/* newwebsite — base.css (CHARTER §3 design-token shell · §2.1c-ii LOCAL carve-out).
 *
 * HAND-AUTHORED from site.json.theme tokens. There is no token-CSS generator at v2.0
 * (tools/SHARED_DESIGN does not exist yet), so this file is the one legitimately-LOCAL
 * frontend asset and has NO anti-drift backstop until the v2.1 generator lands (§2.1d).
 * The three theme colors below are the entire site-specific surface — retheming a site
 * = changing these three custom properties.
 *
 * site.json.theme → :root tokens (keep in sync; the v2.1 generator will emit these):
 *   primary_color   #2563eb
 *   secondary_color #1e40af
 *   accent_color    #38bdf8
 */
:root {
  /* --- theme tokens (from site.json.theme) --- */
  --color-primary: #2563eb;
  --color-secondary: #1e40af;
  --color-accent: #38bdf8;

  /* --- derived brand surfaces --- */
  --brand-gradient: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  --accent-glow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 40%, transparent),
                 0 12px 40px -12px color-mix(in srgb, var(--color-primary) 55%, transparent);

  /* --- neutral ink/canvas (dark identity-platform) --- */
  --ink-0: #05070d;          /* canvas */
  --ink-1: #0b0f1a;          /* raised surface */
  --ink-2: #131829;          /* card */
  --line: color-mix(in srgb, var(--color-accent) 14%, #1d2438);
  --text-hi: #f3f6ff;
  --text-mid: #aeb8d4;
  --text-low: #6b7596;

  /* --- type --- */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", ui-sans-serif, "Segoe UI", Helvetica, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  /* --- scale --- */
  --space: clamp(1rem, 0.6rem + 1.6vw, 1.75rem);
  --radius: 14px;
  --radius-lg: 22px;
  --maxw: 1140px;
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-mid);
  background:
    radial-gradient(1200px 620px at 78% -8%, color-mix(in srgb, var(--color-primary) 26%, transparent), transparent 70%),
    radial-gradient(820px 520px at 6% 8%, color-mix(in srgb, var(--color-secondary) 22%, transparent), transparent 68%),
    var(--ink-0);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* subtle grain so the gradients read as atmosphere, not flat fills */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: var(--color-accent); text-decoration: none; transition: color .18s ease; }
a:hover { color: var(--text-hi); }

.container { width: min(var(--maxw), 100% - 2.5rem); margin-inline: auto; position: relative; z-index: 1; }

/* ---------- header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--ink-0) 72%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; gap: 1.25rem; padding: 1.05rem 0; }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-family: var(--font-display);
  font-weight: 600; font-size: 1.18rem; color: var(--text-hi); letter-spacing: -0.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--brand-gradient); box-shadow: var(--accent-glow); color: #fff;
}
.brand-mark svg { width: 19px; height: 19px; }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; align-items: center; }
.nav-links a { color: var(--text-mid); font-size: .94rem; font-weight: 500; }
.nav-links a:hover { color: var(--text-hi); }
.nav-cta { display: inline-flex; gap: .6rem; align-items: center; }

/* ---------- buttons ---------- */
.btn {
  --btn-bg: transparent; --btn-fg: var(--text-hi); --btn-bd: var(--line);
  display: inline-flex; align-items: center; gap: .5rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: .94rem; line-height: 1;
  padding: .72rem 1.15rem; border-radius: 10px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); transition: transform .16s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-ghost:hover { border-color: color-mix(in srgb, var(--color-accent) 55%, var(--line)); color: var(--text-hi); }
.btn-primary {
  --btn-fg: #fff; --btn-bd: transparent;
  background: var(--brand-gradient); box-shadow: var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px color-mix(in srgb, var(--color-accent) 60%, transparent),
  0 18px 48px -14px color-mix(in srgb, var(--color-primary) 70%, transparent); }

/* ---------- hero ---------- */
.hero { padding: clamp(3.5rem, 7vw, 6.5rem) 0 clamp(2.5rem, 5vw, 4rem); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem; font-family: var(--font-mono);
  font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--color-accent);
  padding: .4rem .8rem; border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--color-accent) 7%, transparent);
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600; color: var(--text-hi);
  font-size: clamp(2.5rem, 5.4vw, 4.4rem); line-height: 1.03; letter-spacing: -0.025em;
  margin: 1.3rem 0 0; max-width: 16ch;
}
.hero h1 .grad {
  background: linear-gradient(115deg, var(--color-accent), var(--color-primary));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 52ch; margin: 1.5rem 0 2.2rem; color: var(--text-mid); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

/* ---------- capability grid ---------- */
.section { padding: clamp(2.5rem, 5vw, 4.5rem) 0; }
.section-title { font-family: var(--font-display); color: var(--text-hi); font-weight: 600;
  font-size: clamp(1.5rem, 2.6vw, 2rem); letter-spacing: -0.02em; margin: 0 0 .5rem; }
.section-sub { color: var(--text-low); max-width: 56ch; margin: 0 0 2rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(248px, 1fr)); }
.card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink-1));
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem 1.5rem 1.65rem;
  transition: transform .18s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--color-accent) 45%, var(--line)); }
.card-ico {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; margin-bottom: 1rem;
  color: var(--color-accent); background: color-mix(in srgb, var(--color-accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--color-accent) 28%, transparent); font-size: 1.05rem;
}
.card h3 { font-family: var(--font-body); color: var(--text-hi); font-size: 1.05rem; margin: 0 0 .4rem; font-weight: 600; }
.card p { margin: 0; font-size: .92rem; color: var(--text-low); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 2rem; padding: 2.2rem 0; }
.foot { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; color: var(--text-low); font-size: .88rem; }
.foot .brand { font-size: 1rem; }
.foot-links { display: flex; gap: 1.3rem; margin-left: auto; }
.foot-links a { color: var(--text-low); }
.foot-links a:hover { color: var(--text-hi); }

@media (max-width: 680px) {
  .nav-links { gap: .9rem; }
  .nav-links .hide-sm { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
