/* combined-mobile.css
   Combines variables.css + base.css + animations.css
   Adds mobile-friendly overrides. Does NOT modify layout.css.
*/

/* =========================
   VARIABLES (from variables.css)
========================= */
:root {
  /* Colors */
  --bg-main: #0e0e0e;
  --bg-section: #0e0e0e;
  --text-primary: #f5f5f5;
  --text-secondary: #b3b3b3;
  --text-muted: #777;

  /* Accent */
  --accent-warning: #f0c674;

  /* Typography */
  --font-main: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  /* Spacing */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 32px;
  --space-lg: 64px;
  --space-xl: 120px;

  /* Layout */
  --content-width: 980px;
}

/* =========================
   BASE (from base.css, without the duplicate reveal block)
========================= */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-main);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--text-primary);
  text-decoration: none;
}

a:hover {
  opacity: 0.8;
}

/* =========================
   ANIMATIONS (merged, prefer single reveal implementation)
========================= */
.reveal {
  opacity: 0;
  transform: translateY(10px);
  animation: revealIn 0.8s ease forwards;
}

.reveal.delay-1 { animation-delay: 0.15s; }
.reveal.delay-2 { animation-delay: 0.3s; }
.reveal.delay-3 { animation-delay: 0.45s; }

@keyframes revealIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   MOBILE-FRIENDLY OVERRIDES
   These overrides aim to make the site usable on phones/tablets
   without modifying the original layout.css.
========================= */

/* Tighter defaults for narrower screens */
@media (max-width: 900px) {
  :root {
    --space-md: 20px;
    --space-lg: 40px;
    --space-xl: 48px;
    --content-width: 92%;
  }

  body {
    font-size: 15px;
  }

  /* Hero adjustments */
  .hero-title {
    font-size: 2.2rem;
    margin-bottom: 12px;
  }

  .hero-subtitle {
    font-size: 0.95rem;
    margin-bottom: 20px;
  }

  .warning-label {
    max-width: 320px;
    padding-left: 10px;
  }

  /* Chart/image behavior */
  .chart-stage {
    padding: 16px 0;
  }

  .chart-image {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    cursor: auto; /* disable zoom cursor if desired */
  }

  /* Hide off-canvas pointers on mobile (keeps layout.css rule in place) */
  .pointer { display: none !important; }

  /* Summary layout: fall back to single-column if layout.css not applied */
  .summary-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .summary-image {
    max-height: 260px;
    margin: 0 auto;
  }

  /* Footer tightening */
  .footer-dashboard { gap: 1rem; }
}

/* Smaller phones */
@media (max-width: 600px) {
  :root {
    --space-md: 16px;
    --space-lg: 32px;
  }

  body {
    font-size: 14px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }

  .section {
    padding: var(--space-lg) var(--space-sm);
  }

  .summary-image {
    max-height: 220px;
  }

  /* Ensure interactive controls are comfortably tappable */
  .audio-unlock-btn, .desc-toggle {
    padding: 12px 18px;
    font-size: 0.95rem;
  }
}

/* Utility: make images inside summary-chart scale nicely on small screens */
@media (max-width: 900px) {
  .summary-chart img {
    width: 100%;
    max-width: 100%;
    height: auto;
  }
}

/* Optional accessibility improvement: increase hit target sizes on mobile */
@media (hover: none) and (pointer: coarse) {
  a, button {
    touch-action: manipulation;
  }
}

/* ========================= */
/* 📱 MOBILE INTERACTION FIX */
/* ========================= */
@media (max-width: 768px) {

  /* Stack bulb ABOVE the title */
  .hero-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .context-wrapper {
    order: -1; /* move bulb to top */
  }

  /* Hint sits BELOW bulb, not sideways */
  .context-hint {
    position: absolute;
    left: 50%;
    right: auto;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    font-size: 0.85rem;
    text-align: center;
    white-space: nowrap;
  }

  /* Context note becomes inline panel, NOT overlay */
  .context-note {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    max-width: 100%;
    margin-top: 16px;
    padding: 18px;
    z-index: 5; /* BELOW button */
  }
}

/* ========================= */
/* 📱 MOBILE BUTTON SAFE ZONE */
/* ========================= */
@media (max-width: 768px) {

  /* Ensure hero content stacks naturally */
  .hero-content {
    position: relative;
  }

  /* Reserve space above the button */
  .start-briefing {
   
    position: relative;
    z-index: 5;              /* Button always above */
    margin-top: 160px;       /* Space for context box */
  }

   

  /* Context can overlap title, but stays above button space */
  .context-note {
    z-index: 3;
  }
}

@media (max-width: 768px) {

  /* Context should not block clicks outside itself */
  .context-note {
    pointer-events: auto;
    margin-top: 40px;
    
  }

 .context-hint {
  margin-left: -64px;
  margin-top: 45px;
} 

  .start-briefing {
    pointer-events: auto;
    margin-top: 40px;
  }
}


