/* ==========================================================
   INFRADEV — SHARED DESIGN SYSTEM
   Every page includes this file. Keeps look consistent while
   each page still has its own HTML/JS.
   ========================================================== */

:root {
  --navy: #0B1020;
  --navy-soft: #131A30;
  --blue: #3B82F6;
  --blue-soft: #60A5FA;
  --ink: #E7ECFB;
  --ink-dim: #9BA6C4;
  --glass-bg: rgba(255,255,255,0.06);
  --glass-border: rgba(255,255,255,0.14);
  --glass-highlight: rgba(255,255,255,0.35);
  --bg: var(--navy);
  --surface: var(--navy-soft);
  --text: var(--ink);
  --text-dim: var(--ink-dim);
  --radius: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #EEF1F8;
  --surface: #FFFFFF;
  --text: #10142A;
  --text-dim: #565F7E;
  --glass-bg: rgba(255,255,255,0.55);
  --glass-border: rgba(16,20,42,0.10);
  --glass-highlight: rgba(255,255,255,0.85);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
  /* only transition color/background — never layout props — this is
     what keeps theme switches and hovers from ever feeling laggy */
  transition: background .35s var(--ease), color .35s var(--ease);
}

/* Respect users who asked for less motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 400px at 15% 10%, rgba(59,130,246,0.28), transparent 60%),
    radial-gradient(500px 400px at 85% 30%, rgba(96,165,250,0.18), transparent 60%),
    radial-gradient(700px 500px at 50% 100%, rgba(59,130,246,0.14), transparent 60%);
  opacity: 1;
  transition: opacity .35s var(--ease);
}
[data-theme="light"] body::before { opacity: 0.5; }

a { color: inherit; text-decoration: none; }

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Glass utility (liquid glass) ---------- */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border-radius: var(--radius);
  position: relative;
  box-shadow:
    0 1px 0 0 var(--glass-highlight) inset,
    0 8px 30px rgba(0,0,0,0.25);
}
[data-theme="light"] .glass {
  box-shadow:
    0 1px 0 0 var(--glass-highlight) inset,
    0 8px 24px rgba(30,40,80,0.08);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  /* transform-only transition: GPU accelerated, never reflows -> no jank */
  transition: transform .15s var(--ease), filter .15s var(--ease), background .15s var(--ease);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(180deg, var(--blue-soft), var(--blue));
  color: #06122B;
  box-shadow: 0 8px 22px rgba(59,130,246,0.35);
}
.btn-primary:hover { filter: brightness(1.07); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--glass-border);
}
.btn-ghost:hover { background: var(--glass-bg); }

/* ---------- Nav (shared across pages) ---------- */
nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  flex-wrap: wrap;
  gap: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 30px; font-size: 14px; color: var(--text-dim); }
.nav-links a { transition: color .15s var(--ease); }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  color: var(--text-dim);
  transition: color .15s var(--ease), background .15s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--glass-bg); }

footer.wrap {
  padding: 40px 0 50px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}
footer.wrap .links { display: flex; gap: 18px; justify-content: center; margin-top: 10px; }
footer.wrap .links a:hover { color: var(--text); }

/* ---------- Page load transition ----------
   A single fade-in on first paint (not per-section) — avoids the
   generic "everything slides up on scroll" pattern, keeps it to
   one deliberate moment. */
.page-enter {
  animation: pageIn .5s var(--ease) both;
}
@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Simple content page (privacy/terms/contact) ---------- */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 60px 0 100px;
}
.doc h1 { font-size: 32px; font-weight: 650; letter-spacing: -0.01em; margin-bottom: 8px; }
.doc .updated { color: var(--text-dim); font-size: 13px; margin-bottom: 40px; }
.doc h2 { font-size: 19px; font-weight: 600; margin: 34px 0 12px; }
.doc p, .doc li { color: var(--text-dim); font-size: 15px; line-height: 1.7; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc a { color: var(--blue-soft); }
.doc a:hover { text-decoration: underline; }
