/* ==========================================================================
   ReliVR Studio — site styles
   Faithful rebuild of the Squarespace site. All design tokens live in
   :root below so the whole look can be re-themed from one place.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Design tokens (values taken from the live Squarespace theme)
   -------------------------------------------------------------------------- */
:root {
  /* palette (grayscale, from the live site) */
  --color-white: hsl(0, 0%, 98%);        /* default section background */
  --color-light: hsl(0, 0%, 100%);       /* "light" theme background   */
  --color-bright: hsl(0, 0%, 86.3%);     /* "bright" theme background (contact band) */
  --color-dark: hsl(0, 0%, 11%);
  --color-black: hsl(0, 0%, 0%);
  --color-text: var(--color-black);
  --color-text-inverse: hsl(0, 0%, 100%);

  /* type */
  --font-body: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --weight-body: 400;
  --weight-heading: 400;
  --weight-strong: 700;

  /* fluid heading scale (mirrors Squarespace: calc((value - 1) * 1.2vw + 1rem)) */
  --size-h1: clamp(2rem, calc(3.6vw + 1rem), 4.125rem);
  --size-h2: clamp(1.5rem, calc(1.8vw + 1rem), 2.6rem);
  --size-h3: clamp(1.3rem, calc(1.32vw + 1rem), 2.2rem);
  --size-h4: clamp(1.1rem, calc(0.48vw + 1rem), 1.45rem);
  --size-body: 1rem;
  --size-nav: 0.85rem;
  --size-site-title: clamp(1.3rem, calc(0.84vw + 1rem), 1.75rem);

  /* layout */
  --page-max-width: 1600px;
  --page-gutter: 3.3vw;
  --section-pad: clamp(3rem, 8vw, 7.5rem);

  /* forms / buttons */
  --input-radius: 1.2em;
  --button-bg: var(--color-black);
  --button-text: hsl(0, 0%, 100%);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: var(--weight-body);
  font-size: var(--size-body);
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-white);
  /* sticky footer */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: var(--weight-heading);
  line-height: 1.15;
  margin: 0 0 0.6em;
}

h1 { font-size: var(--size-h1); }
h2 { font-size: var(--size-h2); }
h3 { font-size: var(--size-h3); }
h4 { font-size: var(--size-h4); line-height: 1.3; }

p {
  margin: 0 0 1em;
}

strong {
  font-weight: var(--weight-strong);
}

a {
  color: inherit;
}

/* --------------------------------------------------------------------------
   Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--page-max-width);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section--bright {
  background: var(--color-bright);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--color-white);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.4rem;
}

.site-title {
  font-family: var(--font-heading);
  font-size: var(--size-site-title);
  text-decoration: none;
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1.6em;
  font-size: var(--size-nav);
}

.site-nav a {
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* mobile nav toggle (burger) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-text);
}

@media (max-width: 767px) {
  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--color-white);
    padding: 0.5rem var(--page-gutter) 1.5rem;
    font-size: 1.3rem;
  }

  .site-nav a {
    padding-block: 0.6em;
  }

  .site-header {
    position: relative;
  }

  .site-nav.is-open {
    display: flex;
  }
}

/* --------------------------------------------------------------------------
   Home: hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  margin-inline: 2.5vw; /* the background image is inset from the page edges */
  min-height: min(51.5vw, 46rem);
  background-image: url("../assets/images/hero-living-room.png");
  background-size: cover;
  background-position: center;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-video {
  /* square video centered inside the hero, nearly full height */
  height: min(48vw, 43rem);
  width: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hero-title {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--color-text-inverse);
  margin: 0;
  padding-inline: 1rem;
}

@media (max-width: 767px) {
  .hero {
    min-height: 100vw;
  }

  .hero-video {
    height: 88vw;
  }
}

/* --------------------------------------------------------------------------
   Home: intro + steps
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 8vw, 9rem);
  align-items: start;
}

.split + .split {
  margin-top: var(--section-pad);
}

.intro-media img {
  max-width: 470px;
  width: 100%;
}

.steps-media {
  justify-self: end;
  align-self: center;
  width: min(100%, 420px);
}

.steps-media video {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.step-title {
  font-size: 1.15rem;
  margin-bottom: 0.35em;
}

@media (max-width: 767px) {
  .split {
    grid-template-columns: minmax(0, 1fr);
  }

  .steps-media {
    justify-self: start;
  }
}

/* --------------------------------------------------------------------------
   Contact band (home, about, contact page)
   -------------------------------------------------------------------------- */
.contact-band .container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 6vw, 7rem);
  align-items: start;
}

.contact-band .contact-intro p {
  max-width: 34em;
}

@media (max-width: 767px) {
  .contact-band .container {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* the contact *page* uses a single narrow centered column instead */
.contact-page {
  max-width: 560px;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   Contact form
   -------------------------------------------------------------------------- */
.contact-form {
  max-width: 640px;
}

.contact-form .field {
  margin-bottom: 1.1rem;
}

.contact-form .field-label {
  display: block;
  margin-bottom: 0.3rem;
}

.contact-form .field-caption {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.3rem;
}

.contact-form .field-caption .required {
  font-size: 0.85em;
  opacity: 0.8;
}

.contact-form .name-row {
  display: grid;
  /* minmax(0, …) lets the inputs shrink below their intrinsic width on phones */
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
  width: 100%;
  min-width: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  border: 1px solid var(--color-black);
  border-radius: var(--input-radius);
  padding: 0.55em 1em;
}

.contact-form textarea {
  min-height: 6.5em;
  resize: vertical;
}

.contact-form .checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.85rem;
}

.contact-form .checkbox-field input {
  width: 1em;
  height: 1em;
  accent-color: var(--color-black);
}

.form-submit {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--button-text);
  background: var(--button-bg);
  border: none;
  border-radius: 999px;
  padding: 0.9em 1.9em;
  cursor: pointer;
  margin-top: 0.5rem;
}

.form-submit:hover {
  opacity: 0.82;
}

.form-status {
  margin-top: 1rem;
}

.form-status[hidden] {
  display: none;
}

/* --------------------------------------------------------------------------
   About page
   -------------------------------------------------------------------------- */
.about-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: start;
}

.about-text p {
  max-width: 36em;
}

.about-media {
  justify-self: end;
  width: 100%;
  max-width: 590px;
}

@media (max-width: 767px) {
  .about-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-media {
    justify-self: start;
  }
}

/* --------------------------------------------------------------------------
   Text pages (FAQ, Samples, Tutorials)
   -------------------------------------------------------------------------- */
.page-title-gap {
  padding-top: clamp(3rem, 10vh, 8rem);
}

.faq-content h4 {
  margin-top: 1.8em;
}

.faq-content h3 + h4,
.faq-content h4:first-child {
  margin-top: 0;
}

.faq-content ol,
.faq-content ul {
  margin: 0 0 1em;
  padding-left: 1.6em;
}

.faq-content li {
  margin-bottom: 0.25em;
}

.samples-content {
  max-width: 640px;
}

.samples-content ol {
  margin: 0 0 1em;
  padding-left: 1.6em;
}

.samples-content li {
  margin-bottom: 0.8em;
}

.samples-content h4 {
  margin-top: 1.6em;
}

.samples-content h3 {
  margin-top: 1.4em;
}

.tutorials-section {
  min-height: 45vh;
  display: flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--color-white);
  padding-block: clamp(2.5rem, 5vw, 5rem);
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, calc(1.1vw + 1rem), 2rem);
  margin: 0;
}

.footer-cols {
  display: grid;
  grid-template-columns: auto auto;
  gap: clamp(2rem, 5vw, 6rem);
}

.footer-cols h3 {
  font-size: 1.05rem;
  margin-bottom: 1.2em;
}

.footer-cols p {
  font-size: 0.85rem;
  margin: 0;
}
