/* EmbroidLab marketing site
   Tokens: denim ground, three thread colors, cool paper. */

@font-face {
  font-family: "Unbounded";
  src: url("/assets/fonts/unbounded.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Spline Sans Mono";
  src: url("/assets/fonts/spline-sans-mono.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  --denim: #1C2541;
  --denim-deep: #131A30;
  --denim-line: #2E3A5E;
  --ink: #151B2E;
  --slate: #4F5876;
  --paper: #F3F5F9;
  --paper-2: #E6EBF3;
  --white: #FFFFFF;
  --poppy: #E0484E;
  --marigold: #F3B23C;
  --fern: #2A9D7F;

  --f-display: "Unbounded", "Arial Black", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Spline Sans Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --step--1: clamp(0.83rem, 0.8rem + 0.1vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.25rem + 1vw, 2.1rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.6vw, 3.6rem);

  --wrap: 72rem;
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.18em; }
h1, h2, h3 { margin: 0; line-height: 1.12; }
p { margin: 0; }

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

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.sr-only, .hp {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--marigold); color: var(--ink); padding: 0.6rem 1rem; border-radius: 8px; font-weight: 700;
}
.skip:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header { background: var(--denim); color: var(--paper); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.1rem; }
.wordmark { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-family: var(--f-display); font-weight: 500; font-size: 1.25rem; letter-spacing: -0.01em; }
.wordmark b { font-weight: 700; color: var(--marigold); }
.wordmark-mark { width: 2rem; height: 2rem; }
.site-nav { display: flex; align-items: center; gap: 1.6rem; font-size: var(--step--1); }
.site-nav a { text-decoration: none; opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }
.site-nav .nav-cta { opacity: 1; border: 1.5px solid var(--marigold); color: var(--marigold); padding: 0.45rem 0.9rem; border-radius: 999px; font-weight: 700; }
.site-nav .nav-cta:hover { background: var(--marigold); color: var(--ink); text-decoration: none; }
@media (max-width: 720px) {
  .site-nav a:not(.nav-cta) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--denim);
  color: var(--paper);
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(3rem, 7vw, 6rem);
  position: relative;
}
/* running-stitch hem along the hero's bottom edge */
.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 14px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--marigold) 0 12px, transparent 12px 20px);
  opacity: 0.8;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.eyebrow { font-family: var(--f-mono); font-size: var(--step--1); letter-spacing: 0.04em; color: var(--marigold); margin-bottom: 1.25rem; }
.hero h1 {
  font-family: var(--f-display); font-weight: 700; font-size: var(--step-3);
  letter-spacing: -0.025em; line-height: 1.06; text-wrap: balance;
}
.lede { margin-top: 1.4rem; max-width: 34rem; font-size: var(--step-1); line-height: 1.5; color: #D5DCEC; }

/* ---------- Waitlist form ---------- */
.waitlist { margin-top: 2rem; max-width: 34rem; }
.field-row { display: flex; gap: 0.5rem; background: var(--white); border-radius: 999px; padding: 0.35rem; box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 12px 30px -12px rgba(0,0,0,0.5); }
.field-row input {
  flex: 1; min-width: 0; border: 0; background: transparent; font: inherit; color: var(--ink);
  padding: 0.7rem 1rem; border-radius: 999px;
}
.field-row input::placeholder { color: #7A839E; }
.field-row input:focus-visible { outline-offset: 0; }
.field-row button, .resew {
  font: inherit; font-weight: 700; cursor: pointer; border: 0; border-radius: 999px;
}
.field-row button { background: var(--marigold); color: var(--ink); padding: 0.7rem 1.3rem; white-space: nowrap; transition: transform 0.15s ease, background 0.15s ease; }
.field-row button:hover { background: #F7C25E; }
.field-row button:active { transform: translateY(1px); }
.field-row button[disabled] { opacity: 0.7; cursor: progress; }
.waitlist[data-state="invalid"] .field-row { box-shadow: 0 0 0 3px var(--poppy); }

.segment { border: 0; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.2rem; font-size: var(--step--1); }
.segment legend { float: left; margin-right: 0.4rem; color: #B9C3DB; padding: 0; }
.segment label { display: inline-flex; align-items: center; gap: 0.45rem; cursor: pointer; }
.segment input { accent-color: var(--marigold); width: 1.05rem; height: 1.05rem; margin: 0; }

.form-status { min-height: 1.6em; margin-top: 0.8rem; font-weight: 700; }
.waitlist[data-state="error"] .form-status, .waitlist[data-state="invalid"] .form-status { color: #FF9A9E; }
.waitlist[data-state="ok"] .form-status { color: #7FE0C2; }
.form-note { font-size: var(--step--1); color: #AAB4CD; }

@media (max-width: 480px) {
  .field-row { flex-direction: column; border-radius: 18px; }
  .field-row button { padding-block: 0.8rem; }
}

/* ---------- Hoop (signature) ---------- */
.hoop { margin: 0; }
.hoop-svg { width: 100%; height: auto; filter: drop-shadow(0 30px 40px rgba(0,0,0,0.35)); }
.needle { transition: opacity 0.4s ease; }
.needle.done { opacity: 0; }
.readout {
  margin-top: 1.2rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; align-items: center;
  font-family: var(--f-mono); font-size: 0.8rem; color: #B9C3DB;
  border-top: 1px solid var(--denim-line); padding-top: 0.9rem;
}
.readout-item { display: inline-flex; gap: 0.5rem; align-items: center; }
.readout .k { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.68rem; color: #8592B3; }
.readout .v { color: var(--paper); font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 0.4rem; }
.chip { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #8592B3; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.25); }
.resew { margin-left: auto; background: transparent; color: var(--marigold); border: 1.5px solid currentColor; padding: 0.25rem 0.8rem; font-family: var(--f-mono); font-size: 0.75rem; }
.resew:hover { background: var(--marigold); color: var(--ink); }

/* ---------- Formats strip ---------- */
.formats { background: var(--denim-deep); color: #B9C3DB; }
.formats-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem 2rem; padding-block: 1.1rem; font-size: var(--step--1); }
.formats ul { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.formats li {
  font-family: var(--f-mono); font-weight: 500; color: var(--paper); letter-spacing: 0.06em;
  border: 1px solid var(--denim-line); border-radius: 6px; padding: 0.2rem 0.6rem;
}

/* ---------- Sections ---------- */
.features, .how, .faq { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-title { font-family: var(--f-display); font-weight: 700; font-size: var(--step-2); letter-spacing: -0.02em; text-wrap: balance; max-width: 22ch; }

/* Features: two audiences side by side */
.audiences { margin-top: 2.6rem; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.audience { background: var(--white); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.4rem); box-shadow: 0 1px 0 var(--paper-2), 0 20px 40px -30px rgba(28,37,65,0.35); }
.audience header { padding-bottom: 1.4rem; margin-bottom: 1.4rem; border-bottom: 1px solid var(--paper-2); }
.audience h3 { font-family: var(--f-display); font-weight: 500; font-size: var(--step-1); margin: 0.9rem 0 0.5rem; }
.audience header p { color: var(--slate); }
.audience dl { margin: 0; display: grid; gap: 1.3rem; }
.audience dt { font-weight: 700; }
.audience dd { margin: 0.2rem 0 0; color: var(--slate); }

/* Thread spool: identifies each audience by its thread color */
.spool { display: block; width: 2.6rem; height: 2.6rem; border-radius: 8px; position: relative; overflow: hidden; }
.spool::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(255,255,255,0.22) 0 2px, transparent 2px 4px); }
.spool-fern { background: var(--fern); }
.spool-poppy { background: var(--poppy); }

/* How it works: an ordered sequence joined by a running stitch */
.how { background: var(--paper-2); }
.steps { list-style: none; margin: 2.8rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 1.15rem; left: 1.2rem; right: 1.2rem; height: 2px;
  background: repeating-linear-gradient(90deg, var(--fern) 0 10px, transparent 10px 17px);
}
.steps li { counter-increment: step; position: relative; }
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--denim); color: var(--marigold); font-family: var(--f-mono); font-weight: 500; position: relative; z-index: 1;
  box-shadow: 0 0 0 6px var(--paper-2);
}
.steps h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.05rem; margin: 1.2rem 0 0.5rem; }
.steps p { color: var(--slate); font-size: var(--step--1); line-height: 1.55; }

@media (max-width: 860px) {
  .audiences { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.6rem; }
  .steps::before { top: 1.2rem; bottom: 1.2rem; left: 1.15rem; right: auto; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--fern) 0 10px, transparent 10px 17px); }
  .steps li { padding-left: 3.6rem; }
  .steps li::before { position: absolute; left: 0; top: 0; }
  .steps h3 { margin-top: 0.3rem; }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 2rem 4rem; align-items: start; }
.faq-list details { border-bottom: 1px solid #CDD5E4; }
.faq-list details:first-child { border-top: 1px solid #CDD5E4; }
.faq-list summary {
  cursor: pointer; list-style: none; padding: 1.15rem 2.2rem 1.15rem 0; font-weight: 700; position: relative;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 0.3rem; top: 50%; width: 0.75rem; height: 0.75rem; margin-top: -0.5rem;
  border-right: 2px solid var(--slate); border-bottom: 2px solid var(--slate); transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq-list details[open] summary::after { transform: rotate(-135deg); margin-top: -0.15rem; }
.faq-list details p { padding-bottom: 1.2rem; color: var(--slate); max-width: 60ch; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; } }

/* Closing CTA */
.closing { background: var(--denim); color: var(--paper); padding-block: clamp(3.5rem, 8vw, 6rem); }
.closing-inner { text-align: center; display: grid; justify-items: center; }
.closing h2 { font-family: var(--f-display); font-weight: 700; font-size: var(--step-3); letter-spacing: -0.025em; }
.closing p { margin-top: 0.8rem; color: #D5DCEC; }
.waitlist-inline { width: 100%; }

/* Footer */
.site-footer { background: var(--denim-deep); color: #AAB4CD; font-size: var(--step--1); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding-block: 1.6rem; }
.footer-row nav { display: flex; gap: 1.5rem; }

/* ---------- Prose pages (privacy, 404) ---------- */
.prose-page { padding-block: clamp(3rem, 7vw, 5rem); }
.prose { max-width: 44rem; }
.prose h1 { font-family: var(--f-display); font-weight: 700; font-size: var(--step-3); letter-spacing: -0.025em; }
.prose h2 { font-family: var(--f-display); font-weight: 500; font-size: var(--step-1); margin: 2.4rem 0 0.7rem; }
.prose p, .prose ul { margin: 0 0 1rem; color: var(--slate); }
.prose ul { padding-left: 1.2rem; }
.prose li { margin-bottom: 0.6rem; }
.prose li::marker { color: var(--fern); }
.prose strong { color: var(--ink); }
.prose .updated { font-family: var(--f-mono); font-size: var(--step--1); margin-top: 0.8rem; }
.lost { min-height: 60vh; display: grid; align-content: center; }
.lost .button { display: inline-block; margin-top: 1.6rem; background: var(--denim); color: var(--paper); text-decoration: none; font-weight: 700; padding: 0.75rem 1.4rem; border-radius: 999px; }
.lost .button:hover { background: var(--denim-line); }
.confirm button.button { border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.confirm button.button[disabled] { opacity: 0.7; cursor: progress; }
.confirm .button[hidden] { display: none; } /* .lost .button's display would otherwise beat [hidden] */
.confirm-status { min-height: 1.6em; margin-top: 1rem; font-weight: 700; color: var(--poppy); }

/* ---------- Responsive hero ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hoop { max-width: 26rem; width: 100%; margin-inline: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
