/* tokens, base, nav, hero. sections.css holds the rest of the page. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --bg: #fffbf2;
  --surface: #ffffff;
  --surface-2: #fff3d4;
  --ink: #1f1b16;
  --muted: #6a604f;
  --line: #eadfc6;
  --honey: #ffb000;
  --honey-deep: #8a5a00;
  --comb: #ffc93c;
  --term: #201f26;
  --term-ink: #e0dce0;
  --glow: rgba(255, 176, 0, 0.16);
  --shadow: 0 1px 2px rgba(31, 27, 22, 0.05), 0 10px 30px rgba(31, 27, 22, 0.07);
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90'%3E%3Cg fill='none' stroke='%23ffb000' stroke-opacity='.28'%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(0 -15)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(26 30)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(-26 30)'/%3E%3C/g%3E%3C/svg%3E");
  --hex-white: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90'%3E%3Cg fill='none' stroke='%23fff' stroke-opacity='.32'%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(0 -15)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(26 30)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(-26 30)'/%3E%3C/g%3E%3C/svg%3E");
  --serif: "Fraunces", ui-serif, "New York", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1120px;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #15141a;
  --surface: #1e1d24;
  --surface-2: #2a2620;
  --ink: #f4efe4;
  --muted: #a9a293;
  --line: #2f2d36;
  --honey-deep: #ffc857;
  --glow: rgba(255, 176, 0, 0.1);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.35);
  --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90'%3E%3Cg fill='none' stroke='%23ffb000' stroke-opacity='.12'%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(0 -15)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(26 30)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(-26 30)'/%3E%3C/g%3E%3C/svg%3E");
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #15141a;
    --surface: #1e1d24;
    --surface-2: #2a2620;
    --ink: #f4efe4;
    --muted: #a9a293;
    --line: #2f2d36;
    --honey-deep: #ffc857;
    --glow: rgba(255, 176, 0, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 40px rgba(0, 0, 0, 0.35);
    --hex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='52' height='90'%3E%3Cg fill='none' stroke='%23ffb000' stroke-opacity='.12'%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(0 -15)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(26 30)'/%3E%3Cpath d='M26 0 52 15v30L26 60 0 45V15z' transform='translate(-26 30)'/%3E%3C/g%3E%3C/svg%3E");
  }
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { max-width: 100%; }
a { color: inherit; }
code, pre, kbd { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--honey); outline-offset: 3px; border-radius: 6px; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 50;
  padding: 0.6rem 1rem; border-radius: 10px; background: var(--ink); color: var(--bg);
}
.skip:focus { top: 1rem; }
.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
@supports (backdrop-filter: blur(1px)) {
  .nav {
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    backdrop-filter: saturate(1.5) blur(14px);
  }
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 1.25rem; height: 4rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.6rem;
  font: 600 1.4rem/1 var(--serif); letter-spacing: -0.01em; text-decoration: none;
}
.brand svg { width: 1.9rem; height: 1.9rem; transition: transform 0.3s; }
.brand:hover svg { animation: buzz 0.5s ease-in-out; }
@keyframes buzz {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-9deg) translateY(-1px); }
  75% { transform: rotate(9deg) translateY(-1px); }
}
.nav-links { display: none; gap: 1.6rem; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.95rem; text-decoration: none; transition: color 0.15s; }
.nav-links a:hover { color: var(--ink); }
.nav-end { display: flex; align-items: center; gap: 0.6rem; margin-left: auto; }
.nav-links + .nav-end { margin-left: 0; }
@media (min-width: 52rem) { .nav-links { display: flex; } }

.icon-btn {
  display: grid; place-items: center; width: 2.4rem; height: 2.4rem;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--surface); color: var(--ink); cursor: pointer;
  transition: border-color 0.15s, transform 0.15s;
}
.icon-btn:hover { border-color: var(--honey); transform: rotate(12deg); }
.icon-btn svg { width: 1.1rem; height: 1.1rem; }
.icon-btn .moon { display: none; }
:root[data-theme="dark"] .icon-btn .sun { display: none; }
:root[data-theme="dark"] .icon-btn .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .icon-btn .sun { display: none; }
  :root:not([data-theme="light"]) .icon-btn .moon { display: block; }
}

.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.15rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: 500 0.95rem/1.2 var(--sans); text-decoration: none;
  transition: transform 0.15s, border-color 0.15s, background 0.15s;
}
.btn:hover { border-color: var(--honey); transform: translateY(-1px); }
.btn.primary { background: var(--honey); border-color: var(--honey); color: #1f1b16; font-weight: 600; }
.btn.primary:hover { background: #ffc12e; }
.btn svg { width: 1.05rem; height: 1.05rem; }

/* hero */
.hero { position: relative; isolation: isolate; padding-top: clamp(3rem, 8vw, 6rem); text-align: center; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(60% 40% at 50% 0%, var(--glow), transparent 70%), var(--hex);
  -webkit-mask-image: linear-gradient(to bottom, #000 10%, transparent 72%);
  mask-image: linear-gradient(to bottom, #000 10%, transparent 72%);
}
.eyebrow {
  display: inline-flex; align-items: center; gap: 0.55rem; margin: 0;
  padding: 0.3rem 0.85rem 0.3rem 0.7rem; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--muted); font: 500 0.78rem/1.4 var(--mono);
}
.hex-dot {
  display: inline-block; width: 0.7rem; height: 0.8rem; background: var(--honey);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.hero h1 {
  margin: 1.4rem auto 0; max-width: 14ch;
  font: 600 clamp(3rem, 8.4vw, 5.6rem)/0.98 var(--serif); letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero h1 em { font-style: italic; font-weight: 400; color: var(--honey-deep); }
.lede {
  max-width: 38rem; margin: 1.4rem auto 0; color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem); text-wrap: pretty;
}
.cta { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: 2rem; }
.cmd {
  display: flex; align-items: center; gap: 0.6rem; max-width: 100%;
  padding: 0.4rem 0.4rem 0.4rem 1.05rem; border-radius: 14px;
  background: var(--term); color: var(--term-ink); box-shadow: var(--shadow);
  font: 400 0.88rem/1.4 var(--mono); text-align: left;
}
.cmd .prompt { color: var(--honey); user-select: none; }
.cmd code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.cmd code::-webkit-scrollbar { display: none; }
.copy {
  flex: none; padding: 0.5rem 0.85rem; border: 0; border-radius: 10px;
  background: var(--honey); color: #1f1b16; cursor: pointer;
  font: 600 0.8rem/1 var(--sans); transition: background 0.15s, transform 0.15s;
}
.copy:hover { background: #ffc12e; }
.copy:active { transform: scale(0.96); }
.copy.done { background: #6fd6a0; }
.cta-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; }
.fine { margin: 0; color: var(--muted); font-size: 0.85rem; }
.fine code { font-size: 0.8rem; }

.stage {
  position: relative; border-radius: 28px;
  padding: clamp(0.9rem, 4.6vw, 4rem);
  background: var(--comb) var(--hex-white);
  overflow: hidden;
}
.hero .stage { margin-top: clamp(2.5rem, 6vw, 4rem); }
.window {
  position: relative; width: min(100%, 60rem); margin-inline: auto;
  border-radius: 12px; overflow: hidden; background: var(--term);
  box-shadow: 0 34px 60px -24px rgba(31, 27, 22, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05);
}
.window video, .window img { display: block; width: 100%; height: auto; }
.vid-toggle {
  position: absolute; right: 0.8rem; bottom: 0.8rem; width: 2.2rem; height: 2.2rem;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: rgba(32, 31, 38, 0.72); color: #fff; cursor: pointer;
  opacity: 0; transition: opacity 0.2s;
}
.window:hover .vid-toggle, .vid-toggle:focus-visible { opacity: 1; }
.vid-toggle svg { width: 1rem; height: 1rem; }
.vid-toggle .play { display: none; }
.vid-toggle.paused .play { display: block; }
.vid-toggle.paused .pause { display: none; }
@media (hover: none) { .vid-toggle { opacity: 1; } }
.caption { margin: 1rem auto 0; max-width: 40rem; color: var(--muted); font-size: 0.9rem; text-align: center; }

@media (prefers-reduced-motion: no-preference) {
  .hero > .wrap > * { animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero > .wrap > :nth-child(2) { animation-delay: 0.06s; }
  .hero > .wrap > :nth-child(3) { animation-delay: 0.12s; }
  .hero > .wrap > :nth-child(4) { animation-delay: 0.18s; }
  .hero > .wrap > :nth-child(5) { animation-delay: 0.26s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
