/* ============================================================
   Torpie Digital · "The Workshop" design system
   Source of truth: torpie-brand-guide v1
   ============================================================ */

:root {
  /* Color tokens */
  --paper: #FAF8F4;
  --card: #FFFFFF;
  --ink: #1A2B3C;
  --green: #1E6B4F;
  --green-dark: #175540;
  --brass: #C9962E;
  --brass-dark: #8F6A1E;
  --sage: #DCE8E0;
  --clay: #B85C38;
  --muted: #5A6B7A;
  --line: #E5E1D8;
  --ink-text: #F5F3EE;
  --dark-muted: #C4CBD3;
  --dark-link: #8FD3B6;
  --error: #B3402E;

  /* Shadows */
  --shadow-card: 0 1px 3px rgba(26, 43, 60, 0.06);
  --shadow-float: 0 16px 40px rgba(26, 43, 60, 0.10);

  /* Radii */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;

  /* Type */
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  /* Layout */
  --container: 1140px;
  --section-y: 80px;
  --section-y-mobile: 56px;

  /* Motion */
  --reveal-duration: 0.55s;
  --reveal-distance: 14px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0 0 0.5em; }
h1 { font-size: clamp(2.5rem, 5.8vw, 3.9rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.12; }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.4rem); font-weight: 600; letter-spacing: -0.015em; line-height: 1.14; }
h3 { font-size: 1.28rem; font-weight: 600; line-height: 1.25; }
h4 { font-size: 1.06rem; font-weight: 600; }
p { margin: 0 0 1em; max-width: 65ch; }
p:last-child { margin-bottom: 0; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--ink-text);
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding-block: var(--section-y); }
.section--white {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.section--sage { background: var(--sage); }
.section--dark { background: var(--ink); color: var(--ink-text); }
.section--dark p { color: var(--ink-text); }
.section--dark .lede, .section--dark .text-muted { color: var(--dark-muted); }
.section--dark a:not(.btn) { color: var(--dark-link); }
.section--quiet { padding-block: 56px; }

@media (max-width: 760px) {
  .section { padding-block: var(--section-y-mobile); }
}

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Eyebrow ---------- */
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brass-dark);
  margin-bottom: 14px;
}
.eyebrow::after {
  content: "";
  display: block;
  width: 32px;
  height: 2px;
  background: var(--brass);
  margin-top: 8px;
}
.eyebrow--center { text-align: center; }
.eyebrow--center::after { margin-inline: auto; }
.section--dark .eyebrow { color: var(--brass); }

.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center p { margin-inline: auto; }
.lede { font-size: 1.12rem; color: var(--muted); }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-sm);
  padding: 14px 28px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  border: 1.5px solid transparent;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--green); color: #FFFFFF; }
.btn-primary:hover { background: var(--green-dark); }
/* Higher specificity guard: nav link rules must never recolor button text */
.site-nav a.btn-primary, .section--dark a.btn-primary { color: #FFFFFF; }
.btn-secondary { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-secondary:hover { border-color: var(--green); color: var(--green); }
.btn-on-dark { background: var(--paper); color: var(--ink); }
.btn-on-dark:hover { background: #FFFFFF; color: var(--ink); }
.section--dark a.btn-on-dark { color: var(--ink); }
.btn-block { width: 100%; }

.arrow-link { font-weight: 600; white-space: nowrap; }

/* ---------- Announcement bar ---------- */
.announcement {
  background: var(--ink);
  color: var(--ink-text);
  font-size: 14px;
  position: relative;
  z-index: 60;
}
.announcement__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding-block: 10px;
  padding-right: 52px;
  text-align: center;
}
.announcement a { color: var(--dark-link); font-weight: 600; }
.announcement__close {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--dark-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
}
.announcement__close:hover { color: var(--ink-text); }
.announcement[hidden] { display: none; }

/* ---------- Header / nav ---------- */
.site-header {
  background: rgba(250, 248, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo__mark { width: 32px; height: 32px; flex: none; }
.logo__wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-transform: lowercase;
  white-space: nowrap;
}
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  color: var(--ink);
  font-size: 15.5px;
  font-weight: 500;
}
.site-nav a:not(.btn):hover { color: var(--green); text-decoration: none; }
.site-nav a[aria-current="page"]:not(.btn) {
  color: var(--green);
  font-weight: 600;
}
.site-nav .btn { padding: 11px 20px; }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 10px;
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px 24px 20px;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
}

/* ---------- Hero ---------- */
.hero { padding-block: 64px 76px; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}
.hero__lede { font-size: 1.16rem; color: var(--muted); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero__trust {
  margin-top: 26px;
  font-size: 14.5px;
  color: var(--muted);
}
.hero--simple { padding-block: 88px; }
.hero--simple .section-head { margin-bottom: 0; }
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .hero { padding-block: 44px 56px; }
  .hero--simple { padding-block: 56px; }
}

/* ---------- Browser frame ---------- */
.browser-frame {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-float);
  overflow: hidden;
}
.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #F1EEE7;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.browser-frame__dots { display: flex; gap: 6px; flex: none; }
.browser-frame__dots span {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #D8D2C4;
}
.browser-frame__url {
  flex: 1;
  min-width: 0;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.browser-frame__body { aspect-ratio: 16 / 10.5; position: relative; }
.browser-frame__body img { width: 100%; height: 100%; object-fit: cover; }

.placeholder-shot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background:
    linear-gradient(160deg, var(--sage) 0%, #EAF0EC 55%, var(--paper) 100%);
  color: var(--muted);
  font-size: 13.5px;
  text-align: center;
  padding: 20px;
}
.placeholder-shot svg { width: 40px; height: 40px; opacity: 0.75; }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  padding: 30px;
}
.card--featured {
  border-top: 3px solid var(--green);
  position: relative;
}
.card__flag {
  position: absolute;
  top: 0;
  left: 30px;
  transform: translateY(-50%);
  background: var(--brass);
  color: #3A2C0B;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}
.price-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.price {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--green);
  white-space: nowrap;
}
.price small { font-size: 0.95rem; color: var(--muted); font-weight: 500; font-family: var(--font-body); }
.card .lede { font-size: 1rem; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  background: var(--sage);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  padding: 4px 14px;
}

/* ---------- Check list ---------- */
.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.check-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14.5px;
  line-height: 1.5;
}
.check-list .chip {
  flex: none;
  width: 16px; height: 16px;
  margin-top: 3px;
  background: var(--sage);
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.check-list .chip svg { width: 11px; height: 11px; stroke: var(--green); }
.check-list--inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
}

/* ---------- Stats ---------- */
.stat { border-left: 2px solid var(--brass); padding-left: 20px; }
.stat__number {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.stat__label { font-size: 14.5px; color: var(--muted); margin-top: 8px; }
.stat__source { font-size: 13px; color: var(--muted); margin-top: 6px; font-style: normal; }

/* ---------- Process (ghost numerals) ---------- */
.step-card { position: relative; overflow: hidden; }
.step-card__num {
  position: absolute;
  top: -18px;
  right: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 6rem;
  line-height: 1;
  color: rgba(26, 43, 60, 0.05);
  user-select: none;
  pointer-events: none;
}
.step-card h3 { position: relative; }
.step-card p { position: relative; font-size: 15px; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin-inline: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
  padding: 20px 4px;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  color: var(--green);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq__answer { padding: 0 4px 22px; color: var(--muted); font-size: 15.5px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; }
.form label {
  display: block;
  font-size: 14.5px;
  font-weight: 600;
  margin-bottom: 6px;
}
.form input, .form select, .form textarea {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 14px;
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink);
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(30, 107, 79, 0.16);
}
.form textarea { min-height: 130px; resize: vertical; }
.field-error {
  display: none;
  color: var(--error);
  font-size: 13.5px;
  margin-top: 6px;
}
.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--error); }
.field.is-invalid .field-error { display: block; }
.form__notice {
  display: none;
  border: 1px solid var(--line);
  border-left: 3px solid var(--green);
  background: var(--sage);
  border-radius: var(--r-sm);
  padding: 16px 18px;
  font-size: 15px;
}
.form__notice.is-visible { display: block; }
.form__notice--error { border-left-color: var(--error); background: #FBF0EE; }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ---------- Timeline strip ---------- */
.timeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  counter-reset: none;
}
.timeline__item {
  padding: 20px 18px 20px 0;
  border-top: 2px solid var(--line);
  position: relative;
  font-size: 14.5px;
}
.timeline__item::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
}
.timeline__week {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 6px;
}
.timeline__item p { font-size: 14.5px; color: var(--muted); }
@media (max-width: 860px) {
  .timeline { grid-template-columns: minmax(0, 1fr); }
  .timeline__item {
    border-top: 0;
    border-left: 2px solid var(--line);
    padding: 0 0 22px 20px;
  }
  .timeline__item::before { top: 2px; left: -6px; }
}

/* ---------- Case studies ---------- */
.case {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 56px;
  align-items: center;
}
.case + .case { margin-top: 88px; }
.case--flip .case__media { order: -1; }
.case__tag { margin-bottom: 18px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.case__source { font-size: 13px; color: var(--muted); }
.case__results { margin-top: 22px; }
@media (max-width: 980px) {
  .case { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .case--flip .case__media { order: 0; }
  .case + .case { margin-top: 72px; }
}

/* ---------- Pricing toggle ---------- */
.toggle {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  gap: 4px;
}
.toggle button {
  border: 0;
  background: none;
  font-family: var(--font-body);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 20px;
  min-height: 44px;
  cursor: pointer;
}
.toggle button[aria-pressed="true"] {
  background: var(--green);
  color: #FFFFFF;
}
[data-billing] .annual-price { display: none; }
[data-billing="annual"] .annual-price { display: inline; }
[data-billing="annual"] .monthly-price { display: none; }

/* ---------- Clay founding-rates block (max one per page) ---------- */
.founding-block {
  border: 1px solid var(--line);
  border-left: 4px solid var(--clay);
  background: var(--card);
  border-radius: var(--r-md);
  padding: 34px;
  box-shadow: var(--shadow-card);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid rgba(245, 243, 238, 0.14);
  background: var(--ink);
  color: var(--dark-muted);
  padding-block: 64px 40px;
  font-size: 14.5px;
}
.site-footer a { color: var(--dark-muted); }
.site-footer a:hover { color: var(--ink-text); }
.site-footer .logo { color: var(--ink-text); }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 4fr);
  gap: 40px;
  margin-bottom: 44px;
}
.footer-nav { display: grid; gap: 10px; }
.footer-tagline { color: var(--dark-muted); margin-top: 14px; }
.footer-bottom {
  border-top: 1px solid rgba(245, 243, 238, 0.14);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13.5px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------- Sticky mobile CTA ---------- */
.sticky-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(250, 248, 244, 0.85);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
  transform: translateY(110%);
  transition: transform 0.3s ease;
}
.sticky-cta.is-visible { transform: translateY(0); }
@media (max-width: 760px) {
  .sticky-cta { display: block; }
  body.has-sticky-cta { padding-bottom: 76px; }
}
@media (prefers-reduced-motion: reduce) {
  .sticky-cta { transition: none; }
}

/* ---------- Scroll reveal (single sanctioned effect) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
    transition: opacity var(--reveal-duration) ease, transform var(--reveal-duration) ease;
  }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ---------- Utilities ---------- */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.center { text-align: center; }
.center p { margin-inline: auto; }
.flow > * + * { margin-top: 16px; }
.divider-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--card);
  padding-block: 40px;
}

/* ---------- Added during refinement pass ---------- */
.h-md { font-size: 1.6rem; }
.h-sm { font-size: 1.5rem; }
.stack-40 > * + * { margin-top: 40px; }
.card-cols {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 20px 48px;
}
.card-cols__aside { align-self: start; }
@media (max-width: 860px) {
  .card-cols { grid-template-columns: minmax(0, 1fr); }
}
.photo-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  aspect-ratio: 4 / 5;
  position: relative;
  margin: 0;
}
.contact-grid { align-items: start; gap: 56px; }

.mb-0 { margin-bottom: 0; }
.card + .card, .stack-40 .card + .card { }

.card-cols h4 { margin-top: 0; }
.plan-gap { margin-top: 44px; }

/* ============================================================
   BOLD PASS — motion & depth layer
   Every animation is gated behind prefers-reduced-motion.
   ============================================================ */

/* ---------- Paper grain overlay ---------- */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
}

/* ---------- Brass scroll progress bar ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  z-index: 9999;
  background: var(--brass);
  transform-origin: 0 50%;
  transform: scaleX(var(--scroll-progress, 0));
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
}

/* ---------- Hero signature moment ---------- */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  top: -220px; right: -180px;
  width: 640px; height: 640px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(220, 232, 224, 0.85), rgba(220, 232, 224, 0));
  pointer-events: none;
}
.hero .container { position: relative; }

@media (prefers-reduced-motion: no-preference) {
  .hero-word {
    display: inline-block;
    opacity: 0;
    transform: translateY(0.55em);
    animation: word-rise 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.08s * var(--i, 0));
  }
  @keyframes word-rise {
    to { opacity: 1; transform: none; }
  }
  .hero__lede, .hero__actions, .hero__trust {
    opacity: 0;
    animation: fade-rise 0.7s ease forwards;
  }
  .hero__lede { animation-delay: 0.55s; }
  .hero__actions { animation-delay: 0.7s; }
  .hero__trust { animation-delay: 0.85s; }
  @keyframes fade-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
  }
}

/* Self-drawing brass underline on the last hero word */
.hero-accent { position: relative; display: inline-block; }
.hero-accent .hero-word { position: relative; z-index: 1; }
.hero-accent svg {
  position: absolute;
  left: -3%; bottom: -0.3em;
  width: 106%; height: 0.3em;
  overflow: visible;
  pointer-events: none;
  z-index: 0;
}
.hero-accent svg path {
  fill: none;
  stroke: var(--brass);
  stroke-width: 5;
  stroke-linecap: round;
}
@media (prefers-reduced-motion: no-preference) {
  .hero-accent svg path {
    stroke-dasharray: 120;
    stroke-dashoffset: 120;
    animation: draw-line 0.7s ease-out forwards;
    animation-delay: 1s;
  }
  @keyframes draw-line { to { stroke-dashoffset: 0; } }
}

/* Floating, cursor-tilting hero mockup */
.hero__media { perspective: 1100px; }
@media (prefers-reduced-motion: no-preference) {
  .hero__media .browser-frame {
    opacity: 0;
    animation: frame-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.45s forwards;
    will-change: transform;
  }
  @keyframes frame-in {
    from { opacity: 0; transform: translateY(28px) scale(0.97); }
    to { opacity: 1; transform: none; }
  }
  .hero__media.is-settled .browser-frame {
    animation: frame-float 7s ease-in-out infinite;
  }
  @keyframes frame-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-9px); }
  }
  .hero__media.is-tilting .browser-frame {
    animation: none;
    transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(-4px);
    transition: transform 0.18s ease-out;
  }
}

/* ---------- Staggered reveals ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transition-delay: var(--stagger, 0s); }
}

/* ---------- Hover depth ---------- */
@media (prefers-reduced-motion: no-preference) {
  .card {
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease, border-color 0.3s ease,
                opacity var(--reveal-duration) ease;
  }
  .card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px -18px rgba(26, 43, 60, 0.28);
    border-color: var(--green);
  }
  .card.reveal { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.3s ease, border-color 0.3s ease,
                opacity var(--reveal-duration) ease; }
  .card.reveal:not(.is-visible) { opacity: 0; transform: translateY(var(--reveal-distance)); }
  .step-card .step-card__num { transition: color 0.35s ease; }
  .step-card:hover .step-card__num { color: var(--brass); }
}

/* Primary button shine sweep + arrow nudge */
.btn { position: relative; overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .btn-primary::after {
    content: "";
    position: absolute;
    top: 0; left: -80%;
    width: 55%; height: 100%;
    background: linear-gradient(105deg, transparent, rgba(245, 243, 238, 0.35), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    pointer-events: none;
  }
  .btn-primary:hover::after { left: 130%; }
  .arrow-link { transition: color 0.2s ease; }
  .arrow-link:hover { letter-spacing: 0.01em; }
}

/* ---------- Dark CTA drama ---------- */
.section--dark { position: relative; overflow: hidden; }
.section--dark::before {
  content: "";
  position: absolute;
  right: -70px; bottom: -110px;
  width: 380px; height: 380px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12.5l5 5L20 6.5' fill='none' stroke='%23F5F3EE' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.05;
  transform: rotate(-8deg);
  pointer-events: none;
}
.section--dark::after {
  content: "";
  position: absolute;
  top: -160px; left: -120px;
  width: 480px; height: 480px;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(30, 107, 79, 0.45), rgba(30, 107, 79, 0));
  pointer-events: none;
}
.section--dark > * { position: relative; z-index: 1; }

/* ---------- Marquee band ---------- */
@media (prefers-reduced-motion: no-preference) {
  .marquee {
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
            mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  }
  .marquee__track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: marquee-scroll 36s linear infinite;
  }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  .marquee__track .check-list {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 12px;
    margin: 0;
  }
  @keyframes marquee-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
  }
}

/* ---------- Stat count-up ---------- */
.stat__number { font-variant-numeric: tabular-nums; }

/* ============================================================
   FANCY PASS 2 — texture, chrome, and choreography
   ============================================================ */

/* ---------- Workshop grid texture on paper sections ---------- */
.hero, .section--sage, .section--quiet {
  background-image:
    linear-gradient(rgba(26, 43, 60, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26, 43, 60, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
}
.section--sage {
  background-color: var(--sage);
  background-image:
    linear-gradient(rgba(30, 107, 79, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 107, 79, 0.06) 1px, transparent 1px);
}

/* Giant Open Shop watermark in sage sections */
.section--sage { position: relative; overflow: hidden; }
.section--sage::before {
  content: "";
  position: absolute;
  right: -60px; top: 50%;
  width: 340px; height: 340px;
  transform: translateY(-50%) rotate(6deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cpath d='M30 5 H11 a6 6 0 0 0 -6 6 v18 a6 6 0 0 0 6 6 h18 a6 6 0 0 0 6 -6 V16' fill='none' stroke='%231E6B4F' stroke-width='2.4' stroke-linecap='round'/%3E%3Cpath d='M13 21 L19 27 L34 8' fill='none' stroke='%231E6B4F' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: 0.07;
  pointer-events: none;
}
.section--sage .container { position: relative; }

/* ---------- Open Shop mark: draw on load, redraw on hover ---------- */
.logo__mark { overflow: visible; }
@media (prefers-reduced-motion: no-preference) {
  .logo__mark .mark-frame {
    stroke-dasharray: 130;
    stroke-dashoffset: 130;
    animation: mark-draw 0.9s ease-out 0.1s forwards;
  }
  .logo__mark .mark-check {
    stroke-dasharray: 46;
    stroke-dashoffset: 46;
    animation: mark-draw 0.5s ease-out 0.85s forwards;
  }
  @keyframes mark-draw { to { stroke-dashoffset: 0; } }
  .logo:hover .mark-check {
    animation: mark-redraw 0.6s ease-out forwards;
  }
  @keyframes mark-redraw {
    0% { stroke-dashoffset: 46; }
    100% { stroke-dashoffset: 0; }
  }
}

/* ---------- Header: shrink + deepen on scroll ---------- */
.site-header {
  transition: box-shadow 0.3s ease;
}
.site-header__inner {
  transition: min-height 0.3s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 10px 30px -18px rgba(26, 43, 60, 0.35);
}
.site-header.is-scrolled .site-header__inner { min-height: 58px; }

/* Animated nav underline */
.site-nav a:not(.btn) { position: relative; }
.site-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
.site-nav a:not(.btn):hover::after,
.site-nav a[aria-current="page"]:not(.btn)::after { transform: scaleX(1); }
@media (max-width: 860px) {
  .site-nav a:not(.btn)::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .site-header, .site-header__inner, .site-nav a:not(.btn)::after { transition: none; }
}

/* ---------- Footer: ghost wordmark + warmth ---------- */
.site-footer { position: relative; overflow: hidden; }
.footer-ghost {
  position: absolute;
  left: 50%; bottom: -0.32em;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(72px, 13vw, 190px);
  line-height: 1;
  white-space: nowrap;
  color: rgba(245, 243, 238, 0.035);
  pointer-events: none;
  user-select: none;
}
.site-footer .container { position: relative; }
.site-footer .footer-nav a,
.site-footer .flow a {
  position: relative;
  transition: color 0.2s ease, padding-left 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
@media (prefers-reduced-motion: no-preference) {
  .footer-nav a:hover { padding-left: 10px; }
  .footer-nav a::before {
    content: "";
    position: absolute;
    left: 0; top: 50%;
    width: 6px; height: 2px;
    background: var(--dark-link);
    transform: translateY(-50%) scaleX(0);
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .footer-nav a:hover::before { transform: translateY(-50%) scaleX(1); }
}
.footer-bottom { position: relative; }

/* ---------- Eyebrow rule grows in on reveal ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal .eyebrow::after,
  .reveal.eyebrow::after {
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.25s;
  }
  .reveal.is-visible .eyebrow::after,
  .reveal.is-visible.eyebrow::after { transform: scaleX(1); }
  .eyebrow--center::after { transform-origin: center; }
  .hero .eyebrow::after {
    transform: scaleX(0);
    transform-origin: left center;
    animation: rule-grow 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.4s forwards;
  }
  @keyframes rule-grow { to { transform: scaleX(1); } }
}

/* ---------- FAQ: smooth open/close ---------- */
.faq details .faq__answer { overflow: hidden; }
@media (prefers-reduced-motion: no-preference) {
  .faq details.is-animating .faq__answer { transition: height 0.32s cubic-bezier(0.22, 1, 0.36, 1); }
  .faq summary::after { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
}

/* ---------- Timeline connector draws across ---------- */
.timeline { position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  left: 2%; right: 2%; top: 50px;
  height: 2px;
  background: var(--border);
  z-index: 0;
}
.timeline > * { position: relative; z-index: 1; }
@media (prefers-reduced-motion: no-preference) {
  .timeline::before {
    background: linear-gradient(90deg, var(--brass), var(--brass)) no-repeat 0 0 / 0% 100%, var(--border);
    transition: background-size 1.4s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
  }
  .timeline.is-inview::before { background-size: 100% 100%; }
}
@media (max-width: 860px) {
  .timeline::before { display: none; }
}

/* ---------- Check chips pop in ---------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal .check-list li .chip { transform: scale(0.4); opacity: 0; transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s ease; }
  .reveal.is-visible .check-list li .chip { transform: scale(1); opacity: 1; }
  .reveal.is-visible .check-list li:nth-child(2) .chip { transition-delay: 0.08s; }
  .reveal.is-visible .check-list li:nth-child(3) .chip { transition-delay: 0.16s; }
  .reveal.is-visible .check-list li:nth-child(4) .chip { transition-delay: 0.24s; }
  .reveal.is-visible .check-list li:nth-child(5) .chip { transition-delay: 0.32s; }
  .reveal.is-visible .check-list li:nth-child(6) .chip { transition-delay: 0.4s; }
}

/* ---------- Recent builds gallery ---------- */
.build-gallery { margin-top: 8px; }
.build-tile {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.build-tile h3 { margin: 16px 0 4px; font-size: 1.1rem; }
.build-tile p { margin: 0; }
.build-tile .browser-frame { margin: 0; }
@media (prefers-reduced-motion: no-preference) {
  .build-tile .browser-frame {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease;
  }
  .build-tile:hover .browser-frame {
    transform: translateY(-6px) scale(1.015);
    box-shadow: 0 22px 44px -20px rgba(26, 43, 60, 0.35);
  }
  .build-tile:hover h3 { color: var(--green); }
}

/* ---------- Photo card with real image ---------- */
.photo-card img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: inherit;
  filter: grayscale(1) contrast(1.02);
}
@media (prefers-reduced-motion: no-preference) {
  .photo-card { overflow: hidden; }
  .photo-card img { transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1); }
  .photo-card:hover img { filter: grayscale(0.15) contrast(1.02); transform: scale(1.02); }
}

/* ---------- Form polish + conversion cues ---------- */
.field input, .field select, .field textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  box-shadow: 0 0 0 4px rgba(30, 107, 79, 0.14);
}
.form-microcopy {
  margin-top: 12px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-microcopy svg { width: 15px; height: 15px; flex: none; stroke: var(--green); }
.btn.is-loading { opacity: 0.7; pointer-events: none; }
.btn.is-loading::before {
  content: "";
  display: inline-block;
  width: 14px; height: 14px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn.is-loading::before { display: none; }
}
