/* =================================================================
   CIED — Design System
   Dials: Design Variance 7 · Motion 5 · Visual Density 3
   Aesthetic: Clean-luxury medical / Swiss precision meets premium
================================================================= */

/* ----------------------------------------------------------------
   TOKENS
---------------------------------------------------------------- */
:root {
  /* Palette — white base, medical platinum accents */
  --white:        #FFFFFF;
  --off-white:    #F6F5F3;
  --warm-white:   #EFECE8;
  --dark:         #121110;
  --dark-surf:    #1D1B19;
  --text-1:       #181614;
  --text-2:       #5A5652;
  --text-3:       #9A9490;
  --pt:           #ABA69F;   /* platinum accent */
  --pt-light:     #D9D4CE;   /* platinum light  */
  --pt-dark:      #736D65;   /* platinum dark   */

  /* Typography */
  --f-display: 'Cormorant Garamond', Georgia, serif;
  --f-body:    'Manrope', system-ui, -apple-system, sans-serif;

  /* Spacing */
  --sp:    clamp(80px, 10vw, 140px);
  --wrap:  1280px;
  --px:    clamp(20px, 5vw, 64px);
  --nav-h: 72px;

  /* Motion */
  --ease:    cubic-bezier(.25,.1,.25,1);
  --ease-out: cubic-bezier(0,.2,.2,1);
}

/* ----------------------------------------------------------------
   RESET
---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html  { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body  {
  font-family: var(--f-body);
  font-weight: 300;
  color: var(--text-1);
  background: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img   { max-width: 100%; display: block; }
a     { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ----------------------------------------------------------------
   LAYOUT PRIMITIVES
---------------------------------------------------------------- */
.container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--px);
}

.section             { padding-block: var(--sp); }
.section--alt        { background: var(--off-white); }
.section--dark       { background: var(--dark); }

/* ----------------------------------------------------------------
   TYPOGRAPHY SCALE
---------------------------------------------------------------- */
.eyebrow {
  display: block;
  font-family: var(--f-body);
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pt);
  margin-bottom: 1.25rem;
}
.eyebrow--light { color: var(--pt-light); }

.h2 {
  font-family: var(--f-display);
  font-size: clamp(2.125rem, 4.5vw, 3.375rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--text-1);
  margin-bottom: 1.5rem;
}
.h2--light { color: var(--white); }

.lead {
  font-size: clamp(.9375rem, 1.6vw, 1.0625rem);
  font-weight: 300;
  line-height: 1.75;
  color: var(--text-2);
  max-width: 56ch;
}
.lead--light { color: rgba(255,255,255,.58); }

.body {
  font-size: clamp(.9375rem, 1.4vw, 1rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--text-2);
  margin-bottom: 1.25rem;
}

/* ----------------------------------------------------------------
   BUTTONS
---------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--f-body);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  height: 48px;
  padding-inline: 2rem;
  border-radius: 2px;
  transition: background .28s var(--ease), color .28s var(--ease), border-color .28s var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

.btn--primary {
  background: var(--text-1);
  color: var(--white);
}
.btn--primary:hover { background: var(--pt-dark); }

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.38);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.65);
}

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.28);
}
.btn--outline-light:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(255,255,255,.55);
}

.btn--block { width: 100%; }

/* ----------------------------------------------------------------
   LINK ARROW
---------------------------------------------------------------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .875rem;
  font-weight: 400;
  color: var(--text-1);
  transition: gap .22s var(--ease), color .22s;
}
.link-arrow:hover       { gap: .9rem; color: var(--pt-dark); }
.link-arrow--accent     { color: var(--pt); }
.link-arrow--accent:hover { color: var(--pt-light); }

/* ----------------------------------------------------------------
   REVEAL ANIMATION (IntersectionObserver driven)
---------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .72s var(--ease-out), transform .72s var(--ease-out);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Hero content uses CSS keyframes — renders in initial viewport */
@keyframes heroIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero__location { animation: heroIn .8s var(--ease-out) .3s  both; }
.hero__headline { animation: heroIn .9s var(--ease-out) .48s both; }
.hero__copy     { animation: heroIn .8s var(--ease-out) .64s both; }
.hero__actions  { animation: heroIn .8s var(--ease-out) .8s  both; }
.hero__scroll   { animation: heroIn .8s var(--ease-out) 1.1s both; }


/* =================================================================
   NAVIGATION
================================================================= */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 200;
  height: var(--nav-h);
  transition: background .4s var(--ease), box-shadow .4s var(--ease);
}

.nav--solid {
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--pt-light);
}

.nav__container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--px);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1;
  gap: 2px;
}
.nav__logo-mark {
  font-family: var(--f-body);
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: .18em;
  color: var(--white);
  transition: color .4s;
}
.nav--solid .nav__logo-mark { color: var(--text-1); }

.nav__logo-sub {
  font-size: .5rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  transition: color .4s;
}
.nav--solid .nav__logo-sub { color: var(--text-3); }

/* Links */
.nav__links {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}
.nav__link {
  font-size: .8125rem;
  font-weight: 300;
  letter-spacing: .04em;
  color: rgba(255,255,255,.82);
  transition: color .2s;
}
.nav__link:hover { color: var(--white); }
.nav--solid .nav__link       { color: var(--text-2); }
.nav--solid .nav__link:hover { color: var(--text-1); }

/* CTA button in nav */
.nav__cta {
  font-size: .6875rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--white);
  border: 1px solid rgba(255,255,255,.35);
  padding: .5rem 1.25rem;
  border-radius: 2px;
  transition: background .28s var(--ease), border-color .28s var(--ease), color .28s var(--ease);
}
.nav__cta:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.65); }
.nav--solid .nav__cta { color: var(--text-1); border-color: var(--pt-light); }
.nav--solid .nav__cta:hover {
  background: var(--text-1);
  color: var(--white);
  border-color: var(--text-1);
}

/* Burger (mobile) */
.nav__burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--white);
  transition: transform .3s, opacity .3s, background .4s;
}
.nav--solid .nav__burger span { background: var(--text-1); }
.nav__burger.is-open span:first-child { transform: translateY(6px) rotate(45deg); }
.nav__burger.is-open span:last-child  { transform: translateY(-6px) rotate(-45deg); }


/* =================================================================
   HERO
================================================================= */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;        /* content centered vertically, away from fade zones */
  background: var(--white);   /* white shows through transparent mask edges */
  overflow: hidden;
}

/* Video container — no mask-image (breaks mobile); z-index explicit for safe stacking */
.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/*
  Fuzzy gradient fades implemented as ::before / ::after on .hero.
  These DIV-layer overlays ARE composited correctly on top of the video
  on all mobile browsers (iOS Safari, Android Chrome, Samsung Internet).
  mask-image on a video's parent is NOT reliable on mobile — avoid it.

  ::before → top fade  (video → white nav)
  ::after  → bottom fade (video → white about-section)
*/
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;           /* above video (z:auto), below text body (z:2) */
  pointer-events: none;
}

/* Top fade: transparent at centre → white at very top */
.hero::before {
  top: 0;
  height: 22%;
  background: linear-gradient(
    to bottom,
    rgba(255,255,255,1)   0%,
    rgba(255,255,255,.72) 35%,
    rgba(255,255,255,.28) 65%,
    rgba(255,255,255,0)  100%
  );
}

/* Bottom fade: transparent at centre → white at very bottom */
.hero::after {
  bottom: 0;
  height: 24%;
  background: linear-gradient(
    to top,
    rgba(255,255,255,1)   0%,
    rgba(255,255,255,.72) 35%,
    rgba(255,255,255,.28) 65%,
    rgba(255,255,255,0)  100%
  );
}

/*
  Dark scrim — sits inside .hero__media (not masked).
  Provides contrast behind the hero headline in the centre zone.
*/
.hero__dim {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 80% 60% at 50% 55%,
    rgba(10, 8, 6, .52) 0%,
    rgba(10, 8, 6, .28) 55%,
    transparent 100%
  );
}

/* Content positioning — vertically centred, horizontal left-aligned */
.hero__body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-inline: var(--px);
  padding-top: clamp(56px, 6vh, 80px);  /* clear the nav bar */
}

.hero__location {
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--pt);
  margin-bottom: 1.25rem;
}

.hero__headline {
  font-family: var(--f-display);
  font-size: clamp(2.75rem, 6vw, 5rem);   /* slightly tighter for two long lines */
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -.015em;
  color: var(--white);
  text-shadow: 0 2px 24px rgba(0,0,0,.35);
  margin-bottom: 1.5rem;
}
.hero__headline em {
  font-style: italic;
  font-weight: 300;
  color: rgba(255,255,255,.92);
}

.hero__copy {
  font-size: clamp(.9375rem, 1.5vw, 1.0625rem);
  font-weight: 200;
  line-height: 1.7;
  color: rgba(255,255,255,.72);
  text-shadow: 0 1px 12px rgba(0,0,0,.3);
  margin-bottom: 2.5rem;
  max-width: 50ch;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Scroll indicator — positioned at 68% height, inside the unmasked video zone */
.hero__scroll {
  position: absolute;
  top: 68%;
  right: var(--px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: .5;
}
.hero__scroll-line {
  display: block;
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, rgba(255,255,255,.85), transparent);
  animation: scrollPulse 2.4s ease-in-out infinite;
}
.hero__scroll-label {
  font-size: .5rem;
  font-weight: 400;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  writing-mode: vertical-rl;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(1);   opacity: 1;  }
  50%       { transform: scaleY(.5); opacity: .3; }
}


/* =================================================================
   ABOUT
================================================================= */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
}

.about__copy { max-width: 46ch; }

.about__img {
  width: 100%;
  aspect-ratio: 7 / 6;
  object-fit: cover;
  display: block;
}

/* Stats bar flush under the image */
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--pt-light);
  margin-top: 1px;
}
.stat {
  background: var(--white);
  padding: 1.375rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .375rem;
}
.stat__n {
  font-family: var(--f-display);
  font-size: 1.75rem;
  font-weight: 300;
  line-height: 1;
  color: var(--text-1);
}
.stat__l {
  font-size: .625rem;
  font-weight: 400;
  letter-spacing: .04em;
  line-height: 1.45;
  color: var(--text-3);
}


/* =================================================================
   SERVICES
================================================================= */
.services__hd {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(48px, 6vw, 80px);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--pt-light);
}

.svc {
  background: var(--off-white);
  padding: clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: background .3s var(--ease);
}
.svc:hover { background: var(--warm-white); }

.svc__icon {
  color: var(--pt);
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.svc__title {
  font-family: var(--f-body);
  font-size: .9375rem;
  font-weight: 400;
  line-height: 1.3;
  color: var(--text-1);
}

.svc__text {
  font-size: .875rem;
  font-weight: 300;
  line-height: 1.72;
  color: var(--text-2);
  margin-top: auto;
}


/* =================================================================
   FIT TO GO
================================================================= */
.fit__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 7vw, 100px);
  align-items: center;
}

.fit__img-wrap img {
  width: 100%;
  aspect-ratio: 6 / 5;
  object-fit: cover;
  display: block;
}

.fit__copy { max-width: 46ch; }

.fit__list {
  margin: 1.75rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.fit__list li {
  display: flex;
  align-items: center;
  gap: .875rem;
  font-size: .9375rem;
  font-weight: 300;
  color: var(--text-2);
}
.fit__list li::before {
  content: '';
  display: block;
  width: 18px;
  height: 1px;
  background: var(--pt);
  flex-shrink: 0;
}


/* =================================================================
   EDUCATION
================================================================= */
.education__hd {
  max-width: 660px;
  margin-bottom: clamp(48px, 6vw, 72px);
}

.education__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}

.course {
  border: 1px solid rgba(255,255,255,.09);
  padding: clamp(28px, 3vw, 44px);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: border-color .3s var(--ease);
}
.course:hover { border-color: rgba(255,255,255,.22); }

.course__tags { display: flex; gap: .625rem; flex-wrap: wrap; }
.course__tag {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--pt);
  border: 1px solid rgba(171,166,159,.28);
  padding: .3rem .75rem;
  border-radius: 2px;
}

.course__title {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 300;
  line-height: 1.25;
  color: var(--white);
}

.course__text {
  font-size: .875rem;
  font-weight: 300;
  line-height: 1.72;
  color: rgba(255,255,255,.52);
}

.course__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.07);
  margin-top: auto;
}

.course__seats {
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .06em;
  color: rgba(255,255,255,.32);
}

/* Education aside */
.education__aside {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.education__quote {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2.4vw, 1.625rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.55;
  color: rgba(255,255,255,.6);
}


/* =================================================================
   CONTACT
================================================================= */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(48px, 9vw, 128px);
  align-items: start;
}

.contact__info { max-width: 42ch; }

.contact__dl {
  margin-top: 2.5rem;
  border-top: 1px solid var(--pt-light);
}
.contact__row {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: .75rem;
  padding-block: 1rem;
  border-bottom: 1px solid var(--pt-light);
}
.contact__row dt {
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
  padding-top: 3px;
  line-height: 1.4;
}
.contact__row dd {
  font-size: .9375rem;
  font-weight: 300;
  color: var(--text-1);
  line-height: 1.5;
}
.contact__row dd a { transition: color .2s; }
.contact__row dd a:hover { color: var(--pt-dark); }

/* Form */
.contact__form { display: flex; flex-direction: column; gap: 1.375rem; }

.field { display: flex; flex-direction: column; gap: .5rem; }
.field__label {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.field__input {
  font-family: var(--f-body);
  font-size: .9375rem;
  font-weight: 300;
  color: var(--text-1);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--pt-light);
  padding-block: .75rem;
  padding-inline: 0;
  width: 100%;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .22s;
}
.field__input:focus { border-color: var(--pt); }
.field__input::placeholder { color: var(--text-3); font-weight: 300; }

.field__select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 11 7' fill='none'%3E%3Cpath d='M1 1l4.5 4.5L10 1' stroke='%239A9490' stroke-width='1.1' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 1.25rem;
}

.field__textarea { resize: vertical; min-height: 88px; }


/* =================================================================
   FOOTER
================================================================= */
.footer {
  background: var(--dark);
  padding-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(32px, 4vw, 48px);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(40px, 5vw, 64px);
  margin-bottom: clamp(24px, 3vw, 40px);
  border-bottom: 1px solid rgba(255,255,255,.065);
}

.footer__mark {
  display: block;
  font-family: var(--f-body);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: .22em;
  color: var(--white);
  margin-bottom: .75rem;
}
.footer__name {
  font-size: .8125rem;
  font-weight: 300;
  line-height: 1.65;
  color: rgba(255,255,255,.42);
  margin-bottom: .75rem;
}
.footer__loc {
  font-size: .6875rem;
  font-weight: 300;
  letter-spacing: .07em;
  color: rgba(255,255,255,.22);
}

.footer__nav { display: flex; flex-direction: column; gap: .875rem; }
.footer__nav-hd {
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: rgba(255,255,255,.28);
  margin-bottom: .25rem;
}
.footer__nav a, .footer__contact a {
  font-size: .875rem;
  font-weight: 300;
  color: rgba(255,255,255,.46);
  transition: color .2s;
}
.footer__nav a:hover, .footer__contact a:hover { color: rgba(255,255,255,.85); }

.footer__contact { display: flex; flex-direction: column; gap: .875rem; }

.footer__legal {
  font-size: .6875rem;
  font-weight: 300;
  letter-spacing: .04em;
  color: rgba(255,255,255,.18);
  text-align: center;
}


/* =================================================================
   RESPONSIVE
================================================================= */

/* Tablet landscape */
@media (max-width: 1024px) {
  .services__grid  { grid-template-columns: repeat(2, 1fr); }
  .footer__grid    { grid-template-columns: 1fr 1fr; }
}

/* Tablet portrait */
@media (max-width: 768px) {
  /* Nav mobile */
  .nav__burger { display: flex; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 0 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 2rem var(--px);
    gap: 1.75rem;
    transform: translateX(100%);
    opacity: 0;
    pointer-events: none;
    transition: transform .36s var(--ease), opacity .36s var(--ease);
  }
  .nav__links.is-open {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav__link { font-size: .9375rem; color: var(--text-2); }
  .nav__link:hover { color: var(--text-1); }
  .nav__cta { color: var(--text-1); border-color: var(--pt-light); }

  /* Sections */
  .about__grid,
  .fit__grid,
  .contact__grid { grid-template-columns: 1fr; }

  .services__hd { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }

  .education__grid { grid-template-columns: 1fr; }

  .about__stats { grid-template-columns: repeat(3, 1fr); }

  .contact__grid { gap: clamp(40px, 8vw, 64px); }

  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile */
@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .about__stats  { grid-template-columns: 1fr; }
  .footer__grid  { grid-template-columns: 1fr; }
  .contact__row  { grid-template-columns: 1fr; gap: .2rem; }
}


/* =================================================================
   SCROLL SEQUENCE
================================================================= */

/* Outer track — tall div provides scroll travel */
.scroll-seq { background: var(--dark); }
.scroll-seq__track {
  position: relative;
  height: 420vh;          /* 420 - 100 = 320vh of actual scroll travel */
}

/* Sticky inner — pins at viewport top for the full track height */
.scroll-seq__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* Canvas fills the sticky area */
.scroll-seq__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--dark);
}

/* Left-side gradient veil — ensures text contrast on any frame */
.scroll-seq__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(10, 8, 6, .72)  0%,
    rgba(10, 8, 6, .55) 30%,
    rgba(10, 8, 6, .18) 55%,
    transparent        100%
  );
  pointer-events: none;
}

/* Text panel — left side, vertically centred */
.scroll-seq__panel {
  position: absolute;
  left: var(--px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  max-width: min(42ch, 45vw);
}

/* Individual text slides */
.seq-slide {
  display: none;
  flex-direction: column;
  gap: 1rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .45s var(--ease-out), transform .45s var(--ease-out);
}
.seq-slide.is-active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}
.seq-slide.is-prev { display: none; }

.seq-slide__tag {
  font-size: .5625rem;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--pt);
}

.seq-slide__title {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -.015em;
  color: var(--white);
}

.seq-slide__body {
  font-size: clamp(.875rem, 1.3vw, 1rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255,255,255,.58);
  max-width: 38ch;
}

/* Right-side service index navigation */
.seq-index {
  position: absolute;
  right: var(--px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-end;
}
.seq-index__item {
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.3);
  cursor: pointer;
  transition: color .25s var(--ease), letter-spacing .25s var(--ease);
  background: none;
  border: none;
  padding: 0;
  position: relative;
}
.seq-index__item::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: var(--pt);
  transition: width .3s var(--ease);
}
.seq-index__item.is-active {
  color: rgba(255,255,255,.85);
  letter-spacing: .12em;
}
.seq-index__item.is-active::after { width: 100%; }
.seq-index__item:hover { color: rgba(255,255,255,.65); }

/* Progress bar — bottom of sticky */
.seq-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255,255,255,.08);
  z-index: 3;
}
.seq-progress__bar {
  height: 100%;
  background: var(--pt);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
}

/* Loading overlay */
.seq-loader {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: var(--dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  transition: opacity .5s var(--ease), visibility .5s var(--ease);
}
.seq-loader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.seq-loader__text {
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--pt);
}
.seq-loader__track {
  width: 200px;
  height: 1px;
  background: rgba(255,255,255,.1);
  overflow: hidden;
}
.seq-loader__fill {
  height: 100%;
  background: var(--pt);
  transform-origin: left center;
  transform: scaleX(0);
  will-change: transform;
  transition: transform .1s linear;
}

/* Responsive: hide side index on small screens */
@media (max-width: 768px) {
  .scroll-seq__panel { max-width: calc(100% - 2 * var(--px)); }
  .seq-index { display: none; }
  .scroll-seq__veil {
    background: linear-gradient(
      to bottom,
      rgba(10,8,6,.55) 0%,
      rgba(10,8,6,.35) 60%,
      transparent 100%
    );
  }
}


/* =================================================================
   TRIAJE SECTION
================================================================= */
.triaje__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(48px, 8vw, 112px);
  align-items: center;
}

.triaje__info { max-width: 48ch; }

/* Trust list */
.triaje__trust {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: .875rem;
}
.triaje__trust li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .9rem;
  font-weight: 300;
  color: rgba(255,255,255,.52);
}
.triaje__trust li svg { color: var(--pt); flex-shrink: 0; }

/* CTA card */
.triaje__card {
  position: relative;
  border: 1px solid rgba(255,255,255,.08);
  padding: clamp(36px, 5vw, 56px);
  overflow: hidden;
}

/* Ambient SVG background */
.triaje__ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .7;
  pointer-events: none;
}

.triaje__card-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.triaje__card-label {
  font-size: .5625rem;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--pt);
}

.triaje__card-question {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2.5vw, 1.625rem);
  font-weight: 300;
  font-style: italic;
  line-height: 1.45;
  color: rgba(255,255,255,.78);
}

/* Primary triaje CTA button */
.btn--triaje {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--f-body);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 0 2rem;
  height: 52px;
  background: var(--white);
  color: var(--dark);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background .28s var(--ease), color .28s var(--ease), gap .22s var(--ease);
  align-self: flex-start;
}
.btn--triaje:hover {
  background: var(--pt-light);
  gap: 1rem;
}

.triaje__card-note {
  font-size: .625rem;
  font-weight: 300;
  letter-spacing: .08em;
  color: rgba(255,255,255,.25);
}

@media (max-width: 768px) {
  .triaje__grid { grid-template-columns: 1fr; }
  .btn--triaje  { align-self: stretch; justify-content: center; }
}


/* =================================================================
   TRIAJE MODAL
================================================================= */
.tm-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  visibility: hidden;
  pointer-events: none;
}
.tm-modal.is-open {
  visibility: visible;
  pointer-events: all;
}

/* Backdrop */
.tm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 8, 6, .78);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.tm-modal.is-open .tm-modal__backdrop { opacity: 1; }

/* Card */
.tm-modal__card {
  position: relative;
  z-index: 1;
  background: var(--white);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .38s var(--ease-out), transform .38s var(--ease-out);
  overscroll-behavior: contain;
}
.tm-modal.is-open .tm-modal__card {
  opacity: 1;
  transform: translateY(0);
}

/* Modal header */
.tm-modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.75rem 1rem;
  border-bottom: 1px solid var(--pt-light);
  gap: 1rem;
}

.tm-modal__brand {
  font-size: .5rem;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--pt);
  margin-bottom: .25rem;
}

.tm-modal__step-lbl {
  font-size: .75rem;
  font-weight: 300;
  color: var(--text-3);
  letter-spacing: .04em;
}

/* Step dots */
.tm-dots {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.tm-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pt-light);
  transition: background .3s, transform .3s;
}
.tm-dot.is-active  { background: var(--text-1); transform: scale(1.3); }
.tm-dot.is-done    { background: var(--pt); }

.tm-modal__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  border-radius: 2px;
  transition: color .2s, background .2s;
  flex-shrink: 0;
}
.tm-modal__close:hover { color: var(--text-1); background: var(--off-white); }

/* Modal body */
.tm-modal__body {
  padding: 1.75rem;
  flex: 1;
  min-height: 0;
}

@keyframes tmSlideIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}
.tm-slide-in { animation: tmSlideIn .25s var(--ease-out) both; }

/* Question text */
.tm-q {
  font-family: var(--f-display);
  font-size: clamp(1.1rem, 2.5vw, 1.375rem);
  font-weight: 300;
  line-height: 1.4;
  color: var(--text-1);
  margin-bottom: 1.5rem;
}

/* Options grid */
.tm-opts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}

.tm-opt {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--pt-light);
  background: var(--white);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s var(--ease), background .2s var(--ease);
  border-radius: 2px;
}
.tm-opt:hover { border-color: var(--pt); background: var(--off-white); }
.tm-opt.is-sel { border-color: var(--text-1); background: var(--off-white); }
.tm-opt.is-sel .tm-opt__lbl { color: var(--text-1); }

.tm-opt__lbl {
  font-size: .875rem;
  font-weight: 400;
  color: var(--text-1);
  line-height: 1.3;
}
.tm-opt__dsc {
  font-size: .6875rem;
  font-weight: 300;
  color: var(--text-3);
  line-height: 1.4;
}

/* Form fields inside modal */
.tm-form { display: flex; flex-direction: column; gap: 1.25rem; }
.tm-field { display: flex; flex-direction: column; gap: .4rem; }
.tm-field__lbl {
  font-size: .6rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tm-field__inp {
  font-family: var(--f-body);
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-1);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--pt-light);
  padding-block: .75rem;
  outline: none;
  width: 100%;
  transition: border-color .2s;
  border-radius: 0;
  -webkit-appearance: none;
}
.tm-field__inp:focus { border-color: var(--text-1); }
.tm-field__inp.is-err { border-color: #C0392B; }

/* Modal footer */
.tm-modal__foot {
  padding: 1rem 1.75rem 1.5rem;
  border-top: 1px solid var(--pt-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.tm-modal__back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .75rem;
  font-weight: 400;
  color: var(--text-3);
  cursor: pointer;
  transition: color .2s;
  letter-spacing: .04em;
}
.tm-modal__back:hover { color: var(--text-1); }

/* Next button: disabled state */
#tmNext:disabled {
  opacity: .4;
  cursor: not-allowed;
}

/* Responsive: single column options on mobile */
@media (max-width: 480px) {
  .tm-opts { grid-template-columns: 1fr; }
  .tm-modal__head { flex-wrap: wrap; }
}

@media (max-width: 768px) {
  .hero__video {
    object-fit: cover;
  }
}
