/* ═══════════════════════════════════════════════════════════
   theme.css — Shared across all SCU app pages
   Handles dark / light CSS variables + toggle button style
   ═══════════════════════════════════════════════════════════ */

/* ── Default: Dark ── */
:root {
  --bg:         #0e0d12;
  --surface:    #16141d;
  --surface-2:  #1e1b28;
  --border:     rgba(255, 255, 255, 0.07);
  --border-hover: rgba(167, 139, 250, 0.35);
  --purple:     #a78bfa;
  --purple-btn: #a78bfa;
  --purple-btn-text: #0e0d12;
  --purple-btn-hover: #c4b5fd;
  --green:      #6ee7b7;
  --green-bg:   rgba(110, 231, 183, 0.1);
  --green-border: rgba(110, 231, 183, 0.25);
  --green-text: #6ee7b7;
  --muted:      #6b6880;
  --muted-2:    #4a4760;
  --text:       #e8e6f0;
  --shadow:     rgba(0, 0, 0, 0.5);
  --shadow-card: 0 20px 60px rgba(0, 0, 0, 0.5);
  --noise-opacity: 0.4;
  --nav-bg:     rgba(14, 13, 18, 0.75);
  --glow-opacity: 0.14;
  --card-gradient: linear-gradient(135deg, #13103a, #1e1040);
  --ds-banner:  linear-gradient(135deg, #0d1117, #1a1240);
  --coming-border: rgba(255, 255, 255, 0.1);
}

/* ── Light Theme ── */
[data-theme="light"] {
  --bg:         #f5f3fb;
  --surface:    #ffffff;
  --surface-2:  #ede9f8;
  --border:     rgba(100, 80, 180, 0.1);
  --border-hover: rgba(109, 40, 217, 0.3);
  --purple:     #6d28d9;
  --purple-btn: #7c3aed;
  --purple-btn-text: #ffffff;
  --purple-btn-hover: #6d28d9;
  --green:      #059669;
  --green-bg:   rgba(5, 150, 105, 0.08);
  --green-border: rgba(5, 150, 105, 0.25);
  --green-text: #047857;
  --muted:      #7b7699;
  --muted-2:    #a09cc0;
  --text:       #1e1a3a;
  --shadow:     rgba(60, 40, 120, 0.12);
  --shadow-card: 0 8px 40px rgba(60, 40, 120, 0.1);
  --noise-opacity: 0.15;
  --nav-bg:     rgba(245, 243, 251, 0.85);
  --glow-opacity: 0.08;
  --card-gradient: linear-gradient(135deg, #ede9f8, #ddd5f5);
  --ds-banner:  linear-gradient(135deg, #1e1040, #2d1b69);
  --coming-border: rgba(100, 80, 180, 0.15);
}

/* ── Base resets ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
  transition: opacity 0.3s ease;
}

/* ── Ambient glows ── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: var(--glow-opacity);
  transition: opacity 0.3s ease;
}
.glow-1 { width: 560px; height: 560px; background: var(--purple); top: -180px; left: -100px; }
.glow-2 { width: 380px; height: 380px; background: var(--green);  bottom: 0;   right: -80px; }

/* ── Theme toggle button ── */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--purple);
  color: var(--purple);
}
.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: opacity 0.2s;
}
/* Show moon in dark, sun in light */
.icon-moon { display: block; }
.icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

/* ── Nav (shared) ── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.nav-logo { width: 32px; height: 32px; }
.nav-name {
  font-family: 'DM Serif Display', serif;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.nav-name span { color: var(--text); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── Shared buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: var(--purple-btn);
  color: var(--purple-btn-text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 40px rgba(167, 139, 250, 0.2);
}
.btn-primary:hover {
  background: var(--purple-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(167, 139, 250, 0.35);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: transparent;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  font-size: 1rem;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(167, 139, 250, 0.4);
}
.apple-icon { width: 16px; height: 16px; fill: currentColor; }

/* ── Shared section labels ── */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-body {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}

/* ── Divider ── */
.divider {
  position: relative;
  z-index: 1;
  height: 1px;
  background: var(--border);
  max-width: 900px;
  margin: 0 auto;
}

/* ── Footer ── */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  transition: border-color 0.3s ease;
}
.footer-left { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--text); }

/* ── Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ── Mobile ── */
@media (max-width: 600px) {
  nav { padding: 16px 20px; }
  .nav-links { gap: 14px; }
  footer { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
}
