/* StarBind Nocturne — Design Tokens for Web (reports.starbind.me)
   Adapted from the mobile app's tailwind.css for a standalone web page.
   Removes mobile-app-specific lockdowns (overflow:hidden on body, etc.)
   and keeps only the visual language. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500&family=Inter:wght@400;500;600;700&display=swap');

/* ═══════════════════════════════════════════
   Tailwind @theme tokens
   ═══════════════════════════════════════════ */

:root {
  /* ─── Core palette (Nocturne) ─────────────────────── */
  --color-primary: #d4af5f;
  --color-secondary: #e8c98a;
  --color-gold-deep: #9c7b3a;

  --color-black: #f3eee4;           /* parchment — high-emphasis text on dark */
  --color-white: #ffffff;

  /* Status */
  --color-success: #7fb888;
  --color-error: #e17a7a;
  --color-warning: #e8a04a;

  /* Surfaces */
  --color-void: #0b0a0c;
  --color-elev: #141216;
  --color-inset: #1c1a1f;
  --color-overlay: rgba(11, 10, 12, 0.65);
  --color-nav-surface: rgba(14, 12, 16, 0.78);

  /* Grayscale — remapped to dark-mode neutrals */
  --color-gray-100: #141216;
  --color-gray-200: #1c1a1f;
  --color-gray-300: rgba(243, 238, 228, 0.22);
  --color-gray-400: rgba(243, 238, 228, 0.55);
  --color-gray-500: rgba(243, 238, 228, 0.68);
  --color-gray-600: #f3eee4;

  /* ─── Typography ──────────────────────────────────── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  --font-mono: 'SF Mono', ui-monospace, 'JetBrains Mono', Menlo, monospace;

  /* ─── Shadows ─────────────────────────────────────── */
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
  --shadow-subtle: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-gold-glow: 0 8px 24px rgba(212, 175, 95, 0.28);

  /* ─── Border radius ───────────────────────────────── */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* ─── Glass surfaces (dark frosted) ───────────────── */
  --glass-subtle-bg: rgba(26, 22, 30, 0.48);
  --glass-subtle-border: rgba(255, 255, 255, 0.08);

  --glass-medium-bg: rgba(26, 22, 30, 0.62);
  --glass-medium-border: rgba(255, 255, 255, 0.09);

  --glass-heavy-bg: rgba(26, 22, 30, 0.78);
  --glass-heavy-border: rgba(212, 175, 95, 0.24);

  /* ─── Hairlines / dividers ────────────────────────── */
  --divider-color: rgba(243, 238, 228, 0.08);
  --divider-strong: rgba(243, 238, 228, 0.14);
  --gold-hair: rgba(212, 175, 95, 0.38);
  --gold-hair-soft: rgba(212, 175, 95, 0.18);
  --gold-mist: rgba(212, 175, 95, 0.14);
  --gold-faint: rgba(212, 175, 95, 0.08);

  /* ─── Focus ring ──────────────────────────────────── */
  --focus-ring-color: rgba(212, 175, 95, 0.22);
  --focus-border-color: rgba(212, 175, 95, 0.55);
}

/* ═══════════════════════════════════════════
   Global Base Styles
   ═══════════════════════════════════════════ */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  background: var(--color-void);
  color: var(--color-black);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Gold selection */
::selection {
  background: rgba(212, 175, 95, 0.35);
  color: #f3eee4;
}

/* ─── Display font ───────────────────────────────────── */
.font-display {
  font-family: var(--font-display);
  letter-spacing: -0.3px;
}

/* ─── Glass utilities (dark frosted) ──────────────────── */
.glass-subtle {
  background: var(--glass-subtle-bg);
  border: 0.5px solid var(--glass-subtle-border);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
}

.glass-medium {
  background: var(--glass-medium-bg);
  border: 0.5px solid var(--glass-medium-border);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}

.glass-heavy {
  background: var(--glass-heavy-bg);
  border: 0.5px solid var(--glass-heavy-border);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
}

.glass-card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 50%),
    rgba(26, 22, 30, 0.58);
  border: 0.5px solid rgba(255, 255, 255, 0.09);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.38);
}

.glass-card-gold {
  position: relative;
  background:
    linear-gradient(180deg, rgba(212, 175, 95, 0.06) 0%, transparent 55%),
    rgba(26, 22, 30, 0.62);
  border: 0.5px solid var(--gold-hair);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 160, 0.10),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.04),
    0 8px 32px rgba(0, 0, 0, 0.4);
}

.glass-card:hover {
  border-color: var(--gold-hair-soft);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 8px 32px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--gold-faint);
}

/* ─── Nav glass ───────────────────────────────────────── */
.nav-glass {
  background: var(--color-nav-surface);
  border-bottom: 0.5px solid rgba(243, 238, 228, 0.08);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
}

/* ─── Gold pill CTA ───────────────────────────────────── */
.gold-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  background: linear-gradient(165deg, #e8c98a 0%, #d4af5f 55%, #9c7b3a 100%);
  box-shadow: 0 2px 6px rgba(212, 175, 95, 0.25);
  color: #1a0f05;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gold-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 175, 95, 0.35);
}

.gold-pill:active {
  transform: scale(0.97);
}

/* ─── Secondary button (outline) ──────────────────────── */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  border: 1px solid var(--gold-hair);
  background: transparent;
  color: var(--color-primary);
  font-weight: 500;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-outline:hover {
  background: var(--gold-faint);
  border-color: var(--color-primary);
}

/* ─── Dividers ────────────────────────────────────────── */
.divider {
  height: 0.5px;
  background: var(--divider-color);
  border: none;
}

.gold-divider {
  height: 0.5px;
  background: var(--gold-hair-soft);
  border: none;
}

/* ─── App gradient background — deep space starfield ──── */
.app-gradient-bg {
  background:
    radial-gradient(1.2px 1.2px at 7% 6%, rgba(243, 238, 228, 0.75), transparent 100%),
    radial-gradient(1px   1px   at 22% 3%, rgba(243, 238, 228, 0.42), transparent 100%),
    radial-gradient(1.5px 1.5px at 35% 14%, rgba(243, 238, 228, 0.65), transparent 100%),
    radial-gradient(1px   1px   at 49% 8%, rgba(212, 175, 95, 0.55), transparent 100%),
    radial-gradient(1.1px 1.1px at 63% 16%, rgba(243, 238, 228, 0.38), transparent 100%),
    radial-gradient(1.4px 1.4px at 77% 5%, rgba(243, 238, 228, 0.7), transparent 100%),
    radial-gradient(1px   1px   at 89% 18%, rgba(243, 238, 228, 0.44), transparent 100%),
    radial-gradient(1.2px 1.2px at 96% 10%, rgba(243, 238, 228, 0.56), transparent 100%),
    radial-gradient(1px   1px   at 13% 28%, rgba(243, 238, 228, 0.34), transparent 100%),
    radial-gradient(1.5px 1.5px at 29% 41%, rgba(243, 238, 228, 0.58), transparent 100%),
    radial-gradient(1px   1px   at 44% 34%, rgba(243, 238, 228, 0.4), transparent 100%),
    radial-gradient(1.3px 1.3px at 59% 48%, rgba(212, 175, 95, 0.48), transparent 100%),
    radial-gradient(1px   1px   at 72% 39%, rgba(243, 238, 228, 0.36), transparent 100%),
    radial-gradient(1.1px 1.1px at 85% 45%, rgba(243, 238, 228, 0.52), transparent 100%),
    radial-gradient(1px   1px   at 6% 58%, rgba(243, 238, 228, 0.42), transparent 100%),
    radial-gradient(1.2px 1.2px at 19% 68%, rgba(243, 238, 228, 0.54), transparent 100%),
    radial-gradient(1px   1px   at 37% 63%, rgba(243, 238, 228, 0.32), transparent 100%),
    radial-gradient(1.4px 1.4px at 51% 78%, rgba(243, 238, 228, 0.66), transparent 100%),
    radial-gradient(1px   1px   at 65% 72%, rgba(243, 238, 228, 0.4), transparent 100%),
    radial-gradient(1.2px 1.2px at 79% 84%, rgba(243, 238, 228, 0.5), transparent 100%),
    radial-gradient(1px   1px   at 93% 69%, rgba(212, 175, 95, 0.44), transparent 100%),
    radial-gradient(1.5px 1.5px at 11% 91%, rgba(243, 238, 228, 0.6), transparent 100%),
    radial-gradient(1px   1px   at 28% 96%, rgba(243, 238, 228, 0.34), transparent 100%),
    radial-gradient(1.2px 1.2px at 55% 93%, rgba(243, 238, 228, 0.46), transparent 100%),
    radial-gradient(1px   1px   at 82% 98%, rgba(243, 238, 228, 0.3), transparent 100%),
    radial-gradient(ellipse 90% 60% at 50% 0%, rgba(60, 45, 90, 0.1) 0%, transparent 65%),
    linear-gradient(180deg, #050408 0%, #0a0710 45%, #0d0812 100%);
  background-attachment: fixed;
}

/* ─── Animations ──────────────────────────────────────── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.animate-float {
  animation: float 8s ease-in-out infinite;
}

.animate-float-slow {
  animation: float-slow 12s ease-in-out infinite;
}

/* ─── Reduced motion ──────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
