/* =========================
   GLOBAL CANVAS
========================= */

html,
body {
  background:
    radial-gradient(
      circle at 50% -20%,
      rgba(255, 255, 255, 0.04),
      rgba(0, 0, 0, 0.96) 55%
    ),
    linear-gradient(#050505, #050505);
  background-attachment: fixed;
}

.section {
  padding: var(--space-xl) var(--space-md);
  background: transparent;
}

/* =========================
   HERO
========================= */

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.85),
      rgba(0, 0, 0, 0.35),
      rgba(0, 0, 0, 0)
    );
}

.hero-content {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.hero-title {
  font-size: 3.1rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
  color: #ffffff;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 36px;
}

.warning-label {
  display: inline-block;
  font-size: 0.9rem;
  color: rgba(240, 198, 116, 0.9);
  border-left: 3px solid rgba(240, 198, 116, 0.6);
  padding-left: 14px;
  margin-bottom: 32px;
  text-align: left;
  max-width: 420px;
}

/* =========================
   CHART SECTIONS
========================= */

.chart-section {
  max-width: var(--content-width);
  margin: 0 auto;
  position: relative;
}

.chart-section::after {
  content: "";
  display: block;
  width: 48px;
  height: 1px;
  margin: 120px auto 0;
  background: rgba(255, 255, 255, 0.08);
}

.chart-header {
  max-width: 900px;
  margin: 0 auto 28px;
}

.chart-header h2 {
  font-size: 2rem;
  margin-bottom: 10px;
}

.chart-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* =========================
   CHART STAGE
========================= */

.chart-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 0;
}

.chart-image {
  width: 100%;
  max-width: 900px;
  border-radius: 8px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 24px 80px rgba(0, 0, 0, 0.65);
}

/* =========================
   POINTERS (CHART-BOUND)
========================= */

.pointer {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
  z-index: 3;
}

.pointer.left {
  left: -200px;
}

.pointer.right {
  right: -200px;
}

.pointer.active {
  opacity: 1;
}

/* Hide pointer on mobile */
@media (max-width: 900px) {
  .pointer {
    display: none;
  }
}

/* =========================
   ACTIVE CHART FEEDBACK
========================= */

.hero-chart {
  transform: scale(0.985);
  transition: transform 0.35s ease;
}

.hero-chart.is-active {
  transform: scale(1);
}

/* =========================
   FOOTER & END MESSAGE
========================= */

.footer-section {
  padding-bottom: var(--space-lg);
}

.footer-content {
  max-width: var(--content-width);
  margin: 0 auto;
  color: var(--text-secondary);
}

.footer-name {
  font-weight: 500;
  margin-bottom: var(--space-xs);
}

.end-message {
  opacity: 0;
  text-align: center;
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin: 160px auto 80px;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.end-message.visible {
  opacity: 1;
}

/* =========================
   AUDIO BUTTON
========================= */

.audio-unlock-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.9);
  padding: 12px 26px;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all 0.25s ease;
}

.audio-unlock-btn:hover {
  border-color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.06);
}

/* =========================
   DESCRIPTION TOGGLE
========================= */

.desc-toggle {
  margin: 24px auto 0;
  display: block;
  background: none;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  cursor: pointer;
}

.desc-toggle:hover {
  color: rgba(255,255,255,0.9);
}

.chart-description {
  max-width: 760px;
  margin: 16px auto 0;
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-secondary);
  display: none;
}

/* =========================
   CHART ZOOM
========================= */

.chart-image {
  cursor: zoom-in;
}

#zoom-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

#zoom-overlay img {
  max-width: 92%;
  max-height: 92%;
  border-radius: 8px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.9);
  cursor: zoom-out;
}

/* ===============================
   CLOSING SLIDE — PROBLEM / SOLUTION
   =============================== */

.summary-section {
  padding: 6rem 1.5rem 7rem;
  max-width: 1100px;
  margin: 0 auto;
}

.summary-header {
  text-align: center;
  margin-bottom: 3rem;
}

.summary-header h2 {
  font-size: clamp(1.6rem, 2.2vw, 2rem);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary, #eaeaea);
}

/* Core layout */
.summary-content {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3.5rem;
  align-items: center;
}

/* Visual block */
.summary-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.summary-image {
  max-width: 100%;
  max-height: 340px;
  object-fit: contain;
  opacity: 0.9;
  filter: grayscale(15%);
}

/* Text block */
.summary-text {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--text-secondary, #cfcfcf);
}

.summary-text p {
  margin-bottom: 1.25rem;
}

.summary-text p:last-child {
  margin-bottom: 0;
}

/* Subtle divider feel (not a hard line) */
.summary-section::before {
  content: "";
  display: block;
  height: 1px;
  width: 60%;
  margin: 0 auto 4rem;
  background: linear-gradient(
    to right,
    transparent,
    rgba(255,255,255,0.15),
    transparent
  );
}

/* Slight differentiation between problem and solution */
#simple-problem {
  opacity: 0.95;
}

#simple-solution {
  padding-top: 7rem;
}

/* Mobile refinement */
@media (max-width: 900px) {
  .summary-content {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    text-align: center;
  }

  .summary-text {
    font-size: 1rem;
  }

  .summary-image {
    max-height: 260px;
  }
}

/* === SUMMARY IMAGE SHOULD BEHAVE LIKE A CHART === */

.summary-content.single {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Make summary image behave like chart visuals */
.summary-chart {
  width: 90%;
  max-width: 1200px;   /* THIS is the key change */
  margin: 0 auto 2rem;
  display: flex;
  justify-content: center;
}

.summary-chart img {
  width: 90%;
  max-width: 1200px;
  height: auto;
  max-height: none !important; /* kills silent constraints */
  object-fit: contain;
}
/* Ensure toggle sits below image */
.summary-content.single .desc-toggle {
  margin: 0.5rem auto 0;
}

/* Description spacing */
.summary-content.single .chart-description {
  margin-top: 0.75rem;
  max-width: 720px;
  text-align: center;
}

/* ===============================
   END OF BRIEFING — FINAL SLIDE
   =============================== */

.end-section {
  min-height: 100vh;              /* fills screen */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;

  background: radial-gradient(
    circle at center,
    rgba(0, 0, 0, 0.04),
    rgba(0,0,0,0.9)
  );
}

.end-content {
  max-width: 640px;
  padding: 2rem;
}

.end-content h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #ffffff;
}

.end-summary {
  font-size: 1.1rem;
  color: #cccccc;
  margin-bottom: 0.75rem;
}

.restart-hint {
  font-size: 0.95rem;
  color: #999999;
  opacity: 0.9;
}

/* ===============================
   FOOTER — UNIVERSAL DASHBOARD
   =============================== */

.footer-section {
  padding: 3rem 1.5rem 2.5rem;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.95),
    rgba(0,0,0,0.75)
  );
}

.footer-dashboard {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  align-items: center;
}

/* Navigation row */
.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-link {
  font-size: 0.95rem;
  color: #cfcfcf;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.footer-link:hover {
  color: #ffffff;
  opacity: 0.9;
}

/* Legal line */
.footer-legal {
  font-size: 0.8rem;
  color: #8a8a8a;
  letter-spacing: 0.03em;
  text-align: center;
}

/* Mobile tightening */
@media (max-width: 600px) {
  .footer-nav {
    gap: 1.2rem;
  }
}


.colab-cta {
  margin: 3rem auto 0;
  padding: 1.6rem;
  max-width: 720px;
  text-align: center;
}

.colab-note {
  font-size: 0.95rem;
  opacity: 0.75;
  margin-bottom: 1rem;
}

.colab-button {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(135deg, #00c38a, #007cf0);
  box-shadow: 0 10px 28px rgba(0,0,0,0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.colab-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0,0,0,0.35);
}





/* --- CRITICAL FIXES --- */
/* Forces the title container to show the hint even if there is a 'reveal' animation */
.hero-title, 
.hero-title.reveal { 
  overflow: visible !important; 
  z-index: 10;
  opacity: 1 !important; /* Ensures the container itself isn't hidden */
}

.context-wrapper {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  position: relative;
  z-index: 20; 
}

/* --- THE HINT STYLES --- */
.context-button {
  position: relative;
  top: -5.1px; /* Keeping your specific position */
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.context-hint {
  position: absolute;
  right: 45px; /* Keeping your specific position */
  top: 45%;
  transform: translateY(-50%);
  font-weight: 700;
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  pointer-events: none;
  z-index: 9999;
  font-family: sans-serif;
  letter-spacing: 1px;

  opacity: 0;
  visibility: hidden; 
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

/* The toggle class used by JS for Auto-show, Heartbeat, and Clicks */
.context-hint.visible {
  opacity: 1 !important;
  visibility: visible !important;
  /* Apply heartbeat animation */
  animation: heartbeat 2s ease-in-out infinite;
}

/* Stop heartbeat when hovering */
.context-hint.visible:hover {
  animation: none;
  opacity: 0.8 !important;
}

/* --- BUTTON VISUALS --- */
.context-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.8px solid rgba(255, 255, 255, 0.6);
}

.context-bulb {
  display: block;
  width: 20px;
  height: 20px;
  margin: 10px auto;
  background-color: white;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 21h6v-1H9v1zm3-20C7.935 1 5 3.935 5 7c0 2.386 1.51 4.417 3.5 5.245V16c0 .552.448 1 1 1h5c.552 0 1-.448 1-1v-3.755C17.49 11.417 19 9.386 19 7c0-3.065-2.935-6-7-6z'/%3E%3C/svg%3E") center/contain no-repeat;
}


/* --- CONTEXT NOTE STYLES --- */
.context-note {
  position: absolute;
  top: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.9);
  color: white;
  padding: 40px;
  border-radius: 8px;
  width: 700px;
  max-width: 90vw;
  z-index: 10000;
  display: none;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  letter-spacing: 1px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.context-note p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
}

/* --- HEARTBEAT EFFECT for hint --- */
@keyframes heartbeat {
  0% {
    opacity: 0.7;
    transform: translateY(-50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.05);
  }
  100% {
    opacity: 0.7;
    transform: translateY(-50%) scale(1);
  }
}

.context-hint.visible {
  opacity: 1 !important;
  visibility: visible !important;
  animation: heartbeat 1.5s infinite ease-in-out;
}