/* Shared base for every site. Each site sets its own tokens on :root.
   Spacing, type and radius values follow .claude/skills/landing-page-design. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font), system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
em, i { font-style: normal; }

:root {
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 700ms var(--ease);
}

/* Type scale (Tailwind steps only) */
.t-xs  { font-size: 12px; line-height: 16px; }
.t-sm  { font-size: 14px; line-height: 20px; }
.t-base{ font-size: 16px; line-height: 24px; }
.t-lg  { font-size: 18px; line-height: 28px; }
.t-xl  { font-size: 20px; line-height: 28px; }
.t-2xl { font-size: 24px; line-height: 32px; }
.t-3xl { font-size: 30px; line-height: 36px; }
.t-4xl { font-size: 36px; line-height: 40px; }
.t-5xl { font-size: 48px; line-height: 1; }
.t-6xl { font-size: 60px; line-height: 1; }
.t-7xl { font-size: 72px; line-height: 1; }
.t-8xl { font-size: 96px; line-height: 1; }

/* Skip link */
.skip {
  position: fixed; left: 16px; top: 16px; z-index: 100;
  padding: 8px 12px; border-radius: 8px;
  background: var(--fg); color: var(--bg);
  font-size: 14px; line-height: 20px; font-weight: 600; text-decoration: none;
  transform: translateY(-80px); transition: transform var(--t);
}
.skip:focus { transform: translateY(0); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

/* Hero heading gradient: text only, never backgrounds */
.grad-dark  { background: linear-gradient(90deg, #FFFFFF, #9B9B9B); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-light { background: linear-gradient(90deg, #000000, #666666); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-measure { max-width: 680px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 8px 12px; border: 0; border-radius: var(--btn-radius, 9999px);
  font: inherit; font-size: 16px; line-height: 24px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: transform var(--t), background-color var(--t), color var(--t), opacity var(--t);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--btn-bg); color: var(--btn-fg); }
.btn-primary:hover { background: var(--btn-bg-hover); }
.btn-ghost { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--fg); }
.btn-sm { font-size: 14px; line-height: 20px; }
.btn[aria-busy="true"] { opacity: .6; pointer-events: none; }

/* Fluid island nav */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center; pointer-events: none;
}
.nav-pill {
  pointer-events: auto;
  margin-top: 24px; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 24px;
  padding: 8px 8px 8px 24px; border-radius: 9999px;
  background: var(--glass); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background-color var(--t), transform var(--t);
}
.nav-brand { display: flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; font-size: 16px; line-height: 24px; white-space: nowrap; }
.nav-links { display: none; gap: 24px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 14px; line-height: 20px; opacity: .72; transition: opacity var(--t); }
.nav-links a:hover, .nav-links a[aria-current="true"] { opacity: 1; }
@media (min-width: 900px) { .nav-links { display: flex; } .nav-burger { display: none; } }

.nav-burger {
  position: relative; width: 40px; height: 40px; border: 0; border-radius: 9999px;
  background: transparent; color: var(--fg); cursor: pointer;
}
.nav-burger span {
  position: absolute; left: 12px; width: 16px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform var(--t), top var(--t);
}
.nav-burger span:nth-child(1) { top: 15px; }
.nav-burger span:nth-child(2) { top: 23px; }
.menu-open .nav-burger span:nth-child(1) { top: 19px; transform: rotate(45deg); }
.menu-open .nav-burger span:nth-child(2) { top: 19px; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: center; gap: 16px;
  padding: 96px 24px 48px;
  background: var(--menu-bg); backdrop-filter: blur(64px); -webkit-backdrop-filter: blur(64px);
  opacity: 0; visibility: hidden; transition: opacity var(--t), visibility 0s linear 700ms;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity var(--t), visibility 0s; }
.menu a {
  font-size: 36px; line-height: 40px; font-weight: 600; text-decoration: none;
  transform: translateY(48px); opacity: 0; transition: transform var(--t), opacity var(--t);
}
.menu-open .menu a { transform: none; opacity: 1; }
.menu-open .menu a:nth-child(1) { transition-delay: 100ms; }
.menu-open .menu a:nth-child(2) { transition-delay: 150ms; }
.menu-open .menu a:nth-child(3) { transition-delay: 200ms; }
.menu-open .menu a:nth-child(4) { transition-delay: 250ms; }
.menu-open .menu a:nth-child(5) { transition-delay: 300ms; }
.menu-open { overflow: hidden; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(64px); filter: blur(12px); transition: opacity 900ms var(--ease), transform 900ms var(--ease), filter 900ms var(--ease); }
.reveal.in { opacity: 1; transform: none; filter: blur(0); }
.reveal[data-d="1"] { transition-delay: 100ms; }
.reveal[data-d="2"] { transition-delay: 200ms; }
.reveal[data-d="3"] { transition-delay: 300ms; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; filter: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Tagline reveal: words go from muted to full, one at a time */
.tagline { max-width: 680px; font-weight: 600; }
.tagline .w { opacity: .3; transition: opacity 600ms var(--ease); }
.tagline .w.on { opacity: 1; }

/* FAQ */
.faq details { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--line); transition: background-color var(--t); }
.faq details + details { margin-top: 8px; }
.faq details[open] { background: var(--surface); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 24px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary i { transition: transform var(--t); flex: none; }
.faq details[open] summary i { transform: rotate(45deg); }
.faq details p { padding: 0 24px 24px; color: var(--muted); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 8px; }
.input {
  width: 100%; padding: 8px 16px; min-height: 48px; border: 0; border-radius: var(--input-radius, 9999px);
  background: var(--surface); color: var(--fg); font: inherit; font-size: 16px; line-height: 24px;
  box-shadow: inset 0 0 0 1px var(--line); transition: box-shadow var(--t);
}
.input:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--danger, #E5484D); }
.form-msg { font-size: 14px; line-height: 20px; min-height: 20px; }
.form-msg.err { color: var(--danger, #E5484D); }
.form-msg.ok { color: var(--ok, #46A758); }

/* Hero video plumbing */
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.skeleton { background: var(--surface); animation: pulse 1600ms var(--ease) infinite alternate; }
@keyframes pulse { from { opacity: .5; } to { opacity: 1; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
