/* aihc.app. The colors match blog.aihc.app, perf.aihc.app and docs.aihc.app. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url(/fonts/inter-latin-wght-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-opsz-normal.woff2) format('woff2-variations');
}
@font-face {
  font-family: 'Newsreader Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 800;
  src: url(/fonts/newsreader-latin-opsz-italic.woff2) format('woff2-variations');
}

:root {
  color-scheme: light dark;
  --bg: #faf8f3;
  --surface: #ffffff;
  --surface-2: #f3f0ea;
  --ink: #1d1a17;
  --muted: #6b655d;
  --faint: #8f887c;
  --rule: #e6e0d6;
  --accent: #5e5086;
  --accent-strong: #46396b;
  --accent-soft: #eee9f7;
  --on-accent: #ffffff;
  --glow: rgba(94, 80, 134, 0.22);
  --glow-2: rgba(183, 168, 230, 0.45);
  --good: #0a8a0a;
  --shadow: 0 1px 2px rgba(29, 26, 23, 0.04), 0 8px 24px -12px rgba(29, 26, 23, 0.18);
  --term-bg: #1d1a22;
  --term-ink: #ebe6de;
  --term-dim: #9c958b;
  --term-rule: #2b2731;
  --term-accent: #b7a8e6;
  --sans: 'Inter Variable', ui-sans-serif, system-ui, sans-serif;
  --serif: 'Newsreader Variable', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wide: 70rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151318;
    --surface: #1d1a22;
    --surface-2: #262230;
    --ink: #ebe6de;
    --muted: #9c958b;
    --faint: #736c62;
    --rule: #2b2731;
    --accent: #b7a8e6;
    --accent-strong: #d1c6f0;
    --accent-soft: #27223a;
    --on-accent: #151318;
    --glow: rgba(183, 168, 230, 0.16);
    --glow-2: rgba(94, 80, 134, 0.55);
    --good: #4cc04c;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.6);
    --term-bg: #100e13;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--accent-strong); }
code { font-family: var(--mono); font-size: 0.88em; }
p code, .link-note code {
  background: var(--surface-2);
  border-radius: 0.3em;
  padding: 0.1em 0.35em;
}
h1, h2, h3, p { margin: 0; }
h1, h2 {
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.05;
  text-wrap: balance;
}
h1 em, h2 em { font-style: italic; color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 1.5rem; }
.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 0.5rem; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid color-mix(in srgb, var(--rule) 70%, transparent);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 4rem; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.brand-mark {
  display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 0.5rem;
  background: var(--accent); color: var(--on-accent);
  box-shadow: 0 0 0 0 var(--glow-2); transition: box-shadow 0.3s;
}
.brand:hover .brand-mark { box-shadow: 0 0 22px 2px var(--glow-2); }
.brand-mark svg { width: 1.45rem; height: 1.45rem; }
.nav nav { display: flex; align-items: center; gap: 1.5rem; }
.nav nav a { color: var(--muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.nav nav a:hover { color: var(--ink); }
@media (max-width: 640px) {
  .nav nav a:not(.nav-gh) { display: none; }
}

/* Hero */
.hero { position: relative; isolation: isolate; padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(3.5rem, 8vw, 6rem); }
.hero-bg { position: absolute; inset: -4rem 0 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.9; will-change: transform; }
.blob-a { width: 38rem; height: 38rem; left: -10rem; top: -14rem; background: radial-gradient(circle, var(--glow-2), transparent 65%); animation: drift-a 18s ease-in-out infinite alternate; }
.blob-b { width: 34rem; height: 34rem; right: -8rem; top: 4rem; background: radial-gradient(circle, var(--glow), transparent 65%); animation: drift-b 22s ease-in-out infinite alternate; }
.grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 3.5rem 3.5rem;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 35%, #000 10%, transparent 75%);
}
@keyframes drift-a { to { transform: translate(9rem, 5rem) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-7rem, -4rem) scale(0.9); } }

.hero-inner { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 62rem) {
  .hero-inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 4rem; }
}
.hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.terminal { animation: rise 0.9s 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(1.2rem); } }

.eyebrow, .kicker {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding: 0.4rem 0.85rem; border-radius: 99px;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  margin-bottom: 1.5rem;
}
.pulse { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 0 var(--good); animation: pulse 2.2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 0.5rem transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

h1 { font-size: clamp(2.9rem, 7.2vw, 5.2rem); }
h1 em {
  background: linear-gradient(100deg, var(--accent-strong), var(--accent) 45%, var(--accent-strong) 90%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shimmer 7s linear infinite;
  padding-right: 0.08em;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.lede { margin-top: 1.5rem; font-size: clamp(1.1rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34rem; }
.cta { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2.2rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.8rem 1.35rem; border-radius: 0.7rem;
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: transform 0.15s, box-shadow 0.25s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 6px 24px -6px var(--glow-2); }
.btn-primary:hover { background: var(--accent-strong); color: var(--on-accent); box-shadow: 0 10px 34px -6px var(--glow-2); }
.btn-ghost { color: var(--ink); border: 1px solid var(--rule); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { color: var(--ink); border-color: var(--accent); }

/* Terminal */
.terminal {
  position: relative;
  background: var(--term-bg); color: var(--term-ink);
  border: 1px solid var(--term-rule); border-radius: 0.9rem;
  box-shadow: 0 30px 80px -30px var(--glow-2), var(--shadow);
  min-width: 0;
}
.terminal::before {
  content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, var(--term-accent), transparent 35%, transparent 65%, var(--term-accent));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0.55;
}
.terminal-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--term-rule); }
.terminal-bar i { width: 0.65rem; height: 0.65rem; border-radius: 50%; background: #3a3542; }
.terminal-bar span { margin-left: auto; font-family: var(--mono); font-size: 0.72rem; color: var(--term-dim); }
.terminal pre { margin: 0; padding: 1.2rem 1.25rem 1.4rem; overflow-x: auto; font-size: clamp(0.72rem, 1.5vw, 0.84rem); line-height: 1.75; }
.terminal code { font-size: inherit; }
.t-line { display: inline-block; min-height: 1.75em; }
.t-prompt { color: var(--term-accent); user-select: none; }
.t-dim { color: var(--term-dim); }
.t-ok { color: #4cc04c; }
.t-accent { color: var(--term-accent); font-weight: 600; }
.t-hello { color: #fff; font-weight: 600; }
.t-caret { display: inline-block; width: 0.55em; height: 1.1em; vertical-align: text-bottom; background: var(--term-accent); animation: blink 1.1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.js .terminal .t-line.t-hidden { visibility: hidden; }

/* Sections */
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--rule); }
@media (prefers-color-scheme: dark) { .section-alt { background: #18161c; } }
.kicker { margin-bottom: 1rem; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); max-width: 22ch; }
.section-lede { margin-top: 1.2rem; color: var(--muted); font-size: 1.15rem; max-width: 40rem; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)); gap: 1rem; margin-top: 3rem; }
.card, .meter, .link-card, .status {
  position: relative; overflow: hidden;
  background: var(--surface); border: 1px solid var(--rule); border-radius: 1rem;
  box-shadow: var(--shadow);
}
.card { padding: 1.5rem; transition: transform 0.25s, border-color 0.25s; }
.card::after, .link-card::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(22rem circle at var(--mx, 50%) var(--my, 0%), var(--glow), transparent 55%);
}
.card:hover, .link-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 55%, var(--rule)); }
.card:hover::after, .link-card:hover::after { opacity: 1; }
.icon {
  display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.7rem;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 1.1rem;
}
.icon svg { width: 1.35rem; height: 1.35rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { font-size: 1.08rem; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 0.5rem; }
.card p { color: var(--muted); font-size: 0.95rem; line-height: 1.55; }

/* Pipeline */
.pipeline-box { margin-top: 3rem; padding: 1.75rem; border: 1px dashed color-mix(in srgb, var(--accent) 40%, var(--rule)); border-radius: 1rem; }
.pipeline-title { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: var(--muted); margin-bottom: 1.25rem; }
.pipeline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; }
.pipeline li {
  position: relative; flex: 1 1 6.5rem;
  display: flex; flex-direction: column; gap: 0.1rem;
  padding: 0.7rem 0.75rem; border-radius: 0.7rem;
  background: var(--surface); border: 1px solid var(--rule);
  animation: stage 7s infinite; animation-delay: calc(var(--i) * 1s);
}
.pipeline li:nth-child(1) { --i: 0; } .pipeline li:nth-child(2) { --i: 1; }
.pipeline li:nth-child(3) { --i: 2; } .pipeline li:nth-child(4) { --i: 3; }
.pipeline li:nth-child(5) { --i: 4; } .pipeline li:nth-child(6) { --i: 5; }
.pipeline li:nth-child(7) { --i: 6; }
.pipeline li span { font-weight: 600; font-size: 0.92rem; }
.pipeline li small { font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.pipeline li:not(:last-child)::after {
  content: ''; position: absolute; right: -1.2rem; top: 50%; width: 0.8rem; height: 0.8rem;
  transform: translateY(-50%);
  background: var(--faint);
  clip-path: polygon(0 42%, 60% 42%, 60% 15%, 100% 50%, 60% 85%, 60% 58%, 0 58%);
}
.pipeline .emit { flex: 1.6 1 9rem; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.pipeline .emit small { color: var(--accent); }
@keyframes stage {
  0%, 16%, 100% { border-color: var(--rule); box-shadow: none; }
  5% { border-color: var(--accent); box-shadow: 0 0 0 3px var(--glow), 0 0 26px -4px var(--glow-2); }
}

/* Performance meters */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 3rem; }
.meter { padding: 1.6rem; }
.meter-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.meter-value { font-family: var(--serif); font-size: clamp(3.4rem, 6vw, 4.4rem); font-weight: 500; line-height: 1.05; letter-spacing: -0.03em; margin: 0.3rem 0 1.1rem; font-variant-numeric: tabular-nums; }
.meter-value .x { color: var(--accent); font-style: italic; margin-left: 0.04em; }
.bars { display: grid; gap: 0.45rem; }
.bar { display: grid; grid-template-columns: 2.6rem 1fr; align-items: center; gap: 0.6rem; font-size: 0.72rem; font-weight: 600; color: var(--faint); }
.bar i { display: block; height: 0.6rem; border-radius: 99px; width: var(--w); background: var(--rule); transform-origin: left; }
.bar-aihc { color: var(--accent); }
.bar-aihc i { background: linear-gradient(90deg, var(--accent-strong), var(--accent)); box-shadow: 0 0 14px var(--glow-2); min-width: 0.6rem; }
.js .meter .bar i { transform: scaleX(0); transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.25s; }
.js .meter.in .bar i { transform: scaleX(1); }
.meter-note { margin-top: 1.1rem; font-size: 0.92rem; color: var(--muted); }
.fineprint { margin-top: 1.6rem; font-size: 0.85rem; color: var(--muted); max-width: 52rem; }

/* How it's made */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 56rem) { .split { grid-template-columns: 1.15fr 1fr; gap: 4rem; } }
.split h2 { margin-bottom: 1.5rem; }
.split > div > p:not(.kicker) { color: var(--muted); font-size: 1.1rem; max-width: 36rem; }
.split > div > p + p { margin-top: 1rem; }
.status { padding: 1.75rem; }
.status-head { display: flex; align-items: center; gap: 0.6rem; font-weight: 650; margin-bottom: 0.9rem; }
.status-head .pulse { background: #e0a020; animation-name: pulse-warn; }
@keyframes pulse-warn { 0% { box-shadow: 0 0 0 0 #e0a020; } 70%, 100% { box-shadow: 0 0 0 0.5rem transparent; } }
.status p:not(.status-head) { color: var(--muted); font-size: 0.97rem; margin-bottom: 0.8rem; }
.arrow-link { font-weight: 600; text-decoration: none; }
.arrow-link span { display: inline-block; transition: transform 0.2s; }
.arrow-link:hover span { transform: translateX(4px); }

/* Resource links */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; margin-top: 3rem; }
.link-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.4rem 1.5rem 1.5rem; text-decoration: none; color: var(--ink); transition: transform 0.25s, border-color 0.25s; }
.link-card:hover { color: var(--ink); }
.link-host { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); }
.link-title { font-family: var(--serif); font-size: 1.5rem; font-weight: 500; letter-spacing: -0.01em; line-height: 1.2; }
.link-title::after { content: ' →'; font-family: var(--sans); font-size: 0.75em; color: var(--accent); display: inline-block; margin-left: 0.3em; transition: transform 0.2s; }
.link-card:hover .link-title::after { transform: translateX(4px); }
.link-note { color: var(--muted); font-size: 0.93rem; line-height: 1.5; }

/* Closing */
.closing { text-align: center; overflow: hidden; }
.closing::before {
  content: ''; position: absolute; left: 50%; bottom: -22rem; width: 60rem; height: 40rem; transform: translateX(-50%);
  background: radial-gradient(ellipse, var(--glow-2), transparent 62%); filter: blur(60px); opacity: 0.7; pointer-events: none;
}
.closing-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.closing h2 { max-width: none; }
.closing p { margin-top: 1.2rem; color: var(--muted); font-size: 1.15rem; max-width: 36rem; }
.snippet {
  margin: 2rem 0 0; padding: 1.1rem 1.4rem; max-width: 100%; overflow-x: auto; text-align: left;
  background: var(--term-bg); color: var(--term-ink); border: 1px solid var(--term-rule); border-radius: 0.8rem;
  font-size: clamp(0.72rem, 1.6vw, 0.86rem); line-height: 1.8;
}
.snippet code { font-size: inherit; }
.closing .cta { justify-content: center; }

/* Footer */
.footer { border-top: 1px solid var(--rule); padding: 2rem 0; font-size: 0.88rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; }
.footer nav { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* Scroll reveal. Content stays visible when JavaScript is off. */
.js .reveal { opacity: 0; transform: translateY(1.4rem); transition: opacity 0.7s, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
.js .card.reveal.in:hover, .js .link-card.reveal.in:hover { transform: translateY(-3px); transition-delay: 0s; transition-duration: 0.25s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .js .meter .bar i { transform: none; }
}
