@font-face {
  font-family: 'Cedarville Cursive';
  src: url('assets/cedarville-cursive.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

/* The editorial sample supplies the screen palette and type. The page styles
   still own the service, form, card, and print layouts. */
@media screen {
  :root {
    --editorial-paper: #f7f7f7;
    --editorial-surface: #fff;
    --editorial-warm: #f4f0eb;
    --editorial-ink: #152034;
    --editorial-muted: #5e534f;
    --editorial-accent: #5a0f1b;
    --editorial-gold: #765b33;
    --editorial-line: #d8ccc0;
    --editorial-display: Optima, Candara, 'Trebuchet MS', sans-serif;
    --editorial-body: 'Helvetica Neue', Arial, sans-serif;
    --editorial-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
    --editorial-gutter: max(clamp(1.25rem, 4vw, 4rem), calc((100% - 82rem) / 2));
    --editorial-section: clamp(3.75rem, 8vw, 9rem);
  }

  body {
    color-scheme: light;
    background: var(--editorial-paper);
    color: var(--editorial-ink);
    font-family: var(--editorial-body);
  }

  .r8-brand-name {
    font: 400 clamp(.9rem, 1.45vw, 1.3rem)/1.2 var(--editorial-display);
    color: var(--editorial-accent);
    letter-spacing: .055em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .eyebrow, .r8-stage, .edge-note, .legal-date {
    font-family: var(--editorial-mono);
    letter-spacing: .06em;
  }

  .selected-direction :focus-visible,
  .selected-direction .r8-section :focus-visible,
  body:not([data-page="selected"]) :focus-visible,
  body:not([data-page="selected"]) .questions-layout :focus-visible {
    outline-color: var(--editorial-accent);
  }

  /* The home page */
  .selected-direction,
  .selected-direction #sample,
  .selected-direction .r8-section,
  .selected-direction .molecular-science,
  .selected-direction .consultation,
  .selected-direction .site-footer {
    background: var(--editorial-paper);
    color: var(--editorial-ink);
  }

  .selected-direction #sample .site-nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    height: auto;
    min-height: 72px;
    gap: 0 clamp(.4rem, 2vw, 1.5rem);
    padding-inline: var(--editorial-gutter);
    background: var(--editorial-paper);
    color: var(--editorial-ink);
    border-color: var(--editorial-line);
  }

  .selected-direction #sample .site-nav[data-compact] {
    min-height: 60px;
    box-shadow: 0 1px 0 var(--editorial-line);
  }

  .selected-direction .site-nav .brand {
    grid-area: 1 / 2;
    justify-self: center;
    text-decoration: none;
  }

  .selected-direction .site-nav .r8-nav-primary {
    grid-area: 1 / 3;
    justify-self: end;
    min-width: 0;
    text-align: right;
  }

  .selected-direction .r8-nav-primary a,
  .selected-direction .site-nav .menu-toggle {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font: .76rem/1.35 var(--editorial-mono);
    color: var(--editorial-accent);
    text-transform: uppercase;
  }

  .selected-direction .r8-nav-primary a { text-decoration-color: var(--editorial-line); }

  .selected-direction .site-nav .menu-toggle {
    display: none;
    grid-area: 1 / 1;
    justify-self: start;
    padding: 0 4px;
    border: 0;
    background: transparent;
    color: var(--editorial-ink);
  }

  .selected-direction .site-nav.has-menu .menu-toggle { display: inline-flex; }

  .selected-direction #sample .site-nav .site-links {
    grid-area: 2 / 1 / 3 / -1;
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .15rem 1.6rem;
    padding-bottom: .7rem;
    background: var(--editorial-paper);
    color: var(--editorial-ink);
    box-shadow: none;
  }

  .selected-direction #sample .site-nav.has-menu .site-links { display: none; }

  .selected-direction #sample .site-nav.has-menu.menu-open .site-links {
    position: absolute;
    display: grid;
    grid-template-columns: 1fr;
    z-index: 2;
    inset: 100% 0 auto;
    padding: .6rem var(--editorial-gutter) 1.1rem;
    border-bottom: 1px solid var(--editorial-line);
    box-shadow: 0 12px 18px #15203412;
  }

  .selected-direction #sample .site-nav.has-menu.menu-open .site-links a {
    border-bottom: 1px solid var(--editorial-line);
    font: .9rem/1.4 var(--editorial-mono);
    padding: .65rem 0;
  }

  /* The clip's light plate disappears against the paper. Text stays above it. */
  .selected-direction #hero {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    justify-items: center;
    overflow: clip;
    min-height: max(36rem, calc(100svh - 72px));
    padding: clamp(3.4rem, 8vh, 6rem) var(--editorial-gutter) clamp(1rem, 4vh, 2.5rem);
    row-gap: clamp(1.8rem, 7vh, 5rem);
    background: radial-gradient(ellipse at 8% 5%, #fff 0%, transparent 40%), var(--editorial-paper);
    color: var(--editorial-ink);
  }

  .selected-direction #hero .film {
    inset: 0;
    z-index: 0;
    background: transparent;
    mix-blend-mode: multiply;
    opacity: .44;
    pointer-events: none;
  }

  .selected-direction #hero .film::after { display: none; }

  .selected-direction #hero .film > :is(img, video) {
    inset: 0 0 auto;
    block-size: clamp(620px, 78vh, 820px);
    object-fit: cover;
    object-position: 62% center;
  }

  .selected-direction #hero .film.playing > img { opacity: 0; }

  .r8-hero-wordmark {
    position: absolute;
    inset: 9% 0 auto;
    z-index: 1;
    display: grid;
    gap: .05em;
    justify-items: center;
    font: 400 clamp(2.75rem, 16.5vw, 18rem)/.9 var(--editorial-display);
    letter-spacing: -.045em;
    color: #fff;
    pointer-events: none;
  }

  .selected-direction #hero .hero-copy {
    position: relative;
    z-index: 2;
    isolation: isolate;
    align-self: center;
    margin-block-start: clamp(5rem, 16vw, 13rem);
    padding: 0;
    width: min(100%, 41rem);
    text-align: center;
  }

  .selected-direction #hero .hero-copy::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -.65rem -.9rem;
    background: var(--editorial-paper);
    opacity: .74;
    filter: blur(.625rem);
    pointer-events: none;
  }

  .selected-direction #hero .eyebrow {
    display: block;
    color: var(--editorial-accent);
    text-align: center;
  }

  .selected-direction #hero .display {
    margin: .8rem auto;
    font: 400 clamp(1rem, 1.5vw, 1.35rem)/1.3 var(--editorial-mono);
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .selected-direction #hero .display em { color: inherit; font-style: normal; }

  .selected-direction #hero .body-copy {
    max-width: 55ch;
    margin: .7rem auto .55rem;
    color: var(--editorial-ink);
    font-size: clamp(.875rem, 1.4vw, 1.05rem);
  }

  .selected-direction #hero .hero-copy .text-link {
    justify-content: center;
    max-width: 100%;
    margin: 0;
    color: var(--editorial-accent);
    font-size: .92rem;
  }

  .selected-direction #hero .molecule-bottom {
    display: grid;
    position: relative;
    z-index: 2;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: .5rem;
    width: 100%;
    margin: 0;
  }

  .selected-direction #hero .scroll-cue {
    grid-column: 2;
    margin: 0;
    color: var(--editorial-accent);
    font-family: var(--editorial-mono);
    text-align: center;
  }

  .selected-direction #hero .motion-toggle {
    position: static;
    grid-column: 3;
    justify-self: end;
    min-width: 44px;
    min-height: 44px;
    margin: 0;
    padding: 0 .4rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--editorial-ink);
    font: .74rem/1.3 var(--editorial-mono);
    text-transform: uppercase;
  }

  .selected-direction #hero .motion-toggle:hover { text-decoration: underline; }
  .selected-direction #hero .motion-toggle::after { display: none; }

  .selected-direction #hero .playback-recovery {
    z-index: 3;
    background: var(--editorial-surface);
    color: var(--editorial-ink);
    border-color: var(--editorial-line);
  }

  .selected-direction :is(.molecular-science, .r8-section, .consultation, .site-footer) {
    padding-inline: var(--editorial-gutter);
    border-top: 1px solid var(--editorial-line);
  }

  .selected-direction :is(.molecular-science, .r8-section, .consultation) {
    padding-block: var(--editorial-section);
  }

  .selected-direction :is(.r8-journey, .r8-faq) { background: var(--editorial-warm); }

  .selected-direction :is(.section-title h2, .r8-section h2, .consultation h2) {
    font: 400 clamp(2.4rem, 5vw, 5.25rem)/1.05 var(--editorial-display);
    letter-spacing: -.025em;
    text-wrap: balance;
  }

  .selected-direction :is(.r8-section h3, .r8-card-front h3, .r8-card-back h4) {
    font-family: var(--editorial-display);
  }

  .selected-direction :is(.section-title h2, .r8-section h2, .consultation h2) em {
    color: var(--editorial-accent);
    font-style: normal;
  }

  .selected-direction #science .section-title em { color: var(--editorial-accent); }

  .selected-direction .consultation h2 em {
    display: inline-block;
    font-family: 'Cedarville Cursive', var(--editorial-display);
    line-height: 1.28;
    letter-spacing: 0;
  }

  .selected-direction :is(.eyebrow, .r8-stage, .sample-label, .r8-plus, .edge-note) {
    color: var(--editorial-gold);
  }

  .selected-direction :is(.molecular-science .body-copy, .r8-heading > p, .r8-philosophy-copy p,
  .r8-journey-grid p, .r8-faq details p, .continuum-bridge, .consultation > div > p, .site-footer p) {
    color: var(--editorial-muted);
    max-width: 65ch;
  }

  .selected-direction :is(.body-copy, .r8-heading > p, .r8-philosophy-copy > p) {
    font-size: clamp(1rem, 1.65vw, 1.35rem);
    line-height: 1.6;
  }

  .selected-direction :is(.perspective-art, .r8-note, .r8-faq details, .r8-journey-grid li,
  .r8-principles article, .r8-footer-links) { border-color: var(--editorial-line); }

  .selected-direction .bridge-line { background: var(--editorial-line); }
  .selected-direction .bridge-line i { background: var(--editorial-gold); }

  .selected-direction .r8-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
    align-items: stretch;
  }

  .selected-direction .r8-card-grid .r8-face {
    background: var(--editorial-surface);
    color: var(--editorial-ink);
    border-color: var(--editorial-line);
  }

  .selected-direction .r8-card-grid .r8-card-front:hover { border-color: var(--editorial-gold); }
  .selected-direction .r8-card-grid .r8-card-line,
  .selected-direction .r8-card-grid .r8-card-cue i { color: var(--editorial-gold); }
  .selected-direction .r8-card-grid .r8-card-copy { color: var(--editorial-muted); }
  .selected-direction .r8-card-grid .r8-card-cue { border-color: var(--editorial-line); }

  .selected-direction .consultation > div > .consultation-button {
    background: var(--editorial-accent);
    border-color: var(--editorial-accent);
    color: #fff;
  }

  .selected-direction .site-footer .r8-brand-name { color: var(--editorial-accent); }

  /* Service pages, preparation guide, legal pages and intake */
  body:not([data-page="selected"]) > header[data-sticky-header],
  body:not([data-page="selected"]) > header.has-menu.menu-open nav,
  body:not([data-page="selected"]) > footer {
    background: var(--editorial-paper);
    color: var(--editorial-ink);
    border-color: var(--editorial-line);
    box-shadow: none;
  }

  body > header[data-sticky-header] > a,
  footer > a:has(.r8-brand-name) { text-decoration: none; }

  body > header[data-sticky-header] :is(.menu-toggle, .motion) {
    background: var(--editorial-surface);
    color: var(--editorial-accent);
    border-color: var(--editorial-line);
  }

  body:not([data-page="selected"]) header.has-menu.menu-open nav a,
  body:not([data-page="selected"]) footer .legal-links { border-color: var(--editorial-line); }

  body:not([data-page="selected"]) main :is(h1, h2, h3) {
    font-family: var(--editorial-display);
    letter-spacing: -.019em;
  }

  :is(.service-hero h1, .guide-intro h1) {
    font-size: clamp(2.75rem, 5.6vw, 5.35rem);
    text-wrap: balance;
  }

  :is(.service-hero, .guide-intro) .intro { max-width: 59ch; }
  :is(.service-hero, .guide-intro) { padding-block-start: clamp(3rem, 7.5vw, 8rem); }

  body:not([data-page="selected"]) :is(.eyebrow, .scope-note span) { color: var(--editorial-gold); }

  body:not([data-page="selected"]) :is(h2 em, .questions-layout h2 em) {
    color: var(--editorial-accent);
    font-style: normal;
  }

  body:not([data-page="selected"]) :is(.intro, .scope-note p, .prepare p:not(.eyebrow), footer p,
  .legal-date, .legal-links span, .intake-notes p, .service-hero figcaption) { color: var(--editorial-muted); }

  .service-hero figcaption { background: var(--editorial-paper); }
  .questions-layout, .intake-shell { background: var(--editorial-surface); color: var(--editorial-ink); }
  .prepare { background: var(--editorial-warm); color: var(--editorial-ink); }
  .related nav a { font-family: var(--editorial-display); }
  .related nav a:hover { color: var(--editorial-accent); }
  .related nav a, .scope-note, .intake-notes p { border-color: var(--editorial-line); }

  /* Contact cards keep their existing controls and woven monogram. */
  :root:has(body[data-profile-id]) { background: var(--editorial-paper); }

  body[data-profile-id] .page {
    background: radial-gradient(ellipse at 80% 10%, #fff, transparent 44%), var(--editorial-paper);
    color: var(--editorial-ink);
  }

  body[data-profile-id] :is(.wordmark, h1, .card-identity h2) { font-family: var(--editorial-display); }
  body[data-profile-id] :is(.wordmark, .eyebrow, h1 span, .header .icon-button) { color: var(--editorial-accent); }
  body[data-profile-id] :is(.intro-summary, .intro-caption, .stage-caption, .preview-label, .footer) { color: var(--editorial-muted); }
  body[data-profile-id] :is(.header, .footer) { border-color: var(--editorial-line); }
  body[data-profile-id] .contact-card { background: var(--editorial-surface); box-shadow: 0 18px 52px #15203415; }
}

@media screen and (max-width: 700px) {
  .selected-direction #sample .site-nav { min-height: 62px; }
  .selected-direction #sample .site-nav[data-compact] { min-height: 54px; }
  .selected-direction .r8-nav-primary a { font-size: .64rem; }
  .selected-direction #hero { min-height: max(34rem, calc(100svh - 62px)); }
  .selected-direction #hero .hero-copy { margin-block-start: clamp(4.25rem, 22vw, 8rem); }
  .r8-hero-wordmark { inset-block-start: clamp(7rem, 30vw, 13rem); }

  .selected-direction #hero .film > :is(img, video) {
    inset-block-start: calc(215px - 28.125vw);
    block-size: 56.25vw;
    object-fit: contain;
    object-position: center;
  }

  .selected-direction .r8-card-grid { grid-template-columns: 1fr; }
}

@media screen and (prefers-reduced-motion: no-preference) and (forced-colors: none) {
  .r8-editorial-reveal {
    filter: blur(calc((1 - var(--r8-clarity, 1)) * 8px));
    opacity: calc(.42 + .58 * var(--r8-clarity, 1));
  }

  .r8-editorial-reveal:focus-within, .r8-editorial-reveal:target, :target .r8-editorial-reveal,
  .paused .r8-editorial-reveal, .reduced .r8-editorial-reveal { filter: none; opacity: 1; }

  html:not(:has(:target, :focus-visible)) .selected-direction #hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    background: #fff;
    pointer-events: none;
    animation: r8-editorial-opening 240ms ease-out;
    opacity: 0;
  }

  @keyframes r8-editorial-opening { from { opacity: 1; } }
}

@media screen and (forced-colors: active) {
  .selected-direction #hero .film, .r8-hero-wordmark, .selected-direction #hero .hero-copy::before { display: none; }
}
