/* ============================================================================
   PONGO — comic-storybook diorama theme
   ============================================================================ */

:root {
  --forest: #1f3d2b;
  --forest-dark: #0f2016;
  --forest-mid: #2c4f38;
  --cream: #f7efdb;
  --cream-2: #efe3c4;
  --mustard: #eab420;
  --mustard-dark: #b9860f;
  --terracotta: #d9713f;
  --sky: #8fc4e3;
  --ink: #12201a;
  --paper-shadow: rgba(18, 32, 26, 0.55);
  --comic-border: 3px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Baloo 2", "Nunito", system-ui, sans-serif;
  background: var(--forest-dark);
  color: var(--cream);
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

.font-body { font-family: "Nunito", system-ui, sans-serif; }

h1, h2, h3, h4, .font-comic { font-family: "Baloo 2", "Nunito", sans-serif; }

::selection { background: var(--mustard); color: var(--ink); }

/* ---------------------------------------------------------------------- */
/* Comic outlined heading text                                            */
/* ---------------------------------------------------------------------- */
.comic-title {
  font-weight: 800;
  color: var(--cream);
  -webkit-text-stroke: 1.25px var(--ink);
  paint-order: stroke fill;
  text-shadow: 3px 3px 0 var(--ink);
  letter-spacing: 0.5px;
  line-height: 1.15;
}

.comic-title--mustard {
  color: var(--mustard);
  -webkit-text-stroke: 1.75px var(--ink);
}

/* Hero-scale headings can carry a heavier stroke without the fill/stroke
   merging into illegible blobs the way it does at body-heading sizes. */
.comic-title--hero {
  -webkit-text-stroke: 2.5px var(--ink);
  text-shadow: 4px 4px 0 var(--ink), 7px 7px 0 rgba(18, 32, 26, 0.35);
}

/* Small headings (~20px, e.g. step-card titles) need an even lighter
   stroke — at that size a 1.25px stroke still swallows the fill. */
.comic-title--sm {
  -webkit-text-stroke: 0.6px var(--ink);
  text-shadow: 1.5px 1.5px 0 var(--ink);
}

/* ---------------------------------------------------------------------- */
/* Halftone dot texture                                                   */
/* ---------------------------------------------------------------------- */
.halftone {
  position: relative;
}
.halftone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(247, 239, 219, 0.55) 1.4px, transparent 1.6px);
  background-size: 13px 13px;
  opacity: 0.15;
  mix-blend-mode: overlay;
}

/* ---------------------------------------------------------------------- */
/* Jagged torn-paper dividers between sections                            */
/* ---------------------------------------------------------------------- */
.jagged-top,
.jagged-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  height: 34px;
  z-index: 5;
  pointer-events: none;
}
.jagged-top { top: -1px; }
.jagged-bottom { bottom: -1px; transform: scaleY(-1); }

/* ---------------------------------------------------------------------- */
/* Sticker badges (rotated pill, hard comic shadow)                       */
/* ---------------------------------------------------------------------- */
.sticker {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  padding: 0.4em 0.9em;
  background: var(--cream);
  color: var(--ink);
  border: var(--comic-border) solid var(--ink);
  border-radius: 999px;
  font-weight: 800;
  box-shadow: 4px 4px 0 var(--ink);
  transform: rotate(-3deg);
  white-space: nowrap;
}
.sticker--mustard { background: var(--mustard); }
.sticker--sky { background: var(--sky); }
.sticker--rot2 { transform: rotate(2.5deg); }
.sticker--rot-4 { transform: rotate(-4deg); }

/* ---------------------------------------------------------------------- */
/* Comic buttons — press-down interaction                                 */
/* ---------------------------------------------------------------------- */
.btn-comic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.85em 1.6em;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 14px;
  border: var(--comic-border) solid var(--ink);
  box-shadow: 5px 5px 0 var(--ink);
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  color: var(--ink);
}
.btn-comic:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--ink); }
.btn-comic:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }

.btn-comic--primary { background: var(--mustard); }
.btn-comic--secondary { background: var(--cream); }
.btn-comic--ghost { background: transparent; color: var(--cream); border-color: var(--cream); box-shadow: 5px 5px 0 rgba(247,239,219,0.35); }
.btn-comic--ghost:hover { box-shadow: 7px 7px 0 rgba(247,239,219,0.35); }
.btn-comic--sm { padding: 0.55em 1.05em; font-size: 0.9rem; border-radius: 10px; box-shadow: 3px 3px 0 var(--ink); }
.btn-comic--sm:hover { box-shadow: 4px 4px 0 var(--ink); transform: translate(-1px,-1px); }
.btn-comic--sm:active { box-shadow: 1px 1px 0 var(--ink); transform: translate(2px,2px); }

.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: var(--cream);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 1.15rem;
}
.icon-circle:hover { transform: translate(-2px, -2px) rotate(-6deg); box-shadow: 5px 5px 0 var(--ink); }

/* ---------------------------------------------------------------------- */
/* Diorama frame — the "perspective pop-up book" panel                    */
/* ---------------------------------------------------------------------- */
.diorama {
  perspective: 1800px;
}
.diorama-panel {
  transform: rotateY(-7deg) rotateX(2deg);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(.2,.7,.3,1);
  background: var(--cream);
  color: var(--ink);
  border: var(--comic-border) solid var(--ink);
  border-radius: 20px;
  box-shadow:
    10px 10px 0 var(--ink),
    16px 16px 24px rgba(0,0,0,0.35);
}
.diorama:hover .diorama-panel,
.diorama-panel:focus-within {
  transform: rotateY(0deg) rotateX(0deg);
}
.diorama-panel--right { transform: rotateY(7deg) rotateX(2deg); }
.diorama:hover .diorama-panel--right { transform: rotateY(0deg) rotateX(0deg); }

@media (max-width: 900px) {
  .diorama-panel,
  .diorama-panel--right { transform: none; box-shadow: 7px 7px 0 var(--ink); }
}

/* ---------------------------------------------------------------------- */
/* Section background images                                              */
/* ---------------------------------------------------------------------- */
.section-bg {
  position: relative;
  background-position: center;
  background-size: cover;
  background-attachment: fixed;
  isolation: isolate;
}
@media (max-width: 820px) {
  .section-bg { background-attachment: scroll; }
}
.section-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

#hero.section-bg { background-image: url("hero.png"); }
#hero.section-bg::before {
  background: linear-gradient(180deg, rgba(9,17,13,0.55) 0%, rgba(9,17,13,0.72) 55%, var(--forest-dark) 100%);
}

#about.section-bg { background-image: url("about.png"); }
#about.section-bg::before {
  background: linear-gradient(180deg, var(--forest-dark) 0%, rgba(9,20,15,0.55) 14%, rgba(9,20,15,0.62) 86%, var(--forest-dark) 100%);
}

#howtobuy.section-bg { background-image: url("howtobuy.png"); }
#howtobuy.section-bg::before {
  background: linear-gradient(180deg, var(--forest-dark) 0%, rgba(24,15,7,0.62) 16%, rgba(24,15,7,0.68) 84%, var(--forest-dark) 100%);
}

#chart.section-bg { background-image: url("background.png"); }
#chart.section-bg::before {
  background: linear-gradient(180deg, var(--forest-dark) 0%, rgba(10,20,14,0.75) 16%, rgba(10,20,14,0.8) 84%, var(--forest-dark) 100%);
}

#joinus.section-bg { background-image: url("banner.png"); background-position: center 35%; }
#joinus.section-bg::before {
  background: linear-gradient(180deg, var(--forest-dark) 0%, rgba(10,20,14,0.35) 18%, rgba(9,17,13,0.55) 60%, var(--forest-dark) 100%);
}

body { background-image: url("background.png"); background-size: cover; background-position: center; background-attachment: fixed; }
body > .bg-veil { position: fixed; inset: 0; background: var(--forest-dark); opacity: 0.94; z-index: -1; }

.section-inner { position: relative; z-index: 2; }

/* ---------------------------------------------------------------------- */
/* Nav                                                                    */
/* ---------------------------------------------------------------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 32, 22, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--ink);
  transition: box-shadow 0.2s ease, background 0.2s ease;
}
.site-nav--scrolled { box-shadow: 0 6px 0 rgba(0,0,0,0.15); background: rgba(12, 26, 18, 0.96); }

.nav-link {
  position: relative;
  font-weight: 700;
  color: var(--cream);
  text-decoration: none;
  padding: 0.3em 0.1em;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -3px;
  height: 3px;
  background: var(--mustard);
  transition: right 0.25s ease;
  border-radius: 3px;
}
.nav-link:hover::after,
.nav-link--active::after { right: 0; }
.nav-link--active { color: var(--mustard); }

#navMenu {
  transition: max-height 0.3s ease;
}
@media (max-width: 900px) {
  #navMenu:not(.nav-open) { display: none; }
}

/* ---------------------------------------------------------------------- */
/* Marquee ticker strip                                                   */
/* ---------------------------------------------------------------------- */
.ticker {
  background: var(--mustard);
  color: var(--ink);
  border-bottom: 3px solid var(--ink);
  overflow: hidden;
  white-space: nowrap;
  font-weight: 800;
  font-family: "Baloo 2", sans-serif;
}
.ticker-track {
  display: inline-block;
  padding-left: 100%;
  animation: ticker-scroll 26s linear infinite;
}
.ticker-track span { margin: 0 1.4em; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-100%); }
}

/* ---------------------------------------------------------------------- */
/* Speech bubble                                                          */
/* ---------------------------------------------------------------------- */
.speech-bubble {
  position: relative;
  background: var(--cream);
  color: var(--ink);
  border: var(--comic-border) solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.2em 1.4em;
}
.speech-bubble::after {
  content: "";
  position: absolute;
  left: 2.2em;
  bottom: -1.35em;
  width: 0; height: 0;
  border: 1em solid transparent;
  border-top-color: var(--ink);
  border-bottom: 0;
}
.speech-bubble::before {
  content: "";
  position: absolute;
  left: 2.42em;
  bottom: -0.95em;
  width: 0; height: 0;
  border: 0.78em solid transparent;
  border-top-color: var(--cream);
  border-bottom: 0;
  z-index: 1;
}

/* ---------------------------------------------------------------------- */
/* Step numbers (how to buy)                                              */
/* ---------------------------------------------------------------------- */
.step-badge {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 50%;
  background: var(--forest);
  color: var(--mustard);
  border: 3px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Baloo 2", sans-serif;
  font-weight: 800;
  font-size: 1.4rem;
  box-shadow: 4px 4px 0 var(--ink);
  flex-shrink: 0;
}

/* ---------------------------------------------------------------------- */
/* CA / pair patch box                                                    */
/* ---------------------------------------------------------------------- */
.code-pill {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  background: var(--forest-dark);
  color: var(--mustard);
  border: 2px solid var(--ink);
  border-radius: 10px;
  padding: 0.55em 0.8em;
  font-size: 0.92rem;
  word-break: break-all;
}

/* ---------------------------------------------------------------------- */
/* Reveal on scroll                                                       */
/* ---------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal-delay-1.in-view { transition-delay: 0.08s; }
.reveal-delay-2.in-view { transition-delay: 0.16s; }
.reveal-delay-3.in-view { transition-delay: 0.24s; }

/* ---------------------------------------------------------------------- */
/* Chart TV frame                                                         */
/* ---------------------------------------------------------------------- */
.tv-frame {
  background: linear-gradient(155deg, #2c4f38, #12261a);
  border: var(--comic-border) solid var(--ink);
  border-radius: 26px;
  padding: 1.1rem;
  box-shadow: 12px 12px 0 var(--ink);
}
.tv-screen {
  background: #0b1710;
  border-radius: 14px;
  border: 3px solid var(--ink);
  overflow: hidden;
}
.tv-knob {
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--mustard); border: 2px solid var(--ink);
}

/* ---------------------------------------------------------------------- */
/* Flat comic card (grid items — no 3D tilt)                              */
/* ---------------------------------------------------------------------- */
.comic-card {
  background: var(--cream);
  color: var(--ink);
  border: var(--comic-border) solid var(--ink);
  border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink);
  padding: 1.7rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.comic-card:hover { transform: translate(-3px, -3px); box-shadow: 9px 9px 0 var(--ink); }

/* ---------------------------------------------------------------------- */
/* Torn-paper zigzag divider between sections                             */
/* ---------------------------------------------------------------------- */
.divider {
  position: relative;
  height: 34px;
  z-index: 6;
}
.divider svg { width: 100%; height: 100%; display: block; }
.divider-flip { transform: scaleY(-1); }
.divider-icons {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 1.1rem;
  color: var(--ink);
  opacity: 0.55;
  pointer-events: none;
}

/* misc */
.rotate-1 { transform: rotate(1.5deg); }
.rotate-n1 { transform: rotate(-1.5deg); }
.rotate-2 { transform: rotate(2.5deg); }
.rotate-n2 { transform: rotate(-2.5deg); }

.text-outline-thin { -webkit-text-stroke: 1px var(--ink); }

.scroll-cue {
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
