/* =============================================================================================
   Redentive homepage and Services prototype — revision 9 (dialog focus fix, grouped portfolio with galleries)
   Two font families, both self-hosted and used on redentive.com: Montserrat (display), Manrope (text).
   The page is complete without JavaScript; `.motion` (added by script once GSAP is ready) only adds
   the opening sequence and small scroll details on top of the static layout.
   ============================================================================================= */
@font-face { font-family: "Montserrat Variable"; src: url("./fonts/montserrat-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Manrope Variable"; src: url("./fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-display: swap; }

:root {
  --black: #000;                /* the hero photograph's background is pure black */
  --night: #0b0b0c;
  --graphite: #141518;
  --graphite-lift: #1d1f23;
  --ivory: #f2efe8;
  --ivory-soft: #d8d4cb;
  --ivory-muted: #a29e96;
  --rule-dark: rgba(242, 239, 232, 0.16);

  --paper: #f4f0e8;
  --paper-deep: #ebe5da;
  --ink: #141619;
  --ink-muted: #57554f;
  --rule-light: rgba(20, 22, 25, 0.16);

  --teal: #34a8bc;              /* Redentive teal (redentive.com theme) */
  --teal-light: #72c3d1;
  --teal-deep: #177687;         /* teal for text on paper */
  --brand-ink: #0c1722;

  /* The stage every CAD cutout sits on: near-black graphite with a soft lift behind the model. */
  --stage: radial-gradient(78% 72% at 50% 44%, #1d1e22 0%, #131417 56%, #0a0a0c 100%);

  --font-display: "Montserrat Variable", Montserrat, "Helvetica Neue", Arial, sans-serif;
  --font-text: "Manrope Variable", Manrope, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 88px);
  --max: 1360px;
  --pad-x: max(var(--gutter), calc((100% - var(--max)) / 2));
  --header-h: 72px;
}
@media (max-width: 760px) { :root { --header-h: 60px; } }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--black); color-scheme: dark; scroll-padding-top: calc(var(--header-h) + 28px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--black); color: var(--ivory);
  font-family: var(--font-text); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.025em; line-height: 1.06; }
p, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--teal-light); outline-offset: 4px; }
[tabindex="-1"]:focus { outline: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.anchor-alias { display: block; position: relative; height: 0; }

.skip-to-content {
  position: fixed; left: 12px; top: 12px; z-index: 100; padding: 10px 16px; border-radius: 4px;
  background: var(--ivory); color: var(--ink); font-weight: 600; text-decoration: none;
  transform: translateY(-200%); transition: transform 0.2s;
}
.skip-to-content:focus { transform: none; }

/* Actions ------------------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 0.95rem/1 var(--font-text); letter-spacing: 0; text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--teal); color: var(--brand-ink); }
.btn-primary:hover { background: var(--teal-light); }
.btn-ghost { border-color: rgba(242, 239, 232, 0.4); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--ivory); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2a2d31; }
.text-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  font-weight: 600; font-size: 0.98rem; text-decoration: none; color: var(--ivory);
}
.text-link span { transition: transform 0.2s; color: var(--teal); }
.text-link:hover span { transform: translateX(4px); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.eyebrow { font-weight: 600; font-size: 0.95rem; color: var(--teal); margin-bottom: 14px; }

/* =============================================================================================
   HEADER
   ============================================================================================= */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; gap: 28px; padding: 0 var(--pad-x);
  background: transparent; border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.site-header.is-solid, html:not(.js) .site-header { background: #050506; border-color: var(--rule-dark); } /* solid when the script that switches it is absent */
.brand { flex: none; line-height: 0; }
/* The logo file has transparent margins around the artwork; offset them so the art aligns. */
.brand img { height: calc(var(--header-h) * 0.78); width: auto; margin-left: calc(var(--header-h) * 0.78 * 2.99 * -0.056); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: 32px; }
.site-nav a { font-size: 0.93rem; font-weight: 500; text-decoration: none; color: var(--ivory-soft); transition: color 0.2s; }
.site-nav a:hover { color: var(--ivory); }
.header-cta { min-height: 38px; padding: 0 16px; font-size: 0.86rem; }
.menu-toggle {
  position: relative; display: none; align-items: center; gap: 10px; min-height: 44px; padding: 0 2px;
  background: none; border: 0; color: var(--ivory); font: 600 0.88rem var(--font-text); cursor: pointer;
}
/* Widens the touch area to 44 px when only the icon shows, without moving the icon. */
.menu-toggle::before { content: ""; position: absolute; inset: 0 -10px; }
.menu-toggle-icon { display: grid; gap: 5px; width: 20px; }
.menu-toggle-icon i { display: block; height: 1.5px; background: currentColor; transition: transform 0.25s; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon i:first-child { transform: translateY(3.25px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: #050506;
  padding: calc(var(--header-h) + 28px) var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 28px; overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav a { display: block; padding: 12px 0; border-bottom: 1px solid var(--rule-dark); font: 600 1.75rem/1.2 var(--font-display); letter-spacing: -0.02em; text-decoration: none; }
.mobile-menu .btn { align-self: stretch; }
.mobile-menu-foot { display: flex; gap: 24px; color: var(--ivory-soft); }
.mobile-menu-foot a { min-height: 44px; display: inline-flex; align-items: center; }

/* Without script the menu button cannot work, so a plain link to the footer navigation stands in. */
.menu-link { display: none; min-height: 44px; align-items: center; font-weight: 600; font-size: 0.88rem; text-decoration: none; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .header-cta { margin-left: auto; }
  html.js .menu-toggle { display: inline-flex; }
  html:not(.js) .menu-link { display: inline-flex; }
}
@media (max-width: 480px) {
  .site-header { gap: 14px; }
  .header-cta { padding: 0 14px; font-size: 0.82rem; }
  /* icon-only toggle on narrow phones; the label stays available to screen readers */
  .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* =============================================================================================
   CAD STAGE — every cutout CAD design sits on the same graphite stage, contained with breathing
   room. A side the source itself cuts off (flush-*) meets the frame edge instead of floating.
   ============================================================================================= */
.stage {
  --ox: 50%; --oy: 50%;
  position: relative; display: block; overflow: hidden;
  padding: var(--stage-pad, 6%); background: var(--stage); border-radius: 8px;
}
.stage > img { width: 100%; height: 100%; object-fit: contain; object-position: var(--ox) var(--oy); }
.stage.flush-left { --ox: 0%; padding-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.stage.flush-right { --ox: 100%; padding-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.stage.flush-bottom { --oy: 100%; padding-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.stage.flush-left.flush-right { --ox: 50%; }
.stage.flush-top { --oy: 0%; padding-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }

/* =============================================================================================
   1. OPENING — one composition: persistent copy, a shared visual area (photo, then CAD example)
   ============================================================================================= */
.hero { position: relative; background: var(--black); overflow: hidden; }
.hero-stage {
  position: relative; height: 100svh; min-height: 560px;
  display: grid; grid-template-rows: auto minmax(0, 1fr);
  padding: calc(var(--header-h) + clamp(18px, 4.5svh, 52px)) var(--pad-x) clamp(16px, 3svh, 32px);
}
.hero-copy {
  position: relative; z-index: 3;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 22px 64px;
}
.hero-title { font-size: clamp(2.4rem, min(4.7vw, 8.2svh), 5rem); line-height: 1.02; letter-spacing: -0.035em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .line > span { display: block; text-wrap: balance; }
.hero-meta { display: grid; gap: 18px; justify-items: start; padding-bottom: 0.2em; }
.hero-lede { font-size: clamp(1.1rem, 1.45vw, 1.35rem); color: var(--ivory-soft); }

/* The arch (x 15–85 %, y 20–73 % of the photograph) is fitted into the free stage area and centred.
   The photograph's black margins may run under the text; they are pure black like the page. */
.hero-product { position: relative; z-index: 1; container-type: size; min-height: 0; }
.hero-photo { position: absolute; inset: 0; }
.hero-figure {
  --w: min(calc(100cqw / 0.703 * 0.97), calc(100cqh / 0.536 * 0.92), 1536px);
  position: absolute; width: var(--w);
  left: calc(50% - var(--w) * 0.5026);
  top: calc(50% - var(--w) * 0.6667 * 0.4663);
}
.hero-img { width: 100%; height: auto; transform-origin: 50% 62%; }
.hero-caption { position: absolute; z-index: 2; left: 0; bottom: 0; font-size: 0.85rem; color: var(--ivory-muted); }

/* The CAD example. Static (no script, reduced motion): a still below the photograph. */
.cad-example { position: relative; padding: clamp(24px, 4vw, 56px) var(--pad-x) clamp(40px, 6vw, 88px); }
.cad-frame { position: relative; max-width: 860px; margin: 0 auto; }
.cad-canvas { display: none; }
.cad-still { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; background: var(--stage); border-radius: 8px; }
.cad-caption { position: static; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; max-width: 860px; margin: 14px auto 0; }
.cad-caption a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ivory); font-weight: 600; font-size: 0.92rem; text-decoration: none; }
.cad-caption a span { color: var(--teal); transition: transform 0.2s; }
.cad-caption a:hover span { transform: translateX(4px); }
.view-cad { display: none; }

/* With motion: the CAD example shares the visual area and appears as the photograph gives way.
   (The script frames the model into the same area the photograph occupies.) */
.motion .cad-example { position: absolute; inset: 0; z-index: 2; padding: 0; opacity: 0; pointer-events: none; }
/* The model is seen through a soft-edged window on the visual area (below the copy, above the caption
   line; the script sets --win-top / --win-bottom), so the close-up never runs under any text. */
.motion .cad-frame {
  --win-top: 0px; --win-bottom: 0px; --feather: 28px;
  position: absolute; inset: 0; max-width: none; margin: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent var(--win-top), #000 calc(var(--win-top) + var(--feather)), #000 calc(100% - var(--win-bottom) - var(--feather)), transparent calc(100% - var(--win-bottom)));
          mask-image: linear-gradient(to bottom, transparent var(--win-top), #000 calc(var(--win-top) + var(--feather)), #000 calc(100% - var(--win-bottom) - var(--feather)), transparent calc(100% - var(--win-bottom)));
}
.motion:not(.no-webgl) .cad-canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 0.6s; }
.motion .cad-canvas.is-ready { opacity: 1; }
.motion .cad-still { position: absolute; aspect-ratio: auto; background: none; border-radius: 0; transform-origin: 50% 44%; }
.motion .cad-still.is-hidden { display: none; }
.motion .cad-caption { position: absolute; left: var(--pad-x); bottom: clamp(16px, 3svh, 32px); margin: 0; max-width: none; pointer-events: none; color: var(--ivory-muted); font-size: 0.85rem; }
.motion .cad-example.is-shown .cad-caption { pointer-events: auto; } /* clickable only once visible */
/* The route into the service: a quiet pill while the camera moves, emphasised once the sequence ends. */
.motion .cad-caption a {
  min-height: 36px; padding: 0 14px; border: 1px solid rgba(242, 239, 232, 0.28); border-radius: 999px;
  transition: border-color 0.35s, background-color 0.35s, color 0.35s;
}
.motion .cad-example.is-final .cad-caption a { border-color: var(--teal); background: rgba(52, 168, 188, 0.16); }
.motion .cad-example.is-final .cad-caption a:hover { background: rgba(52, 168, 188, 0.28); }

/* Camera-beat readout: Front · Detail · Full arch (desktop, once the live model is shown; decorative).
   Each line fills as its beat plays (--p is set by the script). */
.cad-steps { display: none; }
@media (min-width: 761px) {
  .motion:not(.no-webgl) .cad-example.is-live .cad-steps {
    position: absolute; right: var(--pad-x); bottom: calc(clamp(16px, 3svh, 32px) + 6px);
    display: flex; gap: 16px; pointer-events: none;
    font-size: 0.78rem; font-weight: 600; line-height: 1.2; color: var(--ivory-muted);
  }
}
.cad-steps li { display: grid; gap: 8px; width: 74px; transition: color 0.3s; }
.cad-steps li.is-current { color: var(--ivory); }
.cad-steps i { position: relative; display: block; height: 2px; overflow: hidden; background: rgba(242, 239, 232, 0.18); }
.cad-steps i::after { content: ""; position: absolute; inset: 0; background: var(--teal); transform: scaleX(var(--p, 0)); transform-origin: 0 50%; }

/* Phones: a compact photo-led opening; the CAD example is optional, behind "View CAD example". */
@media (max-width: 760px) {
  .hero-copy { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .hero-title { font-size: clamp(2.3rem, 10.6vw, 3.4rem); }
  .hero-meta { gap: 14px; }
  .hero-meta .actions { gap: 8px 22px; }
  .hero-figure { --w: min(calc(100cqw / 0.703 * 0.98), calc(100cqh / 0.536 * 0.9), 1536px); }
  .hero-stage { height: auto; min-height: min(100svh, 760px); grid-template-rows: auto minmax(300px, 1fr); }
  .motion .view-cad {
    display: inline-flex; align-items: center; position: absolute; z-index: 4; right: var(--pad-x); bottom: clamp(10px, 2.5svh, 24px);
    min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid rgba(242, 239, 232, 0.4);
    background: rgba(5, 5, 6, 0.6); color: var(--ivory); font: 600 0.86rem/1 var(--font-text); cursor: pointer;
  }
  .motion .view-cad[hidden] { display: none; }
  .motion .cad-example { visibility: hidden; transition: opacity 0.45s ease, visibility 0s linear 0.45s; }
  .motion .hero-photo { transition: opacity 0.45s ease; }
  .motion .hero.is-cad .cad-example { opacity: 1; visibility: visible; transition: opacity 0.45s ease 0.1s, visibility 0s; }
  .motion .hero.is-cad .hero-photo { opacity: 0; }
  .motion .cad-caption { right: calc(var(--pad-x) + 150px); bottom: clamp(10px, 2.5svh, 24px); gap: 0 14px; } /* clear of the button */
}

/* Entrance: logo, headline and photograph settle once. The supporting line and actions are not
   animated, so the offer and the primary action are readable immediately. */
@media (prefers-reduced-motion: no-preference) {
  html:not(.force-static) .brand { animation: fade-in 0.7s ease-out both; }
  html:not(.force-static) .hero-title .line > span { animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.05s both; }
  html:not(.force-static) .hero-title .line:nth-child(2) > span { animation-delay: 0.16s; }
  html:not(.force-static) .hero-figure { animation: product-in 1.5s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both; }
}
@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(105%); } }
@keyframes product-in { from { opacity: 0; transform: translateY(28px) scale(1.03); } }

/* =============================================================================================
   2. SERVICES, FIGURES AND WORK
   ============================================================================================= */
.services { position: relative; background: var(--black); padding: clamp(72px, 9vw, 136px) 0 clamp(96px, 11vw, 170px); }
.services-head { position: relative; text-align: center; padding: 0 var(--pad-x); }
.services-head h2 { font-size: clamp(2rem, 3.8vw, 3.6rem); letter-spacing: -0.03em; }
.services-head p { margin-top: 14px; font-size: clamp(1.05rem, 1.35vw, 1.25rem); color: var(--ivory-soft); }

/* Six services in a calm 3 × 2 grid; each opens its section on the Services page. */
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 48px); margin: clamp(48px, 6vw, 80px) var(--pad-x) 0; }
.service-grid li { border-top: 1px solid var(--rule-dark); }
.service-grid li:nth-last-child(-n + 3) { border-bottom: 1px solid var(--rule-dark); }
.service-grid a {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: start;
  min-height: 44px; padding: 22px 0 24px; text-decoration: none;
}
.service-name { font: 600 clamp(1.08rem, 1.45vw, 1.38rem)/1.2 var(--font-display); letter-spacing: -0.015em; transition: color 0.2s; }
.service-note { grid-column: 1; color: var(--ivory-muted); font-size: 0.93rem; line-height: 1.4; }
.service-grid a::after { content: "→"; grid-column: 2; grid-row: 1; color: var(--teal); transition: transform 0.2s; }
.service-grid a:hover .service-name { color: var(--teal-light); }
.service-grid a:hover::after { transform: translateX(3px); }
.services-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px 28px; margin: clamp(22px, 2.5vw, 34px) var(--pad-x) 0; }
.process { color: var(--ivory-muted); font: 600 clamp(1.02rem, 1.3vw, 1.22rem)/1.3 var(--font-display); letter-spacing: -0.01em; }

/* Owner-confirmed figures: two equal halves across the full row, centred, with a quiet divider. */
.proof {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: clamp(44px, 5vw, 72px) var(--pad-x) 0; border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark);
}
.proof-item { display: grid; justify-items: center; align-content: start; gap: 10px; padding: clamp(26px, 3.2vw, 44px) 16px; text-align: center; }
.proof-item + .proof-item { border-left: 1px solid var(--rule-dark); }
.proof-num { font: 600 clamp(2.6rem, 5.6vw, 5.4rem)/1 var(--font-display); letter-spacing: -0.045em; font-variant-numeric: tabular-nums; }
.proof-digits { text-align: center; }
.proof-label { color: var(--ivory-soft); font-size: clamp(0.98rem, 1.2vw, 1.15rem); }

/* No-prep veneers: the heading, sentence and link above; then the printed veneer photograph, the dominant
   image at about 62 % of the width, beside the smaller "Digital design comparison" panel, tops aligned.
   Phones: copy, photograph, panel. */
.noprep {
  display: grid; grid-template-columns: minmax(0, 63fr) minmax(0, 37fr); grid-template-areas: "copy copy" "photo design";
  gap: clamp(28px, 3.5vw, 48px) clamp(24px, 3vw, 44px); align-items: start; margin: clamp(96px, 11vw, 160px) var(--pad-x) 0;
}
.noprep-copy { grid-area: copy; display: grid; gap: 14px; justify-items: start; }
.noprep-copy h3 { font-size: clamp(1.9rem, 3vw, 3rem); letter-spacing: -0.03em; }
.noprep-copy p { color: var(--ivory-soft); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 40ch; }
.noprep-photo { grid-area: photo; }
.noprep-photo picture { display: block; overflow: hidden; border-radius: 8px; }
.noprep-photo img { width: 100%; }
.noprep-photo figcaption, .aox-photo figcaption, .aox-frame figcaption, .detail-moment figcaption {
  margin-top: 12px; font-size: 0.85rem; color: var(--ivory-muted);
}

/* The digital design comparison panel: three CAD examples, one at a time (tabs). The Original scan /
   Proposed veneer design switch appears only for the examples with separate views; Enlarge opens the
   example larger. Every example's media has the same 16:10 shape, so the panel keeps its size when the
   example changes. Without script all three examples show, one below the other. */
.dcomp {
  grid-area: design; display: grid; gap: 14px; align-content: start;
  padding: clamp(16px, 1.8vw, 22px); border: 1px solid var(--rule-dark); border-radius: 12px; background: rgba(242, 239, 232, 0.025);
}
.dcomp-head { display: grid; gap: 12px; }
.dcomp-title { font: 600 1.02rem/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--ivory); }
.dcomp-tabs {
  display: inline-flex; justify-self: start; gap: 2px; padding: 4px; border-radius: 999px;
  background: rgba(242, 239, 232, 0.07); border: 1px solid var(--rule-dark);
}
.dcomp-tabs[hidden] { display: none; }
.dcomp-tabs button {
  min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--ivory-soft); font: 600 0.84rem/1 var(--font-text); transition: background-color 0.2s, color 0.2s;
}
.dcomp-tabs button[aria-selected="true"] { background: var(--ivory); color: var(--ink); }
.dcomp-tabs button:focus-visible { outline-offset: 2px; }
.dcomp-panel { display: grid; gap: 12px; }
.dcomp-panel[hidden] { display: none; }
.dcomp-panel:focus-visible { outline-offset: 4px; border-radius: 8px; }
html:not(.js) .dcomp-panel + .dcomp-panel { padding-top: 14px; border-top: 1px solid var(--rule-dark); }
.dcomp .stage-cmp { aspect-ratio: 16 / 10; --stage-pad: 4% 5%; }
.dcomp-stacked img { aspect-ratio: 16 / 10; }
.dcomp-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-height: 40px; }
.dcomp-controls .view-toggle button { min-height: 36px; padding: 0 12px; font-size: 0.82rem; }
.dcomp-hint { color: var(--ivory-muted); font-size: 0.85rem; }
.dcomp-enlarge {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 16px; margin-left: auto; border-radius: 999px;
  border: 1px solid rgba(242, 239, 232, 0.32); background: transparent; color: var(--ivory); font: 600 0.84rem/1 var(--font-text); cursor: pointer;
  transition: border-color 0.2s;
}
.dcomp-enlarge[hidden] { display: none; }
.dcomp-enlarge:hover { border-color: var(--ivory); }

/* Enlarged comparison (a native modal dialog): the two views of an example one above the other, or the
   one-image example, as large as the screen allows. */
.cmp-viewer {
  width: min(calc(100vw - 32px), 1180px); max-width: none; max-height: calc(100dvh - 32px); margin: auto; padding: 0;
  border: 1px solid var(--rule-dark); border-radius: 12px; background: #0b0b0c; color: var(--ivory);
}
.cmp-viewer::backdrop { background: rgba(5, 5, 6, 0.9); }
.cmp-viewer-inner { display: grid; gap: 14px; padding: clamp(14px, 2.4vw, 26px); }
.cmp-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cmp-viewer-title { font: 600 1.1rem/1.3 var(--font-display); letter-spacing: -0.01em; }
.cmp-viewer-close {
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--ivory);
  background: var(--ivory); color: var(--ink); font: 600 0.92rem/1 var(--font-text); cursor: pointer;
}
.cmp-viewer-body { display: grid; gap: 10px; justify-self: center; width: 100%; }
.cmp-viewer-body.is-pair { width: min(100%, calc((100dvh - 210px) * 1.25)); }
.cmp-viewer-body.is-single { width: min(100%, calc((100dvh - 190px) * 1.6)); }
.cmp-view { position: relative; }
.cmp-view .stage { aspect-ratio: 16 / 6.4; --stage-pad: 3% 5%; }
.cmp-view .img-label { left: 12px; top: 12px; }

/* Precomposed comparison images whose subject runs to the image edge (homepage and Services): shown
   whole, never cropped or masked, with the cut edges on a hairline frame. A split image has its halves
   labelled beneath, each label under its own half. */
.cut-frame img { width: 100%; background: #000; border-radius: 8px; outline: 1px solid rgba(242, 239, 232, 0.14); outline-offset: -1px; }
/* The labels of a precomposed comparison sit on the part of the image they name: the upper and lower
   halves of the stacked veneer image, the left and right halves of the All-on-X split (its divide is at
   48.4 % of the width). They sit on the image's black margins, clear of the teeth. */
.labelled { position: relative; }
.labelled figcaption { margin: 0; }
.img-label {
  position: absolute; padding: 5px 11px; border-radius: 999px; pointer-events: none;
  background: rgba(10, 10, 12, 0.76); color: var(--ivory); font-size: 0.8rem; font-weight: 600; line-height: 1.2;
}
.labelled.stacked .img-label:first-child { left: 2%; top: 3%; }
.labelled.stacked .img-label:last-child { left: 2%; top: 54%; }
.labelled.split .img-label:first-child { left: 2%; top: 3%; }
.labelled.split .img-label:last-child { left: calc(48.4% + 2%); top: 3%; }
@media (max-width: 560px) { .img-label { padding: 4px 9px; font-size: 0.72rem; } }

/* Scan / design comparisons. Without script: each example shows its pair side by side.
   With script: one view at a time, switched for both examples by the control. */
.comparisons { display: grid; gap: 12px; }
.comparison-views { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cview { position: relative; }
.stage-cmp { --stage-pad: 3% 5%; aspect-ratio: 16 / 6.4; }
.cview-label {
  position: absolute; left: 10px; top: 10px; padding: 5px 10px; border-radius: 999px;
  background: rgba(10, 10, 12, 0.74); color: var(--ivory); font-size: 0.78rem; font-weight: 600; line-height: 1.2;
}
.is-switchable .comparison-views { grid-template-columns: minmax(0, 1fr); }
.is-switchable .cview { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity 0.22s ease, visibility 0s linear 0.22s; }
.is-switchable .cview.is-active { opacity: 1; visibility: visible; transition: opacity 0.35s ease 0.18s, visibility 0s; }
.view-toggle { display: inline-flex; flex-wrap: wrap; padding: 4px; border-radius: 999px; background: rgba(242, 239, 232, 0.07); border: 1px solid var(--rule-dark); }
.view-toggle[hidden] { display: none; }
.view-toggle button {
  min-height: 40px; padding: 0 16px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  color: var(--ivory-soft); font: 600 0.88rem/1 var(--font-text); transition: background-color 0.2s, color 0.2s;
}
.view-toggle button[aria-pressed="true"] { background: var(--ivory); color: var(--ink); }
.view-toggle button:focus-visible { outline-offset: 2px; }

/* Same-day All-on-X: the i-bar restoration photograph, whole on black (its own background is black,
   so it needs no frame). The prototype CAD image (Services page) ends at the lower arch and sides; it is
   shown unmasked, its cut edges on a hairline frame. */
.highlight { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(32px, 5vw, 96px); align-items: center; margin: clamp(96px, 11vw, 160px) var(--pad-x) 0; }
.highlight-copy { display: grid; gap: 18px; justify-items: start; }
.highlight-copy h3 { font-size: clamp(1.9rem, 3vw, 3rem); letter-spacing: -0.03em; }
.highlight-copy p { color: var(--ivory-soft); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 30ch; }
.aox-photo picture { display: block; }
.aox-photo img { width: 100%; background: #000; }
.aox-frame img { width: 100%; background: #000; outline: 1px solid rgba(242, 239, 232, 0.14); outline-offset: -1px; }

/* The work: the All-on-X comparison (halves labelled on the image), then the portfolio rows, each tile
   linking to its service. */
.work { margin: clamp(96px, 11vw, 160px) var(--pad-x) 0; }
.work-title { font-size: clamp(1.8rem, 2.8vw, 2.6rem); margin-bottom: clamp(24px, 3vw, 40px); }
.work-feature {
  display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(28px, 4vw, 64px); align-items: end;
  margin-bottom: clamp(56px, 7vw, 104px);
}
.work-feature-copy { display: grid; gap: 14px; justify-items: start; }
.work-feature-copy h3 { font-size: clamp(1.5rem, 2.3vw, 2.2rem); letter-spacing: -0.03em; max-width: 14ch; }
/* The portfolio in justified rows: each tile keeps its image's proportions (--ar on the tile) and the tiles
   in a row share one height. CAD designs on the graphite stage, photographs on black. Phones: one column,
   each tile at its own proportion. */
.portfolio { display: grid; gap: clamp(64px, 7vw, 104px); }
.portfolio-group { display: grid; gap: clamp(28px, 3.5vw, 44px); }
.portfolio-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: -6px; }
.portfolio-title { font-size: clamp(1.25rem, 1.7vw, 1.6rem); letter-spacing: -0.02em; }
/* "View all … views": opens the group's views in the full-image viewer (shown once the list has loaded) */
.portfolio-more {
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(242, 239, 232, 0.4);
  background: transparent; color: var(--ivory); font: 600 0.92rem/1 var(--font-text); cursor: pointer; transition: border-color 0.2s;
}
.portfolio-more:hover { border-color: var(--ivory); }
.portfolio-more[hidden] { display: none; }
.sp-media > .portfolio-more { justify-self: start; }
.portfolio-row { display: flex; align-items: flex-start; gap: clamp(14px, 1.8vw, 24px); }
.case { display: block; text-decoration: none; }
.portfolio .case { flex: var(--ar) 1 0; min-width: 0; }
.case-stage, .case-photo, .case-pair { display: block; aspect-ratio: var(--ar); }
.case-stage { --stage-pad: 7%; }
.case-stage-wide { --stage-pad: 0 5% 6%; } /* the full-arch crown design: the scan runs to its top edge */
.case-photo { overflow: hidden; border-radius: 8px; background: #000; }
.case-photo img { width: 100%; height: 100%; object-fit: contain; }
.case-photo.flush-top { border-top-left-radius: 0; border-top-right-radius: 0; } /* the gingiva runs to the top edge */
/* Anterior crowns: the photographed and the CAD crowns of one supplied composition, without its central
   branding; each part at its own proportion (455 : 341 of 1080), labelled in the dark band between them. */
.case-pair { display: grid; grid-template-rows: minmax(0, 455fr) minmax(0, 341fr); gap: 4px; background: #000; }
.case-pair-part { position: relative; display: block; min-height: 0; }
.case-pair-part img { width: 100%; height: 100%; object-fit: contain; }
.case-pair-part:first-child .img-label { left: 10px; bottom: 6px; }
.case-pair-part:last-child .img-label { left: 10px; top: 6px; }
/* Implant bar & bridge: two separate examples side by side, each part at its own proportion. */
.case-duo { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.9594fr); gap: 4px; aspect-ratio: var(--ar); }
.case-duo-part { position: relative; display: block; min-height: 0; border-radius: 8px; overflow: hidden; }
.case-duo-part.stage { --stage-pad: 5% 6%; }
.case-duo-part > img { width: 100%; height: 100%; object-fit: contain; }
.case-duo-pale { background: #f5f5f5; } /* the visualization keeps its own pale studio background */
.case-duo-part .img-label { left: 10px; top: 10px; }
.case-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin-top: 12px; }
.case-cat { font-size: 0.82rem; color: var(--ivory-muted); }
.case-label { font-weight: 600; font-size: 0.95rem; color: var(--ivory-soft); transition: color 0.2s; }
.case:hover .case-label { color: var(--ivory); }
.case:focus-visible { outline-offset: 6px; }
.work-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: clamp(36px, 4vw, 56px); }

/* Restoration detail: a wide photographic pause between the work and the Academy (not pinned). */
.detail-moment { margin: clamp(96px, 11vw, 160px) var(--pad-x) 0; }
.detail-frame { overflow: hidden; border-radius: 8px; background: #000; }
.detail-frame img { width: 100%; }

@media (max-width: 900px) {
  .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service-grid li:nth-last-child(-n + 3) { border-bottom: 0; }
  .service-grid li:nth-last-child(-n + 2) { border-bottom: 1px solid var(--rule-dark); }
  .noprep { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "photo" "design"; gap: 28px; }
  .highlight { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .highlight-copy { order: -1; }
  .work-feature { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (max-width: 560px) {
  .service-grid { grid-template-columns: minmax(0, 1fr); }
  .service-grid li:nth-last-child(-n + 2) { border-bottom: 0; }
  .service-grid li:last-child { border-bottom: 1px solid var(--rule-dark); }
  .service-grid a { padding: 16px 0 18px; }
  .proof { grid-template-columns: minmax(0, 1fr); }
  .proof-item + .proof-item { border-left: 0; border-top: 1px solid var(--rule-dark); }
  .view-toggle button { padding: 0 12px; font-size: 0.82rem; }
}
@media (max-width: 760px) {
  .portfolio { gap: 28px; }
  .portfolio-row { display: contents; }
  .portfolio-group { gap: 28px; }
  .case-duo { grid-template-columns: minmax(0, 1fr); aspect-ratio: auto; gap: 6px; }
  .case-duo-part { aspect-ratio: var(--ar); }
}
@media (prefers-reduced-motion: reduce) { .is-switchable .cview, .is-switchable .cview.is-active { transition: none; } }
.force-static .is-switchable .cview, .force-static .is-switchable .cview.is-active { transition: none; }

/* =============================================================================================
   3. ACADEMY — calm ivory
   ============================================================================================= */
.academy { background: var(--paper); color: var(--ink); color-scheme: light; padding: clamp(96px, 11vw, 170px) var(--pad-x) clamp(96px, 11vw, 160px); }
.academy :focus-visible { outline-color: var(--teal-deep); }
.academy .eyebrow { color: var(--teal-deep); }
.academy .text-link { color: var(--ink); }
.academy .text-link span { color: var(--teal-deep); }

.academy-intro { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(40px, 6vw, 110px); align-items: end; }
.academy-copy h2 { font-size: clamp(2.4rem, 4.3vw, 4.25rem); letter-spacing: -0.04em; margin-bottom: 22px; }
.academy-lede { font-size: clamp(1.15rem, 1.5vw, 1.4rem); line-height: 1.45; max-width: 26ch; }
.academy-audience { margin: 10px 0 30px; color: var(--ink-muted); }
.formats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; margin-top: clamp(40px, 5vw, 64px); }
.formats a { display: grid; gap: 4px; padding: 16px 0 6px; border-top: 1px solid var(--rule-light); text-decoration: none; min-height: 44px; }
.format-name { font-weight: 650; }
.format-name::after { content: " →"; color: var(--teal-deep); }
.format-note { font-size: 0.9rem; color: var(--ink-muted); }
.formats a:hover .format-name { color: var(--teal-deep); }

.portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; background: #1a1a1a; border-radius: 6px; }
.portrait figcaption { margin-top: 12px; font-size: 0.9rem; color: var(--ink-muted); }

/* Teaching photographs in justified rows: --ar is each photograph's width / height, so the photographs in
   a row share one height and every photograph keeps its whole frame (nothing is cropped). The first row
   leads, the rows below are a little lower. Phones: two columns, each photograph at its own proportion.
   Every photograph opens full size in the viewer. */
.gallery, .gallery-more-grid { --g: 14px; display: grid; gap: 26px; }
.gallery { margin-top: clamp(64px, 8vw, 120px); }
.gallery-row { display: flex; align-items: flex-start; gap: var(--g); }
.gallery-item { flex: var(--ar) 1 0; min-width: 0; }
.gallery-open { display: block; overflow: hidden; border-radius: 6px; background: var(--paper-deep); }
.gallery-open:focus-visible { outline-offset: 3px; }
.gallery-item img { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gallery-open:hover img { transform: scale(1.025); }
.gallery-item figcaption { margin-top: 9px; font-size: 0.85rem; line-height: 1.3; color: var(--ink-muted); }

.gallery-more { margin-top: 20px; }
.gallery-more summary {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ink);
}
.gallery-more summary::-webkit-details-marker { display: none; }
.gallery-more summary::after { content: "+"; color: var(--teal-deep); font-size: 1.25em; line-height: 1; }
.gallery-more[open] summary::after { content: "−"; }
.gallery-more summary:focus-visible { outline-offset: 2px; }
.gallery-more-grid { margin-top: 10px; }

.next-step { margin-top: clamp(80px, 9vw, 140px); }
.next-step h3 { font-size: clamp(1.9rem, 3vw, 2.9rem); letter-spacing: -0.03em; margin-bottom: clamp(24px, 3vw, 40px); }
.topics { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); align-items: start; }
.topic-list { display: flex; flex-direction: column; border-top: 1px solid var(--rule-light); }
.topic {
  position: relative; display: block; width: 100%; min-height: 56px; padding: 16px 12px 16px 22px;
  background: none; border: 0; border-bottom: 1px solid var(--rule-light);
  font: 500 clamp(1.02rem, 1.25vw, 1.15rem)/1.3 var(--font-text); color: var(--ink); text-align: left; cursor: pointer;
}
.topic::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 2px; background: transparent; transition: background-color 0.2s; }
.topic[aria-selected="true"] { font-weight: 700; }
.topic[aria-selected="true"]::before { background: var(--teal-deep); }
.topic:hover { color: var(--teal-deep); }
.topic:focus-visible { outline-offset: -2px; }
/* Before the script runs (or if it fails) the topics are links to the curriculum: an arrow, no selection bar. */
a.topic { padding-right: 40px; text-decoration: none; }
a.topic::after { content: "→" / ""; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--teal-deep); }
.topic-panels { display: grid; gap: 14px; justify-items: start; }
.topic-panel { width: 100%; }
.topic-panel > img { width: 100%; aspect-ratio: 1100 / 700; border-radius: 6px; background: #2c2640; }
.topic-stage { aspect-ratio: 1100 / 700; --stage-pad: 4% 6%; border-radius: 6px; }
.topic-panel p { margin-top: 16px; color: var(--ink-muted); }

@media (max-width: 900px) {
  .academy-intro, .topics { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 520px; }
}
@media (max-width: 760px) {
  .gallery, .gallery-more-grid { display: block; columns: 2; column-gap: 10px; }
  .gallery-row { display: contents; }
  .gallery-item { break-inside: avoid; margin-bottom: 16px; }
}
@media (max-width: 560px) {
  .formats { grid-template-columns: minmax(0, 1fr); } .formats a { padding: 14px 0; }
  .gallery-item figcaption { margin-top: 7px; font-size: 0.8rem; }
}

/* Full-image viewer (a native modal dialog: focus stays inside; Escape closes) */
.viewer {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--ivory);
}
.viewer::backdrop { background: rgba(5, 5, 6, 0.94); }
.viewer[open] { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; }
.viewer-figure { display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; align-items: center; gap: 12px; min-height: 0; width: 100%; padding: clamp(16px, 4vh, 40px) 16px 0; }
.viewer-img { max-width: min(100%, 1400px); max-height: 100%; width: auto; height: auto; min-height: 0; object-fit: contain; border-radius: 4px; }
.viewer-img.is-cutout { background: var(--stage); padding: clamp(12px, 3vw, 40px); }
.viewer-bar { display: flex; gap: 14px; align-items: baseline; color: var(--ivory-soft); font-size: 0.95rem; }
.viewer-count { color: var(--ivory-muted); font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.viewer-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; padding: 16px 16px max(16px, env(safe-area-inset-bottom)); }
.viewer-controls button {
  min-height: 44px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(242, 239, 232, 0.4);
  background: transparent; color: var(--ivory); font: 600 0.92rem/1 var(--font-text); cursor: pointer;
}
.viewer-controls button:hover { border-color: var(--ivory); }
.viewer-controls .viewer-close { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }

/* =============================================================================================
   TESTIMONIALS — real quotes, drawn from assets/testimonials.json; hidden while there are none
   ============================================================================================= */
.voices { background: var(--night); border-top: 1px solid var(--rule-dark); padding: clamp(96px, 11vw, 160px) var(--pad-x); }
.voices[hidden] { display: none; }
.voices-head { text-align: center; margin-bottom: clamp(48px, 6vw, 88px); }
.voices-head h2 { font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -0.04em; }
.voices-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 5vw, 56px) clamp(28px, 4vw, 64px); }
.voices-list[data-count="2"], .voices-list[data-count="4"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1040px; margin-inline: auto; }
.voice { display: flex; flex-direction: column; gap: 28px; padding-top: 30px; border-top: 1px solid var(--rule-dark); }
.voice::before { content: "\201C" / ""; display: block; height: 0.42em; font: 600 3.4rem/1 var(--font-display); color: var(--teal); }
.voice blockquote { margin: 0; }
.voice blockquote p { font: 500 clamp(1.1rem, 1.4vw, 1.32rem)/1.5 var(--font-display); letter-spacing: -0.012em; color: var(--ivory); text-wrap: pretty; }
.voice blockquote p + p { margin-top: 0.8em; }
.voice figcaption { margin-top: auto; display: grid; gap: 3px; }
.voice-name { font-weight: 650; }
.voice-role { font-size: 0.9rem; color: var(--ivory-muted); }
/* A few words are set large. */
.voice--short blockquote p { font-size: clamp(1.55rem, 2.3vw, 2.15rem); font-weight: 600; line-height: 1.14; letter-spacing: -0.035em; text-wrap: balance; }
/* The message as it was received; opens full size in the viewer. */
.voice-shot { display: block; align-self: start; overflow: hidden; border-radius: 12px; border: 1px solid var(--rule-dark); background: #161717; transition: border-color 0.2s; }
.voice-shot img { width: 100%; height: auto; }
.voice-shot:hover { border-color: rgba(242, 239, 232, 0.4); }
.voices-note { margin-top: clamp(32px, 4vw, 56px); text-align: center; font-size: 0.85rem; color: var(--ivory-muted); }
/* Rows shared across the columns: the quote marks, the words, the names and the screenshots each line up. */
@supports (grid-template-rows: subgrid) {
  .voice { display: grid; grid-template-rows: subgrid; grid-row: span 4; row-gap: 24px; }
  .voice figcaption { margin-top: 0; align-self: start; }
  .voice blockquote { align-self: start; }
}
/* One quote alone is set large and centred. */
.voices-list[data-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 940px; margin-inline: auto; text-align: center; }
.voices-list[data-count="1"] .voice { border-top: 0; padding-top: 0; align-items: center; }
.voices-list[data-count="1"] .voice blockquote p { font-size: clamp(1.4rem, 2.5vw, 2.3rem); line-height: 1.32; letter-spacing: -0.025em; }
.voices-sample-note {
  max-width: 720px; margin: 0 auto clamp(32px, 4vw, 48px); padding: 12px 18px; border: 1px dashed var(--teal); border-radius: 8px;
  text-align: center; font-size: 0.92rem; color: var(--teal-light);
}
@media (max-width: 900px) {
  .voices-list, .voices-list[data-count="2"], .voices-list[data-count="4"] { grid-template-columns: minmax(0, 1fr); max-width: 620px; margin-inline: auto; }
}

/* =============================================================================================
   4. CLOSING AND FOOTER
   ============================================================================================= */
.closing { background: var(--black); text-align: center; padding: clamp(110px, 16svh, 200px) var(--pad-x); }
.closing h2 { font-size: clamp(2.2rem, 4vw, 4rem); letter-spacing: -0.04em; }
.closing .actions { justify-content: center; margin-top: 32px; }

.site-footer {
  background: var(--black); border-top: 1px solid var(--rule-dark);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  padding: 40px var(--pad-x) 32px;
}
.footer-logo { width: 210px; margin-left: calc(210px * -0.056); }
.footer-nav ul { display: flex; flex-wrap: wrap; gap: 8px 26px; }
.footer-nav a { font-size: 0.92rem; color: var(--ivory-soft); text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.footer-nav a:hover { color: var(--ivory); }
.footer-legal { width: 100%; font-size: 0.82rem; color: var(--ivory-muted); }

/* =============================================================================================
   Motion-only presentation details (script-enabled, reduced motion not requested)
   ============================================================================================= */
/* (In-page links scroll smoothly by script; a CSS smooth-scroll setting would also delay arrivals.) */
.motion .hero-photo, .motion .cad-example { will-change: opacity; }

/* =============================================================================================
   SERVICES PAGE (/services/)
   ============================================================================================= */
.sp figure figcaption, .sp-figure figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--ivory-muted); }
.sp-intro {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 5vw, 80px); align-items: end;
  padding: calc(var(--header-h) + clamp(64px, 10vw, 140px)) var(--pad-x) clamp(56px, 7vw, 96px);
}
.sp-intro h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); letter-spacing: -0.04em; max-width: 14ch; }
.sp-lede { margin: 22px 0 30px; max-width: 44ch; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--ivory-soft); }
.sp-facts { margin-top: 30px; color: var(--ivory-muted); }
.sp-facts strong { color: var(--ivory); font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.sp-fact { white-space: nowrap; }
.sp-index { grid-column: 1 / -1; margin-top: clamp(8px, 1.5vw, 20px); }
.sp-index ul { display: flex; flex-wrap: wrap; gap: 10px; }
.sp-index a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--rule-dark); text-decoration: none; font-weight: 600; font-size: 0.92rem; color: var(--ivory-soft);
  transition: border-color 0.2s, color 0.2s;
}
.sp-index a:hover { border-color: var(--ivory); color: var(--ivory); }
.sp-detail img { width: 100%; border-radius: 8px; }

.sp-service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start;
  padding: clamp(72px, 9vw, 130px) var(--pad-x); border-top: 1px solid var(--rule-dark);
}
.sp-text { display: grid; gap: 14px; justify-items: start; align-content: start; }
.sp-text h2 { font-size: clamp(2rem, 3.4vw, 3.2rem); letter-spacing: -0.03em; }
.sp-text h3:not(.sp-send-title) { font-size: clamp(1.6rem, 2.4vw, 2.3rem); letter-spacing: -0.03em; }
.sp-text p { color: var(--ivory-soft); max-width: 46ch; }
.sp-text .sp-note { color: var(--ivory-muted); font-size: 0.95rem; }
.sp-send-title { margin-top: 12px; font: 600 0.95rem/1.3 var(--font-text); letter-spacing: 0; color: var(--ivory); }
.sp-send { display: grid; gap: 8px; margin-bottom: 8px; }
.sp-send li { position: relative; padding-left: 18px; color: var(--ivory-soft); }
.sp-send li::before { content: ""; position: absolute; left: 0; top: 0.68em; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.sp-media { display: grid; gap: 18px; }
.sp-media-pair { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.sp-media-narrow { max-width: 460px; }
.sp-media-trio { display: grid; gap: 14px; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; } /* three views of one design */
.sp-media figure > img, .sp-media picture img { width: 100%; border-radius: 8px; }
.sp-media .aox-secondary { width: min(100%, 440px); } /* supporting CAD view under the i-bar photograph */
.sp-stage { aspect-ratio: 4 / 3; --stage-pad: 7%; }
.sp-stage-tall { aspect-ratio: 4 / 5; }
.sp-stage-arch { aspect-ratio: 3.1; --stage-pad: 0 5% 6%; } /* the full-arch crown design: the scan runs to its top edge */
.sp-photo { --ar: 2.4; }
.sp-media .sp-pale img { background: #f5f5f5; }
.sp-sub {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start;
  margin-top: clamp(40px, 6vw, 80px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--rule-dark);
}
.sp-comparisons .comparison-views { gap: 8px; }
/* No-prep Veneers: the description and what to send above; below them, as on the homepage, the printed
   photograph (about 62 %) beside the smaller digital design comparison panel. */
.sp-noprep .noprep-media { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 63fr) minmax(0, 37fr); gap: clamp(24px, 3vw, 44px); align-items: start; }
.sp-noprep .noprep-photo, .sp-noprep .dcomp { grid-area: auto; }
.sp-steps { padding: clamp(72px, 9vw, 130px) var(--pad-x); border-top: 1px solid var(--rule-dark); }
.sp-steps h2 { font-size: clamp(1.8rem, 2.8vw, 2.6rem); margin-bottom: clamp(28px, 4vw, 48px); }
.sp-steps ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; counter-reset: step; }
.sp-steps li { border-top: 1px solid var(--rule-dark); padding-top: 18px; color: var(--ivory-soft); }
.sp-steps strong { display: block; margin-bottom: 6px; font-family: var(--font-display); font-size: 1.2rem; color: var(--ivory); }
/* Questions: plain answers, one open at a time is not enforced; without script they simply open. */
.sp-faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(28px, 5vw, 88px); padding: clamp(72px, 9vw, 130px) var(--pad-x); border-top: 1px solid var(--rule-dark); }
.sp-faq h2 { font-size: clamp(1.8rem, 2.8vw, 2.6rem); }
.sp-faq-list { border-top: 1px solid var(--rule-dark); }
.sp-faq details { border-bottom: 1px solid var(--rule-dark); }
.sp-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; padding: 14px 0; cursor: pointer; list-style: none;
  font: 600 clamp(1.02rem, 1.3vw, 1.18rem)/1.3 var(--font-display); letter-spacing: -0.01em; color: var(--ivory);
}
.sp-faq summary::-webkit-details-marker { display: none; }
.sp-faq summary::after { content: "+" / ""; flex: none; color: var(--teal); font: 400 1.5rem/1 var(--font-text); }
.sp-faq details[open] summary::after { content: "−" / ""; }
.sp-faq summary:hover { color: var(--teal-light); }
.sp-faq summary:focus-visible { outline-offset: 2px; }
.sp-faq details p { max-width: 62ch; padding: 0 0 22px; color: var(--ivory-soft); }
.sp-faq details a { color: var(--teal-light); text-underline-offset: 3px; }
@media (max-width: 900px) { .sp-faq { grid-template-columns: minmax(0, 1fr); } }
.subpage .closing { border-top: 1px solid var(--rule-dark); }

@media (max-width: 900px) {
  .sp-intro, .sp-service, .sp-sub, .sp-noprep .noprep-media { grid-template-columns: minmax(0, 1fr); }
  .sp-steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .sp-media-pair, .sp-media-trio, .sp-steps ol { grid-template-columns: minmax(0, 1fr); }
  .sp-comparisons .comparison-views { grid-template-columns: minmax(0, 1fr); }
  .sp-sep { display: none; }
  .sp-fact { display: block; }
}

/* =============================================================================================
   ACADEMY PAGE (/academy/): dark and ivory chapters, one quiet accent (teal), generous space.
   The page is complete without script; with it, the milestone index marks the current milestone
   and sections settle in gently once (never with reduced motion).
   ============================================================================================= */
.ac .ac-head { display: grid; gap: 18px; max-width: 760px; }
.ac .ac-head .eyebrow { margin-bottom: 0; }
.ac h2 { font-size: clamp(2.2rem, 4.2vw, 4rem); letter-spacing: -0.04em; line-height: 1.02; }
.ac-lede { font-size: clamp(1.08rem, 1.35vw, 1.28rem); line-height: 1.5; max-width: 44ch; }

/* Hero ------------------------------------------------------------------------------------------ */
.ac-hero {
  position: relative; display: grid; align-items: end; overflow: hidden; isolation: isolate;
  min-height: min(100svh, 1000px); padding: calc(var(--header-h) + 64px) var(--pad-x) clamp(48px, 8svh, 96px);
}
.ac-hero-media { position: absolute; inset: 0 0 0 40%; z-index: -2; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 26%); mask-image: linear-gradient(90deg, transparent 0%, #000 26%); }
.ac-hero-media img { width: 100%; height: 100%; object-fit: cover; object-position: 58% 42%; }
.ac-hero::before { /* darkened only where the words sit: left and bottom */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 30%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 20%);
}
.ac-hero-inner { display: grid; gap: 22px; justify-items: start; max-width: min(640px, 48%); }
.ac-hero-inner .eyebrow { margin-bottom: 0; }
.ac-hero h1 { font-size: clamp(2.6rem, 5.2vw, 5.1rem); letter-spacing: -0.048em; line-height: 0.98; max-width: 14ch; }
.ac-hero-lede { font-size: clamp(1.1rem, 1.45vw, 1.35rem); line-height: 1.45; color: var(--ivory-soft); max-width: 40ch; }
.ac-hero .actions { margin-top: 8px; }
.ac-hero-credit { display: flex; align-items: center; gap: 14px; margin-top: 10px; font-size: 0.9rem; color: var(--ivory-muted); }
.ac-hero-credit::before { content: ""; width: 36px; height: 1px; background: var(--ivory-muted); }

/* The curriculum at a glance */
.ac-topics { border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark); padding: 0 var(--pad-x); }
.ac-topics ul { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 28px; }
.ac-topics a {
  display: inline-flex; align-items: center; gap: 12px; min-height: 64px; text-decoration: none;
  font-size: 0.92rem; font-weight: 500; color: var(--ivory-soft); transition: color 0.2s;
}
.ac-topics li:not(:first-child) a::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--teal); }
.ac-topics a:hover { color: var(--ivory); }

/* Formats (ivory) --------------------------------------------------------------------------------- */
.ac-formats, .ac-instructor, .ac-visit { background: var(--paper); color: var(--ink); color-scheme: light; }
.ac-formats :focus-visible, .ac-instructor :focus-visible, .ac-visit :focus-visible { outline-color: var(--teal-deep); }
.ac-formats .eyebrow, .ac-instructor .eyebrow, .ac-visit .eyebrow { color: var(--teal-deep); }
.ac-formats .ac-lede, .ac-instructor .ac-lede, .ac-visit .ac-lede { color: var(--ink-muted); }
.ac-formats .text-link, .ac-visit .text-link { color: var(--ink); }
.ac-formats .text-link span, .ac-visit .text-link span { color: var(--teal-deep); }
.ac-formats { padding: clamp(96px, 11vw, 168px) var(--pad-x) clamp(96px, 11vw, 160px); }
.ac-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 24px); margin-top: clamp(48px, 6vw, 80px); }
.ac-card {
  display: flex; flex-direction: column; gap: 16px; padding: clamp(28px, 2.8vw, 44px);
  background: #fbf9f4; border: 1px solid var(--rule-light); border-radius: 18px;
}
.ac-card h3 { font-size: clamp(1.45rem, 1.9vw, 1.85rem); letter-spacing: -0.03em; line-height: 1.1; }
.ac-card > p:not(.ac-card-tag):not(.ac-card-format) { color: var(--ink-muted); }
.ac-card-tag { display: flex; align-items: center; justify-content: space-between; font-size: 0.82rem; font-weight: 600; color: var(--teal-deep); }
.ac-num { font-family: var(--font-display); font-weight: 500; font-size: 0.82rem; letter-spacing: 0.04em; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ac-card-format { margin-top: -8px; font-size: 0.92rem; font-weight: 600; color: var(--ink); }
.ac-card .ac-ticks { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--rule-light); }
.ac-card .text-link { margin-top: auto; padding-top: 8px; }
.ac-card-lead { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.ac-card-lead :focus-visible { outline-color: var(--teal-light); }
.ac-card-lead .ac-card-tag { color: var(--teal-light); }
.ac-card-lead .ac-num, .ac-card-lead > p:not(.ac-card-tag):not(.ac-card-format) { color: #b9b5ad; }
.ac-card-lead .ac-card-format, .ac-card-lead .text-link { color: var(--paper); }
.ac-card-lead .text-link span { color: var(--teal-light); }
.ac-card-lead .ac-ticks { border-color: rgba(244, 240, 232, 0.16); }
.ac-card-lead .ac-ticks li { color: #dcd8cf; }

/* Ticked lists (a short teal stroke, not a bullet) */
.ac-ticks { display: grid; gap: 10px; }
.ac-ticks li { position: relative; padding-left: 26px; font-size: 0.97rem; line-height: 1.45; color: var(--ink); }
.ac-ticks li::before { content: ""; position: absolute; left: 0; top: calc(0.72em - 1px); width: 13px; height: 2px; background: var(--teal); }
.ac-hourly .ac-ticks li { color: var(--ivory-soft); }

/* Mentorship (dark) -------------------------------------------------------------------------------- */
.ac-mentor { padding: clamp(104px, 12vw, 180px) var(--pad-x) clamp(96px, 11vw, 160px); }
.ac-head-wide { max-width: 900px; }
.ac-mentor .ac-lede { color: var(--ivory-soft); }
.ac-mentor-body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(40px, 6vw, 110px); margin-top: clamp(56px, 7vw, 104px); }
.ac-index { position: sticky; top: calc(var(--header-h) + 44px); align-self: start; display: grid; gap: 32px; }
.ac-index ol { display: grid; border-left: 1px solid var(--rule-dark); }
.ac-index ol a {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 4px; padding: 14px 0 14px 22px;
  text-decoration: none; color: var(--ivory-muted); transition: color 0.3s;
}
.ac-index ol a::before { content: ""; position: absolute; left: -1px; top: 10px; bottom: 10px; width: 2px; background: var(--teal); transform: scaleY(0); transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ac-index ol a:hover { color: var(--ivory-soft); }
.ac-index ol a.is-current { color: var(--ivory); }
.ac-index ol a.is-current::before { transform: scaleY(1); }
.ac-index-num { font-family: var(--font-display); font-size: 0.85rem; font-weight: 500; font-variant-numeric: tabular-nums; padding-top: 2px; }
.ac-index-name { font-weight: 600; font-size: 0.98rem; line-height: 1.35; }
.ac-index-cta { justify-self: start; }

.ac-milestones { display: grid; }
.ac-ms { display: grid; gap: 26px; padding: clamp(48px, 5vw, 72px) 0; border-top: 1px solid var(--rule-dark); scroll-margin-top: calc(var(--header-h) + 16px); }
.ac-ms:first-child { padding-top: 0; border-top: 0; }
.ac-ms-num { font-family: var(--font-display); font-weight: 200; font-size: clamp(3.6rem, 6.5vw, 6.4rem); line-height: 0.85; letter-spacing: -0.05em; color: var(--teal); font-variant-numeric: tabular-nums; }
.ac-ms h3 { font-size: clamp(1.75rem, 2.7vw, 2.6rem); letter-spacing: -0.035em; line-height: 1.06; max-width: 20ch; margin-top: -6px; }
.ac-ms-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; }
.ac-ms-meta div { display: inline-flex; align-items: baseline; gap: 8px; padding: 8px 14px; border: 1px solid var(--rule-dark); border-radius: 999px; }
.ac-ms-meta dt { font-size: 0.78rem; color: var(--ivory-muted); }
.ac-ms-meta dd { margin: 0; font-size: 0.9rem; font-weight: 600; color: var(--ivory); }
.ac-ms-figure img { width: 100%; height: auto; border-radius: 12px; background: #111; outline: 1px solid rgba(242, 239, 232, 0.1); outline-offset: -1px; }
.ac-ms-figure figcaption { margin-top: 10px; font-size: 0.85rem; color: var(--ivory-muted); }
.ac-ms-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.ac-ms-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.ac-ms-topics li { padding: 13px 0; border-top: 1px solid var(--rule-dark); color: var(--ivory-soft); font-size: 0.98rem; line-height: 1.4; }
.ac-ms-goal { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; padding-top: 6px; font-family: var(--font-display); font-weight: 500; font-size: clamp(1.15rem, 1.5vw, 1.4rem); letter-spacing: -0.02em; line-height: 1.3; color: var(--ivory); }
.ac-ms-goal span { font-family: var(--font-text); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); }

.ac-callout {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px;
  margin-top: clamp(48px, 6vw, 88px); padding: clamp(28px, 3.4vw, 48px);
  border: 1px solid var(--rule-dark); border-radius: 20px;
  background: radial-gradient(120% 140% at 0% 0%, rgba(52, 168, 188, 0.14) 0%, rgba(52, 168, 188, 0) 55%), var(--graphite);
}
.ac-callout h3 { font-size: clamp(1.5rem, 2.2vw, 2.1rem); letter-spacing: -0.03em; }
.ac-callout p { margin-top: 8px; color: var(--ivory-soft); max-width: 52ch; }

/* Instructor (ivory) ------------------------------------------------------------------------------- */
.ac-instructor {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 120px); align-items: center;
  padding: clamp(96px, 11vw, 160px) var(--pad-x);
}
.ac-portrait img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 14%; border-radius: 14px; background: #1a1a1a; }
.ac-instructor-copy { display: grid; gap: 20px; justify-items: start; max-width: 620px; }
.ac-instructor-copy .eyebrow { margin-bottom: 0; }
.ac-instructor-copy > p:not(.eyebrow):not(.ac-lede) { color: var(--ink-muted); max-width: 52ch; }
.ac-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; margin: 18px 0 0; border-top: 1px solid var(--rule-light); }
.ac-facts div { padding: 22px 0 0; }
.ac-facts div + div { padding-left: clamp(20px, 3vw, 40px); border-left: 1px solid var(--rule-light); }
.ac-facts dt { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 3vw, 2.8rem); letter-spacing: -0.04em; line-height: 1; }
.ac-facts dd { margin: 8px 0 0; font-size: 0.92rem; color: var(--ink-muted); }

/* Hourly (dark) ---------------------------------------------------------------------------------- */
.ac-hourly {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(40px, 7vw, 120px); align-items: center;
  padding: clamp(104px, 12vw, 176px) var(--pad-x);
}
.ac-hourly-copy { display: grid; gap: 20px; }
.ac-hourly-copy .eyebrow { margin-bottom: 0; }
.ac-hourly .ac-lede { color: var(--ivory-soft); }
.ac-session {
  display: grid; gap: 22px; padding: clamp(30px, 3.4vw, 48px); border-radius: 20px;
  border: 1px solid var(--rule-dark); background: linear-gradient(160deg, #1b1d21 0%, #111214 100%);
}
.ac-session-kicker { font-size: 0.85rem; font-weight: 600; color: var(--teal); }
.ac-session-length { margin-top: -12px; font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 3.2vw, 2.9rem); letter-spacing: -0.04em; line-height: 1; }
.ac-session .ac-ticks { padding-top: 22px; border-top: 1px solid var(--rule-dark); }
.ac-session-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.ac-session-note { font-size: 0.85rem; color: var(--ivory-muted); }

/* Visits (ivory) --------------------------------------------------------------------------------- */
.ac-visit { padding: clamp(96px, 11vw, 168px) var(--pad-x) clamp(96px, 11vw, 160px); }
.ac-visit-intro { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 100px); align-items: end; }
.ac-visit-side { display: grid; gap: 28px; }
.ac-gallery { margin-top: clamp(56px, 7vw, 96px); }
.ac-gallery-more { margin-top: 26px; }

/* Closing (dark) ---------------------------------------------------------------------------------- */
.ac-closing .closing-inner { display: grid; justify-items: center; gap: 18px; }
.ac-closing .eyebrow { margin-bottom: 0; }
.ac-closing-lede { color: var(--ivory-soft); font-size: clamp(1.05rem, 1.3vw, 1.2rem); max-width: 46ch; }
.ac-closing-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100%, 1080px); margin-top: clamp(28px, 4vw, 48px); border-top: 1px solid var(--rule-dark); text-align: left; }
.ac-closing-options li + li { border-left: 1px solid var(--rule-dark); }
.ac-closing-options a { display: grid; gap: 6px; padding: 26px clamp(18px, 2.4vw, 32px) 10px; text-decoration: none; min-height: 44px; }
.ac-co-name { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.1rem, 1.5vw, 1.35rem); letter-spacing: -0.02em; }
.ac-co-name::after { content: " \2192"; color: var(--teal); }
.ac-co-note { font-size: 0.88rem; color: var(--ivory-muted); }
.ac-closing-options a:hover .ac-co-name { color: var(--teal-light); }

/* Gentle reveal (script-enabled, motion allowed): each block settles in once. */
.ac-reveal [data-reveal] { opacity: 0; transform: translateY(26px); 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); }
.ac-reveal [data-reveal].is-in { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .ac-cards { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
}
@media (max-width: 900px) {
  .ac-mentor-body, .ac-instructor, .ac-hourly, .ac-visit-intro { grid-template-columns: minmax(0, 1fr); }
  .ac-index { display: none; } /* the curriculum band under the opening links to each milestone */
  /* Narrow screens: the photograph above, fading into black, and the words on black below it. */
  .ac-hero { display: block; min-height: 0; padding: 0 0 48px; }
  .ac-hero::before { content: none; }
  .ac-hero-media { position: relative; inset: auto; z-index: 0; display: block; height: min(58svh, 560px); -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
  .ac-hero-media img { object-position: 66% 40%; }
  .ac-hero-inner { position: relative; z-index: 1; max-width: none; margin-top: -56px; padding: 0 var(--pad-x); }
  .ac-portrait { max-width: 440px; }
  .ac-closing-options { grid-template-columns: minmax(0, 1fr); }
  .ac-closing-options li + li { border-left: 0; border-top: 1px solid var(--rule-dark); }
  .ac-closing-options a { padding: 20px 4px; }
}
@media (max-width: 760px) {
  .ac-topics ul { justify-content: flex-start; gap: 0 18px; padding: 8px 0; }
  .ac-topics a { min-height: 44px; font-size: 0.86rem; }
}
@media (max-width: 560px) {
  .ac-ms-topics, .ac-ms-pair { grid-template-columns: minmax(0, 1fr); }
  .ac-hero .actions .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { .ac-reveal [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* Academy v2 refinements ---------------------------------------------------------------------------- */
/* Headlines break into balanced lines; paragraphs avoid a single word on the last line. */
.ac h1, .ac h2, .ac h3 { text-wrap: balance; }
.ac p, .ac li { text-wrap: pretty; }

/* Curriculum band: evenly spaced subjects with a teal dot between them; one swipeable row on phones. */
.ac-topics ul { justify-content: center; gap: 0; }
.ac-topics li { display: flex; align-items: center; }
.ac-topics li + li::before { content: ""; width: 4px; height: 4px; margin: 0 clamp(16px, 2.4vw, 40px); border-radius: 50%; background: var(--teal); opacity: 0.85; }
.ac-topics li:not(:first-child) a::before { content: none; }
.ac-topics a { white-space: nowrap; }

/* The mentorship at a glance */
.ac-spec { display: flex; flex-wrap: wrap; gap: 0; margin: 10px 0 0; border-top: 1px solid var(--rule-dark); }
.ac-spec div { padding: 18px clamp(20px, 3vw, 44px) 0 0; margin-right: clamp(20px, 3vw, 44px); }
.ac-spec div + div { padding-left: clamp(20px, 3vw, 44px); border-left: 1px solid var(--rule-dark); margin-right: 0; }
.ac-spec dt { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ivory-muted); }
.ac-spec dd { margin: 6px 0 0; font-weight: 600; color: var(--ivory); }

/* Milestone images open full size; a quiet hint appears on hover or keyboard focus. */
.ac-ms-figure .gallery-open { position: relative; display: block; border-radius: 12px; background: #111; overflow: hidden; }
.ac-ms-figure .gallery-open img { transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.ac-ms-figure .gallery-open:hover img { transform: scale(1.015); }
.ac-zoom-hint {
  position: absolute; right: 12px; bottom: 12px; padding: 7px 13px; border-radius: 999px;
  background: rgba(10, 10, 12, 0.78); color: var(--ivory); font-size: 0.78rem; font-weight: 600;
  opacity: 0; transform: translateY(4px); transition: opacity 0.25s, transform 0.25s; pointer-events: none;
}
.ac-ms-figure .gallery-open:hover .ac-zoom-hint, .ac-ms-figure .gallery-open:focus-visible .ac-zoom-hint { opacity: 1; transform: none; }
@media (hover: none) { .ac-zoom-hint { opacity: 1; transform: none; } } /* touch screens: always shown */

/* How the mentorship begins */
.ac-callout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.ac-callout-head p { margin-top: 10px; }
.ac-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2vw, 28px); counter-reset: none; }
.ac-steps li { display: grid; gap: 6px; align-content: start; padding-top: 16px; border-top: 1px solid var(--rule-dark); }
.ac-step-num { font-family: var(--font-display); font-weight: 300; font-size: 1.6rem; line-height: 1; color: var(--teal); margin-bottom: 6px; }
.ac-steps strong { font-weight: 650; color: var(--ivory); }
.ac-steps li > span:last-child { font-size: 0.93rem; line-height: 1.45; color: var(--ivory-soft); }
.ac-callout-cta { grid-column: 2; justify-self: start; }

/* The opening settles in once on load (script present, motion allowed). */
@keyframes acRise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes acSettle { from { transform: scale(1.06); } to { transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  html.js:not(.force-static) .ac-hero-inner > * { animation: acRise 1s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  html.js:not(.force-static) .ac-hero-inner > :nth-child(2) { animation-delay: 0.08s; }
  html.js:not(.force-static) .ac-hero-inner > :nth-child(3) { animation-delay: 0.18s; }
  html.js:not(.force-static) .ac-hero-inner > :nth-child(4) { animation-delay: 0.28s; }
  html.js:not(.force-static) .ac-hero-inner > :nth-child(5) { animation-delay: 0.38s; }
  html.js:not(.force-static) .ac-hero-media img { animation: acSettle 2.2s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
}

@media (max-width: 900px) {
  .ac-callout { grid-template-columns: minmax(0, 1fr); }
  .ac-callout-cta { grid-column: auto; }
}
@media (max-width: 760px) {
  .ac-topics { padding: 0; }
  .ac-topics ul {
    flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
    padding: 6px var(--pad-x);
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 40px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 40px), transparent 100%);
  }
  .ac-topics ul::-webkit-scrollbar { display: none; }
  .ac-topics li { scroll-snap-align: start; }
  .ac-topics li + li::before { margin: 0 16px; }
  .ac-steps { grid-template-columns: minmax(0, 1fr); }
  .ac-spec div, .ac-spec div + div { padding: 14px 0 0; margin-right: 0; border-left: 0; width: 100%; }
  .ac-spec { display: grid; border-top: 0; }
  .ac-spec div { border-top: 1px solid var(--rule-dark); padding-bottom: 12px; display: flex; justify-content: space-between; gap: 16px; align-items: baseline; }
  .ac-spec dd { margin: 0; text-align: right; }
  .ac-ms-meta div { padding: 6px 12px; }
  .ac-ms-meta dd { font-size: 0.85rem; }
}
.ac-spec { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
.ac-hero-media::after { content: ""; position: absolute; inset: 0 0 auto; height: 160px; background: linear-gradient(180deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%); pointer-events: none; }
@media (max-width: 760px) { .ac-spec { grid-template-columns: minmax(0, 1fr); } }
@media (min-width: 761px) { .ac-spec dd { white-space: nowrap; } }
.ac-session-length span { font-family: var(--font-text); font-size: 0.95rem; font-weight: 600; letter-spacing: 0; color: var(--ivory-muted); }

/* =============================================================================================
   CONTACT PAGE (/contact-submit-case/): Submit a case, Request pricing and training inquiries.
   One form (Fluent Forms, form 8) with three headings. The form rules below style the markup the
   plugin prints, so nothing has to change inside the plugin; the plugin's own stylesheet is not
   loaded on this page.
   ============================================================================================= */
.ct [hidden] { display: none !important; }
.ct-grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 110px); align-items: start;
  padding: calc(var(--header-h) + clamp(56px, 8vw, 120px)) var(--pad-x) clamp(72px, 9vw, 130px);
}
.ct-side { position: sticky; top: calc(var(--header-h) + 40px); display: grid; gap: clamp(36px, 4vw, 56px); }
.ct-intro .eyebrow { margin-bottom: 18px; }
.ct-intro h1, .ct-intro .ct-title { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(2.6rem, 5.2vw, 4.8rem); letter-spacing: -0.045em; line-height: 0.98; }
.ct-lede { margin-top: 22px; max-width: 34ch; font-size: clamp(1.1rem, 1.4vw, 1.3rem); line-height: 1.45; color: var(--ivory-soft); }
.ct-aside { display: grid; gap: 32px; max-width: 460px; padding-top: 32px; border-top: 1px solid var(--rule-dark); }
.ct-aside-title { margin-bottom: 14px; font: 600 0.95rem/1.3 var(--font-text); letter-spacing: 0; color: var(--ivory); }
.ct .ac-ticks li { color: var(--ivory-soft); }
.ct-note { margin-top: 16px; font-size: 0.9rem; color: var(--ivory-muted); }
.ct-note:has(a) { margin-top: 4px; }
.ct-note a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ivory-soft); text-underline-offset: 3px; }
.ct-note a:hover { color: var(--ivory); }
.ct-direct .ct-aside-title { margin-bottom: 4px; }
.ct-direct ul { display: flex; flex-wrap: wrap; gap: 0 28px; }

.ct-form {
  padding: clamp(20px, 2.6vw, 36px); border-radius: 20px; border: 1px solid var(--rule-dark);
  background: linear-gradient(160deg, #1b1d21 0%, #111214 100%);
  scroll-margin-top: calc(var(--header-h) + 20px);
}
/* The chooser: three links that work as plain links and, with script, switch in place. */
.ct-modes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px;
  margin-bottom: clamp(26px, 3vw, 38px); border-radius: 999px; border: 1px solid var(--rule-dark); background: #0b0b0c;
}
.ct-modes a {
  display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 4px 10px; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; line-height: 1.15; text-align: center; text-decoration: none; color: var(--ivory-soft);
  transition: background-color 0.2s, color 0.2s;
}
.ct-modes a:hover { color: var(--ivory); }
.ct-modes a[aria-current="true"] { background: var(--ivory); color: var(--ink); }
.ct-modes a:focus-visible { outline-offset: 2px; }

/* The form itself: two columns for the short fields, full width for everything else. */
.ct-form .fluentform fieldset { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 18px; }
.ct-form .ff-el-group { grid-column: 1 / -1; min-width: 0; margin: 0; }
.ct-form .ff-el-group:has(input.ff-el-form-control),
.ct-form .ff-el-group:has(select[name="i_am_a"]),
.ct-form .ff-el-group:has(select[name="estimated_monthly_volume"]) { grid-column: auto; }
.ct[data-mode="training"] .ct-form .ff-el-group:has(select[name="estimated_monthly_volume"]) { display: none; } /* a design-volume question */
.ct-form .ff-custom_html h3 { margin: 0 !important; font: 600 1.25rem/1.2 var(--font-display); letter-spacing: -0.02em; color: var(--ivory); }
.ct-form .ff-custom_html p { margin: 6px 0 0 !important; max-width: 54ch; font-size: 0.92rem; color: var(--ivory-muted) !important; }
.ct-form .ff-custom_html ~ .ff-custom_html { margin-top: 12px; padding-top: 30px; border-top: 1px solid var(--rule-dark); }
.ct-form .ff-custom_html:focus { outline: none; }

.ct-form .ff-el-input--label { margin-bottom: 8px; }
.ct-form .ff-el-input--label label { font-weight: 600; font-size: 0.88rem; color: var(--ivory-soft); }
.ct-form .ff-el-is-required label::after { content: " *"; color: var(--teal-light); }
.ct-form .ff-el-input--label:not(.ff-el-is-required) label::after { content: " (optional)"; font-weight: 500; color: var(--ivory-muted); }
.ct-form .ff-el-tooltip { display: none; }

.ct-form .ff-el-form-control {
  display: block; width: 100%; min-height: 52px; margin: 0; padding: 0 16px; border-radius: 10px;
  border: 1px solid rgba(242, 239, 232, 0.2); background-color: #0b0b0c; color: var(--ivory); box-shadow: none;
  font: 500 1rem/1.4 var(--font-text); -webkit-appearance: none; appearance: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.ct-form .ff-el-form-control::placeholder { color: #8e8a83; opacity: 1; }
.ct-form .ff-el-form-control:hover { border-color: rgba(242, 239, 232, 0.4); }
.ct-form .ff-el-form-control:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(52, 168, 188, 0.3); }
.ct-form .ff-el-form-control:-webkit-autofill {
  -webkit-text-fill-color: var(--ivory); caret-color: var(--ivory);
  box-shadow: 0 0 0 1000px #0b0b0c inset; transition: background-color 9999s;
}
.ct-form .ff-el-form-control:-webkit-autofill:focus { box-shadow: 0 0 0 1000px #0b0b0c inset, 0 0 0 3px rgba(52, 168, 188, 0.3); }
.ct-form select.ff-el-form-control {
  padding-right: 44px; cursor: pointer; text-overflow: ellipsis;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%228%22 viewBox=%220 0 12 8%22%3E%3Cpath d=%22M1 1.5l5 5 5-5%22 fill=%22none%22 stroke=%22%23d8d4cb%22 stroke-width=%221.6%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 12px 8px;
}
.ct-form select.ff-el-form-control:has(option[value=""]:checked) { color: #8e8a83; } /* nothing chosen yet reads as a placeholder */
.ct-form select.ff-el-form-control option { color: var(--ivory); background: #141518; }
.ct-form textarea.ff-el-form-control { min-height: 160px; padding: 14px 16px; line-height: 1.5; resize: vertical; }

.ct-form .ff-el-is-error .ff-el-form-control { border-color: #e58a78; }
.ct-form .ff-el-is-error .ff-el-form-control:focus { box-shadow: 0 0 0 3px rgba(229, 138, 120, 0.3); }
.ct-form .ff-el-input--content .error, .ct-form .text-danger { margin-top: 7px; font-size: 0.85rem; color: #f2ab9c; }
.ct-form .ff-errors-in-stack:not(:empty) { margin-top: 16px; font-size: 0.9rem; color: #f2ab9c; }

.ct-form .ff_submit_btn_wrapper { margin-top: 6px; }
.ct-form form.frm-fluent-form .ff-btn-submit.ff-btn-submit:not(.ff_btn_no_style) {
  display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 32px;
  border: 0; border-radius: 999px; background: var(--teal); color: var(--brand-ink);
  font: 600 1rem/1 var(--font-text); cursor: pointer; transition: background-color 0.2s;
}
.ct-form form.frm-fluent-form .ff-btn-submit.ff-btn-submit:not(.ff_btn_no_style):hover { background: var(--teal-light); }
.ct-form .ff-btn-submit[disabled] { opacity: 0.6; cursor: default; }
.ct-form .ff-message-success {
  padding: 26px 28px; border-radius: 14px; border: 1px solid rgba(52, 168, 188, 0.5); background: rgba(52, 168, 188, 0.09);
  font-size: 1.05rem; color: var(--ivory);
}
.ct-form .ff-message-success:focus { outline: none; }
.ct-form .ff-message-success strong { display: block; margin-bottom: 6px; font: 600 1.35rem/1.2 var(--font-display); letter-spacing: -0.02em; }
.preview-flag { display: block; margin-top: 14px; font-size: 0.88rem; color: var(--ivory-muted); }

.ct-steps h2 { letter-spacing: -0.03em; }

@media (max-height: 780px) { .ct-side { position: static; } }
@media (max-width: 900px) {
  .ct-grid { grid-template-columns: minmax(0, 1fr); }
  /* Heading, then the form, then the checklist and direct contacts. */
  .ct-side { display: contents; }
  .ct-intro { order: 1; }
  .ct-form { order: 2; }
  .ct-aside { order: 3; max-width: none; }
}
@media (max-width: 560px) {
  .ct-form .fluentform fieldset { grid-template-columns: minmax(0, 1fr); }
  .ct-form .ff-el-group { grid-column: 1 / -1 !important; }
  .ct-form form.frm-fluent-form .ff-btn-submit.ff-btn-submit:not(.ff_btn_no_style) { width: 100%; }
  .ct-modes { border-radius: 18px; }
  .ct-modes a { min-height: 48px; padding: 4px 6px; border-radius: 14px; font-size: 0.84rem; }
}

/* =============================================================================================
   SHOP (/shop/) AND PRODUCT PAGES (/product/…/): the WooCommerce shop in the site's own design.
   Product names, descriptions, images and prices are WooCommerce's; only the presentation is new.
   ============================================================================================= */
.shop .ac-ticks li { color: var(--ivory-soft); }
.shop-intro { padding: calc(var(--header-h) + clamp(64px, 10vw, 140px)) var(--pad-x) clamp(48px, 6vw, 88px); }
.shop-intro h1 { font-size: clamp(2.4rem, 5vw, 4.6rem); letter-spacing: -0.04em; max-width: 16ch; }
.shop-lede { margin-top: 22px; max-width: 46ch; font-size: clamp(1.1rem, 1.4vw, 1.3rem); color: var(--ivory-soft); }
.shop-intro .actions { margin-top: 30px; }
.preview-note { min-height: 72svh; }
.preview-note h1 { max-width: 18ch; }

.shop-list { padding: 0 var(--pad-x) clamp(72px, 9vw, 130px); }
.shop-item {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 88px); align-items: center;
  padding: clamp(28px, 4vw, 56px) 0; border-top: 1px solid var(--rule-dark);
}
.shop-item-media { display: block; overflow: hidden; border-radius: 14px; background: #060a10; }
.shop-item-media img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.shop-item:hover .shop-item-media img { transform: scale(1.02); }
.shop-item-body { display: grid; gap: 16px; justify-items: start; }
.shop-kicker { font-size: 0.85rem; font-weight: 600; color: var(--teal); }
.shop-item h2 { font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -0.035em; line-height: 1.06; }
.shop-item h2 a { text-decoration: none; }
.shop-item h2 a:hover { color: var(--teal-light); }
.shop-version {
  display: inline-block; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--rule-dark); vertical-align: middle;
  font: 600 0.8rem/1 var(--font-text); letter-spacing: 0; color: var(--ivory-soft); white-space: nowrap;
}
.shop-item-text { max-width: 44ch; color: var(--ivory-soft); }
.shop-price { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-display); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.shop-price-amount { font-size: clamp(2rem, 3vw, 2.7rem); }
.shop-price-unit { font: 500 0.95rem/1 var(--font-text); letter-spacing: 0; color: var(--ivory-muted); }
.shop-item .actions { margin-top: 8px; }

/* Product page ------------------------------------------------------------------------------------ */
.pd-top {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); grid-template-areas: "crumbs crumbs" "gallery summary";
  gap: clamp(18px, 2.2vw, 30px) clamp(32px, 5vw, 88px); align-items: start;
  padding: calc(var(--header-h) + clamp(28px, 4vw, 56px)) var(--pad-x) clamp(72px, 9vw, 130px);
}
.pd-crumbs { grid-area: crumbs; }
.pd-crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; font-size: 0.88rem; color: var(--ivory-muted); }
.pd-crumbs li + li::before { content: "/"; margin-right: 10px; }
.pd-crumbs a { display: inline-flex; align-items: center; min-height: 32px; color: var(--ivory-soft); text-decoration: none; }
.pd-crumbs a:hover { color: var(--ivory); }
.pd-gallery { grid-area: gallery; display: grid; gap: 12px; }
.pd-gallery .gallery-open { background: #060a10; }
.pd-main .gallery-open { border-radius: 14px; }
.pd-main img { width: 100%; height: auto; }
/* The other images in one justified row: each keeps its whole frame, all at one height. */
.pd-thumbs { display: flex; align-items: flex-start; gap: 12px; }
.pd-thumbs figure { flex: var(--ar) 1 0; min-width: 0; }
.pd-thumbs .gallery-open { border-radius: 10px; }
.pd-thumbs img { width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1); }
.pd-summary {
  grid-area: summary; position: sticky; top: calc(var(--header-h) + 32px);
  display: grid; gap: 18px; justify-items: start; padding-top: clamp(0px, 2vw, 28px);
}
.pd-summary h1 { font-size: clamp(2.1rem, 3.6vw, 3.4rem); letter-spacing: -0.04em; line-height: 1.03; }
.pd-short { max-width: 46ch; font-size: 1.05rem; color: var(--ivory-soft); }
.pd-buy { width: 100%; margin: 4px 0 0; }
.pd-add { min-height: 54px; padding: 0 36px; font-size: 1rem; cursor: pointer; }
.pd-format { width: 100%; padding-top: 22px; border-top: 1px solid var(--rule-dark); }

.pd-detail {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(40px, 6vw, 110px); align-items: start;
  padding: clamp(88px, 10vw, 150px) var(--pad-x); background: var(--paper); color: var(--ink); color-scheme: light;
}
.pd-detail .eyebrow { color: var(--teal-deep); }
.pd-detail h2 { font-size: clamp(1.9rem, 3.2vw, 3rem); letter-spacing: -0.035em; line-height: 1.06; }
.pd-lede { margin-top: 20px; max-width: 44ch; font-size: 1.08rem; color: var(--ink-muted); }
.pd-lists { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); }
.pd-lists h3 { margin-bottom: 18px; padding-bottom: 14px; border-bottom: 1px solid var(--rule-light); font: 600 1rem/1.3 var(--font-text); letter-spacing: 0; }
.pd-detail .ac-ticks li { color: var(--ink); }

.pd-why { padding: clamp(96px, 11vw, 170px) var(--pad-x); }
.pd-why > div { max-width: 980px; }
.pd-statement { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 2.9vw, 2.7rem); letter-spacing: -0.03em; line-height: 1.16; }
.pd-why-text { margin-top: 24px; max-width: 50ch; font-size: 1.1rem; color: var(--ivory-soft); }

.pd-closing .closing-inner { display: grid; justify-items: center; gap: 16px; }
.pd-closing h2 { max-width: 20ch; font-size: clamp(1.8rem, 3vw, 2.8rem); letter-spacing: -0.035em; }
.pd-closing .actions { margin-top: 12px; }
.pd-note { max-width: 68ch; margin-top: clamp(28px, 4vw, 48px); font-size: 0.85rem; color: var(--ivory-muted); }
.pd-note strong { font-weight: 600; color: var(--ivory-soft); }

@media (max-height: 760px) { .pd-summary { position: static; } }
@media (max-width: 900px) {
  .shop-item, .pd-detail { grid-template-columns: minmax(0, 1fr); }
  .pd-top { grid-template-columns: minmax(0, 1fr); grid-template-areas: "crumbs" "gallery" "summary"; }
  .pd-summary { position: static; padding-top: 12px; }
}
@media (max-width: 560px) {
  .pd-lists { grid-template-columns: minmax(0, 1fr); }
  .pd-add, .pd-closing .btn { width: 100%; }
  .pd-thumbs { gap: 8px; }
}

/* =============================================================================================
   WORDPRESS — pages printed from WordPress content (cart, checkout, account, legal) and plugin output
   ============================================================================================= */
/* The admin toolbar (signed-in administrators only) sits above the fixed header. */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
/* These pages are light, so the header is always solid. */
.rdx-generic .site-header { background: #050506; border-color: var(--rule-dark); }
.footer-legal a { color: inherit; text-underline-offset: 3px; }
.footer-legal a:hover { color: var(--ivory); }

.wpg { background: var(--paper); color: var(--ink); color-scheme: light; min-height: 72svh; padding: calc(var(--header-h) + clamp(48px, 7vw, 96px)) var(--pad-x) clamp(72px, 9vw, 130px); }
.wpg :focus-visible { outline-color: var(--teal-deep); }
.wpg-inner { max-width: 1120px; margin: 0 auto; }
.wpg h1 { font-size: clamp(2.2rem, 4vw, 3.6rem); letter-spacing: -0.04em; margin-bottom: clamp(28px, 4vw, 48px); }
.wpg-content { font-size: 1.02rem; }
.wpg-content > * + * { margin-top: 1.1em; }
.wpg-content h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); letter-spacing: -0.03em; margin-top: 1.8em; }
.wpg-content h3 { font: 650 1.1rem/1.3 var(--font-text); letter-spacing: 0; margin-top: 1.6em; }
.wpg-content a { color: var(--teal-deep); text-underline-offset: 3px; }
.wpg-content :where(ul, ol):not([class]) { padding-left: 1.3em; }
.wpg-content ul:not([class]) { list-style: disc; }
.wpg-content ol:not([class]) { list-style: decimal; }
.wpg-content :where(input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"], select, textarea) {
  min-height: 48px; padding: 10px 14px; border: 1px solid rgba(20, 22, 25, 0.28); border-radius: 8px; background: #fff; color: var(--ink); font: inherit;
}
/* WooCommerce buttons (block cart and checkout, classic account pages) take the site's button. */
.wpg .wpg-content .wc-block-components-button:not(.is-link), .wpg .wpg-content .wp-element-button, .wpg .wpg-content .button, .wpg .wpg-content button[type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--ink); color: var(--paper); font: 600 0.95rem/1 var(--font-text); text-decoration: none; cursor: pointer;
}
.wpg .wpg-content .wc-block-components-button:not(.is-link):hover, .wpg .wpg-content .wp-element-button:hover, .wpg .wpg-content .button:hover, .wpg .wpg-content button[type="submit"]:hover { background: #2a2d31; color: var(--paper); }
.wpg-content .wc-block-components-product-name, .wpg-content .wc-block-cart-items a { color: var(--ink); }
.wpg-content table { width: 100%; border-collapse: collapse; }
.wpg-content :where(th, td) { padding: 12px 10px; border-bottom: 1px solid var(--rule-light); text-align: left; }
.wpg-content .woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0 0 16px; margin-bottom: 24px; border-bottom: 1px solid var(--rule-light); }
.wpg-content .woocommerce-MyAccount-navigation a { font-weight: 600; text-decoration: none; }
.wpg-content .woocommerce-MyAccount-navigation .is-active a { color: var(--ink); }

/* WooCommerce messages on the designed shop pages. */
.shop-notices { position: fixed; top: calc(var(--header-h) + 12px); left: var(--pad-x); right: var(--pad-x); z-index: 40; display: grid; gap: 8px; }
.shop-notices > * { margin: 0; padding: 14px 18px; border-radius: 10px; background: var(--paper); color: var(--ink); color-scheme: light; list-style: none; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5); }
.shop-notices a { color: var(--teal-deep); font-weight: 600; margin-right: 12px; }
.ct-form-missing { color: var(--ivory-soft); }
.ct-form-missing a { color: var(--teal-light); }
