/* ==========================================================================
   KNOB Coming-Soon — Design Tokens
   Palette is fully swappable: change values here, the whole page follows.
   Amber is the color of the device's OLED display.
   ========================================================================== */

:root {
  --bg: #12100d;
  --bg-raised: #1a1712;
  --text: #ede8df;
  --text-dim: #a39c91;
  --accent: #e8a33d;
  --accent-deep: #b87a1e; /* surfaces + hover fills only, never text on --bg */
  --line: #2c2822;

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Geist", "Segoe UI", system-ui, sans-serif;
  --font-mono: "Geist Mono", "Cascadia Code", ui-monospace, monospace;

  --radius-surface: 16px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --container: 1160px;
}

/* ==========================================================================
   Fonts (self-hosted, no third-party CDN at runtime)
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Geist";
  src: url("../assets/fonts/geist-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("../assets/fonts/geist-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  hyphens: auto;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  max-width: 65ch;
}

a {
  color: var(--text);
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

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

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  position: absolute;
  inset-inline: 0;
  top: 0;
  z-index: 10;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: 0.04em;
  color: var(--text);
  text-decoration: none;
}

.wordmark span {
  color: var(--accent);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding-block: 6rem 3rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  width: 100%;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-status::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-size: clamp(2.125rem, 3.6vw, 3.25rem);
  max-width: 22ch;
}

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.125rem;
  color: var(--text-dim);
  max-width: 44ch;
}

/* Device (hero) */

.hero-device {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.device {
  position: relative;
  width: min(380px, 76vw);
  aspect-ratio: 1;
}

.device-body {
  width: 100%;
  height: 100%;
  display: block;
}

.device-display {
  position: absolute;
  /* circle centered inside the knob face */
  left: 19%;
  top: 19%;
  width: 62%;
  height: 62%;
  border-radius: 50%;
  overflow: hidden;
  background: #0a0908;
  box-shadow: inset 0 2px 12px rgb(0 0 0 / 0.7);
}

.device-display canvas {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

/* faint OLED pixel grid over the display */
.device-display::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(0deg, rgb(0 0 0 / 0.22) 0 1px, transparent 1px 5px),
    repeating-linear-gradient(90deg, rgb(0 0 0 / 0.22) 0 1px, transparent 1px 5px);
  border-radius: 50%;
}

/* Load-in choreography: elements start hidden, .is-awake reveals them.
   The eyes boot in parallel (handled in JS); nothing blocks the headline. */

.js .wake {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}

body.is-awake .wake {
  opacity: 1;
  transform: none;
}

body.is-awake .wake:nth-of-type(1) { transition-delay: 0ms; }

.wake[data-wake="1"] { transition-delay: 60ms; }
.wake[data-wake="2"] { transition-delay: 140ms; }
.wake[data-wake="3"] { transition-delay: 220ms; }
.wake[data-wake="4"] { transition-delay: 300ms; }

/* ==========================================================================
   Sections shared
   ========================================================================== */

section {
  padding-block: clamp(3.5rem, 7vw, 6rem);
}

.section-title {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  margin-bottom: clamp(2rem, 4.5vw, 3.25rem);
  max-width: 26ch;
}

/* Scroll reveal (hidden only when JS is available to reveal it again) */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 280ms var(--ease-out), transform 280ms var(--ease-out);
}

.reveal.is-visible[data-stagger="1"] { transition-delay: 70ms; }
.reveal.is-visible[data-stagger="2"] { transition-delay: 140ms; }

/* ==========================================================================
   Section: Was KNOB kann (asymmetric, no equal cards)
   ========================================================================== */

.features {
  border-top: 1px solid var(--line);
}

.feature h3 {
  font-size: 1.375rem;
  margin-bottom: 0.75rem;
}

.feature p {
  color: var(--text-dim);
}

.feature {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

/* three items, deliberately off-grid: uneven widths + vertical offsets */
.feature-trio {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 4fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
}

.feature-trio .feature:nth-child(2) {
  margin-top: 2.25rem;
}

.feature-trio .feature:nth-child(3) {
  margin-top: 4.5rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.25rem;
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.875rem;
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text);
}

/* ==========================================================================
   Legal pages
   ========================================================================== */

.legal {
  padding-block: 8rem 5rem;
  max-width: 720px;
}

.legal h1 {
  font-size: clamp(1.875rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
}

.legal h2 {
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
}

.legal p {
  color: var(--text-dim);
  margin-bottom: 1rem;
}

.legal .todo {
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.875rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
  .hero-grid,
  .feature-trio {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 7rem;
  }

  .hero-grid {
    gap: 3rem;
  }

  .hero-device {
    order: -1;
  }

  .device {
    width: min(280px, 66vw);
  }

  .feature-trio .feature:nth-child(2),
  .feature-trio .feature:nth-child(3) {
    margin-top: 0;
  }
}

/* ==========================================================================
   Reduced motion: static eyes, opacity-only transitions
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .wake,
  .js .reveal {
    transform: none;
    transition: opacity 200ms ease;
  }
}
