/* ==========================================================================
   CDXED — Base Design System
   Tokens, reset, typography and shared components used across
   the public site (index.html) and the admin panel (admin.html)
   ========================================================================== */

:root{
  /* ---- Color: deep navy-blue system ---- */
  --void:        #05070d;   /* page background */
  --surface:     #090e1a;   /* alt section background */
  --surface-2:   #0d1424;   /* cards */
  --elevated:    #121a30;   /* inputs / elevated hover */
  --line:        rgba(150,166,204,.14);
  --line-strong: rgba(150,166,204,.30);

  --blue:        #2f6eff;   /* primary electric blue (brand) */
  --blue-bright: #5f8dff;   /* hover state */
  --blue-deep:   #122058;   /* deep shadow blue */
  --blue-glow:   rgba(47,110,255,.38);

  --ink:         #f4f6fb;   /* primary text */
  --ink-dim:     #a6b0c8;   /* secondary text */
  --ink-faint:   #6b7590;   /* tertiary / captions */

  --danger:      #ff5d6c;
  --danger-dim:  rgba(255,93,108,.14);
  --success:     #2ee6a6;
  --success-dim: rgba(46,230,166,.14);

  /* ---- Type ---- */
  --font-logo:    'Fredoka', sans-serif;
  --font-display: 'Fredoka', sans-serif;
  --font-ui:      'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* ---- Shape / rhythm ---- */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --container: 1180px;
  --ease: cubic-bezier(.16,.8,.24,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body{
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
button{ font-family: inherit; cursor: pointer; }
ul{ list-style: none; margin: 0; padding: 0; }
input, textarea, select, button{ color: inherit; }

::selection{ background: var(--blue); color: #fff; }

/* Ambient background: soft radial glows, fixed so they read as atmosphere,
   not decoration on every section */
.ambient{
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(760px 480px at 84% -6%, rgba(47,110,255,.16), transparent 60%),
    radial-gradient(620px 460px at -6% 40%, rgba(47,110,255,.10), transparent 60%),
    var(--void);
}

/* ---- Layout helpers ---- */
.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.section{ padding: 120px 0; position: relative; z-index: 1; }
@media (max-width: 720px){ .section{ padding: 80px 0; } }

.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin: 0 0 18px;
}
.eyebrow::before{
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 4px var(--blue-glow);
}
.eyebrow .tc{ color: var(--ink-faint); font-weight: 400; }

h1,h2,h3,h4{
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 18px;
  letter-spacing: -0.01em;
}
h1{ font-weight: 700; font-size: clamp(2.4rem, 5vw, 4.2rem); }
h2{ font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
h3{ font-size: 1.35rem; }

p{ margin: 0 0 16px; color: var(--ink-dim); }
.lede{ font-size: 1.15rem; color: var(--ink-dim); max-width: 640px; }
small, .caption{ font-family: var(--font-body); font-weight: 500; font-size: 13px; color: var(--ink-faint); }

/* ---- Buttons ---- */
.btn{
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .01em;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
  white-space: nowrap;
}
.btn svg{ width: 16px; height: 16px; flex: none; }
.btn-primary{
  background: linear-gradient(135deg, var(--blue), #1c4be0);
  color: #fff;
  box-shadow: 0 10px 30px -8px var(--blue-glow);
}
.btn-primary:hover{ transform: translateY(-2px); box-shadow: 0 16px 36px -8px var(--blue-glow); }
.btn-ghost{
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover{ border-color: var(--blue-bright); color: var(--blue-bright); transform: translateY(-2px); }
.btn-sm{ padding: 10px 18px; font-size: 13px; }
.btn-danger{ background: var(--danger-dim); color: var(--danger); border-color: rgba(255,93,108,.3); }
.btn-danger:hover{ background: rgba(255,93,108,.22); }
.btn:disabled{ opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-block{ width: 100%; justify-content: center; }

/* ---- Cards & form fields (shared by admin) ---- */
.field{ margin-bottom: 18px; }
.field label{
  display: block;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.field input,
.field textarea,
.field select{
  width: 100%;
  background: var(--elevated);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 13px 15px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.field textarea{ resize: vertical; min-height: 100px; line-height: 1.55; }
.field input:focus,
.field textarea:focus,
.field select:focus{
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px var(--blue-glow);
}
.field-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px){ .field-row{ grid-template-columns: 1fr; } }
.field-hint{ font-size: 12.5px; color: var(--ink-faint); margin-top: 6px; }

/* Focus visibility for keyboard users */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 2px solid var(--blue-bright);
  outline-offset: 2px;
}

/* ---- Reveal-on-scroll ---- */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
.reveal-stagger > *{ transition-delay: calc(var(--i, 0) * 90ms); }

/* ---- Scrollbar ---- */
::-webkit-scrollbar{ width: 10px; height: 10px; }
::-webkit-scrollbar-track{ background: var(--void); }
::-webkit-scrollbar-thumb{ background: #1c2740; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover{ background: var(--blue-deep); }

/* ---- Loader spinner (shared) ---- */
.spinner{
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
}
@keyframes spin{ to{ transform: rotate(360deg); } }

/* ---- Toast ----
.toast{
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translate(-50%, 120%);
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 14px;
  padding: 14px 22px;
  border-radius: var(--radius-pill);
  box-shadow: 0 20px 50px -12px rgba(0,0,0,.6);
  z-index: 999;
  transition: transform .45s var(--ease);
  display: flex; align-items: center; gap: 10px;
}
.toast.show{ transform: translate(-50%, 0); }
.toast.ok{ border-color: rgba(46,230,166,.35); }
.toast.ok .toast-dot{ background: var(--success); }
.toast.err{ border-color: rgba(255,93,108,.35); }
.toast.err .toast-dot{ background: var(--danger); }
.toast-dot{ width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; } */
