/* ==========================================================================
   Risserio — design tokens

   Palette is built out from the brand navy/teal, pushed darker so the
   teal accent has real contrast to work against. Teal is the signal
   colour: it only ever marks something live, active, or complete.
   ========================================================================== */

:root {
  --ink:      #070E1A;
  --surface:  #0E1829;
  --raised:   #142338;
  --line:     #1E2C42;
  --signal:   #00D4AA;
  --signal-d: #00A886;
  --paper:    #F2F5F9;
  --muted:    #7E8FA6;
  --warn:     #F5A524;
  --danger:   #F05252;

  --display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body:    "Inter", ui-sans-serif, system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, monospace;

  --r-sm: 6px;
  --r:    10px;
  --r-lg: 16px;

  --pad: clamp(1.25rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--signal); color: var(--ink); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}

/* ── type scale ─────────────────────────────────────────────────────── */

h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.04; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); line-height: 1.12; }
h3 { font-size: 1.15rem; line-height: 1.3; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--signal);
}

.lede { font-size: clamp(1.02rem, 1.9vw, 1.2rem); color: var(--muted); max-width: 54ch; }
.muted { color: var(--muted); }
.mono  { font-family: var(--mono); }

/* ── layout ─────────────────────────────────────────────────────────── */

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 var(--pad); }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }

/* ── nav ────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7,14,26,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 66px;
}
.brand {
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
  letter-spacing: -.02em; display: flex; align-items: center; gap: .55rem;
}
.brand-dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 12px var(--signal);
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; font-size: .92rem; }
.nav-links a { color: var(--muted); transition: color .18s; }
.nav-links a:hover { color: var(--paper); }
@media (max-width: 700px) { .nav-links .hide-sm { display: none; } }

/* ── buttons ────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--body); font-size: .94rem; font-weight: 500;
  padding: .72rem 1.35rem; border-radius: var(--r);
  border: 1px solid transparent; cursor: pointer;
  transition: transform .16s, background .16s, border-color .16s, opacity .16s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); color: var(--ink); font-weight: 600; }
.btn-primary:hover { background: var(--signal-d); }
.btn-ghost { border-color: var(--line); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--muted); }
.btn-block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ── the production line — signature element ────────────────────────── */

.line {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: .5rem;
  margin: 2.5rem 0;
}
.stage {
  position: relative;
  padding: 1rem .9rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
}
.stage::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--line);
  transition: background .4s;
}
.stage.on::before { background: var(--signal); box-shadow: 0 0 14px var(--signal); }
.stage.on { border-color: #23394f; }
.stage-n {
  font-family: var(--mono); font-size: .68rem; color: var(--muted);
  letter-spacing: .1em;
}
.stage-t { font-size: .88rem; margin-top: .3rem; font-weight: 500; }
.stage.on .stage-t { color: var(--signal); }
@media (max-width: 780px) {
  .line { grid-template-columns: repeat(2, 1fr); }
}

/* ── cards / panels ─────────────────────────────────────────────────── */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
}

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 1rem; }

/* ── pricing ────────────────────────────────────────────────────────── */

.price-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem 1.6rem;
  display: flex; flex-direction: column;
  position: relative;
}
.price-card.featured { border-color: var(--signal); }
.price-tag {
  position: absolute; top: -11px; left: 1.6rem;
  background: var(--signal); color: var(--ink);
  font-family: var(--mono); font-size: .66rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 20px;
}
.price-amt {
  font-family: var(--display); font-size: 2.9rem; font-weight: 600;
  letter-spacing: -.03em; line-height: 1; margin: .7rem 0 .2rem;
}
.price-amt span { font-size: .95rem; color: var(--muted); font-weight: 400; }
.feature-list { list-style: none; margin: 1.3rem 0; display: grid; gap: .6rem; flex: 1; }
.feature-list li {
  font-size: .9rem; display: flex; gap: .6rem; align-items: flex-start;
  color: #C9D4E2;
}
.feature-list li::before { content: "→"; color: var(--signal); flex-shrink: 0; }
.feature-list li.off { color: #55647A; }
.feature-list li.off::before { content: "×"; color: #3D4A5C; }

/* ── forms ──────────────────────────────────────────────────────────── */

label { display: block; font-size: .82rem; color: var(--muted); margin-bottom: .4rem; }
input, textarea, select {
  width: 100%; font-family: var(--body); font-size: .95rem;
  background: var(--ink); color: var(--paper);
  border: 1px solid var(--line); border-radius: var(--r);
  padding: .72rem .9rem;
  transition: border-color .16s;
}
input:focus, textarea:focus, select:focus { border-color: var(--signal); outline: none; }
.field { margin-bottom: 1rem; }

/* ── dashboard ──────────────────────────────────────────────────────── */

.dash { display: grid; grid-template-columns: 260px 1fr; gap: 1.5rem; align-items: start; }
@media (max-width: 900px) { .dash { grid-template-columns: 1fr; } }

.meter { margin-bottom: 1.1rem; }
.meter-top {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: .82rem; margin-bottom: .4rem;
}
.meter-top b { font-family: var(--mono); font-weight: 500; }
.meter-bar { height: 5px; background: var(--ink); border-radius: 99px; overflow: hidden; }
.meter-fill { height: 100%; background: var(--signal); border-radius: 99px; transition: width .5s; }
.meter-fill.high { background: var(--warn); }
.meter-fill.full { background: var(--danger); }

.tabs { display: flex; gap: .4rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.tab {
  font-size: .88rem; padding: .5rem 1rem; border-radius: 99px;
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  cursor: pointer; transition: all .16s; font-family: var(--body);
}
.tab.active { background: var(--signal); border-color: var(--signal); color: var(--ink); font-weight: 600; }

.result-img { width: 100%; border-radius: var(--r); display: block; border: 1px solid var(--line); }
.result-text {
  white-space: pre-wrap; font-size: .93rem; line-height: 1.7;
  background: var(--ink); border: 1px solid var(--line);
  border-radius: var(--r); padding: 1.1rem;
}

.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px,1fr)); gap: .8rem; }
.lib-item { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.lib-item img, .lib-item video { width: 100%; display: block; aspect-ratio: 9/16; object-fit: cover; }
.lib-meta { padding: .6rem .7rem; font-size: .76rem; color: var(--muted); }

.empty {
  text-align: center; padding: 3rem 1rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: var(--r-lg);
}

.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  background: var(--raised); border: 1px solid var(--line);
  padding: .8rem 1.2rem; border-radius: var(--r); font-size: .9rem;
  z-index: 100; max-width: 90vw;
}
.toast.err { border-color: var(--danger); }

.hidden { display: none !important; }
