/* ============================================================
   Malrey — a booking team for tattoo studios
   Ink on near-black, two sections flipped to paper.
   Display: Fraunces · Body/labels: Instrument Sans
   ============================================================ */

:root {
  /* --- ground --- */
  --ink:        #0e0d0c;
  --ink-2:      #141210;          /* raised (form, phone screen) */
  --paper:      #e9e3d7;          /* light sections — deliberately not #F4F1EA */

  /* --- three named text tones per ground (no scattered opacity steps) --- */
  --t1: #f1ebe0;                  /* primary on ink */
  --t2: #a7a094;                  /* secondary on ink */
  --t3: #8a8175;                  /* tertiary on ink  (4.9:1 — AA for small text) */
  --p1: #1a1714;                  /* primary on paper */
  --p2: #554d44;                  /* secondary on paper */
  --p3: #625a51;                  /* tertiary on paper (4.9:1 — AA for small text) */

  --coral:   #ff5a3c;
  --coral-2: #ff7357;

  /* --- rules --- */
  --rule:        rgba(241, 235, 224, 0.12);
  --rule-strong: rgba(241, 235, 224, 0.22);
  --rule-paper:  rgba(26, 23, 20, 0.16);

  /* --- spacing scale: only these values are used --- */
  --s1: 4px;  --s2: 8px;   --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 40px; --s7: 64px;  --s8: 96px; --s9: 160px;

  /* --- one radius everywhere (the phone is the sole exception) --- */
  --radius: 2px;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Instrument Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* --- containers vary by content type --- */
  --w-wide:   1400px;
  --w-mid:    1180px;
  --w-narrow: 760px;
  --pad: clamp(20px, 5vw, 64px);

  --nav-h: 68px;
}

* { box-sizing: border-box; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--t1);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

svg { display: block; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: var(--radius); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

section[id], main[id] { scroll-margin-top: var(--s8); }

/* ---------- film grain: depth, not an effect ---------- */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 2;
  pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- containers ---------- */
.container { width: 100%; max-width: var(--w-mid); margin: 0 auto; padding-inline: var(--pad); }
.container-wide { max-width: var(--w-wide); }
.container-narrow { max-width: var(--w-narrow); }

/* ============================================================
   TYPE
   ============================================================ */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--t2);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  font-feature-settings: "liga" 1, "kern" 1;
  font-size: clamp(3rem, 8vw, 7.5rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
}
.display em { font-style: italic; }

.headline {
  font-family: var(--serif);
  font-weight: 400;
  font-feature-settings: "liga" 1, "kern" 1;
  font-size: clamp(2rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0;
}
.headline em { font-style: italic; }

.lede {
  font-size: 1.1875rem;
  line-height: 1.6;
  color: var(--t2);
  max-width: 46ch;
  text-wrap: pretty;
}
.lede b { color: var(--t1); font-weight: 600; }

/* ============================================================
   BUTTONS + LINKS
   ============================================================ */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--s2);
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: var(--s4) var(--s5);
  border: 0; border-radius: var(--radius);
  cursor: pointer;
  overflow: hidden;
  color: #23120c;
  background: var(--coral);
}
.btn > * { position: relative; z-index: 1; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: var(--coral-2);
  transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.btn:hover::before { transform: scaleX(1); }
.btn-block { width: 100%; }

.text-link {
  position: relative;
  display: inline-flex; align-items: center; gap: var(--s2);
  font-weight: 500; color: var(--t1);
}
.text-link::after {
  content: ""; position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px; background: var(--coral);
  transform: scaleX(0); transform-origin: left;
  transition: transform .2s ease;
}
.text-link:hover::after { transform: scaleX(1); }
.text-link .ar { color: var(--coral); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.site-header.is-stuck {
  background: var(--ink);
  border-bottom-color: var(--rule);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.wordmark { display: inline-flex; align-items: center; gap: var(--s2); color: var(--t1); }
.brand-mark { display: inline-flex; color: var(--t1); }
.brand-name { font-family: var(--serif); font-size: 1.35rem; letter-spacing: -0.01em; }

.site-nav { position: relative; display: flex; align-items: center; gap: var(--s5); }
.site-nav .nav-link { font-size: 0.95rem; color: var(--t2); padding: var(--s2) 0; }
.site-nav .nav-link:hover, .site-nav .nav-link.is-active { color: var(--t1); }
/* Over the hero the nav CTA stays quiet so the hero button owns the single
   coral moment; once the nav is stuck it becomes the primary target. */
.nav-cta {
  font-weight: 600; font-size: 0.95rem;
  color: var(--t1); background: transparent;
  padding: var(--s2) var(--s4);
  border: 1px solid var(--rule-strong); border-radius: var(--radius);
  transition: background .3s ease, color .3s ease, border-color .3s ease;
}
.is-stuck .nav-cta { color: #23120c; background: var(--coral); border-color: var(--coral); }
.nav-cta:hover { border-color: var(--coral); }
.is-stuck .nav-cta:hover { background: var(--coral-2); }
/* the moving coral underline */
.nav-ind {
  position: absolute; left: 0; bottom: 0; height: 2px; width: 0;
  background: var(--coral); opacity: 0;
  transition: transform .3s ease, width .3s ease, opacity .2s ease;
}

.nav-toggle {
  display: none;
  background: none; border: 0; cursor: pointer;
  padding: var(--s3); margin-right: calc(var(--s3) * -1);
  color: var(--t1);
}
.nav-toggle-bars { display: block; width: 26px; }
.nav-toggle-bars i {
  display: block; height: 1.5px; background: currentColor;
  transition: transform .3s ease, opacity .3s ease;
}
.nav-toggle-bars i + i { margin-top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars i:last-child  { transform: translateY(-4px) rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0; z-index: 39;
  background: var(--ink);
  display: grid; place-items: center;
}
.nav-overlay[hidden] { display: none; }
.nav-overlay nav { display: grid; gap: var(--s6); text-align: center; }
.nav-overlay a {
  font-family: var(--serif); font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1; color: var(--t1);
}
.nav-overlay a:last-child { color: var(--coral); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding-block: var(--s8) var(--s7); }
.hero-inner { max-width: var(--w-wide); }
.hero-head { margin-bottom: var(--s7); }
.hero-head .eyebrow { display: block; margin-bottom: var(--s5); }
.hero-body { display: grid; grid-template-columns: 1fr; gap: var(--s7); align-items: start; }
.hero-copy .lede { margin: 0 0 var(--s6); }
.hero-actions { display: flex; align-items: center; gap: var(--s5); flex-wrap: wrap; }

.guarantee {
  margin: var(--s5) 0 0;
  padding-left: var(--s4);
  border-left: 2px solid var(--t3);
  font-size: 1.0625rem; line-height: 1.45;
  color: var(--t1); max-width: 34ch;
}
.trust-row {
  list-style: none; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  margin: var(--s5) 0 0; padding: 0;
}
.trust-row li { font-size: 0.9375rem; color: var(--t2); display: inline-flex; align-items: center; gap: var(--s2); }
.trust-row li::before { content: ""; width: 4px; height: 4px; background: var(--t3); flex: none; }
.trust-stack { margin-top: var(--s5); }

/* ---------- sample reply expandable ---------- */
.sample { margin-top: var(--s5); max-width: 46ch; }
.sample > summary {
  list-style: none; cursor: pointer;
  display: inline-flex; align-items: center; gap: var(--s3);
  font-weight: 500; color: var(--t1); padding: var(--s1) 0;
}
.sample > summary::-webkit-details-marker { display: none; }
.sample > summary:hover { color: var(--coral); }
.sample-mark { position: relative; width: 12px; height: 12px; flex: none; }
.sample-mark::before, .sample-mark::after {
  content: ""; position: absolute; background: var(--t2); transition: transform .28s ease;
}
.sample-mark::before { left: 0; top: 5px; width: 12px; height: 1.5px; }
.sample-mark::after  { left: 5px; top: 0; width: 1.5px; height: 12px; }
.sample[open] .sample-mark { transform: rotate(45deg); }
.sample-body { padding-top: var(--s4); }
.dm-thread {
  list-style: none; margin: 0; padding: var(--s4) 0 0;
  display: grid; gap: var(--s4); border-top: 1px solid var(--rule);
}
.dm { display: grid; grid-template-columns: 46px 1fr; gap: var(--s3); align-items: baseline; }
.dm-time { font-size: 0.8125rem; color: var(--t3); font-variant-numeric: tabular-nums; }
.dm p { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--t2); }
.dm.out { padding-left: var(--s3); border-left: 1px solid var(--rule); }
.dm.out p { color: var(--t1); }

/* ============================================================
   PHONE MOCK  (the only element with a radius or a shadow)
   ============================================================ */
.hero-visual { display: flex; justify-content: center; }
.phone-wrap { margin: 0; width: 100%; max-width: 340px; }
.phone {
  border-radius: 30px;
  background: #050505;
  padding: 10px;
  border: 1px solid rgba(241, 235, 224, 0.09);
  /* lit from a window, set down on a bench */
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.7);
  transform: rotate(-2.5deg);          /* the one deliberate imperfection */
}
.phone-screen {
  border-radius: 22px;
  background: var(--ink-2);
  padding: var(--s4) var(--s3) var(--s4);
  overflow: hidden;
}
.phone-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s2);
  padding: 0 var(--s2) var(--s3);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--s4);
}
.phone-handle { font-size: 0.8125rem; font-weight: 600; color: var(--t1); }
.phone-badge { font-size: 0.6875rem; color: var(--t3); }

.thread { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s3); }
.msg { display: grid; gap: var(--s1); max-width: 86%; }
.msg p {
  margin: 0; font-size: 0.8125rem; line-height: 1.45;
  padding: var(--s3); border-radius: 14px;
}
.msg-t { font-size: 0.6875rem; color: var(--t3); font-variant-numeric: tabular-nums; }
.msg.in { justify-self: start; }
.msg.in p { background: rgba(241, 235, 224, 0.07); color: var(--t1); border-bottom-left-radius: 4px; }
.msg.out { justify-self: end; text-align: right; }
.msg.out p { background: rgba(241, 235, 224, 0.14); color: var(--t1); border-bottom-right-radius: 4px; }
.deposit-link {
  justify-self: end;
  font-size: 0.6875rem; color: var(--t1);
  border: 1px solid var(--rule-strong); border-radius: 999px;
  padding: var(--s1) var(--s3);
}
.chip-row { justify-self: end; max-width: none; }
.paid-chip {
  display: inline-block;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em;
  color: #23120c; background: var(--coral);
  padding: var(--s1) var(--s3); border-radius: 999px;
}
/* typing indicator — only ever shown mid-sequence */
.msg.typing { justify-self: start; display: none; }
.msg.typing.is-shown { display: grid; }
.msg.typing .dots {
  display: inline-flex; gap: 4px;
  background: rgba(241, 235, 224, 0.07);
  padding: var(--s3); border-radius: 14px; border-bottom-left-radius: 4px;
}
.msg.typing .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--t2); opacity: .5; }

.phone-cap {
  margin-top: var(--s5);
  display: flex; align-items: center; gap: var(--s3);
  font-size: 0.875rem; color: var(--t2);
}
.replay {
  background: none; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 0.8125rem; color: var(--t3);
  text-decoration: underline; text-underline-offset: 2px; padding: var(--s1);
}
.replay:hover { color: var(--coral); }

/* ============================================================
   SECTION SCAFFOLD
   ============================================================ */
.section { padding-block: var(--s8); }
.sec-head { max-width: 34ch; margin-bottom: var(--s7); }
.sec-head .eyebrow { display: block; margin-bottom: var(--s4); }
.sec-head .sec-sub {
  color: var(--t2); font-size: 1.0625rem; max-width: 46ch;
  margin: var(--s4) 0 0; text-wrap: pretty;
}

/* ---------- how it works: ruled steps, numerals hung in the margin ---------- */
.flow { border-top: 1px solid var(--rule); }
.beat {
  position: relative;
  display: grid; grid-template-columns: 1fr;
  gap: var(--s3);
  padding-block: var(--s6);
}
.beat-n {
  font-family: var(--serif); font-style: italic;
  font-size: 2rem; line-height: 1; color: var(--coral);
}
.beat-body h3 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.1;
  letter-spacing: -0.01em; margin: 0 0 var(--s3);
  text-wrap: balance;
}
.beat-body p { margin: 0; color: var(--t2); max-width: 54ch; text-wrap: pretty; }
.beat-body p b { color: var(--t1); font-weight: 600; }

/* demoted calendar */
.mini-cal {
  display: grid; gap: 0;
  margin-top: var(--s5); max-width: 420px;
  border-top: 1px solid var(--rule);
}
.mini-cal-head {
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--t3); padding: var(--s3) 0;
}
.mini-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: var(--s3);
  align-items: baseline; padding: var(--s3) 0;
  border-top: 1px solid var(--rule);
  font-size: 0.875rem;
}
.mini-row .t { color: var(--t2); font-variant-numeric: tabular-nums; }
.mini-row .n { color: var(--t1); }
.mini-row .s { color: var(--t3); font-size: 0.75rem; }
.mini-row .s.paid { color: var(--t2); }
.mini-row.is-open .n { color: var(--t3); }

/* ============================================================
   LIGHT SECTIONS (paper) — hard edges, no gradient
   ============================================================ */
.light {
  position: relative;
  background: var(--paper);
  color: var(--p1);
}
/* paper tooth, subtler than the film grain */
.light::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
}
.light > * { position: relative; z-index: 1; }
.light .eyebrow { color: var(--p2); }
.light .headline { color: var(--p1); }
.light .sec-sub { color: var(--p2); }

/* who you're talking to */
.people { padding-block: var(--s8); }
.people-inner { display: grid; grid-template-columns: 1fr; gap: var(--s6); }
.people-quote {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.12; letter-spacing: -0.015em;
  text-wrap: balance; max-width: 20ch;
  margin: var(--s4) 0 0; color: var(--p1);
}
.people-quote em { font-style: italic; color: var(--coral); }
.people-body { color: var(--p2); font-size: 1.0625rem; line-height: 1.65; max-width: 62ch; margin: 0; text-wrap: pretty; }
.people-body b { color: var(--p1); font-weight: 600; }
.crew {
  display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5);
  margin-top: var(--s5); padding-top: var(--s5);
  border-top: 1px solid var(--rule-paper);
}
.crew span { font-size: 0.875rem; color: var(--p2); }
.crew span::before { content: "—"; color: var(--p3); margin-right: var(--s2); }

/* ---------- satisfied customers: a credit list, not testimonials ---------- */
.customers { padding-block: var(--s9) var(--s8); }
.customers .sec-head { margin-bottom: var(--s7); }
.customer-list {
  list-style: none; margin: 0; padding: 0;
  border-top: 1px solid var(--rule-paper);
  display: grid;
  /* auto-fill so more entries flow into columns without a redesign */
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  column-gap: var(--s7);
}
.customer { border-bottom: 1px solid var(--rule-paper); }
.customer-handle {
  display: block;
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.2; letter-spacing: -0.01em;
  color: var(--p1);
  padding-block: var(--s5);
  transition: color .2s ease;
}
.customer-handle:hover { color: var(--coral); }

/* ============================================================
   RESULTS — figures as typographic events
   ============================================================ */
.results-list { border-top: 1px solid var(--rule); }
.result {
  position: relative;
  display: grid; grid-template-columns: 1fr; gap: var(--s3);
  padding-block: var(--s7);
  align-items: baseline;
}
.result-fig {
  font-family: var(--serif); font-weight: 400; font-style: italic;
  font-size: clamp(4rem, 10vw, 9rem);
  line-height: 0.85; letter-spacing: -0.03em;
  color: var(--t1);
  font-variant-numeric: tabular-nums;
}
.result p { margin: 0; color: var(--t2); font-size: 1.0625rem; line-height: 1.6; max-width: 44ch; text-wrap: pretty; }
.result p b { color: var(--t1); font-weight: 600; }

/* ============================================================
   FAQ — ruled, no chrome
   ============================================================ */
.faq-inner { display: grid; grid-template-columns: 1fr; gap: var(--s6); }
.faq-list { border-top: 1px solid var(--rule); }
.faq-item { position: relative; }
.faq-item summary {
  list-style: none; cursor: pointer;
  padding: var(--s5) 0;
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--s4);
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(1.125rem, 2vw, 1.375rem); line-height: 1.25;
  color: var(--t1);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--coral); }
.faq-icon { position: relative; flex: none; width: 14px; height: 14px; translate: 0 2px; transition: transform .3s ease; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--coral); }
.faq-icon::before { left: 0; top: 6px; width: 14px; height: 1.5px; }
.faq-icon::after  { left: 6px; top: 0; width: 1.5px; height: 14px; }
.faq-item[open] .faq-icon { transform: rotate(45deg); }
/* animated height via grid rows, not a max-height hack */
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > * { min-height: 0; overflow: hidden; }
.faq-a p { margin: 0 0 var(--s5); color: var(--t2); max-width: 62ch; text-wrap: pretty; }
.faq-price { color: var(--t1); font-weight: 600; margin: 0 0 var(--s3); }

/* ============================================================
   RULES THAT DRAW — the page's connective motion
   ============================================================ */
.beat::after, .result::after, .faq-item::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--rule); transform-origin: left;
}
@media (prefers-reduced-motion: no-preference) {
  .js .beat::after,
  .js .result::after,
  .js .faq-list .faq-item::after {
    transform: scaleX(0);
    transition: transform .7s ease-out;
  }
  .js .beat.is-visible::after,
  .js .result.is-visible::after,
  .js .faq-list.is-visible .faq-item::after { transform: scaleX(1); }
  /* the FAQ rules cascade rather than snapping in together */
  .js .faq-list .faq-item:nth-child(2)::after { transition-delay: .06s; }
  .js .faq-list .faq-item:nth-child(3)::after { transition-delay: .12s; }
  .js .faq-list .faq-item:nth-child(4)::after { transition-delay: .18s; }
  .js .faq-list .faq-item:nth-child(5)::after { transition-delay: .24s; }
  .js .faq-list .faq-item:nth-child(6)::after { transition-delay: .30s; }
  .js .faq-list .faq-item:nth-child(7)::after { transition-delay: .36s; }
  .js .faq-list .faq-item:nth-child(8)::after { transition-delay: .42s; }
}

/* ============================================================
   CTA + FORM
   ============================================================ */
.cta { border-top: 1px solid var(--rule); }
.cta-inner { display: grid; grid-template-columns: 1fr; gap: var(--s7); align-items: start; }
.cta-copy .eyebrow { display: block; margin-bottom: var(--s4); }
.cta-copy .headline { margin-bottom: var(--s5); }
.cta-copy .cta-sub { color: var(--t2); max-width: 40ch; margin: 0; text-wrap: pretty; }
.cta-copy .cta-sub b { color: var(--t1); font-weight: 600; }

.contact-form { display: block; }
.form-title {
  font-family: var(--serif); font-weight: 400; font-size: 1.5rem;
  margin: 0 0 var(--s6);
}
.field { margin-bottom: var(--s6); }
.field label {
  display: block; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--t3);
  margin-bottom: var(--s3);
}
.field label .opt { letter-spacing: 0.04em; text-transform: none; font-weight: 400; }
.field input, .field textarea {
  width: 100%;
  background: transparent;
  border: 0; border-bottom: 1px solid var(--rule-strong);
  border-radius: 0;
  color: var(--t1); font-family: var(--sans); font-size: 1.0625rem;
  padding: var(--s3) 0;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; min-height: 132px; }
.field input::placeholder, .field textarea::placeholder { color: var(--t3); }
.field input:focus, .field textarea:focus { border-bottom-color: var(--coral); }

.form-fineprint { margin: var(--s4) 0 0; font-size: 0.8125rem; color: var(--t3); }
.fineprint-link { color: var(--t2); text-decoration: underline; text-underline-offset: 2px; }
.fineprint-link:hover { color: var(--coral); }

.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note { padding: var(--s4); margin-bottom: var(--s5); border-radius: var(--radius); }
.form-success { border: 1px solid var(--coral); background: rgba(255, 90, 60, 0.08); color: var(--t1); }
.form-success strong { color: var(--coral); }
.form-error { border: 1px solid var(--t3); background: rgba(241, 235, 224, 0.03); color: var(--t2); }
.form-error strong { color: var(--t1); }

/* ============================================================
   INK DIVIDER (self-drawing flash)
   ============================================================ */
.ink-divider {
  display: flex; align-items: flex-end; justify-content: center;
  gap: var(--s6); padding-block: var(--s7);
}
.ink-divider .rule { height: 1px; background: var(--rule); flex: 1; max-width: 240px; margin-bottom: var(--s4); }
.sprig { width: auto; height: clamp(110px, 14vw, 160px); overflow: visible; }
.sprig path { stroke: var(--coral); stroke-width: 1.25; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.sprig .bud { fill: var(--coral); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--rule); }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: var(--s4); padding-block: var(--s6);
}
.footer-inner .wordmark .brand-name { font-size: 1.125rem; }
.footer-tag { margin: 0; color: var(--t2); font-size: 0.9375rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); }
.footer-links a { font-size: 0.9375rem; color: var(--t2); }
.footer-links a:hover { color: var(--coral); }
.copyright { margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s4); color: var(--t3); font-size: 0.8125rem; }

/* ============================================================
   LEGAL PAGE
   ============================================================ */
.legal { padding-block: var(--s7) var(--s8); }
.legal-inner { width: 100%; max-width: var(--w-narrow); margin: 0 auto; padding-inline: var(--pad); }
.legal .eyebrow { display: block; margin-bottom: var(--s4); }
.legal .headline { margin-bottom: var(--s5); }
.legal-lede { font-size: 1.1875rem; line-height: 1.6; color: var(--t2); margin: 0; text-wrap: pretty; }
.legal-lede b { color: var(--t1); font-weight: 600; }
.legal h2 {
  font-family: var(--serif); font-weight: 400; font-size: 1.375rem;
  line-height: 1.2; margin: var(--s6) 0 var(--s3); color: var(--t1);
}
.legal p { color: var(--t2); line-height: 1.65; margin: 0; max-width: 62ch; text-wrap: pretty; }
.legal p b { color: var(--t1); font-weight: 600; }
.legal a { color: var(--t1); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--coral); }
.legal-updated { margin-top: var(--s7) !important; font-size: 0.875rem; color: var(--t3); }
.legal-back { margin-top: var(--s5) !important; }

/* ============================================================
   INK THREAD (scroll)
   ============================================================ */
/* The thread lives in the gutter outside the widest container, and only when
   that gutter genuinely exists — see the min-width guard below. Its `left`
   tracks the container edge so the gap stays ~64px on wider screens. */
.ink-thread {
  display: none;
  position: fixed; top: 0; height: 100vh; width: 22px;
  left: max(6px, calc((100vw - var(--w-wide)) / 2 - 22px));
  z-index: 3; pointer-events: none; opacity: 0.4;
}
.ink-tip {
  display: none;
  position: fixed; width: 8px; height: 8px; border-radius: 50%;
  background: var(--coral); box-shadow: 0 0 8px 2px rgba(255, 90, 60, 0.35);
  transform: translate(-50%, -50%); z-index: 4; pointer-events: none;
  opacity: 0; transition: opacity .4s ease;
}
.ink-tip.on { opacity: 1; }

/* Below this the hero container has no spare gutter, so the thread would
   crowd (or on mobile, overlap) the text. Hidden rather than squeezed. */
@media (min-width: 1440px) {
  .ink-thread, .ink-tip { display: block; }
}

/* ============================================================
   MOTION (reveals) — see script.js
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0; transform: translateY(16px);
    transition: opacity .5s cubic-bezier(.16, 1, .3, 1),
                transform .5s cubic-bezier(.16, 1, .3, 1);
    transition-delay: var(--d, 0s);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }

  /* the DM sequence: plays once, then holds */
  .js .thread .msg[data-step] {
    opacity: 0; transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease;
  }
  .js .thread .msg[data-step].is-shown { opacity: 1; transform: none; }
  .js .thread .paid-chip { transform: scale(.92); transition: transform .35s cubic-bezier(.16, 1, .3, 1); }
  .js .thread .chip-row.is-shown .paid-chip { transform: scale(1); }

  .msg.typing .dots i { animation: dot 1.1s ease-in-out infinite; }
  .msg.typing .dots i:nth-child(2) { animation-delay: .15s; }
  .msg.typing .dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes dot { 0%, 100% { opacity: .3; } 50% { opacity: .9; } }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (min-width: 700px) {
  .beat { grid-template-columns: 96px 1fr; gap: var(--s6); }
  .beat-n { font-size: 2.5rem; text-align: right; }
  .result { grid-template-columns: minmax(180px, 280px) 1fr; gap: var(--s6); align-items: center; }
}

@media (min-width: 960px) {
  .hero { padding-block: var(--s8) var(--s8); }
  .hero-body { grid-template-columns: 1.05fr 0.95fr; gap: var(--s8); align-items: start; }
  .people-inner { grid-template-columns: 0.85fr 1.15fr; gap: var(--s8); }
  .faq-inner { grid-template-columns: 0.8fr 1.2fr; gap: var(--s8); align-items: start; }
  .cta-inner { grid-template-columns: 1fr 1fr; gap: var(--s8); }

}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .nav-toggle { display: block; }
}

@media (max-width: 520px) {
  .hero-actions .btn { width: 100%; }
  .section, .people { padding-block: var(--s7); }
  .customers { padding-block: var(--s7); }
  .result { padding-block: var(--s6); }
  .beat { padding-block: var(--s5); }
  .phone { transform: rotate(-1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; animation: none !important; transition: none !important; }
  .ink-thread, .ink-tip { display: none; }
}
