/* LinkRepo — single source of truth for all styling.
   Brand guide mapping lives in ../README.md. Both pages share this file. */

/* ---------- tokens ---------- */
:root {
  --ink: #17332B;          /* Ink Green — headlines, body, primary buttons */
  --ink-deep: #0D1F1A;     /* darkened ink, gradient corner only */
  --ink-lift: #1E4238;     /* lightened ink, gradient corner only */
  --marigold: #E8A33D;     /* the one accent — CTA + QR motif */
  --card: #F3EFE4;         /* section backgrounds, cards */
  --page: #FBF9F3;         /* page background */

  --ink-muted: rgba(23, 51, 43, 0.72);
  --ink-faint: rgba(23, 51, 43, 0.52);
  --hairline: rgba(23, 51, 43, 0.14);
  --cream-muted: rgba(243, 239, 228, 0.76);
  --cream-line: rgba(243, 239, 228, 0.26);

  --head: "Archivo", system-ui, sans-serif;   /* 900 only, headlines only */
  --body: "Work Sans", system-ui, sans-serif; /* 400/500/600 — body + UI */

  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --radius: 14px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

/* ---------- type ---------- */
h1, h2, h3 {
  font-family: var(--head);
  font-weight: 900;
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 1.5rem + 4.4vw, 4.5rem); }
h2 { font-size: clamp(1.9rem, 1.25rem + 2.7vw, 3rem); }
h3 { font-size: clamp(1.125rem, 1.02rem + 0.5vw, 1.375rem); letter-spacing: -0.01em; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 40ch;
}
.eyebrow {
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;   /* one-word label — the only caps the guide allows */
  color: var(--ink-faint);
  margin: 0 0 1.1rem;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section-card { background: var(--card); }
.measure { max-width: 62ch; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--card);
  padding: 0.75rem 1.25rem; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 2px solid var(--marigold);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- ink gradient (the one background treatment on this page) ----------
   Single hue, darkening toward one corner. Hero + full-bleed CTA only. */
.on-ink {
  background: linear-gradient(148deg, var(--ink-lift) 0%, var(--ink) 44%, var(--ink-deep) 100%);
  color: var(--card);
}
.on-ink h1, .on-ink h2 { color: var(--card); }
.on-ink .lede, .on-ink p { color: var(--cream-muted); }
.on-ink .eyebrow { color: rgba(243, 239, 228, 0.6); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 1rem 1.6rem;
  border-radius: 999px;
  border: 1.5px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* Marigold is reserved for the primary CTA — one per screen. */
.btn-primary { background: var(--marigold); color: var(--ink); }
.btn-primary:hover { background: #D9922C; }

/* Secondary is ink outline on light, cream outline on ink. Never tinted marigold. */
.btn-secondary { background: transparent; color: var(--ink); border-color: rgba(23, 51, 43, 0.32); }
.btn-secondary:hover { border-color: var(--ink); background: rgba(23, 51, 43, 0.04); }
.on-ink .btn-secondary { color: var(--card); border-color: var(--cream-line); }
.on-ink .btn-secondary:hover { border-color: var(--card); background: rgba(243, 239, 228, 0.08); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn-block { width: 100%; }

.trust-line {
  margin-top: 1.1rem;
  font-size: 0.9375rem;
  color: var(--ink-faint);
}
.on-ink .trust-line { color: rgba(243, 239, 228, 0.6); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--page);
  border-bottom: 1px solid var(--hairline);
}
.nav-bar {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 72px;
}
.wordmark {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font-family: var(--head); font-weight: 900; font-size: 1.25rem;
  letter-spacing: -0.02em; text-decoration: none;
  margin-right: auto;
}
.mark { width: 30px; height: 20px; flex: none; }
.nav-links { display: flex; gap: 1.75rem; }
.nav-links a {
  text-decoration: none; font-weight: 500; font-size: 0.9375rem;
  color: var(--ink-muted); padding-block: 0.5rem;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta .btn { padding: 0.7rem 1.2rem; font-size: 0.9375rem; }
.nav-toggle {
  display: none;
  background: none; border: 1px solid var(--hairline); border-radius: 10px;
  width: 42px; height: 42px; padding: 0; cursor: pointer;
}
.nav-toggle span {
  display: block; width: 18px; height: 1.5px; background: var(--ink);
  margin: 4px auto; transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

/* ---------- hero ---------- */
.hero { padding-block: clamp(3.5rem, 7vw, 6.5rem); overflow: hidden; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center;
}
.hero .lede { max-width: 44ch; margin-top: 1.5rem; }

/* ---------- the mock page ----------
   Modelled on a real LinkRepo page: dark ground with the brand's own accent
   glow, logo tile, highlighted tagline, status pill, handle, then white link
   rows with an icon tile, a badge and a chevron. One component — the hero
   uses it and so does every card in the carousel. Per-brand colors arrive as
   --accent / --accent-soft / --glow / --mock-bg on the element itself. */
.mock { position: relative; padding-bottom: 3rem; padding-right: 4.5rem; }

.mock-page {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  max-width: 320px;
  background: var(--mock-bg, #14100E);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  padding: 1.6rem 1.1rem 1.25rem;
  color: var(--card);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}
/* Single-hue accent glow off the top edge — depth, not decoration. */
.mock-page::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(88% 46% at 50% -4%, var(--glow, transparent) 0%, transparent 68%);
}
/* The corner brackets the real pages use as a frame. */
.mock-corners::before, .mock-corners::after {
  content: ""; position: absolute; width: 18px; height: 18px;
  border: 1px solid var(--accent-soft, rgba(255, 255, 255, 0.3));
}
.mock-corners::before { top: 10px; left: 10px; border-right: 0; border-bottom: 0; }
.mock-corners::after { right: 10px; bottom: 10px; border-left: 0; border-top: 0; }

.mock-logo {
  width: 54px; height: 54px; margin: 0 auto 0.85rem;
  border-radius: 15px;
  background: var(--accent, var(--ink));
  display: grid; place-items: center;
  font-family: var(--head); font-weight: 900; font-size: 1.0625rem;
  color: #fff; letter-spacing: -0.01em;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4);
}
/* Scoped to .mock-page so these beat the .on-ink text colors on both surfaces. */
.mock-page.has-bg::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--mock-photo);
  background-size: cover; background-position: center;
  opacity: 0.3;
}
.mock-hero {
  margin: -1.6rem -1.1rem 0.9rem;
  height: 92px; overflow: hidden;
}
.mock-hero img { width: 100%; height: 100%; object-fit: cover; }
.mock-hero + .mock-logo { margin-top: -2.2rem; position: relative; }

.mock-logo.has-photo { background: none; padding: 0; overflow: hidden; }
.mock-logo img { width: 100%; height: 100%; object-fit: cover; }

.mock-page .mock-name {
  font-family: var(--mock-head, var(--head)); font-weight: var(--mock-head-weight, 900); font-size: 1.0625rem;
  line-height: 1.25; letter-spacing: -0.01em;
  text-align: center; color: var(--card);
  margin: 0;
}
.mock-page .mock-tag {
  font-family: var(--mock-body, var(--body));
  font-size: 0.75rem; line-height: 1.45;
  text-align: center; color: rgba(243, 239, 228, 0.6);
  margin: 0.3rem 0 0;
}
.mock-page .mock-tag em { font-style: normal; font-weight: 600; color: var(--accent); }

.mock-page .mock-pill {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
  width: fit-content; margin: 0.85rem auto 0;
  border: 1px solid var(--accent-soft, rgba(255, 255, 255, 0.25));
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--card);
  background: rgba(0, 0, 0, 0.25);
}
.mock-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--glow, transparent);
}
.mock-page .mock-handle {
  text-align: center; font-size: 0.75rem; color: rgba(243, 239, 228, 0.5);
  margin: 0.7rem 0 0;
}
.mock-page .mock-section {
  font-size: 0.5625rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(243, 239, 228, 0.42);
  margin: 1.25rem 0 0.55rem; padding-left: 0.2rem;
}

.mock-row {
  display: flex; align-items: center; gap: 0.6rem;
  background: var(--page);
  border-radius: 12px;
  padding: 0.55rem 0.6rem;
  margin-bottom: 0.5rem;
}
.mock-row:last-of-type { margin-bottom: 0; }
.mock-ico {
  width: 30px; height: 30px; flex: none;
  border-radius: 9px; background: var(--accent, var(--ink));
  display: grid; place-items: center;
}
.mock-ico svg { width: 16px; height: 16px; color: #fff; }
.mock-row-main { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.mock-row-title {
  font-size: 0.78rem; font-weight: 600; line-height: 1.3; color: var(--ink);
  font-family: var(--mock-body, var(--body));
}
.mock-row-sub {
  font-size: 0.6875rem; line-height: 1.3; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mock-ico.has-photo { background: none; overflow: hidden; }
.mock-ico img { width: 100%; height: 100%; object-fit: cover; }
.mock-empty {
  border: 1px dashed rgba(243, 239, 228, 0.22);
  border-radius: 12px; padding: 1.1rem 0.9rem;
  text-align: center; font-size: 0.75rem;
  color: rgba(243, 239, 228, 0.45);
  margin: 0;
}
.mock-badge {
  display: inline-block; margin-left: 0.35rem; vertical-align: 1px;
  font-size: 0.5rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--accent); color: #fff;
  border-radius: 4px; padding: 0.14rem 0.3rem;
}
.mock-chev { margin-left: auto; padding-left: 0.35rem; color: rgba(23, 51, 43, 0.3); font-size: 1.05rem; line-height: 1; }
.mock-page .mock-foot {
  text-align: center; font-size: 0.5625rem; letter-spacing: 0.04em;
  color: rgba(243, 239, 228, 0.3);
  margin: 1.1rem 0 0;
}

/* the code chip that sits against the hero mock */
.mock-qr {
  position: absolute; right: 0; bottom: 0;
  background: var(--card);
  border-radius: 16px;
  padding: 0.9rem;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.3);
}
.mock-qr svg { width: 116px; height: 116px; }
.mock-qr figcaption {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint);
  text-align: center; margin-top: 0.5rem;
}

/* ---------- problem ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.chips li {
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.9375rem; font-weight: 500;
  background: var(--page);
}
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem); align-items: start;
}

/* ---------- objection ---------- */
.pullquote {
  font-family: var(--head); font-weight: 900;
  font-size: clamp(1.375rem, 1.1rem + 1.2vw, 1.875rem);
  line-height: 1.2; letter-spacing: -0.015em;
  border-left: 3px solid var(--marigold);
  padding-left: 1.25rem;
  margin: 2rem 0 0;
  max-width: 24ch;
}

/* ---------- QR section ---------- */
.qr-art { display: grid; place-items: center; }
.qr-art svg { width: min(300px, 100%); height: auto; }
.surfaces { list-style: none; margin: 2rem 0 0; padding: 0; columns: 2; column-gap: 2rem; }
.surfaces li {
  break-inside: avoid;
  padding: 0.6rem 0 0.6rem 1.4rem;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  font-size: 0.9375rem;
}
.surfaces li::before {
  content: ""; position: absolute; left: 0; top: 1.15rem;
  width: 6px; height: 6px; border-radius: 1px; background: var(--ink);
}
.note-strong { font-weight: 600; color: var(--ink); }

/* ---------- 4B: see it for your business ----------
   Flat ink, not the gradient — the gradient is reserved for the hero and the
   final CTA, and flat ink makes the sample cards read like a shelf. */
.section-ink { background: var(--ink); color: var(--card); }
.section-ink h2 { color: var(--card); }
.section-ink .lede { color: var(--cream-muted); }

.samples { padding-block: var(--section); overflow: hidden; }
.samples-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem;
}
.samples-head h2 { max-width: 18ch; }
.samples-head .lede { margin-top: 1.25rem; max-width: 52ch; }

.carousel-nav { display: flex; gap: 0.6rem; flex: none; padding-bottom: 0.25rem; }
.carousel-btn {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  background: transparent; color: var(--card);
  border: 1.5px solid var(--cream-line); border-radius: 50%;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}
.carousel-btn svg { width: 20px; height: 20px; }
.carousel-btn:hover:not(:disabled) { border-color: var(--card); background: rgba(243, 239, 228, 0.08); }
.carousel-btn:disabled { opacity: 0.3; cursor: default; }

.carousel {
  /* One token for the rail inset: the snap padding must match the visual
     padding, or scrollLeft:0 isn't a snap point and card 1 never lines up
     with the headline above it. */
  --rail-pad: var(--gutter);
  display: flex; gap: 1.5rem;
  margin-top: 3rem;
  padding: 0.5rem var(--rail-pad) 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--rail-pad);
  scrollbar-width: thin;
  scrollbar-color: rgba(243, 239, 228, 0.3) transparent;
}
/* Line the rail up with the container on wide screens, without boxing in the
   scroll area — cards still run off the right edge as the affordance. */
@media (min-width: 1220px) {
  /* 100% (not 100vw) so the vertical scrollbar doesn't skew the alignment.
     Container is max-width 1140 with border-box padding, so its text edge is
     the centring margin plus one gutter. */
  .carousel { --rail-pad: calc((100% - 1140px) / 2 + var(--gutter)); }
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-track { background: rgba(243, 239, 228, 0.1); border-radius: 3px; }
.carousel::-webkit-scrollbar-thumb { background: rgba(243, 239, 228, 0.32); border-radius: 3px; }
.carousel:focus-visible { outline: 2px solid var(--marigold); outline-offset: 4px; }

.sample {
  flex: 0 0 clamp(258px, 74vw, 288px);
  scroll-snap-align: start;
  margin: 0;
  /* Stretch every card to the tallest so one wrapped link label doesn't make
     the row look ragged. */
  display: flex; flex-direction: column;
}
.sample .mock-page { flex: 1 1 auto; }
.sample .mock-page { max-width: none; padding-bottom: 1.4rem; }
/* Reserve two lines for the name and the tagline so every card's rows start at
   the same height — the repetition is the whole point of this section. */
.sample .mock-name { min-height: 2.5em; }
.sample .mock-tag { min-height: 2.2em; }
.sample figcaption {
  margin-top: 1rem;
  font-size: 0.8125rem; line-height: 1.5;
  color: rgba(243, 239, 228, 0.6);
}
.sample-kind {
  display: block;
  font-weight: 600; font-size: 0.6875rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--card);
  margin-bottom: 0.3rem;
}
.samples-closer { max-width: 54ch; margin-top: 2.5rem; color: var(--cream-muted); }
.samples .btn-row { margin-top: 1.75rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.5rem, 3vw, 2.5rem); margin-top: 3rem; }
.step { border-top: 2px solid var(--ink); padding-top: 1.25rem; }
.step-num {
  font-family: var(--head); font-weight: 900; font-size: 0.875rem;
  letter-spacing: 0.04em; color: var(--ink-faint); margin-bottom: 0.6rem;
}
.step p { margin-top: 0.6rem; color: var(--ink-muted); font-size: 0.9375rem; }
.center { text-align: center; }
.center .lede, .center .measure { margin-inline: auto; }
.center .btn-row { justify-content: center; }

/* ---------- and it comes with (deliberately quiet) ---------- */
.quiet { padding-block: clamp(3rem, 6vw, 4.5rem); }
.quiet h2 {
  font-family: var(--body); font-weight: 600;
  font-size: 1.0625rem; letter-spacing: 0.01em; line-height: 1.4;
  color: var(--ink-faint);
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--hairline);
}
.extras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem 2.5rem; margin-top: 2rem; }
.extras h3 { font-family: var(--body); font-weight: 600; font-size: 0.9375rem; letter-spacing: 0; }
.extras p { margin-top: 0.4rem; font-size: 0.875rem; color: var(--ink-muted); line-height: 1.55; }

/* ---------- pricing ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin-top: 3rem; align-items: stretch; }
.plan {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; height: 100%;
}
.plan-featured { border-color: var(--ink); border-width: 1.5px; }
.plan-name { font-weight: 600; font-size: 0.9375rem; color: var(--ink-muted); }
.plan-price { font-family: var(--head); font-weight: 900; font-size: 2.5rem; letter-spacing: -0.03em; margin-top: 0.5rem; }
.plan-price span { font-family: var(--body); font-weight: 500; font-size: 1rem; color: var(--ink-faint); letter-spacing: 0; }
.plan-list { list-style: none; margin: 1.5rem 0 2rem; padding: 0; flex: 1; }
.plan-list li { padding: 0.5rem 0 0.5rem 1.6rem; position: relative; font-size: 0.9375rem; }
.plan-list li::before {
  content: ""; position: absolute; left: 0; top: 1rem;
  width: 9px; height: 5px;
  border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink);
  transform: rotate(-45deg);
}
.plan-badge {
  display: inline-block; margin-left: 0.6rem; vertical-align: 0.35rem;
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--ink); border-radius: 999px; padding: 0.2rem 0.55rem;
}
.plans-note { margin-top: 1.75rem; font-size: 0.9375rem; color: var(--ink-faint); }

/* ---------- who this is for ---------- */
.fit-list { list-style: none; margin: 1.5rem 0 0; padding: 0; }
.fit-list li { padding: 0.7rem 0 0.7rem 2rem; position: relative; border-bottom: 1px solid var(--hairline); }
.fit-list li::before {
  position: absolute; left: 0; top: 0.7rem;
  font-weight: 600; color: var(--ink-faint);
}
.fit-yes li::before { content: "\2713"; }
.fit-no li::before { content: "\2715"; }
.fit-no li { color: var(--ink-muted); }

/* ---------- FAQ ---------- */
.faq { max-width: 780px; margin: 3rem auto 0; }
.faq details { border-bottom: 1px solid var(--hairline); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem;
  padding: 1.25rem 0;
  font-weight: 600; font-size: 1.0625rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; margin-top: 0.55rem;
  width: 10px; height: 10px;
  border-right: 1.5px solid var(--ink-faint); border-bottom: 1.5px solid var(--ink-faint);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq .answer { padding: 0 0 1.5rem; color: var(--ink-muted); max-width: 62ch; }

/* ---------- final CTA + footer ---------- */
.final-cta { text-align: center; }
.final-cta .btn-row { justify-content: center; }
.final-cta h2 { max-width: 18ch; margin-inline: auto; }
.final-cta .lede { margin: 1.25rem auto 0; }

.site-footer { background: var(--page); border-top: 1px solid var(--hairline); padding-block: 2.5rem; }
.footer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.footer-bar .wordmark { font-size: 1.0625rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-left: auto; }
.footer-links a { text-decoration: none; font-size: 0.9375rem; color: var(--ink-muted); }
.footer-links a:hover { color: var(--ink); }
.copyright { width: 100%; font-size: 0.875rem; color: var(--ink-faint); margin: 0; }

/* ---------- form fields (shared by the builder and checkout) ---------- */
.form-wrap { max-width: 640px; margin-inline: auto; }
.field { margin-bottom: 1.5rem; }
.field label { display: block; font-weight: 600; font-size: 0.9375rem; margin-bottom: 0.4rem; }
.field .hint { font-size: 0.8125rem; color: var(--ink-faint); margin: 0 0 0.5rem; }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--page);
  border: 1.5px solid rgba(23, 51, 43, 0.2);
  border-radius: 10px;
  padding: 0.8rem 0.9rem;
}
.field input:focus, .field textarea:focus { border-color: var(--ink); }
.field textarea { min-height: 110px; resize: vertical; }
.form-step-head { border-top: 2px solid var(--ink); padding-top: 1rem; margin: 2.5rem 0 1.5rem; }
.form-step-head:first-of-type { margin-top: 0; }
.form-close { border-top: 1px solid var(--hairline); margin-top: 2.5rem; padding-top: 2rem; }
.plan-choice { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.25rem; }
.form-status { margin-top: 1.25rem; font-size: 0.9375rem; font-weight: 500; }

/* ---------- reveal ----------
   Only hidden when JS is running (html.js is set by an inline script in the
   head). Without JS nothing is ever stuck invisible. */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--rd, 0s),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) var(--rd, 0s);
  will-change: opacity, transform;
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.is-visible { will-change: auto; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  /* auto margins on a grid item override stretch and shrink-wrap it, so set an
     explicit width — otherwise the hero card collapses to ~250px. */
  .mock { width: 100%; max-width: 420px; margin-inline: auto; }
  .mock .mock-page { max-width: 360px; margin-inline: auto; }
  .extras { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
}
@media (max-width: 780px) {
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--page);
    border-bottom: 1px solid var(--hairline);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-bar { position: relative; }
  .nav-toggle { display: block; order: 3; }
  .nav-cta { order: 2; }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 780px) {
  .samples-head { display: block; }
  .carousel-nav { display: none; }
}
@media (max-width: 560px) {
  .surfaces { columns: 1; }
  .extras { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  .btn-row .btn { width: 100%; }
  .mock { padding-right: 0; padding-bottom: 0; }
  .mock-qr { position: static; width: fit-content; margin: 1.5rem auto 0; }
}

/* ==========================================================================
   THE APP — build.html, checkout.html, welcome.html, account.html
   Everything below only appears on body.app pages, and reuses the tokens,
   buttons and .mock-page component defined above.
   ========================================================================== */

.app { background: var(--card); }

.steps-rail {
  display: flex; gap: 1.5rem; align-items: center;
  list-style: none; margin: 0 auto 0 2rem; padding: 0;
  counter-reset: step;
  font-size: 0.875rem; font-weight: 500; color: var(--ink-faint);
}
.steps-rail li { counter-increment: step; display: flex; align-items: center; gap: 0.45rem; }
.steps-rail li::before {
  content: counter(step);
  width: 20px; height: 20px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 0.6875rem; font-weight: 600;
  border: 1px solid var(--hairline); color: var(--ink-faint);
}
.steps-rail li[aria-current="step"] { color: var(--ink); font-weight: 600; }
.steps-rail li[aria-current="step"]::before { background: var(--ink); border-color: var(--ink); color: var(--card); }
.steps-rail a { text-decoration: none; }
.steps-rail a:hover { color: var(--ink); }

/* ---------- two-column build layout ---------- */
.build-main { padding-block: clamp(2rem, 4vw, 3.5rem); }
.build-grid, .welcome-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 380px;
  gap: clamp(2rem, 4vw, 3.5rem);
  /* stretch, not start: a sticky preview needs its column to be as tall as the
     form, or it has nowhere to travel and unsticks after the first screen */
  align-items: stretch;
  width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter);
}
.build-preview { height: 100%; }
.build-form h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); }
.build-form > .lede { margin-top: 1rem; max-width: 52ch; }

.panel {
  background: var(--page);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 1.75rem);
  margin-top: 1.5rem;
}
.panel-head {
  font-family: var(--body); font-weight: 600; font-size: 1rem; letter-spacing: 0;
  margin: 0 0 1.25rem;
}
.panel-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.panel-bar .panel-head { margin-bottom: 0.35rem; }
.panel-hint { margin: 0 0 1.25rem; }
.link-count { font-size: 0.8125rem; font-weight: 600; color: var(--ink-faint); }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.opt { font-weight: 400; color: var(--ink-faint); font-size: 0.8125rem; }
.warn {
  margin: 1rem 0 0; font-size: 0.875rem; color: var(--ink-muted);
  border-left: 3px solid var(--marigold); padding-left: 0.85rem;
}
.is-error { color: #9E2B2B; }

.btn-sm { padding: 0.6rem 1rem; font-size: 0.875rem; }
.btn-add { width: 100%; margin-top: 0.5rem; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 0.8125rem; color: var(--ink-faint); text-decoration: underline;
}
.link-btn:hover { color: var(--ink); }

/* ---------- uploads ---------- */
.upload { display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem; }
.upload .upload-input { position: absolute; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.upload-input:focus-visible + label { outline: 2px solid var(--marigold); outline-offset: 3px; }
.upload label.btn { cursor: pointer; }
.upload-name {
  font-size: 0.8125rem; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch;
}

/* ---------- one link ---------- */
.link-item {
  border: 1px solid var(--hairline); border-radius: var(--radius);
  padding: 1rem 1rem 0.25rem; margin-bottom: 0.85rem;
  background: var(--card);
}
.link-item-bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.75rem; }
.link-item-num {
  font-family: var(--head); font-weight: 900; font-size: 0.75rem;
  color: var(--ink-faint); letter-spacing: 0.04em;
}
.link-item-tools { display: flex; gap: 0.35rem; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--hairline); background: var(--page);
  cursor: pointer; font-size: 0.8125rem; line-height: 1;
}
.icon-btn:hover:not(:disabled) { border-color: var(--ink); }
.icon-btn:disabled { opacity: 0.35; cursor: default; }
.icon-btn-del:hover { border-color: #9E2B2B; color: #9E2B2B; }

/* ---------- colour + fonts ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.85rem; }
.swatch {
  width: 34px; height: 34px; border-radius: 9px;
  border: 2px solid transparent; box-shadow: 0 0 0 1px var(--hairline);
  cursor: pointer; padding: 0;
}
.swatch[aria-pressed="true"] { border-color: var(--page); box-shadow: 0 0 0 2px var(--ink); }
.hex-row { display: flex; gap: 0.5rem; align-items: center; }
.hex-row input[type="text"] { width: 9ch; font-family: ui-monospace, monospace; text-transform: uppercase; }
.hex-row input[type="color"] {
  width: 44px; height: 44px; padding: 2px; cursor: pointer;
  border: 1.5px solid rgba(23, 51, 43, 0.2); border-radius: 10px; background: var(--page);
}

.moods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.mood {
  text-align: left; cursor: pointer;
  border: 1.5px solid var(--hairline); border-radius: var(--radius);
  background: var(--card); padding: 0.8rem 0.85rem;
  display: flex; flex-direction: column; gap: 0.2rem;
}
.mood:hover { border-color: rgba(23, 51, 43, 0.35); }
.mood[aria-checked="true"] { border-color: var(--ink); background: var(--page); }
.mood-name { font-size: 1.0625rem; line-height: 1.1; color: var(--ink); }
.mood-note { font-size: 0.6875rem; line-height: 1.35; color: var(--ink-faint); }

.build-actions { margin-top: 2rem; }
.build-actions .btn { width: 100%; }
.build-actions .trust-line { text-align: center; }

/* ---------- the preview pane ---------- */
.preview-sticky { position: sticky; top: 96px; }
.preview-bar {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  margin-bottom: 0.75rem;
}
.preview-label {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint);
}
.preview-url {
  font-size: 0.75rem; color: var(--ink-faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 20ch;
}
.preview-stage {
  background: linear-gradient(148deg, var(--ink-lift) 0%, var(--ink) 44%, var(--ink-deep) 100%);
  border-radius: 20px;
  padding: 1.5rem;
  max-height: calc(100vh - 160px);
  overflow-y: auto;
}
.preview-stage .mock-page { max-width: min(320px, 100%); margin-inline: auto; }
.preview-toggle { display: none; }

/* ---------- checkout ---------- */
.plan-picker { display: grid; gap: 0.85rem; }
.plan-option {
  text-align: left; cursor: pointer;
  border: 1.5px solid var(--hairline); border-radius: var(--radius);
  background: var(--card); padding: 1.1rem 1.15rem;
}
.plan-option[aria-checked="true"] { border-color: var(--ink); background: var(--page); }
.plan-option-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.plan-option .plan-price { font-size: 1.75rem; margin: 0; }
.plan-option .plan-list { margin: 0.9rem 0 0; }
.plan-option .plan-list li { padding-block: 0.3rem; font-size: 0.875rem; }

.terms-list { margin: 0 0 1.25rem; padding-left: 1.1rem; }
.terms-list li { margin-bottom: 0.6rem; font-size: 0.9375rem; color: var(--ink-muted); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.9375rem; cursor: pointer; }
.check input { margin-top: 0.25rem; width: 18px; height: 18px; flex: none; accent-color: var(--ink); }

/* ---------- welcome ---------- */
.handoff { display: grid; gap: 1rem; margin-top: 2.5rem; }
.handoff-item {
  background: var(--page); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.35rem;
}
.handoff-label {
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 0.5rem;
}
.handoff-value {
  font-family: var(--head); font-weight: 900; font-size: clamp(1.125rem, 1rem + 0.8vw, 1.5rem);
  letter-spacing: -0.01em; margin: 0 0 1rem; word-break: break-all;
}
.copy-note { font-size: 0.8125rem; color: var(--ink-faint); margin-left: 0.6rem; }
.qr-download { display: flex; align-items: center; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.qr-chip { width: 84px; height: 84px; flex: none; border-radius: 12px; overflow: hidden; border: 1px solid var(--hairline); }
.qr-chip svg { width: 100%; height: 100%; }

/* ---------- account ---------- */
.account-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 2rem; margin-bottom: 3rem;
}
.account-head h1 { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.75rem); }
.account-head .lede { margin-top: 1rem; }
.account-head .btn { flex: none; }

.repo-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }
.repo-card {
  display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 1.25rem;
  background: var(--page); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.25rem;
}
.repo-thumb {
  background: var(--ink); border-radius: 12px; padding: 0.5rem;
  height: 168px; overflow: hidden;
}
/* Scale the real component down instead of building a second fake thumbnail. */
.repo-thumb .mock-page {
  width: 320px; transform: scale(0.36); transform-origin: top left;
  pointer-events: none;
}
.repo-meta h2 { font-size: 1.125rem; margin: 0.5rem 0 0.25rem; }
.repo-url { font-size: 0.8125rem; color: var(--ink-faint); margin: 0 0 0.5rem; word-break: break-all; }
.repo-status {
  display: inline-block; font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  border-radius: 999px; padding: 0.25rem 0.6rem;
  border: 1px solid var(--hairline); color: var(--ink-faint);
}
.repo-status-live { background: var(--ink); border-color: var(--ink); color: var(--card); }
.repo-status-building { background: var(--marigold); border-color: var(--marigold); color: var(--ink); }
.repo-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.repo-empty {
  grid-column: 1 / -1; text-align: center; color: var(--ink-faint);
  border: 1px dashed var(--hairline); border-radius: var(--radius); padding: 3rem 1.5rem;
}

/* ---------- app responsive ---------- */
@media (max-width: 980px) {
  .build-grid, .welcome-grid { grid-template-columns: minmax(0, 1fr); }
  .steps-rail { display: none; }

  /* The preview becomes a bottom sheet the toggle opens. */
  .build-preview {
    position: fixed; inset: auto 0 0 0; z-index: 60;
    background: var(--page);
    border-top: 1px solid var(--hairline);
    box-shadow: 0 -18px 44px rgba(0, 0, 0, 0.18);
    padding: 1rem var(--gutter) 1.25rem;
    max-height: 82vh; overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.25s ease;
  }
  .preview-open .build-preview { transform: none; }
  .preview-sticky { position: static; }
  .preview-stage { max-height: none; padding: 1rem; }

  .preview-toggle {
    display: block; position: fixed; z-index: 61;
    left: 50%; transform: translateX(-50%); bottom: 1rem;
    background: var(--ink); color: var(--card);
    border: 0; border-radius: 999px;
    padding: 0.85rem 1.5rem; font-weight: 600; font-size: 0.9375rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
    cursor: pointer;
  }
  .preview-toggle { z-index: 62; }
  /* The sheet is content-sized, so an offset based on its max-height put the
     button over the page heading. Keep it parked at the bottom and pad the
     sheet so it never covers the preview. */
  .preview-open .build-preview { padding-bottom: 5rem; }
  .build-main { padding-bottom: 6rem; }

  .account-head { display: block; }
  .account-head .btn { margin-top: 1.5rem; }
}
@media (max-width: 620px) {
  .field-row { grid-template-columns: 1fr; }
  .moods { grid-template-columns: repeat(2, 1fr); }
  .repo-card { grid-template-columns: 1fr; }
  .repo-thumb { height: 200px; }
  .repo-thumb .mock-page { transform: scale(0.55); }
}
@media (prefers-reduced-motion: reduce) {
  .build-preview { transition: none; }
}

/* ==========================================================================
   MOTION — the cursor chain and hover emphasis
   Everything here is decoration: it degrades to nothing under
   prefers-reduced-motion, and the chain never runs on touch.
   ========================================================================== */

/* ---------- the chain that follows the cursor ----------
   Echoes the logo: interlocking rings, ink on light ground and cream on ink,
   with only the lead ring in marigold so the accent stays rare. */
.chain {
  position: fixed; inset: 0; z-index: 90;
  pointer-events: none;
  contain: strict;
}
.chain-link {
  position: absolute; top: 0; left: 0;
  width: var(--s, 22px); height: var(--s, 22px);
  margin: calc(var(--s, 22px) / -2) 0 0 calc(var(--s, 22px) / -2);
  border: 2px solid var(--chain-ink, #17332B);
  border-radius: 50%;
  opacity: 0;
  transition: opacity 0.35s ease, border-color 0.35s ease;
  will-change: transform;
}
.chain-link:nth-child(even) { border-color: var(--chain-alt, rgba(23, 51, 43, 0.42)); }
.chain-link:first-child { border-color: var(--marigold); border-width: 2.5px; }
.chain.is-awake .chain-link { opacity: 1; }

/* over ink sections the rings flip to cream, per the logo rule */
.chain.on-dark { --chain-ink: #F3EFE4; --chain-alt: rgba(243, 239, 228, 0.4); }

@media (hover: none), (pointer: coarse) { .chain { display: none; } }
@media (prefers-reduced-motion: reduce) { .chain { display: none; } }

/* ---------- hover emphasis ----------
   Guarded so touch devices never get stuck in a hover state. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {

  .btn-primary:hover { transform: translateY(-2px) scale(1.015); box-shadow: 0 10px 24px rgba(23, 51, 43, 0.18); }
  .btn-secondary:hover { transform: translateY(-2px); }

  /* the mark's rings pull apart a little, like a link opening */
  .wordmark .mark circle { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: center; }
  .wordmark:hover .mark circle:first-child { transform: translateX(-1.2px); }
  .wordmark:hover .mark circle:last-child { transform: translateX(1.2px); }

  .nav-links a { position: relative; }
  .nav-links a::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0.15rem;
    height: 1.5px; background: currentColor;
    transform: scaleX(0); transform-origin: left;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .nav-links a:hover::after { transform: scaleX(1); }

  /* the six destinations — the point of the problem section */
  .chips li { transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
  .chips li:hover { transform: translateY(-3px); background: var(--ink); border-color: var(--ink); color: var(--card); }

  /* where the code goes — nudge and darken the one you're reading */
  .surfaces li { transition: padding-left 0.2s ease, color 0.2s ease; }
  .surfaces li:hover { padding-left: 1.75rem; color: var(--ink); }
  .surfaces li::before { transition: transform 0.2s ease, background-color 0.2s ease; }
  .surfaces li:hover::before { transform: scale(1.6) rotate(45deg); background: var(--marigold); }

  .step { transition: border-top-color 0.25s ease; }
  .step-num { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), color 0.25s ease; transform-origin: left center; display: inline-block; }
  .step:hover .step-num { transform: scale(1.35); color: var(--ink); }

  /* the sample cards lift off the shelf */
  .sample .mock-page { transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, filter 0.35s ease; }
  .sample:hover .mock-page {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
    filter: brightness(1.07);
  }
  .sample figcaption { transition: color 0.3s ease; }
  .sample:hover figcaption { color: rgba(243, 239, 228, 0.85); }

  /* rows inside any mock page */
  .mock-row { transition: transform 0.2s ease; }
  .mock-page .mock-row:hover { transform: translateX(3px); }

  /* price is the detail that matters most on that screen */
  .plan { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease, border-color 0.3s ease; }
  .plan:hover { transform: translateY(-6px); border-color: var(--ink); box-shadow: 0 22px 44px rgba(23, 51, 43, 0.14); }
  .plan-price { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); transform-origin: left center; }
  .plan:hover .plan-price { transform: scale(1.09); }

  .fit-list li { transition: color 0.2s ease, padding-left 0.2s ease; }
  .fit-list li:hover { color: var(--ink); padding-left: 2.25rem; }

  .faq summary { transition: color 0.2s ease; }
  .faq summary:hover { color: var(--ink); }
  .faq summary:hover::after { border-color: var(--ink); }

  .extras h3 { transition: color 0.2s ease; }
  .extras div:hover h3 { color: var(--ink); }

  .carousel-btn:hover:not(:disabled) { transform: scale(1.08); }

  /* app surfaces */
  .mood, .plan-option, .repo-card { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.25s ease, box-shadow 0.25s ease; }
  .mood:hover, .plan-option:hover { transform: translateY(-3px); }
  .repo-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(23, 51, 43, 0.12); }
  .swatch { transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1); }
  .swatch:hover { transform: scale(1.14); }
  .link-item { transition: border-color 0.25s ease; }
  .link-item:hover { border-color: rgba(23, 51, 43, 0.3); }
  .handoff-item { transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1); }
  .handoff-item:hover { transform: translateY(-3px); }
}
