/* Tokens follow branding/guides/BRAND_GUIDELINES.md. */
:root {
  --sage: #c2ed87;
  --sage-deep: #a9d86b;
  --charcoal: #101211;
  --surface: #191d1a;
  --field: #242a25;
  --ink: #f0f2e9;
  --muted: #929c91;
  --line: #343d34;
  --warm: #d5b78b;
  --sans: "Avenir Next", "Jost", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --mono: "DM Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --gutter: clamp(20px, 5vw, 72px);
  --page: 1240px;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

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

html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--charcoal);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* A faint film grain keeps the large dark fields from banding. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* The hero glow bleeds past the page. The nav sits outside main, so it stays
   sticky even where clip falls back to hidden. */
main { overflow-x: hidden; overflow-x: clip; }

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, select { font: inherit; color: inherit; }

h1, h2 { font-weight: 400; letter-spacing: -0.02em; line-height: 1.04; text-wrap: balance; }
h2 { font-size: clamp(2.1rem, 4.6vw, 3.7rem); }
h3 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
em { font-family: var(--serif); font-style: italic; font-weight: 300; color: var(--sage); letter-spacing: -0.01em; }

:focus-visible { outline: 2px solid var(--sage); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--sage); color: var(--charcoal); }

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--sage);
  color: var(--charcoal);
  font-weight: 600;
}
.skip:focus { top: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.label, .eyebrow {
  font: 500 0.69rem/1.5 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7em; color: var(--ink); }
.eyebrow .num { color: var(--sage); }
.sep { color: var(--muted); opacity: 0.55; margin-inline: 0.2em; }
.dot { width: 7px; height: 7px; flex: none; margin-inline: 4px 2px; border-radius: 50%; background: var(--sage); box-shadow: 0 0 0 4px rgb(194 237 135 / 0.14); }

kbd {
  font: inherit;
  padding: 2px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
}

/* Buttons take the plugin's sculpted look: a lit top edge and a soft drop. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.98rem;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background-color 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary {
  background: linear-gradient(180deg, #cff29c, var(--sage) 45%, var(--sage-deep));
  color: var(--charcoal);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 10px 30px -12px rgb(194 237 135 / 0.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 18px 40px -14px rgb(194 237 135 / 0.7); }
.btn-ghost { border-color: var(--line); background: rgb(36 42 37 / 0.5); }
.btn-ghost:hover { border-color: var(--muted); background: var(--field); }
.btn-small { min-height: 42px; padding: 0 16px; font-size: 0.9rem; }
.btn-large { min-height: 60px; padding: 0 34px; font-size: 1.08rem; }
.btn-tag {
  padding: 2px 8px;
  border-radius: 6px;
  background: rgb(16 18 17 / 0.14);
  font: 500 0.66rem/1.6 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.btn.is-pending {
  background: var(--field);
  border-color: var(--line);
  color: var(--muted);
  box-shadow: none;
  cursor: default;
  transform: none;
}

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-text { display: grid; line-height: 1; }
.brand-text strong { font-weight: 700; font-size: 0.98rem; letter-spacing: 0.06em; }
.brand-text small { margin-top: 5px; font-weight: 600; font-size: 0.56rem; letter-spacing: 0.42em; color: var(--muted); }

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px var(--gutter);
  border-bottom: 1px solid transparent;
  transition: background-color 0.3s, border-color 0.3s;
}
.nav.is-stuck {
  background: rgb(16 18 17 / 0.78);
  border-bottom-color: rgb(52 61 52 / 0.7);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}
.nav-links { display: flex; gap: clamp(18px, 3vw, 40px); font-size: 0.92rem; color: var(--muted); }
.nav-links a { padding: 8px 0; transition: color 0.2s; }
.nav-links a:hover { color: var(--ink); }

.footer {
  display: grid;
  gap: 14px;
  justify-items: start;
  max-width: calc(var(--page) + var(--gutter) * 2);
  margin-inline: auto;
  padding: 56px var(--gutter) 64px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Load and scroll choreography. Without JS everything is simply visible. */
.rise { animation: rise 0.9s var(--ease) both; }
.rise:nth-child(2) { animation-delay: 0.08s; }
.rise:nth-child(3) { animation-delay: 0.16s; }
.rise:nth-child(4) { animation-delay: 0.24s; }
.demo.rise { animation-delay: 0.34s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: none; }
}
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise { animation: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .btn { transition: none; }
}
