/* ============================================================
   365 × CDM — Partnership Design System
   Tone: warm, calm, human-centric, reassuring.
   A deliberate re-skin of the BMW×365 system — same premium
   glass architecture, softer/warmer palette (teal + warm amber
   + soft gold), rounded generous spacing, less "flex", more trust.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;600&display=swap');

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  /* Backgrounds — warm deep slate (softer than pure black) */
  --bg:           #101418;
  --bg2:          #141b21;
  --bg3:          #1c262e;

  /* 365 Partnership palette — calm teal + warm amber + soft gold */
  --teal:          #1f8a8a;   /* trust / calm anchor */
  --teal-light:    #2fb4b0;
  --teal-dark:     #146e6e;

  --amber:         #e8863c;   /* warmth / human */
  --amber-light:   #f4a15c;
  --amber-dark:    #cf6f28;

  --gold:          #d9b25a;   /* value / quality — used sparingly */
  --gold-light:    #ecca7f;

  /* 365 orange lineage (kept subtle for brand continuity) */
  --brand-365:     #fe4a00;

  /* Soft alert (used very sparingly) */
  --clay:          #c8563f;

  /* Neutrals — warm greys */
  --text:         #e7e9ea;
  --text-dim:     #a3adb2;
  --text-bright:  #f4f6f6;
  --text-faint:   #74808a;

  /* Glass UI */
  --glass:        rgba(255,255,255,0.045);
  --glass-border: rgba(255,255,255,0.09);
  --glass-strong: rgba(255,255,255,0.075);

  /* Status */
  --green: #3fb984;
  --warn:  #e0a13a;

  /* Brand gradients — warm, calm partnership signature */
  --grad-primary: linear-gradient(135deg, var(--teal) 0%, var(--amber) 100%);
  --grad-warm:    linear-gradient(90deg, var(--teal) 0%, var(--gold) 50%, var(--amber) 100%);
  --grad-teal:    linear-gradient(135deg, var(--teal-dark), var(--teal), var(--teal-light));
  --grad-amber:   linear-gradient(135deg, var(--amber-dark), var(--amber), var(--amber-light));
  --grad-subtle:  radial-gradient(circle at top, rgba(31,138,138,0.14), transparent 70%);
  --grad-border:  linear-gradient(135deg, var(--teal), var(--gold), var(--amber));

  /* Shadows — soft, warm */
  --shadow-teal:  0 8px 40px rgba(31,138,138,0.22);
  --shadow-amber: 0 8px 40px rgba(232,134,60,0.22);
  --shadow-soft:  0 10px 34px rgba(0,0,0,0.34);
}

/* ── BASE RESET ──────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: 'Space Grotesk', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.65;
}

/* ── TYPOGRAPHY ──────────────────────────────────────────── */
h1, h2, h3, h4, h5 {
  color: var(--text-bright);
  line-height: 1.18;
  font-weight: 700;
}

.mono { font-family: 'JetBrains Mono', monospace; }

.grad-text {
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.teal-text {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.amber-text {
  background: linear-gradient(135deg, var(--amber), var(--amber-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gold-text {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.warm-text {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── PASSWORD GATE ───────────────────────────────────────── */
#gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: opacity .6s, visibility .6s;
}
#gate.hidden { opacity: 0; visibility: hidden; pointer-events: none; display: none; }

.gate-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 50%, rgba(31,138,138,0.16), transparent 55%),
    radial-gradient(circle at 70% 50%, rgba(232,134,60,0.12), transparent 55%);
}

.gate-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
}

.gate-badge {
  display: inline-block;
  padding: 6px 18px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  font-size: .65rem;
  letter-spacing: 4px;
  color: var(--amber-light);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-family: 'JetBrains Mono', monospace;
}

.gate-content h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 6px;
}

.gate-content p {
  color: var(--text-dim);
  margin-bottom: 2.5rem;
  font-size: 1rem;
  letter-spacing: 1px;
}

#gate input {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: 14px 28px;
  border-radius: 12px;
  color: var(--text-bright);
  font-size: 1.1rem;
  font-family: inherit;
  width: 300px;
  text-align: center;
  outline: none;
  transition: border-color .3s;
  letter-spacing: 3px;
}

#gate input:focus { border-color: var(--teal-light); }

#gate button {
  display: block;
  margin: 14px auto 0;
  padding: 14px 48px;
  background: var(--grad-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform .2s, box-shadow .3s;
  letter-spacing: 1px;
}

#gate button:hover {
  transform: scale(1.04);
  box-shadow: 0 0 30px rgba(31,138,138,.4);
}

.gate-err {
  color: var(--clay);
  font-size: .8rem;
  margin-top: 10px;
  opacity: 0;
  transition: opacity .3s;
}
.gate-err.show { opacity: 1; }

/* ── NAV ─────────────────────────────────────────────────── */
nav.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  padding: 14px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  background: rgba(16,20,24,.82);
}

nav.main-nav .nav-logo {
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 1px;
}

nav.main-nav .nav-links {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

nav.main-nav .nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color .2s, background .2s;
}

nav.main-nav .nav-links a:hover,
nav.main-nav .nav-links a.active {
  color: var(--text-bright);
  background: var(--glass);
}

nav.main-nav .nav-links a.active {
  color: var(--amber-light);
}

@media (max-width: 768px) {
  nav.main-nav { padding: 12px 16px; }
  nav.main-nav .nav-links { gap: 2px; }
  nav.main-nav .nav-links a { font-size: .62rem; padding: 5px 8px; }
}

/* ── LAYOUT ──────────────────────────────────────────────── */
.page-wrap { padding-top: 64px; }

section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 60px;
}

.container {
  max-width: 1180px;
  width: 100%;
  margin: 0 auto;
}

@media (max-width: 768px) {
  section { padding: 80px 24px; }
}

/* ── SECTION HEADER ──────────────────────────────────────── */
.section-label {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: .68rem;
  color: var(--amber-light);
  font-weight: 600;
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
}

.section-label .num {
  color: var(--teal-light);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.14;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-dim);
  max-width: 720px;
  line-height: 1.85;
  margin-bottom: 2.5rem;
}

/* ── GLASS CARDS ─────────────────────────────────────────── */
.card {
  background: var(--glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 28px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(31,138,138,.4);
  box-shadow: var(--shadow-teal);
}

.card-grad-border {
  position: relative;
  border-radius: 18px;
}

.card-grad-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: var(--grad-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .3s;
}

.card-grad-border:hover::before { opacity: 1; }

/* ── TILES (large link tiles) ────────────────────────────── */
.tile {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 40px 32px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform .3s, border-color .3s, box-shadow .3s;
  position: relative;
  overflow: hidden;
}

.tile::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  padding: 1px;
  background: var(--grad-primary);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity .4s;
}

.tile:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-teal);
}

.tile:hover::before { opacity: 1; }

.tile .tile-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--glass-strong);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
}

.tile .tile-label {
  font-size: .65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-dim);
  font-family: 'JetBrains Mono', monospace;
}

.tile h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--text-bright);
}

.tile p {
  font-size: .9rem;
  color: var(--text-dim);
  line-height: 1.65;
  flex: 1;
}

.tile .tile-arrow {
  font-size: 1.1rem;
  color: var(--amber);
  margin-top: auto;
  transition: transform .3s;
}

.tile:hover .tile-arrow { transform: translateX(4px); }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--grad-primary);
  border: none;
  border-radius: 12px;
  color: white;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s, box-shadow .3s;
  letter-spacing: .5px;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(31,138,138,.35);
}

.btn-glass {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: border-color .2s, background .2s, transform .2s;
}

.btn-glass:hover {
  border-color: var(--teal-light);
  background: rgba(31,138,138,.08);
  transform: translateY(-2px);
  color: var(--text-bright);
}

/* ── GRIDS ───────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }

/* ── STATUS INDICATORS ───────────────────────────────────── */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  display: inline-block;
  animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .65rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  font-family: 'JetBrains Mono', monospace;
}

.status-badge.active {
  background: rgba(63,185,132,.12);
  color: var(--green);
  border: 1px solid rgba(63,185,132,.3);
}

.status-badge.partner {
  background: rgba(31,138,138,.12);
  color: var(--teal-light);
  border: 1px solid rgba(47,180,176,.3);
}

.status-badge.warm {
  background: rgba(232,134,60,.12);
  color: var(--amber-light);
  border: 1px solid rgba(232,134,60,.3);
}

/* ── DIVIDERS ────────────────────────────────────────────── */
.grad-divider {
  height: 1px;
  background: var(--grad-primary);
  opacity: .3;
  margin: 0;
}

/* ── REVEAL ANIMATION ────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s ease, transform .8s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ── PLACEHOLDER FLAG (for unknowns e.g. Bald Eagle) ─────── */
.placeholder-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px dashed rgba(224,161,58,.5);
  background: rgba(224,161,58,.06);
  color: var(--warn);
  font-family: 'JetBrains Mono', monospace;
  font-size: .78rem;
  letter-spacing: .5px;
}
.placeholder-flag::before { content: '⚑'; font-size: .9rem; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer.site-footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--text-dim);
  font-size: .72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  border-top: 1px solid var(--glass-border);
  font-family: 'JetBrains Mono', monospace;
}

/* ── PILL LIST (content points) ──────────────────────────── */
.point-list { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.point-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 20px;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  transition: border-color .3s, transform .3s;
}
.point-list li:hover { border-color: rgba(31,138,138,.35); transform: translateX(3px); }
.point-list li .pt-mark {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--grad-primary);
  color: #fff; font-size: .8rem; font-weight: 700;
}
.point-list li .pt-body { flex: 1; }
.point-list li .pt-body strong { color: var(--text-bright); display:block; margin-bottom: 2px; font-weight: 600; }
.point-list li .pt-body span { color: var(--text-dim); font-size: .9rem; line-height: 1.6; }

/* ── SCROLL BAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: rgba(31,138,138,.4); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }

/* ── BG EFFECTS ──────────────────────────────────────────── */
.bg-glow-teal {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(31,138,138,0.11) 0%, transparent 70%);
  pointer-events: none;
}

.bg-glow-amber {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,134,60,0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* ── PARTICLE CANVAS LAYERING ────────────────────────────── */
#cdm365ParticleCanvas { z-index: 0 !important; }
body > *:not(#cdm365ParticleCanvas):not(#gate):not(#lb):not(script):not(style) {
  position: relative;
  z-index: 1;
}

/* ── SECTION RAIL UTILITY ────────────────────────────────── */
.has-rail { position: relative; }
.has-rail::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  z-index: 2;
  pointer-events: none;
}
.rail-teal::before   { background: var(--teal); }
.rail-amber::before  { background: var(--amber); }
.rail-gold::before   { background: var(--gold); }
.rail-warm::before   { background: var(--grad-warm); }
.rail-primary::before { background: var(--grad-primary); }
.rail-teal-to-amber::before { background: linear-gradient(to bottom, var(--teal), var(--amber)); }

/* ── PAGE RAIL (fixed left-edge stripe) ──────────────────── */
body.page-rail::after {
  content: '';
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  z-index: 100;
  pointer-events: none;
}
body.page-rail-teal::after     { background: var(--teal); }
body.page-rail-amber::after    { background: var(--amber); }
body.page-rail-gold::after     { background: var(--gold); }
body.page-rail-warm::after     { background: var(--grad-warm); }
body.page-rail-primary::after  { background: var(--grad-primary); }
body.page-rail-teal-to-amber::after { background: linear-gradient(to bottom, var(--teal), var(--amber)); }
