/* Keystone Dental Studio — landing page tokens + base
   ---------------------------------------------------
   System per brand book:
   - Two serifs (display + text), one grotesque (UI/labels)
   - Six type sizes, no more
   - Light over light, quiet over staged
   - A color is a decision
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Manrope:wght@300;400;500;600;700&display=swap');

:root {
  /* ---- Color (a color is a decision) ---- */
  /* ---- Finalized brand palette (Brand Standards Manual, June 2026) ---- */

  /* Dark wing — Dr. Ike's Aesthetic Suite. Forest architectural green base. */
  --ink:         #2E312B;   /* Forest */
  --ink-2:       #363A33;
  --ink-3:       #40463D;
  --ink-line:    #4B5147;
  --ink-soft:    #9D9E90;
  --ink-text:    #D9D5C7;

  /* Charcoal — alternating Suite section (deeper, per brand standards) */
  --ink-wine:    #1F1F1D;   /* Charcoal */
  --ink-wine-2:  #272723;
  --ink-wine-line: #3A3A33;

  /* Secondary accent — Taupe Stone (brand has one accent; collapse clay to it) */
  --clay:        #B7A58E;
  --clay-soft:   #C7B9A6;
  --clay-deep:   #93805F;

  /* Light wing — Keystone Dental Studio */
  --cream:       #F7F1E8;   /* Bone */
  --cream-2:     #F2EBDD;
  --bone:        #E9E2D6;   /* Soft Stone */
  --bone-line:   #DBD2C2;
  --bone-soft:   #9C8E78;
  --bone-text:   #46423B;
  --bone-ink:    #1F1F1D;   /* Charcoal */

  /* Accent — Taupe Stone (replaces gold throughout) */
  --gold:        #B7A58E;
  --gold-soft:   #C7B9A6;
  --gold-deep:   #93805F;

  /* ---- Type (two serifs, one grotesque) ---- */
  --font-display:  "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --font-text:     "EB Garamond", "Cormorant Garamond", Georgia, serif;
  --font-ui:       "Manrope", system-ui, -apple-system, sans-serif;

  /* ---- Six sizes. No more. ---- */
  --t-eyebrow: 11px;   /* 1 — eyebrow label  */
  --t-meta:    14px;   /* 2 — micro/meta     */
  --t-body:    18px;   /* 3 — running body   */
  --t-lede:    24px;   /* 4 — lede/subhead   */
  --t-section: 56px;   /* 5 — section title  */
  --t-display: 112px;  /* 6 — display/hero   */

  /* ---- Rhythm ---- */
  --gutter: 64px;
  --section-pad: 140px;
  --rule: 1px;
}

/* ---- Page reset (scoped to the landing) ---- */
.landing,
.landing * {
  box-sizing: border-box;
}

.landing {
  font-family: var(--font-text);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--bone-text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "calt";
}

.landing h1, .landing h2, .landing h3, .landing h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0;
  color: var(--bone-ink);
  text-wrap: balance;
}

.landing p { margin: 0; text-wrap: pretty; }

.landing a { color: inherit; text-decoration: none; }

.landing button { font: inherit; cursor: pointer; }

.landing .eyebrow {
  font-family: var(--font-ui);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bone-soft);
}

.landing .meta {
  font-family: var(--font-ui);
  font-size: var(--t-meta);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--bone-soft);
}

.landing .lede {
  font-family: var(--font-text);
  font-size: var(--t-lede);
  line-height: 1.4;
  color: var(--bone-text);
}

.landing .display {
  font-family: var(--font-display);
  font-size: var(--t-display);
  line-height: 0.96;
  letter-spacing: -0.025em;
  font-weight: 400;
  color: var(--bone-ink);
}

.landing .section-title {
  font-family: var(--font-display);
  font-size: var(--t-section);
  line-height: 1.02;
  letter-spacing: -0.018em;
  font-weight: 400;
}

.landing .italic {
  font-style: italic;
  color: var(--gold-deep);
}

/* ---- Dark wing — toggled by [data-wing="aesthetic"] ---- */
.landing[data-wing="aesthetic"] {
  background: var(--ink);
  color: var(--ink-text);
}
.landing[data-wing="aesthetic"] h1,
.landing[data-wing="aesthetic"] h2,
.landing[data-wing="aesthetic"] h3,
.landing[data-wing="aesthetic"] h4 { color: var(--cream); }
.landing[data-wing="aesthetic"] .eyebrow { color: var(--ink-soft); }
.landing[data-wing="aesthetic"] .meta    { color: var(--ink-soft); }
.landing[data-wing="aesthetic"] .lede    { color: var(--ink-text); }
.landing[data-wing="aesthetic"] .italic  { color: var(--gold); }

/* ---- Suite tonal variation ----------------------------------------------
   Previously every Suite section + the nav shared one flat --ink, reading as
   a single black wall. Now: the nav is its own slightly-raised band, and dark
   sections alternate espresso ↔ deep wine, with the accent alternating
   gold ↔ clay-rose to match the mood board. */
.landing[data-wing="aesthetic"] .kw-nav {
  background: var(--ink-2) !important;
  border-bottom: 1px solid var(--ink-wine-line);
}
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) {
  background: var(--ink-wine);
}
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) .rule {
  background: var(--ink-wine-line);
}
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) .italic {
  color: var(--clay);
}
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) .dot-rule {
  background: var(--clay);
}
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) .ph,
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) .ph > span {
  background: var(--ink-wine-2);
  border-color: var(--ink-wine-line);
}
.landing[data-wing="aesthetic"] section.dark:nth-of-type(even) .numeral {
  color: var(--ink-wine-line);
}

/* Per-section dark — useable inside light page */
.dark {
  background: var(--ink);
  color: var(--ink-text);
}
.dark h1, .dark h2, .dark h3, .dark h4 { color: var(--cream); }
.dark .eyebrow { color: var(--ink-soft); }
.dark .meta    { color: var(--ink-soft); }
.dark .lede    { color: var(--ink-text); }
.dark .italic  { color: var(--gold); }
.dark .rule    { background: var(--ink-line); }

/* ---- Per-section light (default) ---- */
.light .rule { background: var(--bone-line); }

/* ---- Rules / dividers ---- */
.rule {
  display: block;
  width: 100%;
  height: var(--rule);
  background: var(--bone-line);
}

/* ---- Layout container ---- */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

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

.section-sm {
  padding: 96px 0;
}

/* ---- Buttons / CTAs ---- */
.landing .btn,
.btn {
  font-family: var(--font-ui);
  font-size: var(--t-meta);
  font-weight: 500;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 26px;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--bone-ink);
  border-radius: 999px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.landing .btn:hover,
.btn:hover { background: var(--bone-ink); color: var(--cream); }

.landing .btn-filled,
.btn-filled {
  background: var(--bone-ink);
  color: var(--cream);
  border-color: var(--bone-ink);
}
.landing .btn-filled:hover,
.btn-filled:hover { background: var(--ink-2); color: var(--cream); }

.landing .btn-gold,
.btn-gold {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
}
.landing .btn-gold:hover,
.btn-gold:hover {
  background: var(--gold-soft);
  border-color: var(--gold-soft);
}

.landing .dark .btn,
.dark .btn { color: var(--cream); border-color: var(--cream); }
.landing .dark .btn:hover,
.dark .btn:hover { background: var(--cream); color: var(--ink); }
.landing .dark .btn-filled,
.dark .btn-filled { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.landing .dark .btn-filled:hover,
.dark .btn-filled:hover { background: var(--bone); color: var(--ink); }

.btn .arrow {
  display: inline-block;
  width: 14px; height: 1px;
  background: currentColor;
  position: relative;
}
.btn .arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
}

/* ---- Imagery placeholders (light over light, quiet over staged) ---- */
.ph {
  position: relative;
  overflow: hidden;
  background: var(--bone);
  border: 1px solid var(--bone-line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bone-soft);
  font-family: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ph::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 14px,
      rgba(0,0,0,0.025) 14px, rgba(0,0,0,0.025) 15px);
}
.ph > span {
  position: relative;
  background: var(--bone);
  padding: 6px 10px;
  border: 1px solid var(--bone-line);
}
.dark .ph,
.landing[data-wing="aesthetic"] .ph {
  background: var(--ink-2);
  border-color: var(--ink-line);
  color: var(--ink-soft);
}
.dark .ph > span,
.landing[data-wing="aesthetic"] .ph > span {
  background: var(--ink-2);
  border-color: var(--ink-line);
}
.dark .ph::before,
.landing[data-wing="aesthetic"] .ph::before {
  background-image:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 14px,
      rgba(255,255,255,0.025) 14px, rgba(255,255,255,0.025) 15px);
}

/* ---- Numeric markers ---- */
.numeral {
  font-family: var(--font-display);
  font-size: 120px;
  line-height: 1;
  font-weight: 400;
  color: var(--bone-line);
  letter-spacing: -0.02em;
}
.dark .numeral, .landing[data-wing="aesthetic"] .numeral { color: var(--ink-line); }

/* ---- Dotted divider ---- */
.dot-rule {
  height: 6px; width: 6px; border-radius: 50%;
  background: var(--gold);
  display: inline-block;
}

/* ---- The K monogram ---- */
.monogram {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* ---- Subtle in-view fade ---- */
.fade-in { animation: fadeIn 0.6s ease both; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- DIRECTION OVERRIDES ---------- */

/* Direction A — Editorial
   Quiet magazine spread. Loose grid, restrained imagery,
   bigger whitespace, gold accents kept whispered. */
.landing[data-direction="editorial"] {
  --section-pad: 160px;
  --gutter: 80px;
}
.landing[data-direction="editorial"] .display { font-size: 124px; line-height: 0.94; }
.landing[data-direction="editorial"] .section-title { font-size: 64px; }

/* Direction B — Studio
   Cinematic. Tighter grid, layered imagery, bolder italic moments,
   more contrast — feels like walking into the operatory. */
.landing[data-direction="studio"] {
  --section-pad: 120px;
  --gutter: 56px;
}
.landing[data-direction="studio"] .display { font-size: 152px; line-height: 0.92; letter-spacing: -0.035em; }
.landing[data-direction="studio"] .section-title { font-size: 72px; line-height: 0.96; }
.landing[data-direction="studio"] .lede { font-size: 26px; }

/* ---- Misc ---- */
.flex { display: flex; }
.grid { display: grid; }
.row { display: flex; gap: 32px; align-items: center; }
.between { justify-content: space-between; }
.center { align-items: center; }
.fcol { display: flex; flex-direction: column; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }
.gap-48 { gap: 48px; }
.gap-64 { gap: 64px; }

.col-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; }
.col-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 64px; }
.col-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.col-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }

/* Slim scrollbar inside artboards */
.landing::-webkit-scrollbar { width: 0; }

/* ==================================================================
   HERO MARQUEE — continuous rolling photo strip
   ================================================================== */
.kw-marquee {
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 6%, #000 94%, transparent 100%);
}
.kw-marquee-track {
  display: flex;
  gap: 24px;
  width: max-content;
  animation: kwMarquee 60s linear infinite;
}
.kw-marquee:hover .kw-marquee-track { animation-play-state: paused; }
@keyframes kwMarquee {
  from { transform: translateX(0); }
  /* shift by half: the track holds two copies of the 10 slots + the gap that
     follows the first copy, so -50% lands exactly on the duplicate. */
  to   { transform: translateX(calc(-50% - 12px)); }
}
@media (prefers-reduced-motion: reduce) {
  .kw-marquee-track { animation: none; }
}

/* ==================================================================
   STUDIO SERVICE LIBRARY — editorial directory with large artwork
   ================================================================== */
.kw-svc-library { margin-top: 0; }

.kw-svc-entry {
  display: grid;
  grid-template-columns: minmax(0, 47%) minmax(0, 1fr) auto;
  gap: 56px;
  align-items: center;
  padding: 56px 20px;
  margin: 0 -20px;
  border-bottom: 1px solid var(--bone-line);
  color: inherit;
  text-decoration: none;
  transition: background 0.35s ease;
}
.kw-svc-entry:hover { background: color-mix(in oklch, var(--bone) 55%, transparent); }
.kw-svc-entry:focus-visible { outline: 1px solid var(--gold); outline-offset: -4px; }

/* Artwork — the primary visual anchor */
.kw-svc-art {
  position: relative;
  width: 100%;
  height: 340px;
  overflow: hidden;
  background: var(--bone);
  border: 1px solid var(--bone-line);
}
.kw-svc-art img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.kw-svc-entry:hover .kw-svc-art img { transform: scale(1.02); }

/* Copy column */
.kw-svc-body { display: flex; flex-direction: column; gap: 18px; }
.kw-svc-num { font-family: var(--font-ui); letter-spacing: 0.18em; }
.kw-svc-title {
  font-family: var(--font-display);
  font-size: 34px; font-weight: 400; line-height: 1.1;
  letter-spacing: -0.01em;
}
.kw-svc-desc {
  font-family: var(--font-display);
  font-size: 26px; line-height: 1.3; font-weight: 400;
  white-space: pre-line;
  color: var(--bone-text);
  max-width: 30ch;
}

/* Explore */
.kw-svc-cta {
  display: inline-flex; align-items: center; gap: 12px;
  white-space: nowrap;
  transition: color 0.25s ease;
}
.kw-svc-cta > span { transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.kw-svc-entry:hover .kw-svc-cta { color: var(--gold-deep); }
.kw-svc-entry:hover .kw-svc-cta > span { transform: translateX(5px); }

@media (max-width: 1100px) {
  .kw-svc-entry { grid-template-columns: minmax(0, 50%) minmax(0, 1fr); gap: 40px; padding: 44px 16px; }
  .kw-svc-art { height: 280px; }
  .kw-svc-title { font-size: 28px; }
  .kw-svc-desc { font-size: 21px; }
  .kw-svc-cta { grid-column: 2; justify-self: start; }
}

@media (max-width: 720px) {
  .kw-svc-entry {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 40px 0;
    margin: 0;
  }
  .kw-svc-art { height: 260px; }
  .kw-svc-body { gap: 12px; }
  .kw-svc-title { font-size: 26px; }
  .kw-svc-desc { font-size: 19px; max-width: none; }
  .kw-svc-cta { grid-column: 1; }
}
.kw-service-row .meta .arrow,
.kw-service-row { cursor: pointer; }
.kw-service-row:hover {
  background: color-mix(in oklch, currentColor 5%, transparent);
}
.kw-service-row:hover h3 { color: var(--gold-deep); }
.landing[data-wing="aesthetic"] .kw-service-row:hover h3 { color: var(--gold); }

/* ==================================================================
   WING TRANSITION — plays on Studio ↔ Suite switch (wing-transition.jsx)
   ================================================================== */
.wt {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  overflow: hidden;
}
.wt::before { content: ""; position: absolute; inset: 0; }

/* --- Curtain: a solid panel sweeps left → right, covering then revealing --- */
.wt-curtain::before {
  transform: translateX(-100%);
  animation: wtCurtain 1.05s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}
.wt-curtain.to-suite::before  { background: var(--ink); }
.wt-curtain.to-studio::before { background: var(--cream); }
@keyframes wtCurtain {
  0%   { transform: translateX(-100%); }
  45%  { transform: translateX(0); }
  55%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* --- Fade: the screen dips to the new wing color and back --- */
.wt-fade::before {
  opacity: 0;
  animation: wtFade 0.9s ease forwards;
}
.wt-fade.to-suite::before  { background: var(--ink); }
.wt-fade.to-studio::before { background: var(--cream); }
@keyframes wtFade {
  0%   { opacity: 0; }
  42%  { opacity: 1; }
  58%  { opacity: 1; }
  100% { opacity: 0; }
}

/* --- Letterbox: cinema bars close from top & bottom, then open --- */
.wt-letterbox::before { display: none; }
.wt-bar {
  position: absolute; left: 0; right: 0; height: 50%;
  transform: scaleY(0);
}
.wt-letterbox.to-suite  .wt-bar { background: var(--ink); }
.wt-letterbox.to-studio .wt-bar { background: var(--cream); }
.wt-bar-top { top: 0;    transform-origin: top;    animation: wtBar 1.05s cubic-bezier(0.76,0,0.24,1) forwards; }
.wt-bar-bot { bottom: 0; transform-origin: bottom; animation: wtBar 1.05s cubic-bezier(0.76,0,0.24,1) forwards; }
@keyframes wtBar {
  0%   { transform: scaleY(0); }
  45%  { transform: scaleY(1); }
  55%  { transform: scaleY(1); }
  100% { transform: scaleY(0); }
}

/* --- Slide: a panel pushes in from the side you're heading toward --- */
.wt-slide.to-suite::before {
  background: var(--ink);
  transform: translateX(100%);
  animation: wtSlideFromRight 1.05s cubic-bezier(0.76,0,0.24,1) forwards;
}
.wt-slide.to-studio::before {
  background: var(--cream);
  transform: translateX(-100%);
  animation: wtSlideFromLeft 1.05s cubic-bezier(0.76,0,0.24,1) forwards;
}
@keyframes wtSlideFromRight {
  0%   { transform: translateX(100%); }
  45%  { transform: translateX(0); }
  55%  { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}
@keyframes wtSlideFromLeft {
  0%   { transform: translateX(-100%); }
  45%  { transform: translateX(0); }
  55%  { transform: translateX(0); }
  100% { transform: translateX(100%); }
}

/* --- Marker: the wing's roman numeral flashes large at center --- */
.wt-marker { display: flex; align-items: center; justify-content: center; }
.wt-marker::before {
  opacity: 0;
  animation: wtFade 0.9s ease forwards;
}
.wt-marker.to-suite::before  { background: var(--ink); }
.wt-marker.to-studio::before { background: var(--cream); }
.wt-num {
  position: relative;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(140px, 24vw, 360px);
  line-height: 1;
  color: var(--gold);
  opacity: 0;
  transform: scale(0.82);
  animation: wtNum 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
@keyframes wtNum {
  0%   { opacity: 0; transform: scale(0.82); }
  35%  { opacity: 1; transform: scale(1); }
  64%  { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  .wt { display: none !important; }
}


/* ==================================================================
   NAV — kw-nav-row layouts + responsive drawer
   ================================================================== */
.kw-nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.kw-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
@media (max-width: 1100px) {
  .kw-links { display: none; }
  .kw-tag { display: none; }
}
@media (max-width: 720px) {
  .kw-cta { display: none; }
  .kw-wing-toggle { font-size: 9px !important; }
  .kw-burger { display: inline-flex !important; }
}

/* ==================================================================
   BRAND SPLIT — hover interactions
   ================================================================== */
.kw-split-side {
  transition: background 0.3s, transform 0.3s;
}
.kw-split-side:hover {
  background: color-mix(in oklch, currentColor 4%, var(--bone)) !important;
}
.kw-side-aesthetic:hover {
  background: color-mix(in oklch, var(--gold) 8%, var(--ink)) !important;
}
.kw-side-keystone.is-active {
  background: var(--bone) !important;
}
.kw-side-aesthetic.is-active {
  background: var(--ink-2) !important;
}

/* ==================================================================
   MOTION — fade & slide-in on scroll
   Elements with data-reveal get hidden initially; the IntersectionObserver
   in app.jsx adds .is-visible when they come into view.
   ================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}
[data-reveal="up-slow"] { transition-duration: 1.4s; }
[data-reveal="right"] { transform: translateX(-32px); }
[data-reveal="right"].is-visible { transform: none; }

/* Hero type word-by-word fade in. Progressive enhancement — visible by default,
   animates in environments that allow motion. */
.hero-word {
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-word {
    opacity: 0;
    transform: translateY(30px);
    animation: heroIn 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(var(--hero-i, 0) * 0.1s);
  }
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: none; }
  }
}

/* Parallax — JS adds --p-y as translateY based on scroll position */
[data-parallax] {
  will-change: transform;
  transform: translate3d(0, var(--p-y, 0px), 0);
  transition: transform 0.05s linear;
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal], [data-reveal].is-visible,
  [data-parallax] {
    opacity: 1 !important; transform: none !important; animation: none !important;
  }
}

/* ==================================================================
   RESPONSIVE — tablet + mobile
   ================================================================== */
@media (max-width: 1100px) {
  :root {
    --section-pad: 96px;
    --gutter: 40px;
    --t-display: 88px;
    --t-section: 48px;
    --t-lede: 21px;
  }
  .landing[data-direction="editorial"] { --section-pad: 112px; --gutter: 48px; }
  .landing[data-direction="editorial"] .display { font-size: 88px; line-height: 0.98; }
  .landing[data-direction="editorial"] .section-title { font-size: 52px; }
  .col-2, .col-3, .col-4, .col-5 { grid-template-columns: 1fr 1fr; gap: 40px; }
  .col-2 { gap: 56px; }

  /* Brand split — stack to one column well before phone width, otherwise the
     64px inner padding + 220px numeral clip badly. */
  .kw-split {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
  }
  .kw-split > div[style*="left: 50%"] { display: none !important; }
  .kw-split-inner { padding: 48px 32px 44px !important; }
  .kw-split-numeral { font-size: 130px !important; }

  /* About — portrait must not become a tall sliver beside the copy.
     Keep a portrait proportion when stacked so the face stays in frame. */
  .kw-about-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }
  .kw-about-grid image-slot {
    display: block;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    aspect-ratio: 3 / 4;
    height: auto !important;
  }

  /* The desktop link row hides at this width — the burger must take over here,
     not 380px later, or there is no menu affordance at all on tablet. */
  .kw-burger { display: inline-flex !important; }
}

@media (max-width: 720px) {
  :root {
    --section-pad: 64px;
    --gutter: 24px;
    --t-display: 56px;
    --t-section: 36px;
    --t-lede: 18px;
    --t-body: 16px;
    --t-eyebrow: 10px;
  }
  .landing[data-direction="editorial"] { --section-pad: 80px; --gutter: 24px; }
  .landing[data-direction="editorial"] .display { font-size: 56px; line-height: 1; }
  .landing[data-direction="editorial"] .section-title { font-size: 36px; }
  .col-2, .col-3, .col-4, .col-5 { grid-template-columns: 1fr; gap: 40px; }
  .kw-split { grid-template-columns: 1fr !important; }
  .kw-split > div[style*="left: 50%"] { display: none; }
  .kw-split-inner { padding: 40px 24px 36px !important; }
  .kw-split-numeral { font-size: 96px !important; }
  .kw-about-grid image-slot { max-width: 380px; }
  .row { flex-wrap: wrap; gap: 16px; }
  .row.between { flex-wrap: wrap; }
  .container { padding: 0 var(--gutter); }
  .section { padding: 64px 0 !important; }
  .section-sm { padding: 48px 0 !important; }
  /* Override desktop-only inline grids in process / services rows */
  [data-mobile-stack] { grid-template-columns: 1fr !important; gap: 16px !important; }
  /* Smaller hero meta-text right side */
  .meta[style*="text-align: right"] { text-align: left !important; max-width: 100% !important; }
  /* Process rows (Suite 5-visit + services) collapse to one column */
  #process-aesthetic > .container > .fcol > div { grid-template-columns: 1fr !important; gap: 24px !important; }
}

/* Nav — keep the lockup, toggle and CTA on one line without wrapping.
   Below 900px the CTA text is the first thing to go. */
@media (max-width: 900px) {
  .kw-nav-row { gap: 16px; }
  .kw-wing-toggle button { padding: 8px 10px !important; letter-spacing: 0.12em !important; white-space: nowrap; }
  .kw-cta { padding: 12px 18px !important; white-space: nowrap; }
}
@media (max-width: 720px) {
  .kw-nav-row { gap: 12px; }
  .kw-wing-toggle { font-size: 9px !important; }
  .kw-wing-toggle button { padding: 8px 8px !important; }
}
