/* ═══════════════════════════════════════════════════════════════════════
   ARROWSTERR WEBSITE · BASE
   Shared by every page: tokens, reset, layout, buttons, header, footer.
   Each key page adds its own CSS in pages/<slug>/<slug>.css.
   Brand v5, "the Navigator" (docs/brand.md in the app repo): grey base,
   Signal Blue to point, Night to close, one gold Spark per view. 4px controls,
   8px cards, 12px frames, flat cards, the Notch on the main button.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --brand: #0943B0;
  --brand-deep: #07368E;
  --brand-pale: #EEF3FF;
  --brand-bg: #EEF3FF;
  --sky: #4F7FE0;
  --night: #0B1B3F;
  --spark: #F5A70A;
  --spark-text: #8A4B00;
  --spark-tint: #FFF4DC;

  --ink: #0B1B3F;
  --ink-hover: #13275A;
  --body: #4F4F4F;
  --muted: #666666;
  --faint: #B3B3B3;

  --rule: #EBEBEB;
  --rule-faint: #F1F1F1;
  --rule-strong: #D6D6D6;
  --paper: #FCFCFC;
  --surface: #FFFFFF;
  --surface-2: #F1F1F1;
  --surface-3: #EBEBEB;

  --pos: #0B7A54;
  --pos-bg: #E6F4EE;
  --neg: #C02A35;
  --neg-bg: #FBEBEC;
  --warn: #8A4B00;
  --warn-bg: #FFF4DC;
  --chip-bg: #F1F1F1;
  --chip-ink: #666666;

  --r-xs: 4px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 8px;
  --r-xl: 12px;

  --ring: 0 0 0 1px var(--rule);
  --shadow-sm: 0 0 0 1px var(--rule);
  --shadow-md: 2px 4px 16px rgba(0, 0, 0, .16), 0 2px 4px rgba(0, 0, 0, .08);
  --shadow-lg: 2px 4px 16px rgba(0, 0, 0, .16), 0 2px 4px rgba(0, 0, 0, .08);
  --btn-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 0 4px rgba(0, 0, 0, .08);
  --focus: 0 0 0 2px #0943B0;
  --notch: 8px;

  --climb: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 24 56 39'%3E%3Cpath d='M5.244 61.182 L29.322 26.159 A3.25 3.25 0 0 1 34.678 26.159 L58.756 61.182 Q59.663 62.5 58.063 62.5 L53.375 62.5 Q51.775 62.5 50.868 61.182 L32 33.737 L13.132 61.182 Q12.225 62.5 10.625 62.5 L5.937 62.5 Q4.337 62.5 5.244 61.182 Z M18.593 61.182 L29.322 45.575 A3.25 3.25 0 0 1 34.678 45.575 L45.407 61.182 Q46.314 62.5 44.714 62.5 L40.026 62.5 Q38.426 62.5 37.519 61.182 L32 53.153 L26.481 61.182 Q25.574 62.5 23.974 62.5 L19.286 62.5 Q17.686 62.5 18.593 61.182 Z'/%3E%3C/svg%3E");
  --chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='4 24 56 39'%3E%3Cpath d='M5.244 61.182 L29.322 26.159 A3.25 3.25 0 0 1 34.678 26.159 L58.756 61.182 Q59.663 62.5 58.063 62.5 L53.375 62.5 Q51.775 62.5 50.868 61.182 L32 33.737 L13.132 61.182 Q12.225 62.5 10.625 62.5 L5.937 62.5 Q4.337 62.5 5.244 61.182 Z'/%3E%3C/svg%3E");
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='23.4 3 17.25 17.25'%3E%3Cpath d='M32 3 C33.76 9.555 33.76 9.555 39.331 11.625 C33.76 13.695 33.76 13.695 32 20.25 C30.241 13.695 30.241 13.695 24.669 11.625 C30.241 9.555 30.241 9.555 32 3 Z'/%3E%3C/svg%3E");

  /* Brand v5: Funnel Display for headings 18px and up, Geist for text, Geist Mono for numbers and code. The app uses the same. */
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --display: 'Funnel Display', 'Geist', -apple-system, BlinkMacSystemFont, sans-serif;

  --max: 1120px;
  --gutter: 24px;
  --section: 112px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--body);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'cv11' 1, 'ss01' 1;
}
h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
::selection { background: var(--brand-bg); color: var(--ink); }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

/* Type */
.h1, .h2, .h3, .h4 { color: var(--ink); font-weight: 600; text-wrap: balance; }
.h1, .h2, .h3 { font-family: var(--display); }
.h1 { font-size: clamp(40px, 6.8vw, 80px); line-height: 1; letter-spacing: -0.035em; font-weight: 700; }
.h2 { font-size: clamp(30px, 4.4vw, 50px); line-height: 1.05; letter-spacing: -0.03em; }
.h3 { font-size: 21px; line-height: 1.3; letter-spacing: -0.02em; }
.h4 { font-size: 16px; line-height: 1.5; letter-spacing: 0; font-weight: 600; }
.lede { font-size: clamp(17px, 2vw, 19px); line-height: 1.6; color: var(--body); text-wrap: pretty; }
.small { font-size: 13px; color: var(--muted); }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); letter-spacing: -0.02em; }

/* Landing pages: heading sizes tuned for these pages (the class name is older than the font). */
body.aw-mono { font-size: 16px; }
.aw-mono .h1 { font-size: clamp(34px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -0.02em; }
.aw-mono .h2 { font-size: clamp(27px, 3.8vw, 44px); line-height: 1.08; letter-spacing: -0.015em; }
.aw-mono .h3 { font-size: 19px; letter-spacing: -0.015em; }
.aw-mono .lede { font-size: clamp(16px, 1.8vw, 18px); }
.aw-mono .btn { font-weight: 500; letter-spacing: -0.01em; }
.aw-mono .nav__trigger, .aw-mono .nav__link, .aw-mono .site-actions .login { font-size: 14px; white-space: nowrap; }
.aw-mono .kbar { white-space: nowrap; font-size: 13px; }
@media (max-width: 1360px) { .aw-mono .kbar span { display: none; } .aw-mono .kbar { padding: 0 6px; } }

/* Layout */
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 10px 16px; border-radius: var(--r-sm);
  font-size: 15px; font-weight: 600; line-height: 1.2; letter-spacing: 0; white-space: nowrap;
  transition: background .15s var(--ease), box-shadow .15s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-height: 34px; padding: 7px 12px; font-size: 14px; }
.btn--lg { min-height: 46px; padding: 12px 20px; font-size: 16px; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-deep); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-hover); }
.btn--secondary { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule), var(--btn-shadow); }
.btn--secondary:hover { background: var(--surface-2); }
.btn--white { background: #fff; color: var(--night); }
.btn--white:hover { background: var(--brand-pale); }
.btn svg { width: 16px; height: 16px; }

/* Brand v5: eyebrows, payoff words, notched buttons */
::selection { background: var(--brand-pale); color: var(--ink); }

/* Eyebrow: the Climb mark plus a short label, above section titles. */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; line-height: 18px; font-weight: 600; color: var(--brand); }
.eyebrow::before {
  content: ''; width: 15px; height: 11px; flex: none; background: currentColor;
  -webkit-mask: var(--climb) center / contain no-repeat; mask: var(--climb) center / contain no-repeat;
}
.h-head > .eyebrow { grid-column: 1; }
/* The payoff word: the part of a heading that names the result. */
.accent { color: var(--brand); }

/* Buttons: the primary carries the Notch. No shadow on it. */
.btn { font-weight: 500; }
.btn--primary, .btn--white {
  box-shadow: none;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.btn--lg { --notch: 10px; }
.btn--secondary { box-shadow: inset 0 0 0 1px var(--rule-strong); }
.btn--secondary:hover { box-shadow: inset 0 0 0 1px var(--faint); }
.btn--secondary:hover { background: var(--paper); }
.btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
/* clip-path hides outlines, so notched buttons get the ring inside */
.btn--primary:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--brand), inset 0 0 0 4px #fff; }
.btn--white:focus-visible { outline: none; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 4px var(--night); }

/* Night panels: closing CTAs. Night ground, the Climb watermark, a white
   headline with a light-blue payoff word, a white notched button. */
.cta, .s-cta, .side-cta { position: relative; overflow: hidden; background: var(--night); color: #B3C7F2; }
.cta::after, .s-cta::after {
  content: ''; position: absolute; right: -48px; bottom: -40px; width: 380px; height: 260px; pointer-events: none;
  background: #fff; opacity: .06;
  -webkit-mask: var(--climb) center / contain no-repeat; mask: var(--climb) center / contain no-repeat;
}
.s-cta::after { width: 240px; height: 164px; right: -32px; bottom: -32px; }
.cta > *, .s-cta > * { position: relative; z-index: 1; }
.cta .h2, .cta .h3, .s-cta .h2, .s-cta .h3, .side-cta__t { color: #fff; }
.cta .accent, .cta .eyebrow, .s-cta .accent, .s-cta .eyebrow, .side-cta .accent { color: #8FB0FF; }
.h-cta__ghost { color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .32); }
.h-cta__ghost:hover { background: rgba(255, 255, 255, .08); }
@media (max-width: 600px) { .cta::after { width: 220px; height: 150px; right: -32px; bottom: -24px; } }

/* Chips and marks */
.tick { display: flex; gap: 10px; align-items: flex-start; color: var(--ink); font-size: 15px; }
.tick::before {
  content: ''; flex: none; width: 16px; height: 16px; margin-top: 3px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.8-4.8' fill='none' stroke='%230943B0' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* Cards */
.card { background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.frame { background: var(--paper); border-radius: var(--r-xl); padding: 6px; box-shadow: inset 0 0 0 1px var(--rule); }
.frame > .card { border-radius: calc(var(--r-xl) - 6px); }

/* AI logos */
.logo-ai { width: 22px; height: 22px; border-radius: var(--r-xs); object-fit: contain; background: #fff; }
.ai-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.ai-row li { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: var(--r-sm); background: #fff; box-shadow: var(--ring); font-size: 14px; font-weight: 500; color: var(--ink); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--surface);
  border-bottom: 1px solid transparent; transition: border-color .2s var(--ease);
}
.admin-bar .site-header { top: 32px; }
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.site-header__in { display: flex; align-items: center; gap: 24px; height: 64px; }
.site-logo img { height: 26px; width: auto; }
.aw-menu { display: flex; gap: 4px; }
.aw-menu a { display: block; padding: 8px 12px; border-radius: var(--r-sm); font-size: 15px; font-weight: 500; color: var(--body); transition: color .15s, background .15s; }
.aw-menu a:hover, .aw-menu .current-menu-item > a { color: var(--ink); background: var(--surface-2); }
.site-actions { display: flex; align-items: center; gap: 8px; }
.site-actions .login { padding: 8px 10px; font-size: 15px; font-weight: 500; color: var(--ink); }
.menu-toggle { display: none; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: var(--r-sm); }
.menu-toggle span, .menu-toggle span::before, .menu-toggle span::after { display: block; width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: transform .2s var(--ease), background .2s; }
.menu-toggle span::before, .menu-toggle span::after { content: ''; position: absolute; left: 0; }
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.nav-open .menu-toggle span { background: transparent; }
.nav-open .menu-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .menu-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* Footer */
.site-footer { padding: 72px 0 40px; background: var(--paper); }
.site-footer__top { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 48px; }
.site-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.site-footer__brand img { height: 30px; width: auto; }
.site-footer__brand p { max-width: 340px; font-size: 15px; color: var(--body); }
.site-footer__ctas { display: flex; gap: 8px; }
.site-footer__in { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 32px; padding: 40px 0; border-top: 1px solid var(--surface-3); }
.site-footer__col { display: flex; flex-direction: column; gap: 14px; }
.site-footer__title { font-size: 14px; font-weight: 600; color: var(--ink); }
.site-footer__col ul { display: flex; flex-direction: column; gap: 10px; }
.site-footer__col a { font-size: 14px; color: var(--body); transition: color .15s; }
.site-footer__col a:hover, .site-footer__legal a:hover { color: var(--brand); }
.site-footer__base { padding-top: 24px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
.site-footer__legal { display: inline-flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer__legal a { color: var(--body); transition: color .15s; }

/* Reveal on scroll (base.js adds .is-in) */
/* Fade in, rise 12px and go from blurred to sharp, once (after brew.new). */
.reveal { opacity: 0; filter: blur(6px); translate: 0 12px; transition: opacity .6s var(--ease), filter .6s var(--ease), translate .6s var(--ease); }
.reveal.is-in { opacity: 1; filter: none; translate: none; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; filter: none; translate: none; transform: none; transition: none; } html { scroll-behavior: auto; } }

/* Small screens */
@media (max-width: 860px) {
  :root { --section: 72px; --gutter: 16px; }
  .site-footer__top { flex-direction: column; align-items: flex-start; padding-bottom: 32px; }
  .site-footer__in { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .site-footer__base { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }

/* Screen reader only, visible on focus */
.screen-reader-text { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 8px 12px; background: #fff; border-radius: var(--r-sm); box-shadow: var(--shadow-md); color: var(--ink); }
.screen-reader-text:focus { left: 8px; }

/* Big buttons get an arrow that moves on hover. */
.btn--lg.btn--primary::after, .btn--lg.btn--white::after { content: '→'; font-weight: 500; transition: transform .2s var(--ease); }
.btn--lg.btn--primary:hover::after, .btn--lg.btn--white:hover::after { transform: translateX(3px); }

/* ─────────────── Engineering touches ─────────────── */
kbd {
  display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: var(--r-xs); background: #fff; box-shadow: inset 0 0 0 1px var(--rule), 0 1px 0 var(--rule);
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: var(--body);
}
kbd + kbd { margin-left: 2px; }

/* Header: a jump-to button that opens the palette. */
.kbar { display: inline-flex; align-items: center; gap: 10px; height: 32px; padding: 0 6px 0 10px; border-radius: var(--r-sm); box-shadow: inset 0 0 0 1px var(--rule); font-size: 13px; color: var(--muted); transition: box-shadow .15s, color .15s; }
.kbar:hover { color: var(--ink); box-shadow: inset 0 0 0 1px var(--faint); }
@media (max-width: 1180px) { .kbar span { display: none; } .kbar { padding: 0 6px; } }
@media (max-width: 960px) { .kbar { display: none; } }

/* Command palette. */
.palette { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 14vh 16px 16px; background: rgba(11, 27, 63, .28); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.palette[hidden] { display: none; }
.palette__box { width: 100%; max-width: 560px; overflow: hidden; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-lg); animation: pop .14s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(-6px) scale(.99); } }
.palette__bar { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--rule); font-family: var(--mono); color: var(--brand); }
.palette__bar input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: none; font: 15px var(--font); color: var(--ink); }
.palette__list { max-height: 340px; overflow-y: auto; padding: 6px; }
.palette__item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 10px; border-radius: var(--r-sm); font-size: 14px; color: var(--ink); cursor: pointer; }
.palette__item em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--muted); }
.palette__item.is-on { background: var(--surface-2); }
.palette__item.is-on em { color: var(--brand); }
.palette__none { padding: 18px 10px; font-size: 14px; color: var(--muted); }
.palette__foot { display: flex; gap: 16px; padding: 8px 14px; border-top: 1px solid var(--rule-faint); background: var(--paper); font-family: var(--mono); font-size: 11px; color: var(--muted); }
.palette-open { overflow: hidden; }

/* Terminal block (404). */
.term { width: 100%; max-width: 520px; margin: 0 0 8px; padding: 18px 20px; border-radius: var(--r-md); background: var(--ink); color: #B0BCD2; font: 13px/1.7 var(--mono); text-align: left; white-space: pre-wrap; }
.term b { color: #FF8A8A; font-weight: 500; }
.term__p { color: #7FA8FF; }
.term__cursor { display: inline-block; width: 8px; height: 15px; vertical-align: -2px; background: #B0BCD2; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) { .term__cursor, .palette__box { animation: none; } }


/* Dropdowns (aw_select): the site's own list in place of the browser's. */
.aw-select { position: relative; }
.aw-select__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; text-align: left; }
.aw-select__btn svg { width: 12px; height: 12px; flex: none; color: var(--muted); transition: transform .15s var(--ease); }
.aw-select__btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.aw-select__list { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 20; max-height: 240px; overflow-y: auto; padding: 4px; border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow-md); outline: 0; }
.aw-select__list li { padding: 8px 10px; border-radius: var(--r-sm); font-size: 15px; font-weight: 400; color: var(--ink); cursor: pointer; }
.aw-select__list li.is-on { background: var(--surface-2); }
.aw-select__list li[aria-selected="true"] { color: var(--brand); font-weight: 500; }
