/* StratumCode site stylesheet. Tokens first; see docs/DESIGN.md section 2.
   Palette and components follow the Lamina Notes page, with the accessibility
   adjustments listed in the design document. No inline styles anywhere: the
   content security policy forbids them. */

/* ---------------------------------------------------------------- tokens */
:root {
  /* from the Lamina Notes page */
  --ink: #10234f;
  --ink-soft: #3b4a70;
  --paper: #f6f0e7;
  --paper-2: #efe6d9;
  --card: #fffaf2;
  --line: #e2d6c4;
  --amber: #e0a030;
  --amber-dark: #a8700f;      /* decorative only; not for text (3.7:1 on paper) */
  --white: #ffffff;

  /* added for StratumCode */
  --amber-text: #8a5a0a;      /* text-safe amber, AA on all paper surfaces */
  --tint: #8fa0cf;
  --on-ink: #c7d2f0;
  --field-border: #76819b;
  --error: #9b2c1f;
  --error-bg: #fbeae6;
  --ok: #1f6b45;
  --ok-bg: #e6f3ec;
  --focus: var(--ink);        /* overridden to amber inside .on-ink */

  --radius: 18px;
  --radius-sm: 12px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.on-ink { --focus: var(--amber); }

/* ---------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
img { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 60px); letter-spacing: -.03em; margin-bottom: 18px; }
h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
h3 { font-size: 19px; margin-bottom: 8px; letter-spacing: -.01em; }
h4 { font-size: 16px; margin-bottom: 4px; letter-spacing: -.01em; }
p { margin: 0 0 14px; }
.lede { font-size: 20px; color: var(--ink-soft); max-width: 640px; }
.lede-sm { font-size: 18px; }
.eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--amber-text); margin-bottom: 10px;
}
.eyebrow-on-ink { color: var(--amber); }
.small { font-size: 14px; color: var(--ink-soft); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.empty { color: var(--ink-soft); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 820px; }
section { padding: 84px 0; }
section.tight { padding: 40px 0 84px; }
.alt { background: var(--paper-2); }
[id] { scroll-margin-top: 84px; }

/* running-text links: amber-text for contrast, underlined so colour is never the only cue */
.prose a, .empty a, .more a, .form-note a, .phead-ask a { color: var(--amber-text); text-underline-offset: 3px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--ink); color: var(--white); padding: 12px 18px; border-radius: var(--radius-sm);
  text-decoration: none; font-weight: 600;
}
.skip:focus { top: 12px; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: rgba(246, 240, 231, .88);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; position: relative; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 36px; width: auto; }
.nav-links { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; font-size: 15px; }
.nav-links a {
  display: inline-block; padding: 10px 0; text-decoration: none; color: var(--ink-soft);
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--amber); }
.nav-links .cta a {
  padding: 8px 18px; min-height: 44px; display: inline-flex; align-items: center;
  background: var(--ink); color: var(--white); border-radius: var(--radius-sm); border-bottom: 0; font-weight: 600;
}
.nav-links .cta a:hover { background: #1a3375; color: var(--white); }
.nav-links .cta a[aria-current="page"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--amber); }

.menu { display: none; }
.menu summary {
  list-style: none; cursor: pointer; font-weight: 600; font-size: 15px;
  padding: 10px 18px; border: 1.5px solid var(--ink); border-radius: var(--radius-sm); min-height: 44px;
  display: inline-flex; align-items: center;
}
.menu summary::-webkit-details-marker { display: none; }
.menu ul {
  position: absolute; right: 24px; top: 58px; min-width: 200px; margin: 0; padding: 8px; list-style: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: 0 18px 40px -18px rgba(16, 35, 79, .35);
}
.menu li a { display: block; padding: 12px 14px; text-decoration: none; border-radius: 8px; }
.menu li a:hover, .menu li a[aria-current="page"] { background: var(--paper-2); }
@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu { display: block; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1.5px solid var(--ink); cursor: pointer; font-family: inherit;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--ink); color: var(--white); }
.btn.primary:hover { background: #1a3375; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: rgba(16, 35, 79, .06); }
.btn.amber { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.btn.amber:hover { background: #efb447; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cta-center { justify-content: center; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .btn:hover, .pcard, .pcard:hover { transition: none; transform: none; }
}

/* ---------------------------------------------------------------- page heads and hero */
.page-head { padding: 56px 0 8px; }
.page-head h1 { margin-bottom: 14px; }

.hero { padding: 64px 0 24px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 56px; align-items: center; }
.hero .lede { margin-bottom: 28px; }
.hero-art {
  background: var(--paper-2); border-radius: 26px; padding: 56px; display: grid; place-items: center;
  box-shadow: 0 0 0 1px var(--line);
}
.hero-art svg { width: min(240px, 100%); height: auto; }
@media (max-width: 860px) {
  .hero { padding: 40px 0 8px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-art { padding: 36px; }
  .hero-art svg { width: 140px; }
}

.hero-img {
  border-radius: 26px; overflow: hidden;
  box-shadow: 0 30px 70px -30px rgba(16, 35, 79, .35), 0 0 0 1px var(--line);
}
.hero-img img { width: 100%; height: auto; }
.hero-small { text-align: center; margin-top: 14px; }

/* screenshots: two columns on wide screens, one on small */
.shots { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 32px; margin-top: 36px; }
.shot { margin: 0; }
.shot-wide { grid-column: 1 / -1; }
.shot-img {
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(16, 35, 79, .35), 0 0 0 1px var(--line);
}
.shot-img img { width: 100%; height: auto; }
.shot figcaption { padding: 16px 4px 0; }
.shot figcaption h3 { margin-bottom: 4px; }
.shot figcaption p { color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) { .shots { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 40px; }
.pillar { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); display: grid; place-items: center; margin-bottom: 16px; }
.ico svg { width: 24px; height: 24px; stroke: var(--white); fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ico.amber { background: var(--amber); }
.ico.amber svg { stroke: var(--ink); }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- testimonials */
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; margin-top: 40px; }
.quotes.one { grid-template-columns: minmax(0, 760px); }
.quote { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.quote blockquote { margin: 0 0 18px; padding: 0; border: 0; font-size: 19px; line-height: 1.6; }
.quote blockquote p { margin: 0; }
.quote-by { margin: 0; font-size: 15px; color: var(--ink-soft); }
.quote-by strong { color: var(--ink); }

/* ---------------------------------------------------------------- product cards, badges, chips, filters */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; margin-top: 32px; }
.pcard {
  display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.pcard:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -22px rgba(16, 35, 79, .4); }
.pcard-top { display: flex; align-items: center; gap: 14px; }
.pcard-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pcard-name { font-size: 20px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; }
.pcard-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcard-tag { color: var(--ink-soft); }
.pcard-price { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.more { margin-top: 28px; }

.ptile {
  width: 56px; height: 56px; border-radius: 14px; background: var(--ink); color: var(--paper);
  display: grid; place-items: center; font-weight: 700; font-size: 24px; flex: none; overflow: hidden;
}
.ptile img { width: 100%; height: 100%; object-fit: cover; }
.ptile.lg { width: 88px; height: 88px; border-radius: 22px; font-size: 40px; }

.badge {
  display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  line-height: 1.6; border: 1.5px solid var(--ink); white-space: nowrap;
}
.badge.live { background: var(--ink); color: var(--white); }
.badge.beta { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.badge.coming_soon { background: transparent; color: var(--ink); }
.badge.retired { background: var(--paper-2); border-color: var(--line); color: var(--ink-soft); }
.chip {
  display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--paper-2);
  color: var(--ink-soft); font-size: 13px; font-weight: 500; line-height: 1.6;
}

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0 0 12px; }
.filters-label { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); min-width: 76px; }
.filters a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--card); color: var(--ink-soft);
  text-decoration: none; font-size: 15px;
}
.filters a:hover { border-color: var(--ink-soft); color: var(--ink); }
.filters a[aria-current="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }

/* ---------------------------------------------------------------- product page header */
.phead { padding: 36px 0 28px; }
.crumbs { font-size: 14px; color: var(--ink-soft); margin-bottom: 24px; }
.crumbs a { color: var(--ink-soft); text-underline-offset: 3px; }
.phead-row { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.phead-text h1 { margin-bottom: 8px; }
.phead-text .lede { margin-bottom: 12px; }
.phead-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.phead-cta { margin-top: 24px; }
.phead-note { margin: 14px 0 0; }
.phead-ask { margin: 18px 0 0; }
.subnav {
  display: flex; flex-wrap: wrap; gap: 0 22px; list-style: none; margin: 28px 0 0; padding: 10px 0 0;
  border-top: 1px solid var(--line); font-size: 15px;
}
.subnav a { display: inline-block; padding: 10px 0; color: var(--ink-soft); text-decoration: none; }
.subnav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }

/* ---------------------------------------------------------------- feature groups */
.group {
  display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start;
  padding: 44px 0; border-top: 1px solid var(--line);
}
.group-title { font-size: 28px; margin-bottom: 8px; letter-spacing: -.02em; }
.feats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; }
.feat p { font-size: 15px; color: var(--ink-soft); margin: 0; }
@media (max-width: 860px) {
  .group { grid-template-columns: 1fr; gap: 20px; }
  .feats { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- ownership */
.own { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
pre {
  background: var(--ink); color: #e9eefc; border-radius: var(--radius); padding: 24px;
  font: 14px/1.7 var(--mono); overflow: auto; margin: 0;
}
pre code { font: inherit; }
pre .dim { color: var(--tint); }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 16px; height: 9px;
  border-left: 2.5px solid var(--amber-text); border-bottom: 2.5px solid var(--amber-text);
  transform: rotate(-45deg) scale(.9);
}
@media (max-width: 860px) { .own { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- navy band */
.band { background: var(--ink); color: var(--white); border-radius: 28px; padding: 56px 40px; text-align: center; }
.band h2 { color: var(--white); }
.band p { color: var(--on-ink); max-width: 620px; margin-left: auto; margin-right: auto; }
.band .btn.ghost { color: var(--white); border-color: var(--tint); }
.band .btn.ghost:hover { background: rgba(255, 255, 255, .08); }
.band-small { margin-top: 18px; color: #9fb0e0; }
.steps {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 34px auto; max-width: 860px;
  text-align: left; list-style: none; padding: 0;
}
.step { background: rgba(255, 255, 255, .07); border-radius: 16px; padding: 20px; }
.step b { display: block; color: var(--amber); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 6px; }
.step span { color: #dfe6fa; font-size: 15px; }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .band { padding: 40px 22px; }
}

/* ---------------------------------------------------------------- FAQ */
main details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; margin-bottom: 12px; }
main details summary {
  cursor: pointer; font-weight: 600; font-size: 17px; list-style: none;
  display: flex; justify-content: space-between; gap: 16px;
}
main details summary::-webkit-details-marker { display: none; }
main details summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--amber-text); }
main details[open] summary::after { content: "\2013"; }
main details p { margin: 12px 0 0; color: var(--ink-soft); }

/* ---------------------------------------------------------------- about */
.about-grid { display: grid; grid-template-columns: 1fr 340px; gap: 56px; align-items: start; }
.prose { max-width: 680px; }
.prose h2 { font-size: 28px; margin: 44px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.glance {
  order: 2; position: sticky; top: 88px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.prose { order: 1; }
.glance-h { font-size: 22px; margin-bottom: 4px; }
.glance dl { margin: 0; }
.glance dt {
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--amber-text); margin-top: 18px;
}
.glance dd { margin: 2px 0 0; }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 32px; }
  .glance { position: static; order: -1; }
}

/* ---------------------------------------------------------------- forms and alerts */
.form-wrap > * { max-width: 680px; }
label { display: block; font-weight: 600; margin-bottom: 6px; }
.req, .opt { font-weight: 500; font-size: 14px; color: var(--ink-soft); }
.field { margin-bottom: 22px; }
.help { font-size: 14px; color: var(--ink-soft); margin: 0 0 8px; }
input[type="text"], input[type="email"], input[type="url"], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; font: inherit; color: var(--ink);
  background: var(--card); border: 1.5px solid var(--field-border); border-radius: var(--radius-sm);
}
textarea { min-height: 180px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--error); border-width: 2px; }
.error-text { color: var(--error); font-size: 14px; font-weight: 600; margin: 8px 0 0; }
.error-text::before { content: "\26A0\FE0E\00a0"; }
.alert { border-radius: var(--radius-sm); padding: 16px 20px; margin-bottom: 28px; border: 1.5px solid; }
.alert.error { background: var(--error-bg); border-color: var(--error); color: var(--error); }
.alert.ok { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.alert-title { font-weight: 700; margin: 0 0 6px; }
.alert ul { margin: 0; padding-left: 20px; }
.alert a { color: inherit; text-underline-offset: 3px; }
.alert:focus { outline: 3px solid var(--focus); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { margin-top: 28px; }
.form-note { margin: 18px 0 0; color: var(--ink-soft); }
.form-note.small { font-size: 14px; margin-top: 10px; }
.thanks-ico { margin: 0 auto 20px; background: var(--ok); }

/* ---------------------------------------------------------------- error page */
.err { padding: 96px 0 120px; text-align: center; }
.err .lede { margin: 0 auto 28px; }
.err .cta-row { justify-content: center; }
.err-code { font-size: clamp(72px, 16vw, 140px); font-weight: 800; letter-spacing: -.05em; line-height: 1; color: var(--amber); margin: 0 0 8px; }

/* ---------------------------------------------------------------- footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; font-size: 14px; color: var(--ink-soft); }
.foot { display: flex; flex-wrap: wrap; gap: 32px 64px; justify-content: space-between; align-items: flex-start; }
.foot-brand img { height: 30px; width: auto; margin-bottom: 10px; }
.foot-h { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.foot-list { list-style: none; margin: 0; padding: 0; }
.foot-list a { display: inline-block; padding: 6px 0; color: var(--ink-soft); }
.foot-base { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- small screens */
@media (max-width: 760px) {
  section { padding: 56px 0; }
  section.tight { padding: 28px 0 56px; }
  .page-head { padding: 36px 0 4px; }
  .lede { font-size: 18px; }
  .filters-label { min-width: 100%; }
}
