/* NockAI landing page. Styled after the Offloop reference: serif display type, Inter body,
   flat top header, near black background, hairline borders, large two column sections. */

:root {
  --bg: #09090b;
  --panel: #0e0e10;
  --card: #131316;
  --card-raised: #1b1b1f;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);

  --text: #ffffff;
  --text-soft: #9ca3af;
  --text-dim: rgba(255, 255, 255, 0.45);
  --text-body: rgba(255, 255, 255, 0.7);

  --accent: #f5a524;
  --danger: #f87171;

  --ease-fluid: cubic-bezier(0.32, 0.72, 0, 1);

  --font-display: "Instrument Serif", "Times New Roman", Times, serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 14px; line-height: 20px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.display { font-family: var(--font-display); font-weight: 400; letter-spacing: -0.02em; }
.body-soft { color: var(--text-soft); max-width: 365px; }
.eyebrow { font-size: 11px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-soft); }
.muted { color: var(--text-dim); }

.skip-link { position: absolute; left: 16px; top: -64px; z-index: 100; padding: 8px 12px; background: #fff; color: #000; border-radius: 8px; font-weight: 600; }
.skip-link:focus { top: 16px; }

/* Header: flat, full width, like the reference */
.header {
  position: absolute; inset: 0 0 auto 0; z-index: 30; height: 72px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter);
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.brand-mark { color: var(--accent); }
.nav { display: none; align-items: center; gap: 24px; }
.nav a { font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-dim); transition: color 200ms var(--ease-fluid); }
.nav a:hover { color: var(--text); }

.pill {
  display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border: 0; border-radius: 9999px;
  font-size: 14px; line-height: 24px; font-weight: 500; cursor: pointer;
  transition: background-color 400ms var(--ease-fluid), transform 400ms var(--ease-fluid);
}
.pill:hover { transform: translateY(-1px); }
.pill:active { transform: scale(0.98) translateY(1px); }
.pill-solid { background: #fcfcfc; color: #1b1b1b; }
.pill-solid:hover { background: #e8e8e8; }
.pill-ghost { padding: 6px 12px; background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 13px; line-height: 18px; }
.pill-ghost:hover { background: rgba(255, 255, 255, 0.16); }
.pill[disabled] { opacity: 0.5; cursor: progress; transform: none; }

.menu-toggle { position: relative; width: 40px; height: 36px; padding: 0; background: transparent; border: 0; cursor: pointer; }
.menu-toggle span { position: absolute; left: 10px; width: 20px; height: 2px; background: #fff; border-radius: 2px; transition: all 700ms var(--ease-fluid); }
.menu-toggle span:nth-child(1) { top: 13px; }
.menu-toggle span:nth-child(2) { top: 21px; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 17px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { top: 17px; transform: rotate(-45deg); }
.menu-toggle { z-index: 60; }

.menu {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(9, 9, 11, 0.86); backdrop-filter: blur(48px);
  opacity: 0; visibility: hidden; transition: opacity 700ms var(--ease-fluid), visibility 700ms var(--ease-fluid);
}
.menu.is-open { opacity: 1; visibility: visible; }
.menu ul { display: flex; flex-direction: column; align-items: center; gap: 24px; }
.menu li { font-family: var(--font-display); font-size: 40px; line-height: 44px; opacity: 0; transform: translateY(48px); transition: opacity 700ms var(--ease-fluid), transform 700ms var(--ease-fluid); }
.menu.is-open li { opacity: 1; transform: translateY(0); }
.menu.is-open li:nth-child(1) { transition-delay: 100ms; }
.menu.is-open li:nth-child(2) { transition-delay: 150ms; }
.menu.is-open li:nth-child(3) { transition-delay: 200ms; }
.menu.is-open li:nth-child(4) { transition-delay: 250ms; }
.menu.is-open li:nth-child(5) { transition-delay: 300ms; }
.menu.is-open li:nth-child(6) { transition-delay: 350ms; }
.menu .pill { font-family: var(--font-sans); }

/* Motion */
.rise { opacity: 0; transform: translateY(24px); filter: blur(8px); animation: rise 1100ms var(--ease-fluid) forwards; }
.hero-inner > .rise:nth-child(1) { animation-delay: 150ms; }
.hero-inner > .rise:nth-child(2) { animation-delay: 300ms; }
.hero-inner > .rise:nth-child(3) { animation-delay: 450ms; }
.hero-inner > .rise:nth-child(4) { animation-delay: 600ms; }
@keyframes rise { to { opacity: 1; transform: translateY(0); filter: blur(0); } }

.reveal {
  opacity: 0; transform: translateY(40px); filter: blur(10px);
  transition: opacity 1000ms var(--ease-fluid), transform 1000ms var(--ease-fluid), filter 1000ms var(--ease-fluid);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); filter: blur(0); }

/* Hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: flex-end; overflow: hidden; background: var(--bg); }
.hero-glow {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 22% 38%, rgba(255, 196, 64, 0.55) 0%, rgba(255, 196, 64, 0) 70%),
    radial-gradient(ellipse 90% 70% at 50% 105%, #b83a0c 0%, #5a1d08 45%, rgba(9, 9, 11, 0) 85%),
    radial-gradient(ellipse 60% 40% at 80% 30%, rgba(214, 90, 20, 0.35) 0%, rgba(214, 90, 20, 0) 70%);
}
.hero-grain {
  position: absolute; inset: 0; opacity: 0.18; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; opacity: 0;
  transition: opacity 1400ms var(--ease-fluid);
}
.hero-media.is-ready { opacity: 1; }
.hero-media.is-ready ~ .hero-grain { opacity: 0.1; }
/* Darkens the lower half so the headline stays readable over any video frame. */
.hero-media.is-ready ~ .hero-scrim { opacity: 1; }
.hero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0; transition: opacity 1400ms var(--ease-fluid);
  background: linear-gradient(to bottom, rgba(9, 9, 11, 0.25) 0%, rgba(9, 9, 11, 0.1) 30%, rgba(9, 9, 11, 0.7) 68%, rgba(9, 9, 11, 0.92) 100%);
}
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 160px; background: linear-gradient(to bottom, rgba(9, 9, 11, 0), var(--bg)); pointer-events: none; }
.hero-inner {
  position: relative; z-index: 2; width: 100%; max-width: 980px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px;
  padding: 120px var(--gutter) 112px;
}
.hero-title { font-size: 56px; line-height: 56px; }
.hero-sub { max-width: 480px; color: var(--text-body); }
.hero-proof { font-size: 12px; line-height: 16px; color: var(--text-dim); }

/* Sections */
.section { padding: 96px var(--gutter); max-width: 1264px; margin: 0 auto; }
.split { display: grid; gap: 40px; }
.split-head h2 { font-size: 44px; line-height: 46px; }
.split-head .body-soft { margin-top: 23px; }
.footnote { margin-top: 24px; font-size: 12px; line-height: 16px; color: var(--text-dim); }

/* Window mock (demo, terminal) */
.window { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.window-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.window-title { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--text-body); }
.window-note { font-size: 12px; line-height: 16px; color: var(--text-dim); }
.window-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); }

.prompt-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.prompt-tab { padding: 4px 10px; background: transparent; border: 1px solid transparent; border-radius: 9999px; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--text-dim); cursor: pointer; transition: all 400ms var(--ease-fluid); }
.prompt-tab:hover { color: #fff; }
.prompt-tab:active { transform: scale(0.98); }
.prompt-tab[aria-selected="true"] { color: #fff; background: rgba(255, 255, 255, 0.08); border-color: var(--line); }

.chat { display: grid; gap: 12px; padding: 20px 16px; min-height: 300px; align-content: start; }
.bubble { max-width: 100%; border-radius: 12px; }
.bubble-user { justify-self: end; padding: 10px 14px; background: var(--card-raised); color: #e2e2e2; font-size: 14px; line-height: 21px; max-width: 80%; }
.bubble-model { justify-self: stretch; }
.answer-note { margin-top: 12px; color: var(--text-soft); }

.code { margin: 0; padding: 16px; overflow-x: auto; background: #0b0b0d; border: 1px solid var(--line); border-radius: 12px; font-family: var(--font-mono); font-size: 13px; line-height: 20px; color: #e2e2e2; tab-size: 2; }
.code code { font-family: inherit; }
.code-small { font-size: 12px; line-height: 18px; }
.code-terminal { margin: 16px; white-space: pre; }
.code .line { display: block; opacity: 0; transform: translateY(6px); transition: opacity 500ms var(--ease-fluid), transform 500ms var(--ease-fluid); }
.code .line.is-in { opacity: 1; transform: translateY(0); }

.chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 9999px; font-size: 12px; line-height: 16px; color: var(--text-soft); }
.chip-model { font-family: var(--font-mono); font-weight: 500; color: #fff; background: rgba(255, 255, 255, 0.04); }
.dot { width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }

/* Panels */
.panel { padding: 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.panel-accent { border-color: rgba(245, 165, 36, 0.45); }
.panel h3 { margin-top: 16px; font-size: 15px; line-height: 20px; font-weight: 600; }
.panel h3 + p { margin-top: 8px; color: var(--text-soft); }
.panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.panel-foot { margin-top: 16px; color: var(--text-soft); }
.status { padding: 2px 8px; border: 1px solid var(--line); border-radius: 9999px; font-size: 11px; line-height: 16px; color: var(--text-dim); }
.status-live { border-color: rgba(245, 165, 36, 0.5); color: var(--accent); }

.compare, .model-list, .metric-list { display: grid; gap: 12px; }
.compare { grid-template-columns: 1fr; }
.lines { display: grid; gap: 8px; margin-top: 16px; }
.lines span { display: block; height: 8px; border-radius: 9999px; background: rgba(255, 255, 255, 0.12); }
.lines .gap { height: 8px; background: transparent; }
.compare .code { margin-top: 16px; }

.metric-pending { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: 20px; line-height: 28px; color: var(--text-soft); }
.skeleton { display: inline-block; width: 64px; height: 24px; border-radius: 8px; background: var(--card-raised); animation: pulse 2s var(--ease-fluid) infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }

/* Tagline reveal */
.tagline { padding-top: 120px; padding-bottom: 120px; }
.tagline-text { max-width: 980px; font-size: 40px; line-height: 44px; text-wrap: balance; }
.tagline-text .word { color: rgba(255, 255, 255, 0.28); transition: color 700ms var(--ease-fluid); }
.tagline-text .word.is-lit { color: #fff; }

/* FAQ, like the reference: grouped, numbered rows */
.faq { max-width: 736px; }
.faq-group { margin: 40px 0 12px; font-size: 11px; line-height: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-soft); }
.faq-group:first-child { margin-top: 0; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { display: flex; align-items: center; gap: 16px; padding: 20px 0; font-size: 15px; line-height: 20px; font-weight: 500; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary i { margin-left: auto; color: var(--text-dim); transition: transform 700ms var(--ease-fluid); }
details[open] summary i { transform: rotate(180deg); }
.faq-num { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
details p { padding: 0 0 20px 32px; max-width: 600px; color: var(--text-soft); }
summary:hover .faq-num { color: var(--accent); }

/* Final CTA */
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-top: 120px; padding-bottom: 120px; }
.cta-title { font-size: 44px; line-height: 46px; }
.cta .body-soft { max-width: 420px; }

/* Footer */
.footer { max-width: 1264px; margin: 0 auto; padding: 64px var(--gutter) 32px; border-top: 1px solid var(--line); }
.footer-top { display: grid; gap: 40px; }
.footer-tag { max-width: 360px; margin-top: 20px; font-size: 28px; line-height: 32px; color: var(--text-soft); }
.footer-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.footer-cols h3 { font-size: 13px; line-height: 18px; font-weight: 500; }
.footer-cols ul { display: grid; gap: 12px; margin-top: 16px; font-size: 13px; line-height: 18px; color: var(--text-dim); }
.footer-cols a:hover { color: #fff; }
.footer-legal { margin-top: 64px; font-size: 12px; line-height: 16px; color: var(--text-dim); }

/* Simple pages */
.page { max-width: 680px; margin: 0 auto; padding: 140px var(--gutter) 80px; }
.page h1 { font-family: var(--font-display); font-size: 48px; line-height: 52px; letter-spacing: -0.02em; }
.page h2 { margin-top: 32px; font-size: 16px; line-height: 24px; font-weight: 600; }
.page p { margin-top: 12px; color: var(--text-soft); font-size: 14px; line-height: 22px; }
.page a { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 768px) {
  :root { --gutter: 28px; }
  .nav { display: flex; }
  .menu-toggle { display: none; }
  .hero-title { font-size: 80px; line-height: 80px; }
  .split { grid-template-columns: minmax(0, 424px) minmax(0, 1fr); gap: 64px; align-items: start; }
  .split-head h2 { font-size: 64px; line-height: 66.5px; }
  .compare { grid-template-columns: 1fr 1fr; }
  .tagline-text { font-size: 56px; line-height: 60px; }
  .cta-title { font-size: 64px; line-height: 66.5px; }
  .footer-top { grid-template-columns: 1fr auto; }
  .footer-cols { grid-template-columns: repeat(3, auto); gap: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rise, .reveal { opacity: 1; transform: none; filter: none; animation: none; transition: none; }
  .tagline-text .word { color: #fff; transition: none; }
  .code .line { opacity: 1; transform: none; transition: none; }
  .skeleton { animation: none; }
}
