/* ============================================================
   Halo AI Studio — landing
   Tokens + components ported from the HaloAIStudios design system
   ============================================================ */

/* ---------- fonts (self-hosted, variable) ---------- */
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/hanken-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url('fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- tokens ---------- */
:root {
  /* base — ink (backgrounds) */
  --ink-950: #080807; --ink-900: #0D0D0B; --ink-800: #15150F; --ink-700: #1F1F17; --ink-600: #2C2C22;
  /* base — cream (foregrounds, paper) */
  --cream-100: #F2EFE6; --cream-200: #E6E2D3; --cream-300: #CFCABA;
  /* base — accent */
  --amber-300: #FFB242; --amber-500: #FF8C1E; --amber-600: #FF6600; --sky-300: #78C8FF;
  /* semantic — dark (default) */
  --bg-page: var(--ink-950); --surface-card: var(--ink-900); --surface-raised: var(--ink-800); --surface-overlay: rgba(8,8,7,.8);
  --text-primary: var(--cream-100); --text-secondary: rgba(242,239,230,.62); --text-tertiary: rgba(242,239,230,.4); --text-disabled: rgba(242,239,230,.25);
  --accent: var(--amber-500); --accent-strong: var(--amber-600); --accent-soft: rgba(255,140,30,.12); --accent-counter: var(--sky-300);
  --border-subtle: rgba(242,239,230,.14); --border-strong: rgba(242,239,230,.32);
  --positive: #6FCF8E; --negative: #E85D3D;
  /* semantic — paper (inverse sections) */
  --paper-bg: var(--cream-100); --paper-text: var(--ink-950); --paper-text-secondary: rgba(8,8,7,.64); --paper-border: rgba(8,8,7,.16);

  /* type */
  --font-display: 'Space Grotesk', sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body: 'Hanken Grotesk', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --track-display: -.03em; --track-tight: -.015em; --track-mono: .12em; --track-wide: .22em;
  --leading-body: 1.55;

  /* space + shape */
  --pad: clamp(20px, 5vw, 48px);
  --radius-sm: 4px; --radius-md: 8px; --radius-pill: 999px;

  /* light, not shadow: the brand glows */
  --glow-amber: 0 0 80px 20px rgba(255,140,30,.12);
  --glow-amber-strong: 0 0 60px 8px rgba(255,140,30,.28);
  --shadow-overlay: 0 24px 80px rgba(0,0,0,.5);

  /* motion — snappy, precise */
  --ease-out: cubic-bezier(.16,1,.3,1);
  --ease-in-out: cubic-bezier(.7,0,.2,1);
  --dur-fast: 150ms; --dur-base: 300ms; --dur-slow: 600ms; --dur-orbit: 14s; --dur-orbit-slow: 40s;
  --grain-opacity: .07;
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--text-primary); }
a:hover { color: var(--accent); }
::selection { background: var(--accent); color: var(--ink-950); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

@keyframes halo-spin { to { transform: rotate(360deg); } }
@keyframes halo-spin-rev { to { transform: rotate(-360deg); } }

.grain-layer {
  position: absolute; inset: 0; pointer-events: none;
  mix-blend-mode: screen; opacity: var(--grain-opacity);
  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='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

.mono {
  font-family: var(--font-mono); font-size: 11px;
  letter-spacing: var(--track-mono); text-transform: uppercase;
}
.mono--accent { color: var(--accent); }
.mono--dim { color: var(--text-tertiary); }
.accent-serif { font-family: var(--font-serif); font-style: italic; font-weight: 500; color: var(--accent); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-display); font-weight: 600;
  border-radius: var(--radius-pill); cursor: pointer; text-decoration: none;
  border: 1px solid transparent; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.btn:active { transform: scale(.98); }
.btn--md { padding: 14px 28px; font-size: 15px; }
.btn--lg { padding: 18px 34px; font-size: 16px; }
.btn--primary { background: var(--cream-100); color: var(--ink-950); }
.btn--primary:hover { background: var(--amber-500); color: var(--ink-950); }
.btn--link {
  background: none; border-radius: 0; padding: 0 0 4px;
  color: var(--text-primary); font-family: var(--font-mono); font-weight: 500;
  letter-spacing: var(--track-mono); font-size: 12px; text-transform: uppercase;
  border: none; border-bottom: 1px solid var(--border-strong);
}
.btn--link:hover { border-color: var(--amber-500); color: var(--amber-500); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  background: var(--surface-overlay);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav__wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  letter-spacing: .02em; color: var(--text-primary); text-decoration: none; white-space: nowrap;
}
.nav__wordmark span, .footer__wordmark span { color: var(--accent); }
.nav__links { display: flex; gap: 32px; }
.nav__links a {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--track-mono);
  text-transform: uppercase; text-decoration: none; color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease-out);
  padding-bottom: 3px; border-bottom: 1px solid transparent;
}
.nav__links a:hover { color: var(--text-primary); }
.nav__cta {
  background: var(--cream-100); color: var(--ink-950); border: none;
  border-radius: var(--radius-pill); padding: 11px 22px;
  font-family: var(--font-display); font-weight: 600; font-size: 13px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out);
}
.nav__cta:hover { background: var(--amber-500); color: var(--ink-950); }

/* ---------- halo ring ---------- */
.halo-ring { --ring-speed: 14s; position: relative; width: var(--ring-size); height: var(--ring-size); flex: none; }
.hero__ring .halo-ring { --ring-size: min(76vw, 540px); }
.cta__ring .halo-ring { --ring-size: min(90vw, 620px); }
.halo-ring__band {
  position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(255,178,66,0) 0%, rgba(255,178,66,.9) 18%, rgba(255,102,0,.55) 32%, rgba(255,178,66,0) 55%, rgba(120,200,255,.35) 78%, rgba(255,178,66,0) 100%);
  -webkit-mask: radial-gradient(circle, transparent 63%, #000 64.5%, #000 68%, transparent 70%);
  mask: radial-gradient(circle, transparent 63%, #000 64.5%, #000 68%, transparent 70%);
  animation: halo-spin var(--ring-speed, var(--dur-orbit)) linear infinite;
  filter: blur(1.5px);
}
.halo-ring__glow {
  position: absolute; inset: calc(var(--ring-size) * -.07); border-radius: 50%;
  background: radial-gradient(circle, transparent 55%, rgba(255,140,30,.14) 64%, transparent 74%);
  filter: blur(10px);
  animation: halo-spin var(--ring-speed, var(--dur-orbit)) linear infinite;
}
.halo-ring__disc {
  position: absolute; inset: calc(var(--ring-size) * .133); border-radius: 50%;
  background: var(--bg-page); box-shadow: var(--glow-amber);
}
.halo-ring__orbit {
  position: absolute; inset: 0;
  animation: halo-spin-rev var(--dur-orbit-slow) linear infinite;
}
.halo-ring__orbit text {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: .34em; fill: rgba(242,239,230,.55);
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 88vh; overflow: hidden;
  display: flex; flex-direction: column;
  background-image: linear-gradient(rgba(242,239,230,.045) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(242,239,230,.045) 1px, transparent 1px);
  background-size: 62px 62px;
}
.hero__ghost {
  position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%);
  font-family: var(--font-display); font-weight: 700;
  font-size: min(30vw, 430px); letter-spacing: -.04em; line-height: 1;
  color: var(--ink-800); user-select: none; white-space: nowrap;
}
.hero__ring { position: absolute; left: 50%; top: 46%; transform: translate(-50%,-50%); }
.hero__meta {
  position: relative; display: flex; justify-content: space-between; gap: 16px;
  padding: 26px var(--pad) 0;
}
.hero__foot {
  position: relative; margin-top: auto;
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 0 var(--pad) 44px; gap: 32px; flex-wrap: wrap;
}
.hero__title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(30px, 3.6vw, 42px); line-height: 1.12;
  letter-spacing: var(--track-tight); max-width: 560px;
}
.hero__actions { display: flex; gap: 22px; align-items: center; }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 9vw, 128px) var(--pad); border-top: 1px solid var(--border-subtle); }
.section__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 56px; gap: 24px; flex-wrap: wrap;
}
.section-heading { display: flex; flex-direction: column; gap: 18px; }
.section-heading__meta { display: flex; align-items: baseline; gap: 16px; }
.section-heading h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(34px, 4vw, 48px); line-height: 1.05;
  letter-spacing: var(--track-tight); color: var(--text-primary);
}

/* ---------- capabilities ---------- */
.caps-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.card {
  background: var(--surface-card); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 28px;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--glow-amber); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 21px; margin-bottom: 10px; }
.card__body { font-size: 14px; line-height: 1.55; color: var(--text-secondary); text-wrap: pretty; }
.card__arrow { margin-top: 22px; color: var(--accent); font-size: 15px; }

/* ---------- work ---------- */
.work-list { display: flex; flex-direction: column; }
.work-list::after { content: ''; border-top: 1px solid var(--border-subtle); }
.work-row {
  display: grid; grid-template-columns: 1fr 140px 210px 70px 40px;
  gap: 24px; align-items: baseline; padding: 26px 8px;
  border-top: 1px solid var(--border-subtle);
  transition: background var(--dur-fast) var(--ease-out);
}
.work-row:hover { background: var(--surface-card); }
.work-row__title {
  font-family: var(--font-display); font-weight: 500; font-size: 24px;
  letter-spacing: var(--track-tight);
}
.work-row__arrow { color: var(--accent); font-size: 17px; text-align: right; }

/* ---------- stats ---------- */
.stats { background: var(--paper-bg); color: var(--paper-text); padding: clamp(64px, 7vw, 96px) var(--pad); }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.stat__value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(38px, 3.6vw, 64px); line-height: 1;
  letter-spacing: var(--track-tight); white-space: nowrap;
}
.stat__label { color: rgba(8,8,7,.5); margin: 12px 0 8px; }
.stat__body { font-size: 14px; line-height: 1.5; color: var(--paper-text-secondary); }

/* ---------- cta ---------- */
.cta { position: relative; padding: clamp(96px, 11vw, 150px) var(--pad); text-align: center; overflow: hidden; }
.cta__ring { position: absolute; left: 50%; bottom: calc(min(90vw, 620px) * -.55); transform: translateX(-50%); opacity: .9; }
.cta__inner { position: relative; }
.cta__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(40px, 7.4vw, 72px); line-height: .98;
  letter-spacing: var(--track-display); margin: 22px 0 36px;
}

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 64px var(--pad) 34px;
  display: flex; flex-direction: column; gap: 56px;
  background: var(--bg-page);
}
.footer__cols { display: flex; justify-content: space-between; gap: 48px; flex-wrap: wrap; }
.footer__brand { max-width: 360px; }
.footer__wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 44px;
  letter-spacing: .01em; color: var(--text-primary);
}
.footer__note { color: var(--text-secondary); font-size: 15px; line-height: 1.55; margin-top: 14px; }
.footer__col-title { margin-bottom: 16px; }
.footer__cols a.footer__link {
  display: block; font-size: 14px; color: var(--text-secondary);
  text-decoration: none; margin-bottom: 10px;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__cols a.footer__link:hover { color: var(--accent); }
.footer__meta {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--border-subtle); padding-top: 22px;
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: var(--track-mono); text-transform: uppercase;
  color: var(--text-tertiary); flex-wrap: wrap; gap: 12px;
}
.footer__meta .dot { color: var(--accent); }

/* ---------- reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .halo-ring__band, .halo-ring__glow, .halo-ring__orbit { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav__links { display: none; }
  .work-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; }
  .work-row__title { flex-basis: calc(100% - 40px); }
  .work-row__arrow { margin-left: auto; }
}
