/* ---------- Tokens ---------- */
:root {
  --cardinal: #8c1515;
  --cardinal-bright: #b1040e;
  --bg: #ffffff;
  --bg-alt: #f6f5f3;
  --surface: #ffffff;
  --text: #1c1c1e;
  --text-muted: #5f5f66;
  --border: #e6e3df;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 8px 24px rgba(0, 0, 0, .06);
  --radius: 16px;
  --max: 1120px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --cardinal: #e0525a;
    --cardinal-bright: #ff6b72;
    --bg: #111113;
    --bg-alt: #18181b;
    --surface: #1d1d21;
    --text: #ececef;
    --text-muted: #a1a1aa;
    --border: #2c2c31;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--cardinal); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }

.container { width: min(100% - 48px, var(--max)); margin-inline: auto; }
.muted { color: var(--text-muted); }

.skip-link {
  position: absolute; left: -9999px; top: 8px;
  background: var(--cardinal); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100;
}
.skip-link:focus { left: 8px; }

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

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 700; color: var(--text); letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.nav-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; align-items: center; }
.nav-links a { color: var(--text-muted); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--text); text-decoration: none; }
.nav-links a.nav-cta {
  color: #fff; background: var(--cardinal); padding: 8px 16px; border-radius: 999px;
}
.nav-links a.nav-cta:hover { background: var(--cardinal-bright); color: #fff; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: 96px 0 104px; color: #fff; }
.hero-bg {
  position: absolute; inset: 0;
  background:
    linear-gradient(115deg, rgba(60, 8, 8, .92) 0%, rgba(140, 21, 21, .78) 45%, rgba(20, 20, 24, .55) 100%),
    url("images/yosemite.jpg") center 40% / cover no-repeat;
}
.hero-inner { position: relative; display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.headshot {
  width: 240px; height: 240px; border-radius: 50%; object-fit: cover;
  border: 6px solid rgba(255, 255, 255, .9);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.eyebrow {
  display: inline-block; margin-bottom: 14px;
  font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(255, 255, 255, .14); padding: 6px 12px; border-radius: 999px;
}
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; margin-bottom: 18px; }
.hero .lede { font-size: clamp(18px, 2vw, 21px); max-width: 620px; color: rgba(255, 255, 255, .9); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px; border-radius: 999px; font-weight: 600; font-size: 16px;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--cardinal); color: #fff; box-shadow: 0 6px 18px rgba(140, 21, 21, .3); }
.btn-primary:hover { background: var(--cardinal-bright); }
.hero .btn-primary { background: #fff; color: #8c1515; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.btn-ghost { color: #fff; border: 1.5px solid rgba(255, 255, 255, .6); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.btn-lg { padding: 16px 30px; font-size: 18px; }

/* ---------- Sections ---------- */
.section { padding: 104px 0; }
.section-alt { background: var(--bg-alt); }
.kicker {
  color: var(--cardinal); font-size: 13px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px;
}
.section-head { margin-bottom: 48px; }
.section-head h2, .contact h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }

.two-col { display: grid; grid-template-columns: 1fr 1.5fr; gap: 64px; }
.two-col .section-head { margin-bottom: 0; }
.prose p { color: var(--text-muted); font-size: 18px; }
.prose p:first-child { color: var(--text); font-size: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 28px 0 0; }
.chips li {
  font-size: 14px; font-weight: 500; padding: 7px 14px; border-radius: 999px;
  background: var(--bg-alt); border: 1px solid var(--border);
}

.stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-top: 72px;
  padding-top: 48px; border-top: 1px solid var(--border);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num { font-size: clamp(32px, 4vw, 44px); font-weight: 800; color: var(--cardinal); letter-spacing: -0.02em; }
.stat-label { color: var(--text-muted); font-size: 15px; }

.section-sub { color: var(--text-muted); font-size: 18px; max-width: 720px; margin: 14px 0 0; }

/* ---------- Focus areas ---------- */
.focus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.focus {
  padding: 28px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.focus-icon {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; margin-bottom: 18px;
  background: color-mix(in srgb, var(--cardinal) 10%, transparent); color: var(--cardinal);
}
.focus-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.focus h3 { font-size: 19px; margin-bottom: 8px; }
.focus p { color: var(--text-muted); font-size: 15.5px; margin: 0; }

/* ---------- Approach ---------- */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.principle { border-top: 2px solid var(--border); padding-top: 24px; }
.principle-num { display: block; font-size: 15px; font-weight: 800; color: var(--cardinal); letter-spacing: .08em; margin-bottom: 14px; }
.principle h3 { font-size: 20px; margin-bottom: 10px; }
.principle p { color: var(--text-muted); font-size: 15.5px; margin: 0; }

/* ---------- Spaikz apps ---------- */
.spaikz-intro {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-bottom: 48px;
}
.spaikz-intro h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; margin-bottom: 14px; }
.spaikz-intro .lede { color: var(--text-muted); font-size: 18px; max-width: 720px; margin: 0; }
.spaikz-intro .btn { flex-shrink: 0; }
.apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.app {
  display: flex; flex-direction: column; padding: 24px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.app:hover {
  text-decoration: none; transform: translateY(-4px); border-color: color-mix(in srgb, var(--cardinal) 40%, var(--border));
  box-shadow: 0 2px 4px rgba(0,0,0,.05), 0 16px 40px rgba(0,0,0,.12);
}
.app-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.app-icon {
  display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px;
  font-size: 26px; background: var(--bg-alt); border: 1px solid var(--border);
}
.badge { font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.badge-live { background: #e6f4ea; color: #1e6b34; }
.badge-beta { background: #e8effc; color: #1f4fa3; }
.badge-soon { background: #fdf1df; color: #8a5300; }
@media (prefers-color-scheme: dark) {
  .badge-live { background: #143222; color: #7fd69a; }
  .badge-beta { background: #172741; color: #8fb4f5; }
  .badge-soon { background: #3a2a10; color: #f0c27a; }
}
.app h3 { font-size: 19px; margin-bottom: 8px; }
.app p { color: var(--text-muted); font-size: 15.5px; margin-bottom: 16px; flex-grow: 1; }
.app-platforms { font-size: 13px; font-weight: 600; color: var(--cardinal); letter-spacing: .02em; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact-inner { display: flex; flex-direction: column; align-items: center; }
.contact .lede { color: var(--text-muted); font-size: 19px; margin: 12px 0 28px; }
.social { display: flex; gap: 14px; list-style: none; padding: 0; margin: 32px 0 0; }
.social a {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  transition: background .15s, color .15s, transform .15s;
}
.social a:hover { background: var(--cardinal); color: #fff; transform: translateY(-2px); }
.social svg { width: 20px; height: 20px; fill: currentColor; }
.social svg[fill="none"] { fill: none; }

/* ---------- Footer ---------- */
.site-footer { padding: 28px 0; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-muted); }
.site-footer .container { display: flex; justify-content: space-between; align-items: center; }
.site-footer p { margin: 0; }

/* ---------- Reveal animation ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .app, .btn, .social a { transition: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 64px 0 72px; }
  .hero-inner { grid-template-columns: 1fr; gap: 32px; text-align: center; justify-items: center; }
  .hero .lede { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .headshot { width: 180px; height: 180px; }
  .two-col { grid-template-columns: 1fr; gap: 24px; }
  .section { padding: 72px 0; }
  .stats { gap: 28px; text-align: center; }
  .focus-grid, .principles { grid-template-columns: repeat(2, 1fr); }
  .spaikz-intro { flex-direction: column; align-items: flex-start; gap: 24px; }
}
@media (max-width: 600px) {
  .focus-grid, .principles { grid-template-columns: 1fr; }
  .nav-links li:not(:last-child) { display: none; }
  .site-footer .container { flex-direction: column; gap: 8px; }
}
