/* woaven.ai: one stylesheet for every page. Woaven brand v2 (docs/BRAND.md): the Material 3 roles generated from Loom purple, Lagoon
   teal and Rose, copied by value from the app's tokens (web/src/styles/tokens.css, light and dark); Fraunces for headings and IBM
   Plex Sans for text, self-hosted (fonts/, OFL-1.1). No inline styles and no third-party file: the CSP in _headers allows 'self' only. */

@font-face {
  font-family: "Fraunces Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations"), url("/fonts/fraunces-latin-opsz-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  /* light roles */
  --primary: #7547ad;
  --on-primary: #ffffff;
  --primary-container: #eedbff;
  --on-primary-container: #5c2d93;
  --secondary: #246868;
  --secondary-container: #adeeed;
  --on-secondary-container: #004f50;
  --tertiary: #9e3c5a;
  --tertiary-container: #ffd9e0;
  --on-tertiary-container: #7f2543;
  --error: #ba1a1a;
  --surface: #fdf8fe;
  --surface-lowest: #ffffff;
  --surface-low: #f7f2f8;
  --surface-container: #f1ecf3;
  --surface-high: #ebe7ed;
  --on-surface: #1c1b1f;
  --on-surface-variant: #484550;
  --outline: #797581;
  --outline-variant: #c9c4d1;
  /* the signed-out brand ground: the same in both themes */
  --brand-deep: #491580;
  --brand-deeper: #30005d;
  --brand-deepest: #1f0040;
  --brand-thread-1: #dab9ff;
  --brand-thread-2: #84c4c3;
  --brand-thread-3: #ff9cb4;
  --on-brand: #ffffff;
  --on-brand-variant: #e4d4f7;

  --page: var(--surface-container);
  --card: var(--surface-lowest);

  --font-display: "Fraunces Variable", "Fraunces", Georgia, "Times New Roman", serif;
  --font-base: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shape-sm: 8px;
  --shape-md: 12px;
  --shape-lg: 16px;
  --shape-xl: 28px;
  --shape-full: 999px;
  --gutter: 16px;
  --measure: 42rem;
  --wide: 1120px;
  --motion: 150ms cubic-bezier(.2, 0, 0, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --primary: #dab9ff;
    --on-primary: #440e7b;
    --primary-container: #5c2d93;
    --on-primary-container: #eedbff;
    --secondary: #91d2d1;
    --secondary-container: #004f50;
    --on-secondary-container: #adeeed;
    --tertiary: #ffb1c3;
    --tertiary-container: #7f2543;
    --on-tertiary-container: #ffd9e0;
    --error: #ffb4ab;
    --surface: #141317;
    --surface-lowest: #0e0e12;
    --surface-low: #1c1b1f;
    --surface-container: #201f24;
    --surface-high: #2b292e;
    --on-surface: #e5e1e7;
    --on-surface-variant: #c9c4d1;
    --outline: #938f9b;
    --outline-variant: #484550;
    --page: var(--surface);
    --card: var(--surface-container);
  }
}

@media (min-width: 720px) {
  :root { --gutter: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--on-surface);
  font: 400 1rem/1.6 var(--font-base);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); }
h3 { font-size: 1.25rem; }
p, ul, ol, dl, table { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .35rem; }
strong { font-weight: 600; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }

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

.wrap { width: 100%; max-width: calc(var(--wide) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }

/* skip link */
.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 10;
  padding: .6rem 1rem;
  border-radius: var(--shape-full);
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 500;
}
.skip:focus { top: 12px; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--outline-variant); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--on-surface); text-decoration: none; padding: 4px 0; }
.brand img { width: 32px; height: 32px; }
.wordmark { font: 700 1.5rem/1 var(--font-display); letter-spacing: -.02em; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px 20px; flex-wrap: wrap; }
.site-nav li + li { margin-top: 0; }
.site-nav a { color: var(--on-surface-variant); text-decoration: none; font-weight: 500; font-size: .9375rem; padding: 8px 0; }
.site-nav a:hover { color: var(--on-surface); text-decoration: underline; }
.site-nav a[aria-current="page"] { color: var(--on-surface); text-decoration: underline; text-decoration-color: var(--secondary); text-decoration-thickness: 2px; }

.site-header.on-brand { background: transparent; border-bottom: 0; position: relative; z-index: 1; }
.site-header.on-brand .brand, .site-header.on-brand .site-nav a { color: var(--on-brand); }
.site-header.on-brand .site-nav a:hover { color: var(--on-brand); }
.on-brand :focus-visible, .hero :focus-visible { outline-color: var(--brand-thread-1); }

/* buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  border-radius: var(--shape-full);
  border: 1px solid transparent;
  font: 500 1rem/1.25 var(--font-base);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--motion), color var(--motion);
}
.button:hover { text-decoration: none; }
.button.filled { background: var(--primary); color: var(--on-primary); }
.button.filled:hover { background: var(--on-primary-container); color: var(--on-primary); }
.button.light { background: var(--on-brand); color: var(--brand-deep); }
.button.light:hover { background: var(--brand-thread-1); }
.button.outline-light { border-color: rgba(255, 255, 255, .55); color: var(--on-brand); }
.button.outline-light:hover { background: rgba(255, 255, 255, .1); }
.site-nav .button.small { min-height: 36px; padding: 6px 16px; font-size: .875rem; color: var(--on-primary); }
.site-header.on-brand .site-nav .button.small { background: var(--on-brand); color: var(--brand-deep); }

/* the hero: deep Loom purple under the plain weave, the same in both themes */
.brand-ground {
  background-color: var(--brand-deeper);
  background-image:
    url("/brand/weave.svg"),
    radial-gradient(circle at 88% 12%, rgba(132, 196, 195, .30) 0%, transparent 45%),
    radial-gradient(circle at 8% 96%, rgba(255, 156, 180, .22) 0%, transparent 50%),
    linear-gradient(160deg, var(--brand-deep) 0%, var(--brand-deeper) 58%, var(--brand-deepest) 100%);
  background-size: 36px 36px, auto, auto, auto;
  color: var(--on-brand);
}
.hero { position: relative; overflow: hidden; padding: 40px 0 72px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
.hero h1 { color: var(--on-brand); max-width: 15ch; }
.hero .lead { font-size: 1.1875rem; line-height: 1.6; color: var(--on-brand-variant); max-width: 36rem; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-mark { display: none; }
.hero-mark img { width: 100%; height: auto; }
@media (min-width: 880px) {
  .hero { padding: 56px 0 104px; }
  .hero-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .hero-mark { display: block; justify-self: end; width: min(100%, 380px); opacity: .95; }
}

/* the three promises, each a thread across the bottom of the hero */
.promises { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 20px; }
.promises li { margin: 0; padding-top: 14px; border-top: 3px solid var(--brand-thread-2); }
.promises li:nth-child(2) { border-top-color: var(--brand-thread-1); }
.promises li:nth-child(3) { border-top-color: var(--brand-thread-3); }
.promises strong { display: block; font: 600 1.125rem/1.35 var(--font-display); color: var(--on-brand); margin-bottom: 4px; }
.promises span { color: var(--on-brand-variant); font-size: .9375rem; }
@media (min-width: 720px) { .promises { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } }

/* sections */
.section { padding: 64px 0; }
.section.alt { background: var(--surface); }
.section-head { max-width: 40rem; margin-bottom: 32px; }
.section-head p { color: var(--on-surface-variant); font-size: 1.0625rem; }

/* how it works: a real sequence, so numbered */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; counter-reset: step; }
.steps li {
  margin: 0;
  counter-increment: step;
  background: var(--card);
  border-radius: var(--shape-lg);
  padding: 24px 24px 24px 72px;
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 22px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--secondary-container);
  color: var(--on-secondary-container);
  font: 600 1rem/1 var(--font-base);
}
.steps h3 { margin-bottom: .35rem; }
.steps p { margin: 0; color: var(--on-surface-variant); }
@media (min-width: 880px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; } }

/* what it checks: two halves */
.halves { display: grid; gap: 32px; }
.halves h3 { padding-bottom: 10px; border-bottom: 2px solid var(--primary); }
.halves .second h3 { border-bottom-color: var(--secondary); }
.halves ul { list-style: none; padding: 0; margin: 0; }
.halves li { padding: 10px 0; border-bottom: 1px solid var(--outline-variant); margin: 0; }
@media (min-width: 720px) { .halves { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; } }

/* what Woaven will not do */
.nots { display: grid; gap: 28px 48px; margin: 0; }
.nots div { border-left: 3px solid var(--tertiary); padding-left: 16px; }
.nots dt { font: 600 1.125rem/1.35 var(--font-display); margin-bottom: 4px; }
.nots dd { margin: 0; color: var(--on-surface-variant); }
@media (min-width: 720px) { .nots { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* the waitlist */
.join { background: var(--primary-container); color: var(--on-primary-container); border-radius: var(--shape-xl); padding: 32px 24px; display: grid; gap: 24px; }
.join h2 { color: var(--on-primary-container); }
.join p { margin-bottom: .75rem; }
@media (min-width: 880px) { .join { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 48px; gap: 48px; align-items: start; } }
.join .note { font-size: .875rem; }
.join a { color: var(--on-primary-container); }
.join h3 { color: var(--on-primary-container); font-size: 1.5rem; }

/* the coming-soon badge in the hero */
.badge { display: inline-block; margin: 0 0 16px; padding: 4px 14px; border-radius: var(--shape-full); border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .12); color: var(--on-brand); font-weight: 600; font-size: .875rem; letter-spacing: .04em; text-transform: uppercase; }

/* the made-up example of a change package */
.example { background: var(--card); border-radius: var(--shape-xl); padding: 24px; max-width: 52rem; }
.example dl { margin: 0; display: grid; gap: 20px; }
.example dt { font: 600 1.0625rem/1.35 var(--font-display); margin-bottom: 4px; }
.example dd { margin: 0; color: var(--on-surface-variant); }
.example div { border-left: 3px solid var(--secondary); padding-left: 16px; }
@media (min-width: 720px) { .example { padding: 32px; } .example dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 40px; } }

/* the waitlist, then the sign-in card below it */
.access { display: grid; gap: 24px; }
.signin { background: var(--card); border-radius: var(--shape-xl); padding: 32px 24px; border-top: 3px solid var(--secondary); }
.signin p:last-child { margin-bottom: 0; }
@media (min-width: 880px) { .signin { padding: 32px 48px; } }

.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 500; font-size: .9375rem; }
.field .hint { font-size: .8125rem; color: var(--on-surface-variant); }
.join .field .hint { color: var(--on-primary-container); }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--outline);
  border-radius: var(--shape-sm);
  background: var(--surface-lowest);
  color: var(--on-surface);
  font: 400 1rem/1.4 var(--font-base);
}
.field input:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; border-color: var(--primary); }
.form .button { justify-self: start; }
/* the honeypot: off screen, out of the tab order and hidden from assistive technology (aria-hidden on the wrapper) */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* plain pages (thanks, error, 404) */
.notice { padding: 64px 0 96px; }
.notice .wrap > * { max-width: 40rem; }
.notice .mark { width: 56px; height: 56px; margin-bottom: 24px; }
.notice .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* legal pages */
.doc { padding: 48px 0 80px; }
.doc .wrap > * { max-width: var(--measure); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); }
.doc h2 { font-size: 1.5rem; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--outline-variant); }
.doc h3 { font-size: 1.125rem; margin-top: 1.5rem; }
.doc .meta { color: var(--on-surface-variant); }
.doc .summary { background: var(--card); border-radius: var(--shape-lg); padding: 20px 24px; margin: 24px 0 32px; }
.doc .summary h2 { margin-top: 0; padding-top: 0; border-top: 0; font-size: 1.25rem; }
.doc .summary ul { margin-bottom: 0; }
.doc nav.toc ol { columns: 1; }
@media (min-width: 720px) { .doc nav.toc ol { columns: 2; column-gap: 32px; } }
.doc code { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: .875em; background: var(--surface-high); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.doc .verbatim { border-left: 3px solid var(--primary); padding: 4px 0 4px 16px; margin: 0 0 1rem; font-weight: 500; }
.table-scroll { overflow-x: auto; margin: 0 0 1rem; }
.doc table { border-collapse: collapse; width: 100%; font-size: .9375rem; margin: 0; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--outline-variant); }
.doc th { font-weight: 600; }
.doc .scopes li { margin-top: .75rem; }

/* a fact the owner still has to fill in: bracketed and tinted so nobody mistakes it for a real value */
.ph { background: var(--tertiary-container); color: var(--on-tertiary-container); border-radius: 4px; padding: 0 4px; font-weight: 600; }

/* a legal document whose final text is not in yet (content/<doc>, status: draft) */
.draft-banner { background: var(--tertiary-container); color: var(--on-tertiary-container); border-left: 4px solid var(--tertiary);
  border-radius: var(--shape-md); padding: 14px 18px; margin: 16px 0 24px; }
.draft-banner strong { display: block; font-family: var(--font-display); font-size: 1.125rem; }
.draft-banner p { margin: 4px 0 0; }

/* the support page's cards */
.cards { display: grid; gap: 16px; margin: 24px 0 32px; padding: 0; list-style: none; }
.cards > li { background: var(--card); border-radius: var(--shape-lg); padding: 20px 24px; margin: 0; }
.cards h2 { margin: 0 0 8px; padding: 0; border: 0; font-size: 1.25rem; }
.cards p:last-child { margin-bottom: 0; }
.cards address { font-style: normal; margin: 0 0 1rem; line-height: 1.5; }

/* footer */
.site-footer { background: var(--surface); border-top: 1px solid var(--outline-variant); padding: 32px 0 40px; font-size: .9375rem; color: var(--on-surface-variant); }
.site-footer .wrap { display: grid; gap: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-footer li + li { margin-top: 0; }
.site-footer a { color: var(--on-surface-variant); }
.site-footer p { margin: 0; }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: auto 1fr; align-items: center; } .site-footer ul { justify-content: flex-end; } }

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

/* on a phone the connections table reads as one block per service */
@media (max-width: 599px) {
  .doc table.stack, .doc table.stack tbody, .doc table.stack tr, .doc table.stack th, .doc table.stack td { display: block; width: auto; }
  .doc table.stack thead { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
  .doc table.stack tr { padding: 12px 0; border-bottom: 1px solid var(--outline-variant); }
  .doc table.stack th, .doc table.stack td { border: 0; padding: 2px 0; }
  .doc table.stack th { font-family: var(--font-display); font-size: 1.0625rem; margin-bottom: 4px; }
  .doc table.stack td::before { content: attr(data-label) ": "; font-weight: 600; }
}
.doc caption { caption-side: top; text-align: left; padding-bottom: 8px; }
@media (max-width: 599px) { .doc table.stack caption { display: block; } }
