/* ═══════════════════════════════════════════════
   Tiny Expeditions — Theme & Components
   Bootstrap 5.3.2 (CDN) handles grid, layout,
   utilities, and resets. This file provides the
   dark theme tokens, custom components & overrides.
   ═══════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────── */
:root {
  --bg-deep:        #080c14;
  --bg-dark:        #0d1321;
  --bg-card:        #131b2e;
  --bg-card-hover:  #1a2540;
  --border-subtle:  #1e2d4a;
  --accent:         #a855f7;
  --accent-glow:    rgba(168, 85, 247, .2);
  --accent-light:   #c084fc;
  --cyan:           #2dd4bf;
  --cyan-glow:      rgba(45, 212, 191, .15);
  --green:          #22c55e;
  --red:            #ef4444;
  --text-primary:   #e8edf5;
  --text-secondary: #8896b0;
  --text-muted:     #5a6a85;
}

/* ── Base ──────────────────────────────────── */
body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ── Navbar ────────────────────────────────── */
.navbar       { background: rgba(8, 12, 20, .9) !important; backdrop-filter: blur(20px); border-bottom: 1px solid var(--border-subtle); }
.navbar-brand { font-weight: 800; letter-spacing: 2px; font-size: 1rem; color: var(--cyan) !important; }
.nav-link     { color: var(--text-secondary) !important; font-weight: 500; font-size: .9rem; transition: color .2s; }
.nav-link:hover { color: var(--text-primary) !important; }

/* ── Buttons ───────────────────────────────── */
.btn-nav-cta, .btn-cta {
  background: var(--accent); color: #fff; font-weight: 700;
  border: none; border-radius: 6px; transition: background .2s, transform .15s;
}
.btn-nav-cta       { font-size: .85rem; padding: 8px 20px; }
.btn-cta           { font-size: 1.1rem; padding: 14px 40px; border-radius: 8px; display: inline-block; text-decoration: none; }
.btn-nav-cta:hover,
.btn-cta:hover     { background: #9333ea; color: #fff; transform: translateY(-2px); }

/* ── Hero ──────────────────────────────────── */
.hero { padding: 100px 0 80px; position: relative; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; top: -50%; left: 50%; transform: translateX(-50%);
  width: 800px; height: 800px;
  background: radial-gradient(circle, var(--cyan-glow), transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .3);
  color: var(--cyan); font-weight: 600; font-size: .8rem;
  padding: 6px 16px; border-radius: 20px;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 1.5rem;
}
.hero h1     { font-weight: 900; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.15; margin-bottom: 1.2rem; }
.highlight   { color: var(--cyan); }
.hero .lead  { color: var(--text-secondary); font-size: 1.15rem; max-width: 600px; margin: 0 auto 2rem; }
.hero-visual { max-width: 750px; margin: 3rem auto 0; }

/* ── Sections ──────────────────────────────── */
section           { padding: 80px 0; }
.section-dark     { background: var(--bg-dark); }
.section-deeper   { background: var(--bg-deep); }
.section-darker   { background: var(--bg-card); }
.section-label    { color: var(--cyan); font-weight: 700; font-size: .75rem; letter-spacing: 2px; text-transform: uppercase; margin-bottom: .8rem; }
.section-title    { font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: 1rem; }
.section-subtitle { color: var(--text-secondary); font-size: 1.05rem; max-width: 650px; }
/* Bootstrap text-body-secondary is unreadable on dark bg — remap to theme token */
.text-body-secondary { color: var(--text-secondary) !important; }

/* ── Cards (shared base for all card types) ── */
.feature-card, .pillar-card,
.community-card, .tech-stat {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  transition: transform .2s, border-color .3s;
}
.feature-card:hover,
.pillar-card:hover,
.community-card:hover { transform: translateY(-4px); border-color: rgba(45, 212, 191, .25); }

.feature-card   { padding: 32px 28px; height: 100%; }
.pillar-card    { padding: 36px 28px; text-align: center; height: 100%; }
.community-card { padding: 32px 24px; height: 100%; }
.tech-stat      { padding: 20px; text-align: center; }

.feature-card h4, .pillar-card h4,
.community-card h4 { font-weight: 700; font-size: 1.1rem; margin-bottom: .6rem; }
.feature-card p, .pillar-card p,
.community-card p  { color: var(--text-secondary); font-size: .92rem; }
.feature-card a    { color: var(--cyan); text-decoration: none; font-weight: 600; }
section p a        { color: var(--cyan); text-decoration: none; }
.pillar-card h4    { font-size: 1.15rem; margin-bottom: .8rem; }

/* Feature icon badges */
.feature-icon        { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1rem; }
.feature-icon-cyan   { background: rgba(45, 212, 191, .1);  color: var(--cyan); }
.feature-icon-orange { background: rgba(168, 85, 247, .1);  color: var(--accent); }
.feature-icon-purple { background: rgba(192, 132, 252, .1); color: var(--accent-light); }
.feature-icon-green  { background: rgba(34, 197, 94, .1);   color: var(--green); }

/* Step badges (experience walkthrough) */
.step-badge {
  width: 28px; height: 28px; line-height: 28px;
  border-radius: 50%; text-align: center;
  font-size: .85rem; font-weight: 700;
  background: rgba(45, 212, 191, .15);
  color: var(--cyan);
  border: 1px solid rgba(45, 212, 191, .3);
}
.step-text { color: var(--text-secondary); font-size: .88rem; margin-bottom: 0; }

/* Pillar list arrows */
.pillar-icon       { font-size: 2.2rem; margin-bottom: 1rem; }
.pillar-card ul    { list-style: none; padding: 0; margin-top: .8rem; text-align: left; }
.pillar-card ul li { color: var(--text-secondary); font-size: .88rem; padding: 4px 0 4px 20px; position: relative; }
.pillar-card ul li::before { content: '→'; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }

/* Community accent bars */
.community-icon           { font-size: 2rem; margin-bottom: .8rem; }
.community-accent         { margin: -32px -24px 20px; height: 3px; border-radius: 12px 12px 0 0; }
.community-accent-market  { border-top: 3px solid var(--accent); }
.community-accent-workshop{ border-top: 3px solid var(--green); }
.community-accent-assembly{ border-top: 3px solid var(--cyan); }
.community-accent-pantheon{ border-top: 3px solid var(--accent-light); }

/* Tech stats grid */
.tech-grid        { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; }
.tech-stat .value { font-weight: 800; font-size: 1.4rem; color: var(--cyan); line-height: 1.2; }
.tech-stat .label { color: var(--text-muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }

/* ── Scenario Walkthrough ──────────────────── */
.scenario-step {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 12px; padding: 28px 28px 28px 80px;
  position: relative; transition: border-color .3s, background .3s; margin-bottom: 1rem;
}
.scenario-step:hover { border-color: rgba(0, 212, 255, .3); background: var(--bg-card-hover); }
.step-number {
  position: absolute; left: 24px; top: 28px; width: 40px; height: 40px;
  background: rgba(45, 212, 191, .1); border: 1px solid rgba(45, 212, 191, .3);
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1rem; color: var(--cyan);
}
.step-title       { font-weight: 700; font-size: 1rem; margin-bottom: 6px; }
.step-narration   { color: var(--cyan); font-style: italic; font-weight: 500; margin-bottom: 4px; }
.step-description { color: var(--text-secondary); font-size: .92rem; margin: 0; }

/* LED dots */
.step-leds  { display: inline-flex; gap: 4px; margin-top: 8px; }
.led        { width: 10px; height: 10px; border-radius: 50%; animation: pulse-led 2s infinite; }
.led-blue   { background: var(--cyan);         box-shadow: 0 0 8px var(--cyan); }
.led-red    { background: var(--red);          box-shadow: 0 0 8px var(--red); }
.led-green  { background: var(--green);        box-shadow: 0 0 8px var(--green); }
.led-purple { background: var(--accent-light); box-shadow: 0 0 8px var(--accent-light); }
.led-orange { background: var(--accent);       box-shadow: 0 0 8px var(--accent); }
@keyframes pulse-led { 0%, 100% { opacity: 1; } 50% { opacity: .4; } }

/* ── Comparison Table ──────────────────────── */
.comparison-table { background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: 12px; overflow: hidden; }
.comparison-table th,
.comparison-table td            { padding: 10px 12px; border-bottom: 1px solid var(--border-subtle); font-size: .85rem; text-align: center; }
.comparison-table td:first-child,
.comparison-table thead th:first-child { text-align: left; white-space: nowrap; font-weight: 700; color: var(--text-primary); }
.comparison-table thead th      { background: rgba(45, 212, 191, .05); font-weight: 700; color: var(--text-primary); vertical-align: middle; }
.comparison-table tbody td      { color: var(--text-secondary); }
.comparison-table tbody tr:last-child td { border-bottom: none; }
.comparison-table .row-highlight    { background: rgba(45, 212, 191, .04); }
.comparison-table .row-highlight td { color: var(--text-primary); font-weight: 600; }
.comparison-table .check { color: var(--green); }
.comparison-table .cross { color: var(--text-muted); }
.table-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  font-size: .75rem; font-weight: 700;
  background: rgba(45, 212, 191, .15);
  color: var(--cyan);
  border: 1px solid rgba(45, 212, 191, .3);
}

/* ── Scaniverse Embed ──────────────────────── */
.scaniverse-container { border-radius: 16px; overflow: hidden; border: 1px solid var(--border-subtle); background: var(--bg-card); }
.scaniverse-container iframe { width: 100%; height: 450px; border: 0; }

/* ── CTA ───────────────────────────────────── */
.cta-section { padding: 80px 0; position: relative; }
.cta-section::before {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 600px; height: 600px;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
  pointer-events: none;
}
.cta-box {
  background: var(--bg-card); border: 1px solid var(--border-subtle);
  border-radius: 16px; padding: 48px 40px;
  max-width: 600px; margin: 0 auto; text-align: center; position: relative;
}
.cta-box h2     { font-weight: 800; font-size: 1.8rem; margin-bottom: 1rem; }
.cta-desc       { color: var(--text-secondary); font-size: 1rem; margin-bottom: 2rem; }
.cta-sub        { color: var(--text-muted); font-size: .82rem; margin-top: 1rem; }
.cta-perks      { text-align: left; max-width: 400px; margin: 0 auto 2rem; list-style: none; padding: 0; }
.cta-perks li   { color: var(--text-secondary); font-size: .92rem; padding: 4px 0 4px 24px; position: relative; }
.cta-perks li::before { content: '✓'; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.cta-perks-numbered { list-style: decimal; padding-left: 20px; color: var(--text-secondary); }

/* ── Footer ────────────────────────────────── */
footer   { background: var(--bg-dark); border-top: 1px solid var(--border-subtle); padding: 2rem 0; }
footer p { color: var(--text-muted); font-size: .82rem; margin: 0; }


/* ── Alert/Callout (info encarts for creators) */
.alert-info      { background: rgba(45, 212, 191, .08); border: 1px solid rgba(45, 212, 191, .25); border-radius: 8px; padding: 12px 16px; color: var(--text-secondary); font-size: .92rem; }
.alert-info strong { color: var(--cyan); }

/* ── Utilities ─────────────────────────────── */
.img-bordered   { border: 1px solid var(--border-subtle); border-radius: 12px; object-fit: cover; }
.lootbox-banner { background: linear-gradient(135deg, var(--bg-card), rgba(168, 85, 247, .08)); border-color: rgba(168, 85, 247, .2); }
.lootbox-label  { font-size: .75rem; color: var(--text-muted); margin-top: 4px; }

/* Universe cards — full-bleed image header */
.universe-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  height: 100%;
  transition: transform .2s, border-color .3s;
}
.universe-card:hover { transform: translateY(-4px); border-color: rgba(45, 212, 191, .25); }
.universe-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.universe-card-body { padding: 20px 24px 24px; }
.universe-card-body h4 { font-weight: 700; font-size: 1.1rem; margin-bottom: .5rem; }
.universe-card-body p  { color: var(--text-secondary); font-size: .92rem; margin-bottom: 0; }

/* ── Scroll Reveal ─────────────────────────── */
.reveal         { opacity: 0; transform: translateY(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  .hero          { padding: 70px 0 60px; }
  section        { padding: 60px 0; }
  .scenario-step { padding: 20px 20px 20px 65px; }
  .step-number   { left: 16px; top: 20px; width: 36px; height: 36px; font-size: .9rem; }
  .cta-box       { padding: 32px 24px; }
  .comparison-table th,
  .comparison-table td { padding: 10px 12px; font-size: .8rem; }
  .level-dot     { width: 40px; height: 40px; font-size: .7rem; }
  .level-desc    { font-size: .7rem; }
  .level-arrow   { display: none; }
}

/* ── Creator code snippet (creators.html) ── */
.creator-authors-row > [class*="col-"] { min-height: 0; }
.creator-code              { background: #0a0f1a; border-color: rgba(45, 212, 191, .15); padding: 20px; display: flex; height: 100%; min-height: 0; overflow: hidden; }
.creator-code pre          { color: var(--text-secondary); font-family: 'JetBrains Mono', 'Consolas', monospace; font-size: .82rem; line-height: 1.6; white-space: pre; word-break: normal; overflow-wrap: normal; flex: 1 1 auto; min-height: 0; margin: 0; }
.creator-code-scroll       { height: 100%; max-height: 100%; overflow-x: auto; overflow-y: auto; }
.creator-code-scroll::-webkit-scrollbar:horizontal { height: 0; }

@media (min-width: 992px) {
  .creator-authors-code-col {
    position: relative;
  }

  .creator-authors-code-col .creator-code {
    position: absolute;
    inset: 0;
  }
}
.creator-code .c-c         { color: var(--text-muted); }
.creator-code .c-k         { color: var(--cyan); font-weight: 700; }
.creator-code .c-s         { color: var(--accent-light); }

/* Creator section images — tall side-column coverage */
.creator-section-img {
  width: 100%; height: 100%; min-height: 420px;
  object-fit: cover; border-radius: 12px; display: block;
}

/* ── New components for restructured funnel (4-page site) ── */

/* Hero video wrapper */
.video-hero { animation: fadeInUp .8s ease-out .2s both; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Two-tier CTA cards */
.cta-tier-card { position: relative; padding-top: 32px; text-align: left; display: flex; flex-direction: column; }
.cta-tier-card h3 { color: var(--text-primary); margin-bottom: 4px; }
.cta-tier-card .cta-perks { padding-left: 0; list-style: none; margin-bottom: 24px; }
.cta-tier-card .cta-perks li { padding-left: 24px; position: relative; margin-bottom: 8px; color: var(--text-secondary); }
.cta-tier-card .cta-perks li::before {
  content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 700;
}
.cta-tier-label {
  position: absolute; top: 16px; right: 20px;
  font-size: .7rem; letter-spacing: 1.5px; font-weight: 700; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
  background: var(--bg-deep); color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}
.cta-tier-supporter {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--bg-card), rgba(168, 85, 247, .06));
}
.cta-tier-label-supporter {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cta-tier-supporter .btn-cta {
  background: #fff; color: var(--accent); font-weight: 700;
}
.cta-tier-supporter .btn-cta:hover {
  background: #f0f0f0; color: #9333ea;
}
.cta-tier-founding {
  border-color: var(--orange);
  background: linear-gradient(135deg, var(--bg-card), rgba(249, 115, 22, .07));
}
.cta-tier-label-founding {
  background: var(--orange); color: #fff; border-color: var(--orange);
}
.cta-tier-founding .cta-perks li::before {
  color: var(--orange);
}

/* Bootstrap accordion overrides for FAQ */
.accordion-flush .accordion-item { background: transparent; border-color: var(--border-subtle); }
.accordion-button {
  background: var(--bg-card) !important; color: var(--text-primary) !important;
  font-weight: 600; box-shadow: none !important;
}
.accordion-button:not(.collapsed) { color: var(--accent-light) !important; background: var(--bg-card-hover) !important; }
.accordion-button::after { filter: invert(1) brightness(0.8); }
.accordion-body { background: var(--bg-deep); color: var(--text-secondary); }
.accordion-body a { color: var(--cyan); }
