/* =========================
   Hero (desktop)
   ========================= */
.hero{
  min-height: calc(100vh - var(--header-h));
  padding: 0;
}
@supports (height: 100dvh){
  .hero{ min-height: calc(100dvh - var(--header-h)); }
}

.hero-grid{
  min-height: calc(100vh - var(--header-h));
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  padding: 50px var(--frame-right) clamp(28px, 4vw, 72px) var(--frame-left);
  column-gap: clamp(18px, 4vw, 72px);
  position: relative;
}

@supports (height: 100dvh){
  .hero-grid{ min-height: calc(100dvh - var(--header-h)); }
}

.hero-title{
  margin: 0 0 clamp(12px, 1.8vw, 22px) 0;
  font-weight: 900;
  font-size: clamp(70px, 8.3vw, 176px);
  letter-spacing: -0.01em;
  padding-left: var(--hero-optical-x);
}

/* HERO TITLE (staggered) */
.home .hero-title--stagger{
  display: none;
}

.home .hero-title--mobile{
  display: block;
}

@media (min-width: 900px){
  .home .hero-title--mobile{
    display: none;
  }

  .home .hero-title--stagger{
    line-height: 0.88;
    text-align: left;
    display: flex;
    flex-direction: column;
    width: max-content;   /* shrink-wrap to the longest line */
    justify-self: start;
    align-self: start;
  }

  .home .hero-title--stagger span{
    width: max-content;
  }

  .home .hero-title--stagger .l1{ margin-left: 0; }
  .home .hero-title--stagger .l2{ margin-left: 3.1ch; }
  .home .hero-title--stagger .l3{ margin-left: 4.4ch; }

  .home .hero-title--stagger .l4{
    align-self: flex-end;          /* right edge of the longest line */
    transform: translateX(0.7ch) rotate(-4deg);
    font-size: 0.38em;
    margin-top: 0.25em;
    font-weight: 700;
  }
}
/* HERO TITLE (staggered) ENDS */
.hero-subtitle{
  margin: 0 0 clamp(12px, 1.3vw, 20px) 0;
  font-weight: 400;
  font-size: clamp(22px, 1.85vw, 32px);
  line-height: 1.4;
  letter-spacing: -0.005em;
  max-width: 39ch;
  padding-left: 5px;
}

.hero-subtitle strong{
  font-weight: 700;
}

/* =========================
   HERO DOWN ARROW
   ========================= */
.hero-down{
  display: none;
}

@media (min-width: 935px){
  .hero-down{
    position: absolute;
    right: var(--arrow-right);
    bottom: var(--bottom-gutter);
    text-decoration: none;
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: var(--arrow-glyph-size);
    height: var(--arrow-glyph-size);
    border-radius: 2px;
  }

  .hero-down-glyph{
    display: inline-block;
    font-weight: var(--arrow-glyph-weight);
    font-size: var(--arrow-glyph-size);
    line-height: 0.78;
    transform: translate3d(0, 0, 0) translateY(var(--hero-arrow-rest-y));
    transition: transform 220ms var(--arrow-motion-ease);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
  }

  .hero-down:focus-visible{
    outline: 2px solid #000;
    outline-offset: 2px;
  }

  .hero-down:focus-visible .hero-down-glyph{
    transform:
      translate3d(0, 0, 0)
      translateY(calc(var(--hero-arrow-rest-y) + var(--hero-arrow-hover-shift)))
      scale3d(1.06, 1.06, 1);
  }

  .hero-down:active .hero-down-glyph{
    transform:
      translate3d(0, 0, 0)
      translateY(calc(var(--hero-arrow-rest-y) + var(--hero-arrow-active-shift)))
      scale3d(0.98, 0.98, 1);
    transition-duration: 90ms;
  }
}

@media (min-width: 935px) and (hover: hover), (min-width: 935px) and (any-hover: hover){
  .hero-down:hover .hero-down-glyph{
    transform:
      translate3d(0, 0, 0)
      translateY(calc(var(--hero-arrow-rest-y) + var(--hero-arrow-hover-shift)))
      scale3d(1.06, 1.06, 1);
  }
}

@media (min-width: 935px){
  .hero-down.is-triggered .hero-down-glyph{
    transform:
      translate3d(0, 0, 0)
      translateY(calc(var(--hero-arrow-rest-y) + var(--hero-arrow-trigger-shift)))
      scale3d(var(--hero-arrow-trigger-scale), var(--hero-arrow-trigger-scale), 1);
    transition-duration: var(--arrow-trigger-ms);
  }
}

/* =========================
   FAQ (native accordion)
   ========================= */

.faq{
  padding-top: 0;
}

#section-faq h2{
  font-weight: 700;
}

.faq-list{
  margin-top: clamp(14px, 2vw, 24px);
  display: grid;
  gap: clamp(12px, 1.4vw, 20px);
  width: var(--content-box-width);
}

/* Base box */
.faq-item{
  border: 3px solid #000;
  border-radius: 2px;
  background: #fff;

  transform: translate3d(0,0,0);
  box-shadow: none;

  transition:
    transform 180ms cubic-bezier(.16, 1, .3, 1),
    box-shadow 180ms cubic-bezier(.16, 1, .3, 1);

  will-change: transform;
}

.faq-item[open]{
  box-shadow: 0 0 0 2px #000;
}

.faq-item summary{
  position: relative;
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  user-select: none;
  outline: none;
}

.faq-item summary::-webkit-details-marker{ display: none; }

/* Question */
.faq-q{
  font-weight: 700;
  font-size: clamp(28px, 2.1vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.006em;
}

/* Focus ring */
.faq-item summary:focus-visible{
  outline: 2px solid #000;
  outline-offset: 3px;
}

/* Divider when OPEN */
.faq-item[open] summary{
  padding: 20px 18px 26px;
}

/* Icon */
.faq-icon{
  display: inline-block;
  font-weight: 700;
  font-size: 3em;
  line-height: 1;

  transform: translate3d(0,0,0);
  transform-origin: 50% 50%;

  transition: transform 220ms cubic-bezier(.16, 1, .3, 1);
  will-change: transform;

  backface-visibility: hidden;
  -webkit-font-smoothing: antialiased;
}

.faq-item[open] .faq-icon{
  transform: rotate(90deg);
}

/* Answer */
.faq-a{
  padding: 16px 18px 18px 18px;
  width: 100%;
}

.faq-a p{
  margin: 0;
  max-width: var(--content-measure);
  width: min(100%, var(--content-measure));
  display: block;
}

/* =========================
   FAQ hover + divider
   ========================= */

.faq-item[open] summary::after{
  content:"";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 5px;
  background: #000;
  pointer-events: none;
}

@media (hover: hover), (any-hover: hover){
  /* Thicker border feel (no reflow) */
  .faq-item:hover{
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 0 0 2px #000;
  }

  /* Arrow: tiny rotate + nudge on hover */
  .faq-item:hover .faq-icon{
    transform: translate3d(2px, 0, 0) rotate(45deg);
  }

  /* Open + hover: keep the 90° */
  .faq-item[open]:hover .faq-icon{
    transform: rotate(135deg) translate3d(2px, 0, 0);
  }
}

@media (max-width: 899px){
.faq-q{ line-height: 1.1;}
}

@media (max-width: 899px){
/* =========================
   Hero (mobile overrides)
   Kill the forced full-screen hero on small screens
   ========================= */
  .hero{
    min-height: auto; /* stop forcing 100vh */
  }

  .hero-grid{
    min-height: auto;
    grid-template-columns: 1fr;
    column-gap: 0;
    padding:  0 var(--frame-right) clamp(24px, 6vh, 48px) var(--frame-left);
  }

  .hero-title{
    font-size: clamp(56px, 14vw, 84px);
    line-height: 1.02;
  }

  .hero-subtitle{
    font-size: clamp(22px, 4.8vw, 28px);
    max-width: 30ch;
    line-height: 1.3;
  }
}

/* Mobile: undo the <br> line breaks */
@media (max-width: 520px){
  .hero-title br{
    display: none;
  }
  /* add spacing where the <br> used to be */
  .hero-title br::after{
    content: " ";
  }
  .hero-title{
    text-wrap: balance;
    letter-spacing: -0.02em;
  }
}
