/* Nightcase — shared noir stylesheet for the marketing + legal site.
   Palette mirrors the app's AppColors (lib/theme/app_theme.dart): obsidian
   chrome, amber accent, aged-vellum text, crimson pin. */

:root {
  --bg: #131317;
  --surface: #1c1a22;
  --surface-raised: #262330;
  --primary: #f2c050;      /* amber */
  --primary-deep: #c8963a;
  --pin: #b5231f;          /* crimson */
  --text: #f2ecf7;
  --text-muted: #9c93a8;
  --text-faint: #857d92;
  --vellum: #f5f1e6;
  --divider: #2e2a38;
  --maxw: 1100px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter,
    system-ui, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-deep); text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  font-family: "Courier New", ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--primary);
  font-size: 12px;
  margin-bottom: 18px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  background: var(--primary);
  color: #201a0a;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 8px;
  letter-spacing: 0.5px;
  box-shadow: 0 6px 20px rgba(242, 192, 80, 0.18);
  transition: transform 0.1s ease, background 0.15s ease;
}
.btn:hover { background: var(--primary-deep); text-decoration: none; transform: translateY(-1px); }
.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--divider);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Site header / nav ---- */
.site-header {
  border-bottom: 1px solid var(--divider);
  background: rgba(19, 19, 23, 0.82);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 20;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 15px; padding-bottom: 15px;
}
.brand {
  font-family: "Courier New", ui-monospace, monospace;
  font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
  color: var(--primary); font-size: 18px;
  display: inline-flex; align-items: center; gap: 9px;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  color: var(--primary); font-size: 20px;
  transform: translateY(1px);
}
.nav a { color: var(--text-muted); margin-left: 22px; font-size: 14px; letter-spacing: 0.5px; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---- Hero (two-column) ---- */
.hero-split {
  position: relative;
  border-bottom: 1px solid var(--divider);
  background:
    radial-gradient(700px 380px at 78% 30%, rgba(242,192,80,0.10), transparent 70%),
    radial-gradient(600px 500px at 8% 0%, rgba(139,0,0,0.14), transparent 70%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 32px;
  padding: 72px 24px 64px;
}
.hero-copy h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.04; margin: 0 0 20px; letter-spacing: -0.6px;
}
.hero-copy .lead {
  color: var(--text-muted); font-size: 18px; max-width: 520px; margin: 0 0 30px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-meta {
  list-style: none; display: flex; flex-wrap: wrap; gap: 10px 22px;
  padding: 0; margin: 30px 0 0;
  font-family: "Courier New", ui-monospace, monospace;
  font-size: 12.5px; letter-spacing: 0.5px; color: var(--text-faint);
  text-transform: uppercase;
}
.hero-meta li { display: flex; align-items: center; }
.hero-meta li::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); margin-right: 9px;
}

/* Hero phone cluster */
.hero-art {
  position: relative; min-height: 520px;
  display: flex; align-items: center; justify-content: center;
}
.hero-art .glow {
  position: absolute; width: 380px; height: 380px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,192,80,0.20), transparent 62%);
  filter: blur(24px);
}
.hero-art .phone { position: absolute; width: 232px; }
.hero-art .phone.back  { transform: translateX(-84px) rotate(-8deg); opacity: 0.94; z-index: 1; }
.hero-art .phone.front { transform: translateX(84px)  rotate(5deg);  z-index: 2; }

/* Phone frame (shared) */
.phone {
  border-radius: 34px; background: #0b0a0e;
  border: 1px solid #2a2732; padding: 7px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 27px; }

/* ---- How it plays: compact step strip ---- */
.steps-band { border-bottom: 1px solid var(--divider); padding: 44px 0; }
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px;
}
.step {
  background: var(--surface); border: 1px solid var(--divider);
  border-radius: 12px; padding: 22px 20px; position: relative;
}
.step-no {
  font-family: "Courier New", ui-monospace, monospace;
  color: var(--primary); font-size: 13px; letter-spacing: 2px; font-weight: 700;
}
.step h3 { margin: 8px 0 8px; font-size: 17px; color: var(--text); }
.step p { margin: 0; color: var(--text-muted); font-size: 14px; line-height: 1.55; }

/* ---- Screenshot gallery (single horizontal row) ---- */
.gallery { padding: 56px 0 72px; }
.section-head { text-align: center; margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 12px; }
.section-head h2 { font-size: clamp(26px, 4.4vw, 38px); margin: 0; letter-spacing: -0.3px; }

.gallery-scroll {
  display: flex; gap: 22px;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 4px max(24px, calc((100vw - var(--maxw)) / 2 + 24px)) 22px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}
.gallery-scroll::-webkit-scrollbar { display: none; }
.shot { flex: 0 0 auto; width: 216px; text-align: center; margin: 0; scroll-snap-align: center; }
.shot .cap { margin-top: 14px; display: flex; flex-direction: column; }
.shot .cap .t {
  color: var(--primary); font-family: "Courier New", ui-monospace, monospace;
  letter-spacing: 1.5px; text-transform: uppercase; font-size: 12px;
}
.shot .cap .d { color: var(--text-muted); font-size: 13.5px; margin-top: 5px; line-height: 1.5; }

/* ---- Legal / long-form document ---- */
.doc { padding: 56px 0 88px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(30px, 5vw, 44px); margin: 0 0 6px; }
.doc .updated {
  color: var(--text-faint); font-size: 14px; margin: 0 0 40px;
  font-family: "Courier New", ui-monospace, monospace; letter-spacing: 0.5px;
}
.doc h2 {
  margin-top: 40px; font-size: 22px; color: var(--primary);
  border-top: 1px solid var(--divider); padding-top: 28px;
}
.doc h3 { font-size: 17px; color: var(--text); margin-top: 26px; }
.doc p, .doc li { color: var(--text-muted); }
.doc strong { color: var(--text); }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc a { word-break: break-word; }

/* Legal pages reuse the centered hero look for the 404 */
.hero {
  text-align: center; padding: 96px 0 80px;
}
.hero .wrap { max-width: 760px; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); line-height: 1.05; margin: 0 0 18px; }
.hero .lead { color: var(--text-muted); font-size: 18px; max-width: 520px; margin: 0 auto 30px; }

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--divider); padding: 40px 0;
  color: var(--text-faint); font-size: 14px;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 24px;
  align-items: center; justify-content: space-between;
}
.site-footer .links a { color: var(--text-muted); margin-left: 20px; }
.site-footer .links a:first-child { margin-left: 0; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; padding: 56px 24px 52px; gap: 8px; }
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-meta { justify-content: center; }
  .hero-art { min-height: 470px; margin-top: 24px; }
  .hero-art .phone.back { display: none; }
  .hero-art .phone.front { position: relative; transform: rotate(0deg); width: 236px; }
  .steps { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .steps { grid-template-columns: 1fr; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
  .site-footer .links a { margin-left: 0; margin-right: 18px; }
  .nav a:first-child { display: none; } /* hide "Screens" link, keep legal links */
}
