/* ==========================================================================
   Nishi Live — Landing Page Design System
   Mirrors the Flutter app's "Indigo & Gold" design tokens
   (lib/core/design_system/design_system.dart)
   ========================================================================== */

:root {
  /* Brand colors */
  --color-primary: #4338CA;
  --color-primary-dark: #312E81;
  --color-primary-light: #6D78F5;
  --color-primary-surface: #EEF2FF;
  --color-secondary: #4F46E5;

  --color-gold: #C99700;
  --color-gold-dark: #A16207;
  --color-gold-surface: #FEF8E7;

  --color-success: #15803D;
  --color-error: #DC2626;
  --color-warning: #C2410C;
  --color-info: #0E7490;
  --color-live-red: #EF4444;

  --color-bg: #FFFFFF;
  --color-bg-deep: #0A0C16;
  --color-ink: #0F1222;
  --color-ink-soft: #4B4F6B;
  --color-ink-faint: #8A8DA6;
  --color-border: #E3E5F0;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #4338CA 100%);
  --gradient-accent: linear-gradient(135deg, #4F46E5 0%, #4338CA 55%, #312E81 100%);
  --gradient-premium: linear-gradient(135deg, #F2C14E 0%, #C99700 55%, #A16207 100%);
  --gradient-dark: linear-gradient(180deg, #1E2035 0%, #0A0C16 100%);

  /* Typography */
  --font-heading: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  /* Radius scale */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(15, 18, 34, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 18, 34, 0.10);
  --shadow-lg: 0 20px 48px rgba(15, 18, 34, 0.16);
  --shadow-glow: 0 12px 40px rgba(67, 56, 202, 0.35);

  --container-width: 1180px;
  --header-height: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, button, textarea, select { font: inherit; }

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-ink);
  line-height: 1.2;
  font-weight: 700;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
}
.skip-link:focus {
  left: var(--space-4);
  top: var(--space-4);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

.btn-primary {
  background: var(--gradient-accent);
  color: #fff;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { box-shadow: 0 16px 44px rgba(67, 56, 202, 0.45); }

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}
.btn-outline:hover { border-color: rgba(255, 255, 255, 0.7); background: rgba(255, 255, 255, 0.06); }

.btn-outline-dark {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn-outline-dark:hover { border-color: var(--color-primary); background: var(--color-primary-surface); }

.btn-disabled,
.btn-disabled:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.55);
  border-color: rgba(255, 255, 255, 0.16);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.btn-disabled .btn-caption {
  display: block;
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  font-family: var(--font-body);
}

.btn-sm { padding: 10px 20px; font-size: 14px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.badge-live {
  background: var(--color-live-red);
  color: #fff;
}
.badge-live::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse 1.6s ease-in-out infinite;
}
.badge-gold {
  background: var(--gradient-premium);
  color: #3A2900;
}
.badge-soft {
  background: var(--color-primary-surface);
  color: var(--color-primary);
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  display: flex;
  align-items: center;
  background: rgba(10, 12, 22, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  background: rgba(10, 12, 22, 0.92);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 19px;
  color: #fff;
}
.brand img { width: 38px; height: 38px; border-radius: 10px; }

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-links {
  display: flex;
  gap: var(--space-6);
}
.nav-links a {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 600;
  font-size: 15px;
  position: relative;
  padding-block: 4px;
  transition: color 0.18s ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: #fff; }
.nav-links a[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--color-gold);
  border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: var(--space-4); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: var(--space-2);
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    inset: var(--header-height) 0 auto 0;
    flex-direction: column;
    background: rgba(10, 12, 22, 0.98);
    padding: var(--space-5);
    gap: var(--space-4);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.22s ease, opacity 0.22s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-actions .btn-primary { display: none; }
  .nav-links .btn-primary {
    display: inline-flex;
    margin-top: var(--space-2);
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--gradient-dark);
  color: #fff;
  padding-top: calc(var(--space-9) + var(--header-height));
  padding-bottom: var(--space-9);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(109, 120, 245, 0.35) 0%, rgba(109, 120, 245, 0) 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -25%;
  left: -15%;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(201, 151, 0, 0.22) 0%, rgba(201, 151, 0, 0) 70%);
  pointer-events: none;
}
.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-8);
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  margin-bottom: var(--space-4);
}
.hero-title {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-4);
  color: #fff;
}
.hero-title .accent {
  background: var(--gradient-premium);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-subtitle {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 46ch;
  margin-bottom: var(--space-6);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-6);
}
.hero-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta-item strong {
  font-family: var(--font-heading);
  font-size: 22px;
  color: #fff;
}
.hero-meta-item span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- Phone mockup (illustrative UI, not a real screenshot) ---------- */
.phone-frame {
  position: relative;
  width: 300px;
  margin-inline: auto;
  aspect-ratio: 300 / 610;
  border-radius: 42px;
  padding: 14px;
  background: linear-gradient(160deg, #262A45 0%, #12142A 100%);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.phone-notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: #12142A;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}
.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  background: var(--gradient-accent);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-4) var(--space-3) var(--space-3);
}
.phone-screen-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.phone-host {
  display: flex;
  align-items: center;
  gap: 8px;
}
.phone-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gradient-premium);
  border: 2px solid rgba(255,255,255,0.8);
}
.phone-host-name {
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}
.phone-host-sub {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.7);
}
.phone-viewers {
  background: rgba(0,0,0,0.35);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
}
.phone-chat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: auto;
}
.phone-chat-bubble {
  align-self: flex-start;
  background: rgba(10, 12, 22, 0.5);
  color: #fff;
  font-size: 10.5px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  max-width: 80%;
}
.phone-chat-bubble strong { color: var(--color-gold); margin-right: 4px; }
.phone-gift-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.phone-gift-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gradient-premium);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.phone-caption {
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: var(--space-4);
}

@media (max-width: 940px) {
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-actions, .hero-meta { justify-content: center; }
  .hero-subtitle { margin-inline: auto; }
  .phone-frame { margin-top: var(--space-6); }
}

/* ---------- Section shell ---------- */
.section {
  padding-block: var(--space-9);
}
.section-alt {
  background: var(--color-primary-surface);
}
.section-header {
  max-width: 640px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: var(--space-7);
}
.section-eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--space-3);
}
.section-title {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  margin-bottom: var(--space-3);
}
.section-subtitle {
  color: var(--color-ink-soft);
  font-size: 17px;
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}
.feature-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
}
.feature-icon svg { width: 26px; height: 26px; stroke: #fff; }
.feature-card h3 {
  font-size: 18px;
  margin-bottom: var(--space-2);
}
.feature-card p {
  color: var(--color-ink-soft);
  font-size: 15px;
}

@media (max-width: 940px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  counter-reset: step;
}
.step {
  position: relative;
  padding-top: var(--space-6);
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gradient-premium);
  color: #3A2900;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: var(--space-4);
}
.step h3 { font-size: 18px; margin-bottom: var(--space-2); }
.step p { color: var(--color-ink-soft); font-size: 15px; }

@media (max-width: 780px) {
  .steps { grid-template-columns: 1fr; gap: var(--space-7); }
}

/* ---------- Trust band ---------- */
.trust-band {
  background: var(--gradient-dark);
  color: #fff;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}
.trust-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.trust-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trust-icon svg { width: 22px; height: 22px; stroke: var(--color-gold); }
.trust-item h3 { color: #fff; font-size: 16px; }
.trust-item p { color: rgba(255, 255, 255, 0.68); font-size: 14px; }

@media (max-width: 940px) {
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* ---------- Download CTA ---------- */
.cta-band {
  background: var(--gradient-accent);
  color: #fff;
  text-align: center;
}
.cta-band .section-title { color: #fff; }
.cta-band .section-subtitle { color: rgba(255, 255, 255, 0.82); }
.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-bg-deep);
  color: rgba(255, 255, 255, 0.7);
  padding-block: var(--space-8) var(--space-6);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  margin-bottom: var(--space-3);
}
.footer-brand img { width: 34px; height: 34px; border-radius: 9px; }
.footer-col h4 {
  color: #fff;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.footer-col ul { display: flex; flex-direction: column; gap: var(--space-3); }
.footer-col a { font-size: 14px; transition: color 0.18s ease; }
.footer-col a:hover { color: #fff; }
.footer-tagline { font-size: 14px; max-width: 34ch; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding-top: var(--space-5);
  font-size: 13px;
}

@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-6); }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Legal / Privacy Policy page ---------- */
.legal-hero {
  background: var(--gradient-dark);
  color: #fff;
  padding-top: calc(var(--space-8) + var(--header-height));
  padding-bottom: var(--space-7);
}
.legal-hero h1 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
.legal-hero p { color: rgba(255, 255, 255, 0.7); margin-top: var(--space-3); }

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: var(--space-8);
  padding-block: var(--space-8);
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: calc(var(--header-height) + var(--space-5));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}
.legal-toc h2 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-ink-faint);
  margin-bottom: var(--space-3);
}
.legal-toc ol {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  counter-reset: toc;
}
.legal-toc a {
  font-size: 14px;
  color: var(--color-ink-soft);
  display: block;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  transition: color 0.18s ease;
}
.legal-toc a:hover,
.legal-toc a[aria-current="true"] { color: var(--color-primary); }

.legal-content section {
  padding-bottom: var(--space-7);
  margin-bottom: var(--space-7);
  border-bottom: 1px solid var(--color-border);
  scroll-margin-top: calc(var(--header-height) + var(--space-4));
}
.legal-content section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.legal-content h2 {
  font-size: 22px;
  margin-bottom: var(--space-4);
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}
.legal-content h2 .num {
  color: var(--color-primary);
  font-family: var(--font-heading);
}
.legal-content h3 {
  font-size: 16px;
  margin-top: var(--space-5);
  margin-bottom: var(--space-3);
}
.legal-content p { margin-bottom: var(--space-4); color: var(--color-ink-soft); }
.legal-content ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
  padding-left: var(--space-5);
  list-style: disc;
}
.legal-content ul li { color: var(--color-ink-soft); }
.legal-content a { color: var(--color-primary); text-decoration: underline; text-underline-offset: 2px; }
.legal-content strong { color: var(--color-ink); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

/* ---------- 404 page ---------- */
.not-found {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-8) var(--space-5);
}
.not-found h1 {
  font-size: clamp(3rem, 8vw, 6rem);
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.not-found p { color: var(--color-ink-soft); margin: var(--space-3) 0 var(--space-6); font-size: 17px; }
