/* ═══════════════════════════════════════════
   BLUU DRAGON — Shared Stylesheet
   Light + Dark mode with manual toggle
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── LIGHT MODE (default) ── */
:root {
  --bd-bg:        #F0F6FC;
  --bd-surface:   #FFFFFF;
  --bd-surface2:  #D8EDF9;
  --bd-border:    rgba(42,127,193,0.15);
  --bd-border-s:  rgba(42,127,193,0.35);
  --bd-pioneer:   #5A7E9B;
  --bd-text:      #1A3A5C;
  --bd-muted:     #4A7A9B;
  --bd-light-txt: #A8D4F0;
  --bd-blue:      #2A7FC1;
  --bd-deep:      #0F4C81;
  --bd-navy:      #083260;
  --bd-cyan:      #4BC8E8;
  --bd-gold:      #BA7517;
  --bd-gold-lt:   #E8A83A;
  --bd-bar-bg:    rgba(255,255,255,0.97);
  --bd-bar-shadow: rgba(42,127,193,0.08);
  --bd-hero-grad: linear-gradient(160deg, #e8f4fc 0%, #f5faff 40%, #daeef8 100%);
  --bd-strip-bg:  linear-gradient(135deg, #0F4C81 0%, #083260 100%);
  --bd-cta-bg:    linear-gradient(135deg, #0F4C81 0%, #083260 100%);
  --bd-logo:      url('pics/top_logo_light.png');
  --bd-truu-logo: url('pics/truu_logo_dark.png');
  --bd-card-hover:#f7fbff;
  color-scheme: light;
}

/* ── DARK MODE ── */
[data-theme="dark"] {
  --bd-bg:        #07243D;
  --bd-surface:   #0C3356;
  --bd-surface2:  #0F4070;
  --bd-border:    rgba(91,168,229,0.15);
  --bd-border-s:  rgba(91,168,229,0.3);
  --bd-text:      #D8EDF9;
  --bd-muted:     #85B7EB;
  --bd-light-txt: rgba(91,168,229,0.4);
  --bd-blue:      #5BA8E5;
  --bd-deep:      #378ADD;
  --bd-navy:      #B5D4F4;
  --bd-cyan:      #4BC8E8;
  --bd-gold:      #E8A83A;
  --bd-gold-lt:   #FAC775;
  --bd-bar-bg:    rgba(7,36,61,0.97);
  --bd-bar-shadow: rgba(0,0,0,0.3);
  --bd-hero-grad: linear-gradient(160deg, #07243D 0%, #0C3356 50%, #061E33 100%);
  --bd-strip-bg:  linear-gradient(135deg, #051828 0%, #030E1A 100%);
  --bd-cta-bg:    linear-gradient(135deg, #051828 0%, #030E1A 100%);
  --bd-logo:      url('pics/top_logo_dark.png');
  --bd-truu-logo: url('pics/truu_logo_white.png');
  --bd-card-hover:#0d3a60;
  --bd-pioneer:   #89B8D8;
  color-scheme: dark;
}

/* ── AUTO DARK (system preference, only when no manual override) ── */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bd-bg:        #07243D;
    --bd-surface:   #0C3356;
    --bd-surface2:  #0F4070;
    --bd-border:    rgba(91,168,229,0.15);
    --bd-border-s:  rgba(91,168,229,0.3);
    --bd-text:      #D8EDF9;
    --bd-muted:     #85B7EB;
    --bd-light-txt: rgba(91,168,229,0.4);
    --bd-blue:      #5BA8E5;
    --bd-deep:      #378ADD;
    --bd-navy:      #B5D4F4;
    --bd-cyan:      #4BC8E8;
    --bd-gold:      #E8A83A;
    --bd-gold-lt:   #FAC775;
    --bd-bar-bg:    rgba(7,36,61,0.97);
    --bd-bar-shadow: rgba(0,0,0,0.3);
    --bd-hero-grad: linear-gradient(160deg, #07243D 0%, #0C3356 50%, #061E33 100%);
    --bd-strip-bg:  linear-gradient(135deg, #051828 0%, #030E1A 100%);
    --bd-cta-bg:    linear-gradient(135deg, #051828 0%, #030E1A 100%);
    --bd-logo:      url('pics/top_logo_dark.png');
    --bd-truu-logo: url('pics/truu_logo_white.png');
    --bd-card-hover:#0d3a60;
    --bd-pioneer:   #89B8D8;
    color-scheme: dark;
  }
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bd-bg);
  color: var(--bd-text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.25s, color 0.25s;
}

/* ── TOP BAR (lang + theme toggle) ── */
.top-bar {
  position: sticky; top: 0; z-index: 200;
  background: var(--bd-bar-bg);
  border-bottom: 1px solid var(--bd-border);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 12px var(--bd-bar-shadow);
  display: flex; justify-content: center; align-items: center;
  padding: 0 1rem;
  gap: 0;
}
.lang-bar-inner { display: flex; gap: 0; flex: 1; justify-content: center; }
.lang-btn {
  padding: 0.7rem 1.3rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: none;
  border-bottom: 2px solid transparent;
  color: var(--bd-muted); cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  display: flex; align-items: center; gap: 0.3rem;
}
.lang-btn .flag { 
  display: inline-block;
  font-size: 13px;
  font-style: normal;
  line-height: 1;
}
.flag-icon { display: none; }
/* Fallback: if emoji flags don't render, the 2-letter code still looks fine */
.lang-btn .flag-img {
  width: 20px; height: 14px; object-fit: cover;
  border-radius: 2px; vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}
.lang-btn.active { color: var(--bd-blue); border-bottom-color: var(--bd-blue); }
.lang-btn:hover { color: var(--bd-text); }

/* ── THEME TOGGLE ── */
.theme-toggle {
  display: flex; align-items: center; gap: 0;
  background: var(--bd-surface2);
  border: 1px solid var(--bd-border-s);
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: 0.75rem;
}
.theme-btn {
  padding: 0.4rem 0.6rem;
  font-size: 13px;
  background: none; border: none; cursor: pointer;
  transition: background 0.15s;
  line-height: 1;
  color: var(--bd-muted);
}
.theme-btn.active {
  background: var(--bd-blue);
  color: #fff;
}
.theme-btn:hover:not(.active) { background: var(--bd-border); }

.lang-section { display: none; }
.lang-section.active { display: block; }

/* ── HERO ── */
.hero {
  background: var(--bd-hero-grad);
  min-height: 92vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 5rem 2rem 4rem;
  text-align: center;
  position: relative; overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 50% at 50% 20%, rgba(75,200,232,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 720px; margin: 0 auto; }

/* Logo via CSS — switches automatically with theme */
.logo-hero {
  width: min(480px, 88vw);
  height: auto;
  margin: 0 auto 0.5rem;
  display: block;
  content: var(--bd-logo);
}

/* ── TRUU BADGE ── */
.truu-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--bd-surface);
  border: 1px solid var(--bd-border-s);
  padding: 0.4rem 1rem;
  margin-bottom: 2rem; opacity: 0.95;
}
.truu-badge-text { font-size: 11px; letter-spacing: 0.08em; color: var(--bd-muted); }
.truu-logo-img {
  height: 16px; width: auto;
  content: var(--bd-truu-logo);
}

.welcome-label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.35em; text-transform: uppercase;
  color: var(--bd-gold); margin-bottom: 1.2rem;
}
.hero-headline {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 300; color: var(--bd-navy);
  line-height: 1.15; margin-bottom: 0.75rem;
}
.hero-sub {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1rem, 2.5vw, 1.3rem);
  font-style: italic; font-weight: 300;
  color: var(--bd-blue); line-height: 1.7; margin-bottom: 1.75rem;
}
.divider {
  width: 40px; height: 1px;
  background: linear-gradient(to right, transparent, var(--bd-gold), transparent);
  margin: 0 auto 1.75rem;
}
.hero-body {
  font-size: 0.95rem; font-weight: 300;
  color: var(--bd-muted); line-height: 1.85; margin-bottom: 2.5rem;
}

/* ── BUTTONS ── */
.btn-row { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.8rem 1.9rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none;
  background: var(--bd-blue); color: #fff;
  border: 1px solid var(--bd-blue);
  transition: background 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--bd-deep); border-color: var(--bd-deep); }
.btn-ghost {
  background: transparent; color: var(--bd-blue);
  border-color: var(--bd-border-s);
}
.btn-ghost:hover { background: var(--bd-surface2); color: var(--bd-deep); }
.btn-white { background: #fff; color: var(--bd-deep); border-color: #fff; }
.btn-white:hover { background: var(--bd-surface2); border-color: var(--bd-surface2); color: var(--bd-navy); }

/* ── SECTIONS ── */
.section-wrap { padding: 5rem 2rem; max-width: 960px; margin: 0 auto; }
.section-wrap-narrow { padding: 5rem 2rem; max-width: 720px; margin: 0 auto; }
.section-label {
  font-size: 10px; font-weight: 500;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--bd-gold); margin-bottom: 0.6rem; text-align: center;
}
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 300; text-align: center;
  color: var(--bd-navy); line-height: 1.2; margin-bottom: 0.9rem;
}
.section-sub {
  font-size: 0.9rem; font-weight: 300;
  color: var(--bd-muted); text-align: center;
  max-width: 560px; margin: 0 auto 3rem; line-height: 1.8;
}

/* ── CARDS ── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--bd-border);
  border: 1px solid var(--bd-border);
}
.card {
  background: var(--bd-surface); padding: 2rem 1.75rem;
  transition: background 0.2s;
}
.card:hover { background: var(--bd-card-hover); }
.card-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.2rem; font-weight: 300;
  color: var(--bd-light-txt); line-height: 1; margin-bottom: 0.75rem;
}
.card-title {
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--bd-navy); margin-bottom: 0.55rem;
}
.card-text { font-size: 0.875rem; font-weight: 300; color: var(--bd-muted); line-height: 1.75; }

/* ── SIX-IN-ONE ── */
.six-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1px; background: var(--bd-border);
  border: 1px solid var(--bd-border);
}
.six-card {
  background: var(--bd-surface); padding: 2rem 1.75rem;
  border-left: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.six-card:hover { border-left-color: var(--bd-cyan); background: var(--bd-card-hover); }
.six-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem; font-weight: 300;
  color: var(--bd-light-txt); line-height: 1; margin-bottom: 0.7rem;
}
.six-title { font-size: 0.8rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--bd-navy); margin-bottom: 0.45rem; }
.six-text { font-size: 0.85rem; font-weight: 300; color: var(--bd-muted); line-height: 1.75; }
.six-pioneer { font-size: 0.72rem; color: var(--bd-pioneer); margin-top: 0.45rem; font-style: italic; }

/* ── TRUU BANNER ── */
.truu-banner {
  background: var(--bd-surface2); border: 1px solid var(--bd-border-s);
  padding: 2rem 2.5rem; max-width: 760px;
  margin: 0 auto 3.5rem; text-align: center;
}
.truu-banner-logo {
  height: 28px; width: auto; margin: 0 auto 1rem; display: block;
  content: var(--bd-truu-logo);
}
.truu-banner-text { font-size: 0.88rem; font-weight: 300; color: var(--bd-muted); line-height: 1.75; }
.truu-banner-text strong { color: var(--bd-navy); font-weight: 500; }
.truu-link { font-size: 0.8rem; color: var(--bd-blue); text-decoration: none; border-bottom: 1px solid var(--bd-border-s); margin-top: 0.75rem; display: inline-block; }
.truu-link:hover { color: var(--bd-deep); }

/* ── STRIP ── */
.strip { background: var(--bd-strip-bg); padding: 3.5rem 2rem; }
.strip-inner { max-width: 760px; margin: 0 auto; display: flex; align-items: center; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.partner-logo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; background: #fff; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.25); }
.order-text { flex: 1; min-width: 220px; }
.order-eyebrow { font-size: 9px; font-weight: 500; letter-spacing: 0.3em; text-transform: uppercase; color: var(--bd-gold-lt); margin-bottom: 0.4rem; }
.order-headline { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 300; color: #fff; margin-bottom: 0.5rem; line-height: 1.3; }
.order-desc { font-size: 0.85rem; font-weight: 300; color: rgba(216,237,249,0.8); line-height: 1.7; margin-bottom: 1rem; }

/* ── PARTNER CTA ── */
.partner-cta {
  background: var(--bd-surface2); border: 1px solid var(--bd-border-s);
  padding: 2.5rem; text-align: center; margin-top: 1.5rem;
}
.partner-cta-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 300; color: var(--bd-navy); margin-bottom: 0.5rem; }
.partner-cta-text { font-size: 0.88rem; color: var(--bd-muted); line-height: 1.7; margin-bottom: 1.25rem; max-width: 480px; margin-left: auto; margin-right: auto; }

/* ── TELEGRAM ── */
.tg-section { padding: 5rem 2rem; max-width: 680px; margin: 0 auto; text-align: center; background: var(--bd-hero-grad); }
.tg-qr { width: 150px; height: 150px; object-fit: contain; border-radius: 8px; margin: 1.75rem auto; display: block; border: 1px solid var(--bd-border); }
.tg-handle { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 300; color: var(--bd-blue); }

/* ── CONTACT ── */
.contact-section { padding: 4rem 2rem 5rem; text-align: center; max-width: 500px; margin: 0 auto; }
.contact-line { font-size: 0.875rem; color: var(--bd-muted); margin: 0.5rem 0; }
.contact-line a { color: var(--bd-blue); text-decoration: none; border-bottom: 1px solid var(--bd-border-s); }
.contact-line a:hover { color: var(--bd-deep); }

/* ── NAV / BACK ── */
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.8rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--bd-blue); text-decoration: none; padding: 0.6rem 0; border-bottom: 1px solid var(--bd-border-s); }
.back-link:hover { color: var(--bd-deep); }
.nav-link { font-size: 11px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bd-blue); text-decoration: none; border-bottom: 1px solid var(--bd-border-s); }
.nav-link:hover { color: var(--bd-deep); }

/* ── FOOTER ── */
footer { border-top: 1px solid var(--bd-border); padding: 1.75rem; text-align: center; font-size: 10px; color: var(--bd-muted); letter-spacing: 0.08em; }

/* ── 9-STAGE ── */
.stage-row { display: grid; grid-template-columns: 48px 1fr; gap: 1.25rem; align-items: start; padding: 1.5rem 0; border-bottom: 1px solid var(--bd-border); }
.stage-row:last-child { border-bottom: none; }
.stage-num { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 300; color: var(--bd-light-txt); line-height: 1.2; text-align: center; }
.stage-title { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bd-navy); margin-bottom: 0.3rem; }
.stage-text { font-size: 0.875rem; font-weight: 300; color: var(--bd-muted); line-height: 1.75; }
.material-change { background: var(--bd-strip-bg); color: #fff; padding: 1.75rem 1.5rem; margin: 1.5rem 0; text-align: center; }
.material-change-title { font-family: 'Cormorant Garamond', serif; font-size: 1.5rem; font-weight: 300; margin-bottom: 0.35rem; }
.material-change-sub { font-size: 0.85rem; color: rgba(216,237,249,0.75); }

/* ── DEVICE CARDS ── */
.device-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1px; background: var(--bd-border); border: 1px solid var(--bd-border); margin-top: 2rem; }
.device-card { background: var(--bd-surface); padding: 2.5rem 2rem; text-align: center; transition: background 0.2s; }
.device-card:hover { background: var(--bd-card-hover); }
.device-name { font-family: 'Cormorant Garamond', serif; font-size: 1.8rem; font-weight: 300; color: var(--bd-navy); margin-bottom: 0.3rem; }
.device-tagline { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--bd-gold); margin-bottom: 1.25rem; }
.device-text { font-size: 0.875rem; color: var(--bd-muted); line-height: 1.75; }

/* ── RESPONSIVE ── */
@media (max-width: 700px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 460px) { .grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) { .strip-inner { flex-direction: column; text-align: center; } .hero { padding: 3.5rem 1.5rem 3rem; } }

/* Audience cards - dark mode fix */
.audience-card { background: var(--bd-surface) !important; }
.audience-card:hover { background: var(--bd-card-hover) !important; }

.cta-section .section-title { color: #fff; }
.cta-section .section-sub { color: rgba(216,237,249,0.9); }

/* truu.html page-hero dark mode */
.page-hero {
  background: var(--bd-hero-grad);
  padding: 4rem 2rem 3rem;
  text-align: center;
}
.page-hero-inner { max-width: 680px; margin: 0 auto; }
