/* ===== Homepage (layered on jlpa.css) ===== */

/* Focus: visible, consistent, on light and dark grounds */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.contact :focus-visible, .security-detail :focus-visible, .site-footer :focus-visible, .interlude :focus-visible, .mobile-nav :focus-visible, .skip-link:focus-visible { outline-color: var(--paper); }

/* Hero: static ink lines, one serif line, one action and a plain email link */
.hero-object path { stroke-dasharray: none; stroke-dashoffset: 0; }
.hero h1 { max-width: none; font-size: clamp(3.4rem, min(8vw, 13.5svh), 9.2rem); line-height: .86; }
.hero.has-duo .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); } /* set by portrait.js */
.hero-lede { max-width: 30rem; }
.hero-lede p { margin-bottom: 1.1rem; }
.hero-lede .hero-turn { margin-bottom: 2.5rem; color: var(--ink); font-family: var(--serif); font-size: clamp(1.45rem, 1.95vw, 1.95rem); line-height: 1.2; letter-spacing: -.01em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 1rem 2rem; }
.hero-actions .text-link { min-width: 0; }

/* Nav: a single hairline that follows the section being read (drawn by jlpa.js; without it the per-link underline stays) */
.desktop-nav { position: relative; }
.desktop-nav.has-marker a::after { display: none; }
.desktop-nav a[aria-current] { color: var(--ink); }
.nav-marker { position: absolute; left: 0; bottom: -.45rem; width: 0; height: 1px; background: var(--ink); opacity: 0; pointer-events: none; transition: transform .55s var(--ease), width .55s var(--ease), opacity .3s; }
.nav-marker.is-on { opacity: 1; }
.nav-marker.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .nav-marker { transition: opacity .2s; } }

/* The thread (thread.js): section marks and a dot that brightens with the reader's pace */
.thread-mark { opacity: 0; transition: opacity .7s var(--ease); }
.thread-mark.is-passed { opacity: .85; }
.thread-mark line { stroke: var(--ink); stroke-width: 1; }
.thread-mark text { fill: var(--accent); font-family: var(--sans); font-size: 9px; font-weight: 500; letter-spacing: .1em; font-variant-numeric: tabular-nums; }
.thread-mark.on-dark line { stroke: var(--paper); }
.thread-mark.on-dark text { fill: rgba(240,237,231,.75); }
/* The bobble: drawn on ::before so it can change shape; the halo on ::after. Twelve matching points
   let the circle become an arrow (pointing along the thread) and back. */
.thread-dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 0; background: none; }
.thread-dot::before, .thread-dot::after { content: ""; position: absolute; border-radius: 0; background: var(--accent); transition: background-color .4s ease; }
.thread-dot::before { transform: rotate(var(--rot, 0rad)) scale(var(--sx, 1), var(--sy, 1)); inset: 3px; clip-path: polygon(100.0% 50.0%, 93.3% 75.0%, 75.0% 93.3%, 50.0% 100.0%, 25.0% 93.3%, 6.7% 75.0%, 0.0% 50.0%, 6.7% 25.0%, 25.0% 6.7%, 50.0% 0.0%, 75.0% 6.7%, 93.3% 25.0%); transition: clip-path .9s cubic-bezier(.65,0,.35,1), inset .9s cubic-bezier(.65,0,.35,1), background-color .4s ease; }
.thread-dot.is-arrow::before { inset: 0; clip-path: polygon(100% 50%, 75% 62.5%, 50% 75%, 25% 87.5%, 0% 100%, 12.5% 75%, 25% 50%, 12.5% 25%, 0% 0%, 25% 12.5%, 50% 25%, 75% 37.5%); }
.thread-dot::after { inset: 3px; border-radius: 50%; opacity: calc(var(--speed, 0) * .3); transform: scale(var(--halo, 1)); transition: opacity .3s ease, transform .3s ease; }
.thread-dot.on-dark { background: none; }
.thread-dot.on-dark::before, .thread-dot.on-dark::after { background: var(--paper); }
@media (prefers-reduced-motion: reduce) { .thread-mark { transition: none; } .thread-dot::after { display: none; } }

/* The thread stands a little off the paper: a soft, light shadow beneath it and its bobble */
.thread path.thread-shadow { stroke: rgba(23,23,21,.17); stroke-width: 1.3; opacity: 1; }
.thread-dot:not(.on-dark) { filter: drop-shadow(5px 8px 2.5px rgba(23,23,21,.2)); }
.hero-object svg { filter: drop-shadow(2.2px 3.4px 1.5px rgba(23,23,21,.17)); }

/* The full stop after "Built properly" is where the thread wakes (thread.js) */
.hero h1 .stop.is-away { opacity: 0; transition: none; }
.baseline-mark { display: inline-block; width: 0; height: 0; }
.tittle-patch { position: absolute; top: 0; left: 0; z-index: 14; border-radius: 50%; background: var(--paper); pointer-events: none; }
.thread-dot.is-asleep::before { background: var(--ink); }
.thread-dot.is-asleep { filter: none; transition: none; }
.thread-dot { transition: opacity .6s ease, filter .8s ease; }
.thread path.thread-trail { stroke: var(--ink); stroke-width: 1; }
.thread path.thread-pc { transition: opacity 1.4s ease; }
.thread ellipse.thread-ground { fill: rgba(23,23,21,.55); stroke: none; }
.thread-dot.is-bouncing { filter: none; }

/* The small mark the thread rests on, under the hero line where it turns down (placed by thread.js) */
.hero { position: relative; }
.hero-mark { position: absolute; right: calc(var(--pad) / 2 + 12px); bottom: 1.2rem; z-index: 2; margin: 0; color: var(--muted); font-size: .6rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-mark.is-placed { top: 0; left: 0; right: auto; bottom: auto; }

/* 01 What you're paying for */
.statement h2 { font-size: clamp(2.9rem, 6.2vw, 6.6rem); }
.statement-terms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 4rem); margin: clamp(3rem, 6vw, 5.5rem) 0 0 35%; padding: 1.5rem 0 0; border-top: 1px solid var(--ink); list-style: none; }
.statement-terms span { display: block; margin-bottom: 1.1rem; color: var(--accent); font-size: .63rem; font-weight: 500; letter-spacing: .14em; }
.statement-terms h3 { margin: 0 0 .6rem; font-family: var(--serif); font-size: clamp(1.55rem, 2.2vw, 2.2rem); font-weight: 400; line-height: 1; letter-spacing: -.02em; }
.statement-terms p { margin: 0; color: var(--muted); font-size: .9rem; }

/* 02 Work: heading alone; below the plates, one quiet line of earlier work */
.work-heading-solo { grid-template-columns: 1fr; }
.credits { display: grid; grid-template-columns: minmax(220px, .72fr) minmax(0, 1.6fr); gap: clamp(2rem, 5vw, 5.5rem); padding: clamp(2.5rem, 5vw, 4rem) 0 0; }
.credits-head { display: flex; flex-direction: column; gap: .5rem; margin: 0; padding-top: .35rem; color: var(--accent); font-size: .62rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.credits-head span { color: var(--muted); }
.credits-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem 2.5rem; margin: 0; padding: 1rem 0 0; border-top: 1px solid var(--ink); list-style: none; }
.credits-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; min-width: 0; }
.credits-name { font-family: var(--serif); font-size: 1.35rem; line-height: 1.2; color: var(--ink); }
.credits-note { color: var(--muted); font-size: .86rem; }
/* The names arrive the way text did in 1996: a character at a time, one after another. */
.credits.is-waiting .credits-list li { clip-path: inset(-.3em 100% -.3em 0); }
.credits.is-waiting.is-arriving .credits-list li { clip-path: inset(-.3em 0 -.3em 0); }
.credits.is-arriving .credits-list li:nth-child(1) { transition: clip-path .7s steps(28, end) .1s; }
.credits.is-arriving .credits-list li:nth-child(2) { transition: clip-path .4s steps(23, end) .95s; }
.credits.is-arriving .credits-list li:nth-child(3) { transition: clip-path .8s steps(46, end) 1.5s; }
.credits.is-arriving .credits-list li:nth-child(4) { transition: clip-path .45s steps(29, end) 2.45s; }

/* 03 Practice: three strands, the Site Review card, then Also */
.practice-lede { max-width: 22rem; margin: 2.25rem 0 0; color: var(--muted); font-size: .95rem; }
.strand { grid-template-columns: 3rem minmax(150px, .7fr) minmax(220px, 1.3fr); padding: 2.4rem 0; }
.strand h3 { font-size: clamp(1.9rem, 2.8vw, 2.9rem); }
.strand-tags { margin-top: 1rem !important; color: var(--accent) !important; font-size: .62rem !important; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }

.review-card { display: grid; grid-template-columns: 3rem minmax(150px, .7fr) minmax(220px, 1.3fr); gap: 1rem; padding: 2.4rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 6rem; }
.review-card > span { color: var(--accent); font-size: .8rem; padding-top: .35rem; }
.review-card .kicker { margin: 0 0 .9rem; }
.review-card h3 { margin: 0; font-family: var(--serif); font-size: clamp(1.9rem, 2.8vw, 2.9rem); font-weight: 400; line-height: 1; letter-spacing: -.02em; }
.review-card-price { display: flex; align-items: baseline; gap: 1rem; margin: 0 0 1.25rem; }
.review-card-price strong { font-family: var(--serif); font-size: clamp(2rem, 2.6vw, 2.6rem); font-weight: 400; line-height: .9; letter-spacing: -.03em; }
.review-card-price span { color: var(--accent); font-size: .62rem; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.review-terms { margin: 0 0 2rem; border-top: 1px solid var(--line); }
.review-terms div { display: grid; grid-template-columns: 4.75rem 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.review-terms dt { padding-top: .2rem; color: var(--accent); font-size: .62rem; font-weight: 500; letter-spacing: .13em; text-transform: uppercase; }
.review-terms dd { margin: 0; color: var(--muted); font-size: .88rem; }

.practice-also { display: grid; grid-template-columns: 3rem minmax(0, 1fr); gap: 1rem; margin-top: clamp(2.5rem, 5vw, 4rem); }
.also-head { margin: 0; padding-top: .2rem; color: var(--muted); font-size: .62rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; }
.practice-also ul { margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.practice-also li { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr); gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.practice-also h3 { margin: 0; font-family: var(--serif); font-size: 1.3rem; font-weight: 400; line-height: 1.15; }
.practice-also p { margin: 0; color: var(--muted); font-size: .86rem; }
.practice-also .practice-note { display: block; margin-top: .6rem; font-size: .78rem; line-height: 1.55; opacity: .85; }

/* 04 Process */
.process { --muted: #5d5953; }
.process .section-heading h2 { font-size: clamp(2.8rem, 4.6vw, 5.4rem); }

/* Contrast: lift the faintest text on dark and oxblood grounds */
.security-list code { color: rgba(240,237,231,.62); }
.security-list li span, .security-proof > span { color: rgba(240,237,231,.66); }
.eq-time, .eq-foot, .eq-n, .eq-panel-head span { color: rgba(240,237,231,.7); }
.contact .section-number, .contact .kicker { color: rgba(240,237,231,.78); }
.contact-copy > p.contact-alt { color: rgba(240,237,231,.76); }
.footer-meta p, .footer-bottom { color: rgba(240,237,231,.66); }

@media (max-width: 980px) {
  .hero.has-duo .hero-grid { grid-template-columns: 1fr; }
  .statement-terms { margin-left: 0; }
  .practice-body { grid-column: 2; }
  .credits { grid-template-columns: 1fr; gap: 1rem; }
}
@media (max-width: 700px) {
  .credits-list { grid-template-columns: 1fr; gap: 0; }
  .credits-list li { padding: .5rem 0; border-bottom: 1px solid var(--line); }
  .hero h1 { font-size: clamp(2.7rem, 12.4vw, 4.6rem); line-height: .9; }
  .hero-actions { flex-direction: column; }
  .hero-actions .text-link { width: 100%; }
  .statement h2 { font-size: clamp(2.4rem, 11vw, 4rem); }
  .statement-terms { grid-template-columns: 1fr; gap: 1.5rem; }
  .practice-body { grid-column: 1; }
  .strand { grid-template-columns: 2rem 1fr; }
  .strand > div { grid-column: 2; }
  .review-card { grid-template-columns: 2rem 1fr; }
  .review-card-head, .review-card-body { grid-column: 2; }
  .review-card-body { margin-top: 1.25rem; }
  .practice-also { grid-template-columns: 1fr; }
  .practice-also li { grid-template-columns: 1fr; gap: .4rem; }
}
.given-tittle { position: absolute; top: 0; left: 0; z-index: 14; border-radius: 50%; background: var(--paper); pointer-events: none; opacity: 0; transition: opacity .12s ease; }
.given-tittle.is-placed { opacity: 1; }
/* The portrait's glass: its own layer, above the thread */
.portrait-glass { position: absolute; top: 0; left: 0; z-index: 17; pointer-events: none; }
.hero-portrait canvas, .portrait-claim { cursor: zoom-in; }
