/* ════════════════════════════════════════════════════════════
   DNIRLAW — Design System theme.css
   Spec: docs/superpowers/specs/2026-05-20-danirlaw-redesign-design.md
   Single source of truth: tokens + utility classes.
   Loaded by all 4 HTML pages via <link rel="stylesheet" href="theme.css">
   ════════════════════════════════════════════════════════════ */


/* ════════ 1. Design Tokens ════════ */
:root {
  /* ── Backgrounds ── */
  --bg-base:        #0B1118;
  --bg-surface:     #141C26;
  --bg-elevated:    #161E29;
  --bg-input:       rgba(20, 28, 38, 0.55);

  /* ── Text ── */
  --text-strong:    #E6EBF2;
  --text-body:      #AAB4C0;
  --text-muted:     #7A8A9C;

  /* ── Metallic accent ladder (logo's chrome story) ── */
  --metal-dark:     #6B7D92;
  --metal-mid:      #8A9AAE;
  --metal-light:    #B8C4D0;
  --metal-shine:    #E6EBF2;

  /* ── Luminous borders (polished edges) ── */
  --border-soft:    rgba(184, 196, 208, 0.15);
  --border-strong:  rgba(184, 196, 208, 0.30);

  /* ── Typography (David Libre everywhere) ── */
  --font-display:   'David Libre', 'David', 'Frank Ruhl Libre', serif;
  --font-body:      'David Libre', 'David', serif;

  /* ── Shadows ── */
  --shadow-card:    0 1px 0 rgba(255, 255, 255, 0.08) inset,
                    0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-btn:     inset 0 1px 0 rgba(255, 255, 255, 0.7),
                    inset 0 -2px 4px rgba(0, 0, 0, 0.2),
                    0 8px 24px rgba(184, 196, 208, 0.25);
  --shadow-btn-hover: inset 0 1px 0 rgba(255, 255, 255, 0.7),
                      inset 0 -2px 4px rgba(0, 0, 0, 0.2),
                      0 12px 28px rgba(184, 196, 208, 0.35);

  /* ── Gradients ── */
  --gradient-chrome:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.5), transparent 60%),
    linear-gradient(180deg, var(--metal-shine) 0%, var(--metal-light) 40%, var(--metal-mid) 100%);

  /* ── Animation ── */
  --shimmer-duration: 4s;

  /* ── Transition base ── */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
}


/* ════════ 2. Base reset (body + global) ════════ */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg-base);
  color: var(--text-body);
  line-height: 1.6;
}


/* ════════ 3. Hero stage — cinematic vignette + spotlight ════════ */
.hero-stage {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 30%, rgba(184, 196, 208, 0.13), transparent 65%),
    radial-gradient(ellipse 100% 100% at 50% 100%, rgba(0, 0, 0, 0.7), transparent 60%),
    var(--bg-base);
}

.hero-stage::before {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 140px 40px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 1;
}

/* Logo gets shimmer ONLY inside hero-stage */
.hero-stage .logo-img {
  position: relative;
  z-index: 2;
  animation: shimmer var(--shimmer-duration) ease-in-out infinite;
}

/* All other hero-stage children sit above the vignette */
.hero-stage > * {
  position: relative;
  z-index: 2;
}

@keyframes shimmer {
  0%, 100% {
    filter: drop-shadow(0 0 8px rgba(184, 196, 208, 0.18)) brightness(1);
  }
  50% {
    filter: drop-shadow(0 0 18px rgba(216, 224, 232, 0.4)) brightness(1.08);
  }
}


/* ════════ 4. Buttons ════════ */

/* Primary CTA — chrome gradient pill */
.btn-chrome {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--bg-base);
  background: var(--gradient-chrome);
  box-shadow: var(--shadow-btn);
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-base);
  white-space: nowrap;
}
.btn-chrome:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-hover);
}
.btn-chrome:active {
  transform: translateY(0);
}
.btn-chrome:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Secondary — outlined ghost */
.btn-ghost {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 9999px;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  background: transparent;
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  text-decoration: none;
  transition: background var(--transition-base), border-color var(--transition-base);
  white-space: nowrap;
}
.btn-ghost:hover {
  background: rgba(184, 196, 208, 0.05);
  border-color: var(--metal-light);
}


/* ════════ 5. Cards — frosted glass ════════ */
.card-glass {
  background: rgba(20, 28, 38, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-radius: 14px;
  padding: 1.5rem;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-base), border-color var(--transition-base);
}
.card-glass:hover {
  transform: translateY(-3px);
  border-color: var(--metal-light);
}


/* ════════ 6. Inputs — glass pill ════════ */
.input-glass {
  display: block;
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 9999px;
  background: var(--bg-input);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  color: var(--text-strong);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--transition-base);
}
.input-glass:focus {
  border-color: var(--metal-light);
}
.input-glass::placeholder {
  color: var(--text-muted);
}
/* Make textarea work with .input-glass (rectangular instead of pill) */
textarea.input-glass {
  border-radius: 14px;
  resize: vertical;
  min-height: 5rem;
  font-family: var(--font-body);
  line-height: 1.5;
}


/* ════════ 7. Typography classes ════════ */

.heading-display {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
}

.heading-section {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-strong);
  font-size: 1.5rem;
  line-height: 1.3;
  margin: 0;
}

/* Chrome wordmark effect (DNIRLAW brand text, logo-link in docs header) */
.text-chrome {
  background: var(--gradient-chrome);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.7;
}

.text-muted-label {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.text-caption {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.5;
}


/* ════════ 8. Divider — metallic edge line ════════ */
.divider-chrome {
  height: 1px;
  border: 0;
  background: linear-gradient(90deg, transparent, var(--metal-light), transparent);
  margin: 2rem 0;
}


/* ════════ 9. Privacy banner — positional only; visuals from .card-glass ════════ */
.privacy-banner {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  max-width: 680px;
  margin: 0 auto;
  z-index: 9999;
  padding: 1rem 1.25rem;  /* override .card-glass default padding for compactness */
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
}


/* ════════ 10. Link defaults (inside doc pages) ════════ */
a {
  color: var(--metal-light);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition-base);
}
a:hover {
  color: var(--metal-shine);
}
/* Buttons-as-links: btn-chrome / btn-ghost handle their own colors */
a.btn-chrome, a.btn-ghost { text-decoration: none; }


/* ════════ 11. Selection color ════════ */
::selection {
  background: var(--metal-light);
  color: var(--bg-base);
}


/* ════════ 12. Reduced motion preference ════════ */
@media (prefers-reduced-motion: reduce) {
  .hero-stage .logo-img { animation: none; }
  .btn-chrome:hover, .btn-ghost:hover, .card-glass:hover {
    transform: none;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
