/* Obelisk subpage stylesheet: shared by /about, /services/*, /contact and
   /portal/login. Mirrors the landing page's tokens and paper material exactly.

   Theme: deep emerald ink on warm cream paper. Values are sampled from the
   supplied engraving artwork (--paper is the artwork's own centre colour, so the
   hero image meets the page with no seam) and every ink/accent pair below is
   WCAG-validated against --paper. See FOUNDATION.md before changing any of it.

   Light theme only, deliberately: no prefers-color-scheme block. */
:root {
  /* surfaces */
  --paper: #EAD9C6;
  --paper-warm: #F1E4D5;
  --paper-deep: #E0CDB6;

  /* ink */
  --ink: #013934;        /* 9.31:1 on paper  AAA */
  --ink-dim: #3D5C55;    /* 5.33:1 on paper  AA  */
  --muted: #4F625D;      /* 4.71:1 on paper  AA  */

  /* accent: two steps, because one teal cannot serve both sizes.
     --teal is LARGE TEXT AND FILLS ONLY (3.59:1, fails AA under 18px).
     --teal-ink is for every small text and link (5.47:1). */
  --teal: #177E6E;
  --teal-ink: #0F5F54;
  --teal-soft: rgba(23, 126, 110, 0.10);

  /* Status pairs. Each ink is validated BOTH on --paper and on its own soft
     tint, because status chips routinely put the ink on the tint. The original
     #1B6B4F reached only 4.00:1 on its own 12% tint (it cleared AA on bare
     paper at 4.67:1, which is what made it look safe), so it was darkened. */
  --ok: #175E45;                          /* 5.60:1 paper · 4.72:1 on tint */
  --ok-soft: rgba(23, 94, 69, 0.12);
  --bad: #8C3227;                         /* 5.86:1 paper · 4.91:1 on tint */
  --bad-soft: rgba(140, 50, 39, 0.12);

  /* lines: emerald-tinted, never neutral grey */
  --line: rgba(1, 57, 52, 0.16);
  --line-soft: rgba(1, 57, 52, 0.09);

  /* type */
  --display: "Playfair Display", "Iowan Old Style", Georgia, serif;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --draw: cubic-bezier(0.16, 1, 0.3, 1);
  --page-pad: clamp(22px, 3.4vw, 48px);
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
::selection { background: rgba(23, 126, 110, 0.22); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 3px; }
img, svg { display: block; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { position: relative; z-index: 1; max-width: 1060px; margin: 0 auto; padding: 0 28px; }

/* ================= HEADER (shared with the landing page) =================
   Solid emerald bar. This matches the landing page exactly and deliberately: a
   header is site-wide furniture, so an emerald bar on the landing page and a
   cream one everywhere else would read as a bug the moment you navigate.
   Opaque, so `position: fixed` needs no scrim and content scrolls cleanly under. */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  gap: 16px; padding: 18px var(--page-pad);
  background: var(--ink);
  transition: padding 0.28s var(--ease), box-shadow 0.28s var(--ease);
}
/* Compact state, toggled by static/header.js once the page scrolls away from
   the top. Only padding and the lockup scale change: the grid, the type sizes
   and the CTA all keep their proportions, so nothing reflows sideways. */
.header.is-compact {
  padding: 9px var(--page-pad);
  box-shadow: 0 6px 24px rgba(1, 57, 52, 0.16);
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.logo-lockup { height: 38px; width: auto; display: block; flex: 0 0 auto;
    color: var(--paper); transition: height 0.28s var(--ease); }
.header.is-compact .logo-lockup { height: 30px; }
.header.is-compact .btn { padding: 9px 19px; font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) {
  .header, .logo-lockup { transition: none; }
}

/* Plain links, no pill chrome: on a solid bar a pill reads as a box in a box.
   Cream at 82% is 6.74:1 and lifts to full paper on hover. */
.nav-pill {
  justify-self: center;
  display: inline-flex; align-items: center; gap: clamp(18px, 2.2vw, 32px);
}
.nav-pill a {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 500; letter-spacing: 0.01em;
  color: rgba(234, 217, 198, 0.82); text-decoration: none;
  transition: color 0.2s ease; white-space: nowrap;
}
.nav-pill a:hover { color: var(--paper); }
.nav-pill a.is-here { color: var(--paper); }
/* Dropping .nav-pill frees the middle grid item, and on phones the CTA moves
   into it: centred, not flush right. TIM'S CALL 2026-07-30, chosen from the
   landing page's accidental version of this and now made deliberate site-wide.
   The button is PINNED to column 2 rather than left to auto-place there, so it
   cannot drift if anything is ever added to the mobile bar (a hamburger, a
   second action). Must stay in lockstep with the same block in index.html. */
@media (max-width: 860px) {
  .nav-pill { display: none; }
  .header .btn { grid-column: 2; justify-self: center; }
}

/* ---------- buttons ----------
   .btn--white is the legacy class name from the dark theme, kept so no page
   markup breaks. .btn--primary is the name to use in new markup; both resolve
   to the same emerald fill. */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 24px; border-radius: 999px;
  font-family: var(--sans); font-size: 13.5px; font-weight: 600; letter-spacing: 0.01em;
  text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap;
}
.btn--white, .btn--primary {
  background: var(--ink); color: var(--paper);   /* 9.31:1 */
  transition: background 0.2s ease, transform 0.15s var(--ease);
}
.btn--white:hover, .btn--primary:hover { background: #06544B; }
.btn--white:active, .btn--primary:active { transform: translateY(1px); }
.btn--ghost {
  background: transparent; color: var(--ink); border-color: var(--line);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.btn--ghost:hover { border-color: rgba(1, 57, 52, 0.34); background: rgba(1, 57, 52, 0.04); }
.btn__arrow { width: 9px; height: 9px; }
/* inverted on the emerald bar: cream fill, emerald label (9.31:1) */
.header .btn {
  justify-self: end;
  background: var(--paper); color: var(--ink);
}
.header .btn:hover { background: #F6EFE6; }

/* ================= PAGE HERO (no artwork on subpages) ==================== */
.page-hero { padding: clamp(140px, 20vh, 190px) 0 clamp(48px, 7vh, 84px); }
.hero-tag {
  display: inline-block; margin-bottom: 26px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--teal-ink); background: var(--teal-soft);
  border: 1px solid rgba(23, 126, 110, 0.26); border-radius: 999px; padding: 6px 14px;
}
/* multi-word service labels: tighter tracking so the pill still fits a phone */
.hero-tag--long { letter-spacing: 0.12em; }
@media (max-width: 400px) { .hero-tag--long { letter-spacing: 0.08em; font-size: 10.5px; } }
.page-hero h1 {
  font-family: var(--display);
  font-size: clamp(38px, 5vw, 64px); line-height: 1.1; letter-spacing: -0.015em;
  font-weight: 400; max-width: 21ch;
}
/* italic display glyphs overhang their box; the padding reserves descender room */
.page-hero h1 em {
  font-style: italic; font-weight: 400; color: var(--teal);
  line-height: 1.12; padding-bottom: 0.08em;
}
.page-hero h1.long { font-size: clamp(32px, 4vw, 52px); max-width: 26ch; }
.page-hero .lede {
  color: var(--ink-dim); font-size: clamp(16px, 1.3vw, 18px); line-height: 1.65;
  max-width: 58ch; margin-top: 24px;
}
.page-hero .lede strong { color: var(--ink); font-weight: 600; }
.page-hero .hero-cta { margin-top: 34px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

/* ================= SECTIONS ============================================= */
section { padding: 70px 0; border-top: 1px solid var(--line-soft); }
section.no-rule { border-top: none; padding-top: 0; }
.label {
  display: flex; align-items: center; gap: 11px; margin-bottom: 30px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted);
}
.label::before { content: ""; width: 18px; height: 1px; background: var(--teal); flex: none; }
h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.015em; line-height: 1.15; max-width: 24ch;
}
h2 em { font-style: italic; color: var(--teal); padding-bottom: 0.08em; }
.prose p { color: var(--ink-dim); max-width: 62ch; margin-top: 18px; font-size: 16px; }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose a { color: var(--teal-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ================= paper material (replaces the dark glass) =============
   Cards are paper: a warmer fill, a hairline emerald rule, and a soft
   emerald-tinted shadow. No backdrop-filter, no black shadows. */
.card, .step, .case, .demo, .cta-band {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper-warm);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 4px 16px rgba(1, 57, 52, 0.06);
}
.card, .step, .case { transition: transform 0.22s var(--ease), border-color 0.22s, box-shadow 0.22s; }
@media (prefers-reduced-motion: no-preference) {
  .card:hover, .step:hover, .case:hover {
    transform: translateY(-2px); border-color: rgba(1, 57, 52, 0.28);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.55) inset, 0 10px 26px rgba(1, 57, 52, 0.10);
  }
}

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 38px; }
.step { padding: 26px 24px; }
.step .n { font-family: var(--mono); color: var(--teal-ink); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; }
.step h3 { font-family: var(--sans); font-size: 18px; font-weight: 600; margin: 12px 0 8px; letter-spacing: -0.01em; }
.step p { color: var(--ink-dim); font-size: 14.5px; }
.steps-note { color: var(--ink-dim); max-width: 62ch; margin-top: 30px; font-size: 15px; }
.steps-note strong { color: var(--ink); font-weight: 600; }

/* Fixed 2 columns from 760px up, rather than auto-fit. The only page using this
   grid has FOUR cards, and auto-fit resolved to 3 tracks at desktop, orphaning
   the fourth on a row of its own beside two empty slots. 2x2 fills evenly.
   Below 760px it collapses to one column. */
.cases { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 38px; }
@media (min-width: 760px) { .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.case { padding: 28px 26px; }
.case h3 { font-family: var(--sans); font-size: 17px; font-weight: 600; margin-bottom: 10px; }
.case h3::before {
  content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--teal); margin-right: 10px; vertical-align: 2px;
}
.case p { color: var(--ink-dim); font-size: 14.5px; }

/* feature trio used on the KB and Brain pages */
.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-top: 38px; }

/* ================= CLOSING CTA BAND =====================================
   Reversed out: emerald field, paper type. Gives the page one strong
   full-width moment without breaking the single-theme lock. */
.cta-band {
  padding: 48px 40px; margin-top: 8px; text-align: center;
  background: var(--ink); border-color: transparent; color: var(--paper);
  box-shadow: 0 10px 30px rgba(1, 57, 52, 0.14);
}
.cta-band h2 { margin: 0 auto; color: var(--paper); }
.cta-band h2 em { color: #7FD6C2; }        /* lifted teal: 7.52:1 on --ink */
.cta-band p { color: rgba(234, 217, 198, 0.82); margin: 16px auto 0; max-width: 48ch; }
.cta-band .pill {
  display: inline-block; margin-top: 28px; padding: 13px 28px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-weight: 600; font-size: 14px;
  letter-spacing: 0.02em; text-decoration: none; transition: transform 0.15s ease, background 0.15s ease;
}
.cta-band .pill:hover { transform: translateY(-1px); background: #F6EFE6; }
.cta-band .alt { margin-top: 18px; font-size: 13.5px; }
.cta-band .alt a { color: rgba(234, 217, 198, 0.82); text-decoration: underline; text-underline-offset: 3px; }
.cta-band .alt a:hover { color: var(--paper); }

/* ================= FOOTER =============================================== */
footer { position: relative; z-index: 1; border-top: 1px solid var(--line); padding: 44px 0 60px; color: var(--muted); font-size: 13px; }
.footer-mark { line-height: 0; }
.footer-lockup { height: 38px; width: auto; display: block; }
/* stop-color must live on a class: var() does not resolve in SVG
   presentation attributes */
.footer-lockup .lk-a { stop-color: var(--ink); }
.footer-lockup .lk-b { stop-color: var(--teal); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 16px; }
.footer-nav a { color: var(--ink-dim); text-decoration: none; font-size: 13px; }
.footer-nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
footer .own { max-width: 70ch; margin-top: 18px; line-height: 1.7; }

/* ================= ENTRY + SCROLL REVEAL ================================ */
@media (prefers-reduced-motion: no-preference) {
  .page-hero .hero-tag, .page-hero h1, .page-hero .lede, .page-hero .hero-cta {
    opacity: 0; filter: blur(8px); transform: translateY(16px);
    animation: blurUp 0.7s var(--draw) forwards;
  }
  .page-hero h1 { animation-delay: 0.12s; }
  .page-hero .lede { animation-delay: 0.24s; }
  .page-hero .hero-cta { animation-delay: 0.36s; }
  @keyframes blurUp { to { opacity: 1; filter: blur(0); transform: none; } }
  html.js .reveal { opacity: 0; filter: blur(8px); transform: translateY(18px); transition: opacity 0.7s var(--ease), filter 0.7s var(--ease), transform 0.7s var(--ease); }
  html.js .reveal.in { opacity: 1; filter: blur(0); transform: none; }
}

@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .header { padding: 14px var(--page-pad); }
  .cta-band { padding: 36px 22px; }
}
