/**
 * Entraris theme — single source of truth for branding & theming.
 * Load this file BEFORE any surface stylesheet (app, landing, Fresh Start, forms).
 *
 * Brand color/type/chrome changes belong HERE only.
 * Surface CSS must use var(--…) — do not reintroduce a second :root palette.
 *
 * ---------------------------------------------------------------------------
 * Intensity: B (branded)  ← ship default
 * Intensity: A (refine)   ← quieter; same structure (see values below)
 *
 * To switch B → A after ship:
 *   1. Set the three knobs in the "Intensity knobs" block to the A values
 *   2. Bump theme.css?v= on every shell
 *   3. Spot-check login + vendor home + landing — no markup pass required
 *
 * A keeps: this file, page rhythm, lockup, navy/mist palette, retokened surfaces.
 * A is NOT: tear down, orphan hex, or Index-fighting form chrome.
 * ---------------------------------------------------------------------------
 */

:root {
  /* —— Core palette —— */
  --bg: #f8fafc;
  --ink: #13233f;
  --muted: #5a6b84;
  --card: #ffffff;
  --line: rgba(11, 31, 68, 0.12);
  --input-line: rgba(11, 31, 68, 0.16);
  --accent: #2f5fb0;
  --accent-border-hover: rgba(47, 95, 176, 0.35);
  --mist: #eef3f9;
  --mist-hover: #e4ebf5;
  --navy: #0b1f44;
  --navy-soft: #1a3566;
  --btn: #0b1f44;
  --btn-hover: #2f5fb0;
  --primary: #0b1f44;
  --primary-hover: #2f5fb0;
  --border: rgba(11, 31, 68, 0.12);
  --border-strong: #0b1f44;
  --text: #13233f;

  /* Semantic */
  --danger: #a11d2e;
  --danger-border: #8b0018;
  --danger-line: #f0c4ca;
  --ok: #1f6b45;
  --success: #1f6b45;
  --warn: #8a5b00;
  --warning: #8a5b00;
  --ok-bg: #e8f6ee;
  --banner: #e8f6ee;
  --warn-bg: #fff6e5;
  --danger-bg: #fdecee;
  --info-bg: #eaf2ff;
  --highlight-bg: #fff8e0;
  --highlight-border: #e6c86a;

  /* Type */
  --font: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-page: 1.5rem;
  --text-section: 1.15rem;

  /* Space / radius / shadow / controls */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-8: 3rem;
  --radius: 12px;
  --radius-control: 10px;
  --radius-sm: 10px;
  --radius-marketing: 18px;
  --shadow-sm: 0 1px 2px rgba(19, 45, 90, 0.04);
  --shadow-md: 0 4px 14px rgba(19, 45, 90, 0.06);
  --control-height: 40px;
  --touch-min: 44px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Landing aliases */
  --hl-navy: var(--navy);
  --hl-navy-soft: var(--navy-soft);
  --hl-blue: var(--accent);
  --hl-blue-bright: #3d74d4;
  --hl-sky: #d7e4f6;
  --hl-mist: var(--mist);
  --hl-paper: var(--bg);
  --hl-ink: var(--ink);
  --hl-muted: var(--muted);
  --hl-line: var(--line);
  --hl-ok: var(--ok);
  --hl-warn: var(--warn);
  --hl-danger: var(--danger);
  --hl-radius: var(--radius-marketing);
  --hl-display: var(--font-display);
  --hl-body: var(--font);
  --hl-ease: var(--ease);

  /* Atmosphere gradient stops (shared) */
  --atm-stop-1: #e8f0fa;
  --atm-stop-2: #f4f7fb;
  --atm-stop-3: #fbfcfe;
  --header-frost: rgba(248, 250, 252, 0.88);
  --header-frost-scrolled: rgba(248, 250, 252, 0.96);

  /*
   * Intensity knobs
   * B (branded / ship):  --atmosphere-strength: 1; --brand-header-pad: 1.15rem; --motion-enter: 12px;
   * A (refine / quieter): --atmosphere-strength: 0.55; --brand-header-pad: 1.05rem; --motion-enter: 0px;
   */
  --atmosphere-strength: 1;
  --brand-header-pad: 1.15rem;
  --motion-enter: 12px;
}

/* —— Shared brand chrome (every shell) —— */

.site-atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse 80% 55% at 12% 8%,
      rgba(61, 116, 212, calc(0.14 * var(--atmosphere-strength))),
      transparent 58%
    ),
    radial-gradient(
      ellipse 70% 50% at 88% 18%,
      rgba(47, 95, 176, calc(0.12 * var(--atmosphere-strength))),
      transparent 55%
    ),
    radial-gradient(
      ellipse 60% 45% at 70% 88%,
      rgba(167, 198, 232, calc(0.28 * var(--atmosphere-strength))),
      transparent 60%
    ),
    linear-gradient(165deg, var(--atm-stop-1) 0%, var(--atm-stop-2) 42%, var(--atm-stop-3) 100%);
}

.site-header {
  border-bottom: 1px solid transparent;
  background: var(--header-frost);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
  transition: border-color 0.15s var(--ease), background 0.15s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: var(--header-frost-scrolled);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: var(--brand-header-pad) 0;
}

.brand {
  font-family: var(--font-display);
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  line-height: 1.15;
}

.brand:hover {
  text-decoration: none;
  color: var(--ink);
}

.headerBrandLogo {
  height: 36px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block;
}

.productLockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.productLogo {
  height: 44px;
  width: auto;
  max-width: min(280px, 62vw);
  object-fit: contain;
  display: block;
}

@media (max-width: 600px) {
  .productLogo { height: 36px; max-width: min(220px, 70vw); }
}

/* Content enter (B). A sets --motion-enter: 0px → no visible motion */
@keyframes theme-content-enter {
  from {
    opacity: 0;
    transform: translateY(var(--motion-enter));
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.adminBoard,
.authShell {
  animation: theme-content-enter 0.45s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  .adminBoard,
  .authShell {
    animation: none;
  }
}
