/* ══════════════════════════════════════════════════════════════
   INNER ATLAS — BRAND LAYER v4 · One voice everywhere
   Loaded after styles.css on every page (marketing, blog, app).
   App screens then load atlas-redesign.css, which agrees with
   this layer rather than fighting it.
   The language: night, paper, ink, moonlight.
   ══════════════════════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --ia-night: #0B0A13;
  --ia-night-2: #0E0C1A;
  --ia-paper: #EDE8DC;
  --ia-paper-dim: rgba(237, 232, 220, 0.64);
  --ia-paper-faint: rgba(237, 232, 220, 0.38);
  --ia-moon: #D8CCA4;
  --ia-moon-soft: rgba(216, 204, 166, 0.55);
  --ia-ink-line: rgba(237, 232, 220, 0.09);
  --ia-ink-line-strong: rgba(237, 232, 220, 0.18);
  --ia-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ia-sans: 'Mulish', -apple-system, 'Segoe UI', Arial, sans-serif;
  --ia-ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Retune the shared palette away from neon violet toward moonlight */
  --ice: #EDE8DC;
  --white: #EFEAE0;
  --text: #CCC6B8;
  --text-dim: #948E7E;
  --text-faint: #655F50;
}

/* ── Micro-finish ── */
::selection { background: rgba(216, 204, 166, 0.28); color: #F5F1E6; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(237, 232, 220, 0.14);
  border-radius: 8px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(237, 232, 220, 0.26); background-clip: content-box; }

button, input, select, textarea { font-family: inherit; }

/* ── Top bar: the same quiet ledge on every page ── */
.nav {
  background: linear-gradient(180deg, rgba(11, 10, 19, 0.72), rgba(11, 10, 19, 0.35) 80%, rgba(11, 10, 19, 0)) !important;
  border-bottom: 1px solid rgba(237, 232, 220, 0.05) !important;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nav-logo-text {
  font-family: var(--ia-serif) !important;
  letter-spacing: 0.04em !important;
}

/* ── Headings: the editorial voice, everywhere ── */
h1, h2, h3 { font-family: var(--ia-serif); }

/* ── Buttons: letterpress, not candy ── */
.btn {
  border-radius: 3px;
  font-family: var(--ia-sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: all 0.55s var(--ia-ease);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.btn-primary {
  background: var(--ia-paper);
  color: #16131F;
  border: 1px solid var(--ia-paper);
  box-shadow: 0 10px 34px rgba(237, 232, 220, 0.10);
}
.btn-primary:hover {
  background: #FBF8F0;
  box-shadow: 0 14px 44px rgba(237, 232, 220, 0.18);
  transform: translateY(-1px);
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--ia-ink-line-strong);
  color: var(--ia-paper-dim);
}
.btn-secondary:hover {
  border-color: var(--ia-moon-soft);
  color: var(--ia-paper);
  background: transparent;
}
.btn-ghost {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ia-paper-dim);
}
.btn-ghost:hover { color: var(--ia-paper); background: rgba(237, 232, 220, 0.05); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.62rem; letter-spacing: 0.14em; }
.cta-btn-ivory {
  background: var(--ia-paper);
  color: #16131F;
  border: 1px solid var(--ia-paper);
  box-shadow: 0 10px 34px rgba(237, 232, 220, 0.10);
}
.cta-btn-ivory:hover {
  background: #FBF8F0;
  box-shadow: 0 14px 44px rgba(237, 232, 220, 0.18);
  transform: translateY(-1px);
}

/* ── Cards: hairline borders, quiet depth — no glass noise ── */
.card,
.card-glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.026), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--ia-ink-line);
  border-radius: 6px;
  box-shadow: 0 24px 60px rgba(3, 2, 8, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.7s var(--ia-ease), box-shadow 0.7s var(--ia-ease);
}
@media (hover: hover) {
  .card:hover, .card-glass:hover {
    border-color: var(--ia-ink-line-strong);
    box-shadow: 0 28px 70px rgba(3, 2, 8, 0.45);
  }
}

/* ── Form fields: still water ── */
input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
textarea,
select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--ia-ink-line);
  border-radius: 4px;
  color: var(--ia-paper);
  transition: border-color 0.5s var(--ia-ease);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="search"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: var(--ia-moon-soft);
  box-shadow: none;
  outline: none;
}
input::placeholder, textarea::placeholder { color: var(--ia-paper-faint); }

/* ── Hairlines ── */
hr { border: 0; border-top: 1px solid var(--ia-ink-line); }

/* ── Focus ring, everywhere, in one hue ── */
a:focus-visible,
.btn:focus-visible,
.card:focus-visible,
.bottom-nav-item:focus-visible {
  outline: 1px solid var(--ia-moon-soft);
  outline-offset: 3px;
}

/* ── Motion: slow, intentional, atmospheric — one system ──
   Durations: 0.25s press · 0.5s control · 0.7s surface · 1.15s reveal */
.view-fade-in { animation: iaRise 1.15s var(--ia-ease) both; }
@keyframes iaRise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Honor stillness when asked ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .view-fade-in { animation: none !important; }
}
