/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ===== Design Tokens =====
   Purpose-driven palette:
   - Rose/Pink: affection, love, warmth
   - Peach: safety, gentleness
   - Violet: depth, intimacy, mystery
   - Deep plum: privacy, calm
*/
:root {
  --bg: #1a0d1c;
  --bg-2: #24112a;
  --surface: #2b1533;
  --surface-2: #3a1d45;
  --border: #4a2757;
  --text: #fff0f6;
  --text-soft: #e8d5ee;
  --muted: #c4a8cc;
  --rose: #ff4d7d;
  --pink: #ff7eb6;
  --peach: #ffb26b;
  --violet: #b06bff;
  --success: #6bffb8;
  --gradient: linear-gradient(135deg, #ff4d7d 0%, #ff7eb6 45%, #b06bff 100%);
  --gradient-soft: linear-gradient(160deg, #ff4d7d18, #b06bff18);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow: 0 8px 28px rgba(0,0,0,0.35);
  --shadow-rose: 0 8px 28px rgba(255,77,125,0.25);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, #4a1a3a 0%, transparent 55%),
    radial-gradient(circle at 90% 10%, #2a1150 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  padding-bottom: env(safe-area-inset-bottom);
}

/* ===== Typography ===== */
h1, h2, h3, h4 { line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); font-weight: 700; margin-top: 2rem; }
h3 { font-size: clamp(1.1rem, 4vw, 1.3rem); font-weight: 600; margin-top: 1.5rem; }
p { margin-top: 0.75rem; color: var(--text-soft); }
a { color: var(--peach); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { color: var(--text); font-weight: 600; }

/* ===== Layout ===== */
.container {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-wide { max-width: 960px; }

/* ===== Navigation (shared) ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26, 13, 28, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
}
.site-nav .nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.site-nav .brand {
  font-weight: 800;
  font-size: 1.1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.site-nav .nav-links {
  display: flex;
  gap: 16px;
  font-size: 0.85rem;
}
.site-nav .nav-links a { color: var(--muted); }
.site-nav .nav-links a:hover { color: var(--text); }

/* ===== Buttons ===== */
button, .btn {
  font-family: inherit;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  padding: 14px 20px;
  transition: transform 0.12s, box-shadow 0.2s, opacity 0.2s;
  display: inline-block;
  text-align: center;
}
button:active, .btn:active { transform: scale(0.97); }

.btn-primary {
  width: 100%;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  box-shadow: var(--shadow-rose);
}
.btn-primary:disabled {
  background: var(--surface-2);
  color: var(--muted);
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.7;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost {
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
  text-decoration: underline;
  padding: 8px;
}

/* ===== Forms ===== */
input, textarea, select {
  width: 100%;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(176,107,255,0.2);
}
::placeholder { color: #8a6d94; }

/* ===== Utility ===== */
.hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ===== Cards ===== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

/* ===== Footer (shared) ===== */
.site-footer {
  margin-top: 3rem;
  padding: 24px 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.site-footer a { color: var(--peach); }
.site-footer .footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 20px;
  margin-bottom: 12px;
}

/* ===== Reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}