/* ============================================================
   Quillwort marketing site
   ------------------------------------------------------------
   One stylesheet, no build step, no third-party request.

   Sections 1-4 are the Guided Roots design system, flattened
   from the design bundle's own token files (fonts, colors,
   typography, spacing, base, utilities) into a single file so
   the page makes one CSS request instead of eight chained
   @imports. Values are transcribed, not re-derived.

   Section 5 replaces the canvas artboards' inline styles with
   the same declarations under class names, and adds the
   responsive stacking the artboards left to the canvas.

   Section 6 styles the legal pages, whose markup is unchanged.
   ============================================================ */

/* ── 1. Fonts ────────────────────────────────────────────────
   Self-hosted latin subsets of the design system's three faces
   (SIL Open Font License 1.1), taken from the same Google Fonts
   release the bundle @imports. Self-hosted so first paint waits
   on no third party; font-display: swap so it waits on no font.
   ------------------------------------------------------------ */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 400 700;
  font-stretch: 100%;
  font-display: swap;
  src: url("/assets/fonts/archivo-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/ibm-plex-mono-latin-500.woff2") format("woff2");
}

/* ── 2. Tokens ───────────────────────────────────────────────
   Quillwort is dark only, so the bundle's .gr-light flavor is
   not carried over.
   ------------------------------------------------------------ */
:root {
  /* surfaces: dark forest at dusk */
  --bg0: #0a0f0b;
  --bg1: #0d1410;
  --surface: #121b14;
  --line: #25342755;
  --line-solid: #243126;

  /* ink */
  --ink: #ede8da;
  --ink-dim: #a9b6a0;
  --ink-faint: #75826e;

  /* green - where it's going */
  --green: #9cc87a;
  --green-bright: #b8e095;
  --green-deep: #4f7a3d;

  /* copper - what's grown */
  --copper: #c98a52;
  --copper-bright: #e0a468;
  --copper-dim: #8a6240;

  --select: rgba(156, 200, 122, 0.25);
  --border-hover: #34503a;
  --on-accent: #0b1408;

  /* families */
  --serif: "Instrument Serif", Georgia, serif;
  --sans: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* fluid display sizes */
  --fs-h1: clamp(2.9rem, 6.4vw, 5.4rem);
  --fs-h2: clamp(2.1rem, 4.2vw, 3.4rem);
  --fs-h3: 1.06rem;
  --fs-lede: clamp(1.05rem, 1.5vw, 1.25rem);
  --fs-body: 17px;
  --fs-small: 0.95rem;
  --fs-eyebrow: 0.74rem;
  --fs-mono-data: 0.78rem;

  --lh-display: 1.04;
  --lh-body: 1.65;

  --ls-display: 0.005em;
  --ls-eyebrow: 0.22em;
  --ls-data: 0.04em;

  --fw-regular: 400;
  --fw-medium: 500;
  --fw-semibold: 600;

  /* layout */
  --container: 1180px;
  --gutter: max(24px, 4vw);
  --section-y: clamp(88px, 11vw, 150px);
  --section-y-tight: clamp(60px, 7vw, 96px);

  --radius: 12px;
  --radius-pill: 999px;

  --ease-grow: cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur-fast: 0.25s;

  /* the sticky nav is 76px; anchors clear it */
  --nav-h: 76px;
}

/* ── 3. Base ─────────────────────────────────────────────── */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection {
  background: var(--select);
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: var(--fw-regular);
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  text-wrap: balance;
}
h1 {
  font-size: var(--fs-h1);
}
h2 {
  font-size: var(--fs-h2);
}

/* one italic emphasis per headline: green = direction */
h1 em,
h2 em {
  font-style: italic;
  color: var(--green);
}

h3 {
  font-family: var(--sans);
  font-size: var(--fs-h3);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
}

p {
  text-wrap: pretty;
}

a {
  color: var(--green);
  text-decoration: none;
}
a:hover {
  color: var(--green-bright);
}

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

/* Focus states. The bundle names --focus-ring as --green-deep, which is
   3.85:1 on the page ground and invisible on the green fill; the ring here
   is --green (10.09:1 on --bg0) with a 2px offset so it always lands on the
   page ground rather than on a control's own color. */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}
.gr-btn:focus-visible,
.qw-nav a:focus-visible {
  border-radius: var(--radius-pill);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

/* skip link */
.qw-skip {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -150%);
  z-index: 100;
  background: var(--green);
  color: var(--on-accent);
  font-weight: var(--fw-semibold);
  padding: 12px 22px;
  border-radius: 0 0 var(--radius) var(--radius);
}
.qw-skip:focus {
  transform: translate(-50%, 0);
  color: var(--on-accent);
}

/* ── 4. Design-system utilities ──────────────────────────── */
.gr-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.gr-eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--copper);
  display: flex;
  align-items: center;
  gap: 14px;
}
.gr-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--copper-dim);
  flex: none;
}

.gr-lede {
  font-size: var(--fs-lede);
  color: var(--ink-dim);
  max-width: 58ch;
}

.gr-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: var(--fw-semibold);
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease,
    color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.gr-btn:active {
  transform: translateY(1px);
}
.gr-btn-primary {
  background: var(--green);
  color: var(--on-accent);
}
.gr-btn-primary:hover {
  background: var(--green-bright);
  color: var(--on-accent);
}
.gr-btn-ghost {
  border-color: var(--line-solid);
  color: var(--ink);
  background: transparent;
}
.gr-btn-ghost:hover {
  border-color: var(--green-deep);
  color: var(--green-bright);
}
.gr-btn-small {
  padding: 10px 20px;
  font-size: 0.84rem;
}

.gr-text-link {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.gr-text-link::after {
  content: "\2192";
  transition: transform var(--dur-fast) ease;
}
.gr-text-link:hover::after {
  transform: translateX(4px);
}
@media (prefers-reduced-motion: reduce) {
  .gr-text-link::after,
  .gr-btn {
    transition: none;
  }
}

.gr-card {
  background: linear-gradient(170deg, var(--surface), rgba(13, 20, 16, 0.5));
  border: 1px solid var(--line-solid);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: grid;
  gap: 12px;
  align-content: start;
  position: relative;
  overflow: hidden;
  transition: border-color 0.3s ease;
}
.gr-card:hover {
  border-color: var(--border-hover);
}
.gr-card p {
  color: var(--ink-dim);
  font-size: var(--fs-small);
}

.gr-ringlist {
  list-style: none;
  display: grid;
  gap: 11px;
}
.gr-ringlist li {
  position: relative;
  padding-left: 26px;
  color: var(--ink-dim);
  font-size: var(--fs-small);
}
.gr-ringlist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.52em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--green-deep);
}

.gr-faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line-solid);
}
.gr-faq details {
  border-bottom: 1px solid var(--line-solid);
}
.gr-faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  font-weight: var(--fw-medium);
  font-size: 1.02rem;
  transition: color 0.2s ease;
}
.gr-faq summary:hover {
  color: var(--green-bright);
}
.gr-faq summary::-webkit-details-marker {
  display: none;
}
.gr-faq summary::after {
  content: "+";
  font-family: var(--mono);
  font-size: 1.1rem;
  color: var(--copper);
  flex: none;
  transition: transform 0.25s ease;
}
.gr-faq details[open] summary::after {
  transform: rotate(45deg);
}
.gr-faq .gr-faq-body {
  padding: 0 4px 24px;
  color: var(--ink-dim);
  max-width: 64ch;
}
@media (prefers-reduced-motion: reduce) {
  .gr-faq summary,
  .gr-faq summary::after {
    transition: none;
  }
}

/* ── 5. Page composition ─────────────────────────────────── */

/* The Rings motif. The bundle draws it in JS; these are the same circles
   the generator emits for count=12, hue="blend", emitted once into a
   <defs> and placed with <use>. */
.qw-rings {
  position: absolute;
  opacity: 0.28;
  pointer-events: none;
  display: block;
}
.qw-rings-hero {
  top: -180px;
  right: -160px;
  width: 640px;
  height: 640px;
}
.qw-rings-cta {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 820px;
  height: 820px;
}
.qw-rings-cta.is-small {
  width: 740px;
  height: 740px;
}
@media (max-width: 760px) {
  .qw-rings-hero {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -140px;
  }
  .qw-rings-cta,
  .qw-rings-cta.is-small {
    width: 520px;
    height: 520px;
  }
}

/* nav */
.qw-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 15, 11, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-solid);
}
.qw-nav > div {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.qw-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
}
.qw-brand:hover {
  color: var(--ink);
}
.qw-brand svg {
  width: 34px;
  height: 34px;
  flex: none;
}
.qw-wordmark {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.32em;
  color: var(--ink);
}
.qw-nav nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 0.86rem;
}
.qw-nav nav a:not(.gr-btn) {
  color: var(--ink-dim);
}
.qw-nav nav a:not(.gr-btn):hover {
  color: var(--green-bright);
}
/* Below the point where the bar would crowd, the two text links drop out.
   Both destinations stay reachable: the footer carries them on every page,
   and the hero carries "See pricing". */
@media (max-width: 860px) {
  .qw-nav nav a:not(.gr-btn) {
    display: none;
  }
}
@media (max-width: 400px) {
  .qw-wordmark {
    letter-spacing: 0.22em;
    font-size: 0.82rem;
  }
  .qw-nav > div {
    gap: 12px;
  }
  .qw-nav .gr-btn-small {
    padding: 10px 16px;
    font-size: 0.8rem;
  }
}

/* sections */
.qw-section {
  padding: var(--section-y-tight) 0;
  border-top: 1px solid var(--line-solid);
}
.qw-section.is-raised {
  background: var(--bg1);
}
.qw-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 130px) 0 clamp(56px, 7vw, 100px);
}
:where(section[id]) {
  scroll-margin-top: calc(var(--nav-h) + 16px);
}

.qw-head {
  max-width: 720px;
  display: grid;
  gap: 20px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.qw-head.is-tight {
  margin-bottom: clamp(36px, 4vw, 56px);
}

/* two-column splits */
.qw-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.qw-split.is-hero {
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  position: relative;
}
.qw-split.is-shot-first {
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
}
.qw-split.is-aside {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 880px) {
  .qw-split,
  .qw-split.is-hero,
  .qw-split.is-shot-first,
  .qw-split.is-aside {
    grid-template-columns: minmax(0, 1fr);
  }
  .qw-split.is-shot-first > .qw-shots {
    order: 2;
  }
}

.qw-col {
  display: grid;
  gap: 20px;
}
.qw-col.is-hero {
  gap: 26px;
}
.qw-measure {
  max-width: 52ch;
}

.qw-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 8px;
}

/* the paired phone screenshots */
.qw-shots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  align-items: start;
  justify-self: center;
  width: 100%;
  max-width: calc(236px * 2 + 24px);
}
.qw-shots-solo {
  display: flex;
  justify-content: center;
}
.qw-phone {
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 1422;
  border-radius: 22px;
  border: 1px solid var(--line-solid);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, 0.8);
  display: block;
}
.qw-phone.is-dropped {
  margin-top: clamp(28px, 3vw, 52px);
}
.qw-phone.is-solo {
  width: clamp(180px, 22vw, 280px);
}

/* cards */
.qw-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.qw-cards.is-narrow {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  max-width: 900px;
}
.qw-cards.is-plans {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.qw-cards.is-notes {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

p.qw-kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper);
  margin: 0;
}
p.qw-kicker.is-green {
  color: var(--green);
}
.qw-card-title {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: var(--fw-regular);
  line-height: 1.1;
  letter-spacing: var(--ls-display);
  margin: 10px 0 8px;
}
p.qw-card-body {
  margin: 0 0 16px;
}
.qw-shot {
  width: 100%;
  height: auto;
  aspect-ratio: 640 / 1422;
  border-radius: var(--radius);
  border: 1px solid var(--line-solid);
  display: block;
}

p.qw-price {
  font-family: var(--serif);
  font-size: 2rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 8px 0 4px;
}
p.qw-price.is-large {
  font-size: 3rem;
  line-height: 1;
  margin: 14px 0 2px;
}
p.qw-price-sub {
  color: var(--ink-dim);
  margin: 0;
}
p.qw-price-sub.has-list {
  margin: 0 0 18px;
}
.qw-plan-list {
  font-size: 0.95rem;
  gap: 8px;
}

p.qw-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0;
}

/* pricing plans sit directly under the hero, with no rule between them */
.qw-plans {
  padding: 0 0 var(--section-y-tight);
}

/* the artboards' narrow reading column: one 820px stack with an even rhythm */
.gr-container.is-reading {
  max-width: 820px;
}
.qw-stack {
  display: grid;
  gap: clamp(32px, 4vw, 48px);
}
.qw-head.is-flush {
  margin-bottom: 0;
}
.qw-after-cards {
  margin-top: 28px;
}

/* closing call to action */
.qw-cta {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line-solid);
  padding: var(--section-y) 0;
}
.qw-cta.is-washed {
  background: linear-gradient(180deg, var(--bg0), #0c1410 60%, var(--bg0));
}
.qw-cta.is-tight {
  padding: clamp(72px, 9vw, 120px) 0;
}
.qw-cta-inner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  text-align: center;
  display: grid;
  gap: 22px;
  justify-items: center;
}
.qw-cta-inner .gr-lede {
  text-align: center;
}

/* footer */
.qw-footer {
  border-top: 1px solid var(--line-solid);
  padding: 40px 0;
}
.qw-footer > div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.qw-footer-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}
.qw-footer-mark svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.qw-footer-mark span {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  color: var(--ink-dim);
}
.qw-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.85rem;
}
.qw-footer nav a {
  color: var(--ink-dim);
}
.qw-footer nav a:hover {
  color: var(--green-bright);
}
.qw-footer p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

/* ── 6. Legal pages ──────────────────────────────────────────
   privacy.html, terms.html, deletion.html and 404.html keep
   their markup and wording; only their presentation comes from
   the tokens above.
   ------------------------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--line-solid);
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header .brand {
  font-family: var(--mono);
  font-size: 0.92rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink);
}
.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-size: 0.86rem;
}
.site-header nav a {
  color: var(--ink-dim);
}
.site-header nav a:hover {
  color: var(--green-bright);
}

.legal {
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) var(--gutter) clamp(72px, 9vw, 120px);
}
.legal > * + * {
  margin-top: 18px;
}
.legal h1 {
  font-size: clamp(2.2rem, 5vw, 3.2rem);
}
.legal h2 {
  font-size: clamp(1.4rem, 2.6vw, 1.9rem);
  margin-top: 40px;
}
.legal p,
.legal li {
  color: var(--ink-dim);
}
.legal ul {
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.legal strong {
  color: var(--ink);
  font-weight: var(--fw-semibold);
}
.legal .eyebrow,
.legal p.eyebrow {
  font-family: var(--mono);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--copper);
}
.draft-notice {
  font-family: var(--mono);
  font-size: var(--fs-mono-data);
  letter-spacing: var(--ls-data);
  color: var(--ink-faint);
  border: 1px solid var(--line-solid);
  border-left: 3px solid var(--copper-dim);
  border-radius: var(--radius);
  padding: 14px 18px;
  background: var(--bg1);
}
