/* ==========================================================================
   THE PATH OUT : thepathout.ai
   Palette: cream-clay (see references/deck-brand-standards.md)
   Type: DM Sans (display + body) / JetBrains Mono (accents)
   ========================================================================== */

/* ---- Fonts (self-hosted, latin subset) ---- */

/* DM Sans ships as one variable font file covering all weights */
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("../fonts/dm-sans-variable.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-400.woff2") format("woff2");
}

/* ---- Design tokens ---- */

:root {
  --bg: #f7f3eb;          /* warm cream, one tick lighter than deck #f5f1e8 for backlit screens */
  --paper: #ffffff;
  --ink: #2a2a2a;
  --accent: #8a3a2a;      /* clay red: CTAs, eyebrows, links, final band only */
  --accent-deep: #6e2d20; /* hover state */
  --warm: #d4a574;        /* decorative only, never text */
  --muted: #6b6358;
  --line: #dcd5c6;

  --font-sans: "DM Sans", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --container: 1080px;
  --container-narrow: 720px;
}

/* ---- Reset / base ---- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%; /* stop iOS Safari inflating the ticker on phones */
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-deep);
}

h1,
h2,
h3,
h4 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--warm);
  color: var(--ink);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  z-index: 100;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
}

/* ---- Layout helpers ---- */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding: 96px 0;
}

.section--tight {
  padding: 72px 0;
}

.section--rule {
  border-top: 1px solid var(--line);
}

/* ---- Typography patterns ---- */

.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.headline {
  font-size: 40px;
  max-width: 21ch;
}

.headline--wide {
  max-width: 26ch;
}

.lede {
  font-size: 21px;
  color: var(--ink);
  max-width: 56ch;
}

.caption {
  font-size: 14px;
  color: var(--muted);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.85em;
}

/* ---- Buttons ---- */

.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  padding: 16px 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn--primary {
  background: var(--accent);
  color: var(--bg);
}

.btn--primary:hover {
  background: var(--accent-deep);
  color: var(--bg);
}

.btn--inverse {
  background: var(--bg);
  color: var(--accent);
}

.btn--inverse:hover {
  background: var(--paper);
  color: var(--accent-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--ghost:hover {
  background: var(--accent);
  color: var(--bg);
}

.textlink {
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
}

.textlink::after {
  content: " \2192";
}

.textlink:hover {
  text-decoration: underline;
}

/* ---- Header / nav ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  transition: background-color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Once you scroll, the bar goes translucent and frosts what passes under it. */
.site-header.stuck {
  background: rgba(247, 243, 235, 0.72);
  -webkit-backdrop-filter: saturate(1.3) blur(12px);
  backdrop-filter: saturate(1.3) blur(12px);
  border-bottom-color: var(--line);
  box-shadow: 0 6px 22px rgba(42, 42, 42, 0.06);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
}

.brand:hover {
  color: var(--accent-deep);
}

.brand svg {
  flex: 0 0 auto;
}

/* TPO is the spoken name; the full name rides underneath for clarity. */
.brand-lockup {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--accent);
}

.brand-full {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

.brand:hover .brand-full {
  color: var(--accent);
}

.brand-lockup--light .brand-name { color: var(--bg); }
.brand-lockup--light .brand-full { color: var(--line); }

/* legacy single-word mark, still used where a one-line wordmark is wanted */
.brand-word {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.site-nav a:not(.btn) {
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.site-nav a:not(.btn):hover {
  color: var(--accent);
}

.site-nav a[aria-current="page"] {
  color: var(--accent);
}

.site-nav .btn {
  padding: 12px 20px;
  font-size: 15px;
}

/* ---- Hero ---- */

.hero {
  padding: 96px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-size: clamp(56px, 8.6vw, 118px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  max-width: 12ch;
  margin-bottom: 26px;
}

.hero-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-standfirst {
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 500;
  letter-spacing: -0.01em;
  max-width: 24ch;
  margin-bottom: 20px;
}

.hero .lede {
  margin-bottom: 44px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.trust-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}

.trust-strip p {
  margin: 0;
  font-size: 16px;
  color: var(--muted);
}

/* ---- Card grids ---- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 32px 28px;
}

.card h3 {
  font-size: 21px;
  margin: 18px 0 10px;
}

.card p {
  margin: 0;
  font-size: 16.5px;
  color: var(--ink);
}

.card-mark {
  color: var(--accent);
}

/* ---- Three-step spine ---- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.step {
  border-top: 3px solid var(--accent);
  padding-top: 24px;
}

.step-kicker {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  display: block;
  margin-bottom: 10px;
}

.step h3 {
  font-size: 24px;
  margin-bottom: 12px;
}

.step p {
  font-size: 16.5px;
}

.step-get {
  font-size: 15px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 18px;
}

.step-get strong {
  color: var(--ink);
}

.spine-coda {
  margin-top: 48px;
  font-size: 21px;
  font-weight: 500;
  max-width: 44ch;
}

/* ---- Worked example (editorial column) ---- */

.column-piece {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 56px;
  margin-top: 48px;
}

.column-piece p {
  font-size: 18px;
  max-width: 62ch;
}

.column-piece .kicker-line + p::first-letter {
  font-size: 3.1em;
  font-weight: 700;
  float: left;
  line-height: 0.85;
  padding: 4px 10px 0 0;
  color: var(--accent);
}

.column-piece .kicker-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---- Principles row ---- */

.principles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}

.principle {
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.principle h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.principle p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.editorial {
  max-width: 62ch;
}

.editorial p {
  font-size: 19px;
}

/* ---- FAQ accordion ---- */

.faq {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 4px;
  font-size: 19px;
  font-weight: 500;
  cursor: pointer;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

.faq-chevron {
  flex: 0 0 auto;
  color: var(--accent);
  transition: transform 0.2s ease;
  transform: translateY(2px);
}

.faq-item[open] .faq-chevron {
  transform: translateY(2px) rotate(180deg);
}

.faq-item .faq-body {
  padding: 0 4px;
  max-width: 62ch;
}

.js .faq-item .faq-body {
  overflow: hidden;
  transition: height 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

.faq-item .faq-body p {
  margin: 0 0 0.8em;
  font-size: 17px;
}

.faq-item .faq-body p:last-child {
  margin-bottom: 0;
  padding-bottom: 26px;
}

/* ---- Final CTA band ---- */

.cta-band {
  background: var(--accent);
  color: var(--bg);
  padding: 96px 0;
}

.cta-band h2 {
  font-size: 44px;
  color: var(--bg);
  max-width: 20ch;
}

.cta-band p {
  font-size: 19px;
  max-width: 56ch;
  color: var(--bg);
  margin-bottom: 36px;
}

/* ---- Footer ---- */

.site-footer {
  background: var(--ink);
  color: var(--bg);
  padding: 56px 0 40px;
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bg);
  text-decoration: none;
}

.footer-brand .brand-word {
  color: var(--bg);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  color: var(--bg);
  text-decoration: none;
  font-size: 16px;
}

.footer-links a:hover {
  color: var(--line);
}

.footer-mail {
  color: var(--bg);
  font-size: 16px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-mail:hover {
  color: var(--line);
}

.footer-slug {
  width: 100%;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--line);
}

/* ---- Page hero (interior pages) ---- */

.page-hero {
  padding: 88px 0 56px;
}

.page-hero h1 {
  font-size: 52px;
  max-width: 20ch;
}

.page-hero .lede {
  margin-top: 20px;
}

/* ---- Discovery: the two-week agenda, set as a ledger.
        Type, hairlines, and space; no boxes. ---- */

.agenda {
  margin-top: 32px;
  max-width: 940px;
}

.agenda-head {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
  padding: 48px 0 14px;
}

.agenda-head:first-child {
  padding-top: 0;
}

.agenda-row {
  display: grid;
  grid-template-columns: 128px minmax(0, 300px) 1fr;
  gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.agenda-day {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 3px;
}

.agenda-title {
  font-size: 17px;
  letter-spacing: -0.01em;
}

.agenda-desc {
  margin: 0;
  font-size: 15.5px;
  color: var(--muted);
}

.agenda-coda {
  border-top: 1px solid var(--line);
  margin: 56px 0 0;
  padding-top: 26px;
  font-size: 17.5px;
  max-width: 62ch;
}

/* ---- Contact: booking block ---- */

.book-block h2 {
  font-size: 30px;
  letter-spacing: -0.02em;
}

.book-lede {
  margin-top: 10px;
  color: var(--muted);
  max-width: 52ch;
}

.cal-embed {
  margin-top: 32px;
  min-height: 620px;
}

.contact-body .contact-grid {
  margin-top: 88px;
}

/* Honeypot: invisible to people, present for bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---- Discovery: sample artifact ---- */

.artifact-frame {
  margin-top: 48px;
  display: grid;
  grid-template-columns: minmax(0, 460px) 1fr;
  gap: 48px;
  align-items: start;
}

.artifact-page {
  grid-column: 1;
  grid-row: 1;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 12px 32px rgba(42, 42, 42, 0.09);
  padding: 36px 32px;
}

.artifact-copy {
  grid-column: 2;
  grid-row: 1;
}

.artifact-frame .artifact-hint {
  grid-column: 1;
  grid-row: 2;
  text-align: center;
  margin-top: 0;
}

@media (max-width: 960px) {
  .artifact-copy {
    grid-column: 1;
    grid-row: 2;
  }
  .artifact-frame .artifact-hint {
    grid-row: 3;
  }
}

.artifact-page .doc-eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 6px;
}

.artifact-page .doc-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 18px;
}

.redact {
  display: inline-block;
  height: 0.72em;
  background: var(--line);
  border-radius: 2px;
  vertical-align: baseline;
}

.doc-line {
  margin-bottom: 9px;
  line-height: 1.5;
  font-size: 13px;
  color: var(--muted);
}

.doc-score {
  margin-top: 20px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.doc-score-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
  padding: 5px 0;
}

.doc-bar {
  flex: 0 0 45%;
  height: 7px;
  border-radius: 4px;
  background: var(--line);
  overflow: hidden;
}

.doc-bar i {
  display: block;
  height: 100%;
  background: var(--warm);
}

.artifact-copy h3 {
  font-size: 24px;
}

.artifact-copy p {
  font-size: 17px;
  max-width: 52ch;
}

/* ---- Discovery: interview structure ---- */

.interview-list {
  margin-top: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 40px;
  counter-reset: block;
}

.interview-block {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.interview-block h3 {
  font-size: 19px;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.interview-block h3::before {
  counter-increment: block;
  content: "0" counter(block);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  color: var(--accent);
}

.interview-block p {
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.interview-block .caption {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ---- Contact page ---- */

/* Contact page keeps a tight, even rhythm: the space above the rule and
   the space below it match, and the two cards share a height. */
.contact-body {
  padding-top: 60px;
  padding-bottom: 84px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 0;
  align-items: stretch;
}

.contact-card {
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 40px;
}

.contact-card form {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
}

.contact-card .form-note {
  margin-top: auto;
}

.contact-card h2 {
  font-size: 26px;
}

.contact-card p {
  font-size: 17px;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 17px;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px 14px;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.field textarea {
  min-height: 130px;
  resize: vertical;
}

.form-note {
  font-size: 14.5px;
  color: var(--muted);
  margin-top: 14px;
}

/* ---- 404 ---- */

.notfound {
  padding: 140px 0;
  text-align: left;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* ---- Responsive ---- */

@media (max-width: 960px) {
  .grid-3,
  .steps,
  .principles {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 32px;
  }

  .artifact-frame,
  .contact-grid,
  .interview-list {
    grid-template-columns: 1fr;
  }

  .agenda-row {
    grid-template-columns: 128px 1fr;
    gap: 8px 32px;
  }

  .agenda-day {
    grid-row: 1 / 3;
  }

  .agenda-title,
  .agenda-desc {
    grid-column: 2;
  }

  .column-piece {
    padding: 36px 28px;
  }
}

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  .section {
    padding: 64px 0;
  }

  .agenda-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 18px 0;
  }

  .agenda-day {
    grid-row: auto;
    padding-top: 0;
    margin-bottom: 2px;
  }

  .agenda-title,
  .agenda-desc {
    grid-column: 1;
  }

  .hero {
    padding: 64px 0 48px;
  }

  .hero h1 {
    font-size: 40px;
  }

  .headline {
    font-size: 32px;
  }

  .page-hero h1 {
    font-size: 36px;
  }

  .cta-band h2 {
    font-size: 32px;
  }

  .lede {
    font-size: 18px;
  }

  .site-nav {
    gap: 16px;
  }

  .site-nav a:not(.btn) {
    font-size: 15px;
  }

  .site-nav .btn {
    padding: 10px 14px;
    font-size: 14px;
  }
}

@media (max-width: 620px) {
  /* Header wraps to two rows: brand on top, nav below */
  .site-header .container {
    flex-wrap: wrap;
  }

  .site-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero-actions {
    gap: 18px;
  }

  .column-piece {
    padding: 28px 20px;
  }

  .contact-card {
    padding: 28px 22px;
  }
}

/* ==========================================================================
   v2 INTERACTION LAYER
   Kinetic type, the scroll-drawn path, cursor ring, marquee, draft demo,
   tilt/zoom artifact, mega footer, grain. Everything gates on .js/.motion
   classes so no-JS and reduced-motion stay clean and readable.
   ========================================================================== */

/* ---- Cross-page transitions (progressive; Chromium only for now) ---- */

@view-transition {
  navigation: auto;
}

/* ---- Paper grain over everything ---- */

.motion body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9990;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---- Layering: the pathline sits behind every section ---- */

main {
  position: relative;
}

.pathline {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
}

.pathline path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  /* butt cap: the line starts exactly at the taper's end point, so the two
     40%-opacity layers never overlap (overlap composites visibly darker) */
  stroke-linecap: butt;
  opacity: 0.4;
}

.hero,
.trust-strip,
.marquee,
.section,
.cta-band {
  position: relative;
  z-index: 1;
}

/* ---- Word-level headline reveals ---- */

.motion [data-words] .w,
.motion .hero-title .w {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.7em) rotate(1.5deg);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 55ms);
}

.motion [data-words].revealed .w {
  opacity: 1;
  transform: none;
}

/* Hero words fire on page load instead of scroll */
.motion.loaded .hero-title .w {
  opacity: 1;
  transform: none;
  transition-delay: calc(120ms + var(--i, 0) * 90ms);
}

.motion .hero-kicker,
.motion .hero-standfirst,
.motion .hero .lede,
.motion .hero-actions {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.motion.loaded .hero-kicker { opacity: 1; transform: none; transition-delay: 0.05s; }
.motion.loaded .hero-standfirst { opacity: 1; transform: none; transition-delay: 0.65s; }
.motion.loaded .hero .lede { opacity: 1; transform: none; transition-delay: 0.78s; }
.motion.loaded .hero-actions { opacity: 1; transform: none; transition-delay: 0.9s; }

/* ---- The drawn underline in the hero ---- */

.hero-u {
  position: relative;
  display: inline-block;
  color: var(--accent);
}

.u-stroke {
  position: absolute;
  left: -2%;
  bottom: -0.08em;
  width: 104%;
  height: 0.16em;
  overflow: visible;
}

.u-stroke path {
  fill: none;
  stroke: var(--warm);
  stroke-width: 7;
  stroke-linecap: round;
}

/* Reveal the underline with a left-to-right scale wipe rather than a dash
   offset. A dashed stroke leaves a round-cap dot at the path end before it
   draws; scaling the whole element from zero width renders nothing at all
   until the animation runs, so there is no stray dot on boot. */
.motion .u-stroke {
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.motion.loaded .u-stroke {
  animation: draw-x 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.75s forwards;
}

@keyframes draw-x {
  to { transform: scaleX(1); }
}

@keyframes draw-u {
  to { stroke-dashoffset: 0; }
}

/* ---- Hero mark: the box, with the path drawing out of its opening.
       The scroll line (JS) begins at [data-path-origin], which sits exactly
       where the clay stub ends, so the whole thing reads as one continuous
       path leaving the box and running down the page. ---- */

.hero-mark {
  position: absolute;
  right: 2vw;
  top: 40%;
  transform: translateY(-50%);
  width: 460px;            /* big, thick logo; fixed so widths are predictable */
  pointer-events: none;
  z-index: 0;
}

.hero-mark-bg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.hero-mark-bg path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Box: a faint, heavy container. */
.hero-mark-bg .bx {
  stroke: var(--ink);
  stroke-opacity: 0.15;
  stroke-width: 1.8;
}

/* The path out, in clay. Opacity is on the GROUP so overlapping segment joins
   composite as solid (no darker dots); the descent slims on an S-curve from the
   box weight (~12px) to the scroll line (~4px) for one gentle taper. */
.pathout {
  opacity: 0.4;
}

.pathout .pa {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.88;   /* ~12px at this size: the thick box line */
}

.pathout .ptaper {
  fill: var(--accent);  /* the descent is filled, so its edges taper smoothly */
  stroke: none;
}

/* Anchor at the tapered path's end: (64,78) in the 72x96 viewBox. */
.path-origin {
  position: absolute;
  left: 88.9%;
  top: 81.25%;
  width: 1px;
  height: 1px;
}

/* Fade the whole mark in on load (no dashed draw, so no cap artifacts). */
.motion .hero-mark-bg { opacity: 0; }
.motion.loaded .hero-mark-bg { animation: fade-soft 1.1s ease 0.35s forwards; }

@keyframes fade-soft {
  to { opacity: 1; }
}

@media (max-width: 960px) {
  .hero-mark { display: none; }
}

/* ---- Marquee: the busywork ticker (illustrative, not a service menu) ---- */

.marquee {
  max-width: var(--container);
  margin: 0 auto;
  padding: 15px 24px;
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid var(--line);
}

.marquee-tag {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.marquee-viewport {
  flex: 1 1 auto;
  overflow: hidden;
  white-space: nowrap;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 5%, #000 92%, transparent 100%);
}

.marquee-track {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 13.5px;
  letter-spacing: 0.01em;
  color: var(--muted);
}

.motion .marquee-track {
  animation: marquee 48s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (max-width: 620px) {
  .marquee-tag { display: none; }
}

/* ---- Cards: lift + draw their marks on hover ---- */

.card {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.35s ease, border-color 0.35s ease;
}

.card:hover {
  transform: translateY(-6px);
  border-color: var(--warm);
  box-shadow: 0 18px 40px rgba(42, 42, 42, 0.08);
}

.card-mark path,
.card-mark circle,
.card-mark rect {
  transition: stroke 0.3s ease;
}

.motion .card:hover .card-mark [pathLength] {
  stroke-dasharray: 100;
  animation: draw-u 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}

/* ---- Steps: giant outlined numerals that fill on reveal ---- */

.step {
  border-top: 0;
  padding-top: 0;
}

.step-num {
  display: block;
  font-size: clamp(72px, 8vw, 112px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--accent);
  margin-bottom: 14px;
  transition: color 0.8s ease 0.3s;
}

.step.revealed .step-num {
  color: var(--accent);
  -webkit-text-stroke: 1.5px var(--accent);
}

html:not(.js) .step-num {
  color: var(--accent);
}

.motion .step {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: calc(var(--i, 0) * 140ms);
}

.motion .step.revealed {
  opacity: 1;
  transform: none;
}

/* ---- Draft demo ---- */

.demo {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 56px 1.2fr;
  gap: 0;
  align-items: stretch;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.demo-pane {
  padding: 30px 28px;
}

.demo-in {
  background: var(--bg);
  border-right: 1px solid var(--line);
}

.demo-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.demo-photos {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.demo-photos span {
  width: 52px;
  height: 42px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background:
    radial-gradient(circle at 30% 65%, var(--line) 0 6px, transparent 7px),
    linear-gradient(160deg, transparent 55%, var(--line) 56% 100%);
  background-color: var(--paper);
}

.demo-note {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  margin: 0;
}

.demo-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.demo-out {
  position: relative;
}

.demo-type {
  font-size: 17px;
  line-height: 1.65;
  margin: 0;
  min-height: 7.5em;
}

.demo-type.typing::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: caret 0.85s steps(1) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

.demo-stamp {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 18px 0 0;
}

.motion .demo-stamp {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.motion .demo-stamp.shown {
  opacity: 1;
  transform: none;
}

.demo-replay {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  margin-top: 14px;
}

.demo-replay:hover { color: var(--accent); }

.demo-replay { display: none; }

.js .demo-replay { display: inline-block; }

@media (max-width: 860px) {
  .demo { grid-template-columns: 1fr; }
  .demo-in { border-right: 0; border-bottom: 1px solid var(--line); }
  .demo-bridge { padding: 10px 0; transform: rotate(90deg); }
}

/* ---- Artifact page: tilt lives in JS; zoom state here ---- */

.artifact-page {
  cursor: zoom-in;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
  will-change: transform;
}

.artifact-page:hover {
  box-shadow: 0 24px 56px rgba(42, 42, 42, 0.16);
}

.artifact-page.zoomed {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1.12);
  z-index: 300;
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow: auto;
  cursor: zoom-out;
  box-shadow: 0 40px 90px rgba(42, 42, 42, 0.35);
}

.veil {
  position: fixed;
  inset: 0;
  background: rgba(42, 42, 42, 0.45);
  z-index: 299;
  cursor: zoom-out;
  animation: veil-in 0.25s ease;
}

@keyframes veil-in {
  from { opacity: 0; }
}

.artifact-hint {
  display: none;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 14px;
}

.js .artifact-hint { display: block; }

/* ---- Generic stagger for grids ---- */

.motion [data-stagger] > * {
  transition-delay: calc(var(--i, 0) * 110ms);
}

/* ---- Mega footer ---- */

.footer-mega {
  flex: 1 1 100%;
  margin: 0 0 22px;
  font-size: clamp(44px, 10.5vw, 150px);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(247, 243, 235, 0.38);
  user-select: none;
}

/* What the name means, sitting under the big wordmark. */
.footer-tagline {
  flex: 1 1 100%;
  margin: 0 0 40px;
  max-width: 30ch;
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--bg);
}

.motion .footer-tagline {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease 0.1s, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.motion .footer-tagline.revealed {
  opacity: 1;
  transform: none;
}

.motion .footer-mega {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.motion .footer-mega.revealed {
  opacity: 1;
  transform: none;
}

.site-footer:hover .footer-mega {
  -webkit-text-stroke-color: rgba(212, 165, 116, 0.6);
  transition: -webkit-text-stroke-color 0.6s ease;
}

/* ---- Buttons get springy ---- */

.btn {
  will-change: transform;
}

.btn--primary:active {
  transform: scale(0.97);
}

/* ---- Reduced motion: flat, instant, readable ---- */

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none !important; }
  .u-stroke path { stroke-dashoffset: 0 !important; animation: none !important; }
  .hero-mark-bg path { stroke-dashoffset: 0 !important; animation: none !important; }
  .step-num { color: var(--accent); }
}
