/* =========================================================
   ICEMAN FESTIVAL — Africa's Coldest Under 18 Festival
   Shared theme stylesheet
   ========================================================= */

:root {
  --ice-deep: #061826;
  --ice-navy: #0c2e4e;
  --ice-blue: #1b6fb3;
  --ice-bright: #46b4ff;
  --ice-cyan: #8fe3ff;
  --ice-white: #eaf6ff;
  --frost: #cfe9fb;
  --glow: #5ec8ff;
  --paper: #f4fbff;
  --ink: #07202f;
  --radius: 18px;
  --maxw: 1240px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Anton", "Arial Black", sans-serif;
  --font-body: "Sora", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: #03101c;
  color: var(--ice-white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  cursor: none;
}
/* readability scrim above the live shader, below content */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(3,16,28,.25), rgba(3,16,28,.55));
}

@media (max-width: 820px) { body { cursor: auto; } }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.wrap { width: min(var(--maxw), 92vw); margin-inline: auto; }

/* ---------- Custom frost cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;
  transform: translate(-50%, -50%); border-radius: 50%; mix-blend-mode: screen;
}
.cursor-dot { width: 8px; height: 8px; background: var(--ice-cyan); box-shadow: 0 0 12px var(--glow); }
.cursor-ring {
  width: 40px; height: 40px; border: 1.5px solid rgba(143,227,255,.6);
  transition: width .25s var(--ease), height .25s var(--ease), border-color .25s;
}
.cursor-ring.hot { width: 64px; height: 64px; border-color: var(--ice-bright); }
@media (max-width: 820px) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Snow canvas ---------- */
#snow {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
}

/* ---------- Preloader ---------- */
#preloader {
  position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center;
  background: linear-gradient(180deg, #041220, #08263f);
  transition: opacity .8s var(--ease), visibility .8s;
}
#preloader.done { opacity: 0; visibility: hidden; }
.pre-logo {
  font-family: var(--font-display); font-size: clamp(3rem, 12vw, 9rem); letter-spacing: 4px;
  background: linear-gradient(180deg, #ffffff 0%, #bfe8ff 40%, #2c86c4 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  position: relative;
}
.pre-bar { width: min(320px, 70vw); height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); margin-top: 26px; overflow: hidden; }
.pre-bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ice-bright), var(--ice-cyan)); box-shadow: 0 0 16px var(--glow); border-radius: 99px; animation: fillbar 2.4s var(--ease) forwards; }
.pre-status { margin-top: 14px; font-size: .75rem; letter-spacing: 5px; text-transform: uppercase; color: var(--frost); opacity: .8; }
@keyframes fillbar { to { width: 100%; } }

/* ---------- Navbar ---------- */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 48px);
  transition: background .4s var(--ease), padding .4s var(--ease), backdrop-filter .4s;
}
header.nav.scrolled {
  background: rgba(6, 24, 38, .72); backdrop-filter: blur(14px);
  padding-top: 12px; padding-bottom: 12px;
  border-bottom: 1px solid rgba(143,227,255,.15);
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); letter-spacing: 2px; font-size: 1.5rem; }
.brand .flake { color: var(--ice-bright); filter: drop-shadow(0 0 8px var(--glow)); animation: spin 9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
nav.links { display: flex; gap: 6px; align-items: center; }
nav.links a {
  position: relative; padding: 10px 16px; font-size: .82rem; letter-spacing: 2px; text-transform: uppercase;
  color: var(--frost); border-radius: 99px; transition: color .25s, background .25s;
}
nav.links a::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 6px; height: 2px;
  background: linear-gradient(90deg, var(--ice-bright), var(--ice-cyan)); transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease); border-radius: 2px;
}
nav.links a:hover { color: #fff; }
nav.links a:hover::after, nav.links a.active::after { transform: scaleX(1); }
nav.links a.active { color: #fff; }

.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: none;
  padding: 13px 26px; border-radius: 99px; border: none; font-family: var(--font-body); font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase; font-size: .8rem; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ice-bright), #2c86c4); color: #04121f;
  box-shadow: 0 8px 30px rgba(70,180,255,.35); transition: transform .3s var(--ease), box-shadow .3s;
}
.btn:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 14px 40px rgba(70,180,255,.55); }
.btn.ghost { background: transparent; color: var(--ice-white); border: 1.5px solid rgba(143,227,255,.4); box-shadow: none; }
.btn.ghost:hover { border-color: var(--ice-bright); background: rgba(70,180,255,.08); }
.btn .shine { position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(120deg, transparent, rgba(255,255,255,.6), transparent); transform: skewX(-20deg); animation: shine 3.5s infinite; }
@keyframes shine { 0%,60% { left: -120%; } 100% { left: 160%; } }

.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.6rem; cursor: none; }
@media (max-width: 920px) {
  nav.links { position: fixed; inset: 0 0 0 auto; width: min(320px, 80vw); flex-direction: column; justify-content: center; gap: 18px;
    background: rgba(5,20,33,.96); backdrop-filter: blur(18px); transform: translateX(100%); transition: transform .45s var(--ease); padding: 40px; }
  nav.links.open { transform: translateX(0); }
  nav.links a { font-size: 1rem; }
  .nav-toggle { display: block; z-index: 210; }
}

/* ---------- Section scaffolding ---------- */
section { position: relative; z-index: 2; padding: clamp(70px, 11vh, 140px) 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .72rem; letter-spacing: 5px; text-transform: uppercase; color: var(--ice-bright); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 30px; height: 1px; background: var(--ice-bright); }
h1, h2, h3 { line-height: .98; font-weight: 800; }
.display { font-family: var(--font-display); font-weight: 400; letter-spacing: 1px; text-transform: uppercase; }
.section-title { font-family: var(--font-display); font-size: clamp(2.4rem, 6.5vw, 5.5rem); letter-spacing: 1px; text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff, #bfe6ff 55%, #4ea3df); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--frost); font-size: clamp(1rem, 1.4vw, 1.15rem); max-width: 60ch; line-height: 1.7; opacity: .9; }

/* ---------- Frosted glass cards ---------- */
.glass {
  background: linear-gradient(160deg, rgba(143,227,255,.10), rgba(12,46,78,.18));
  border: 1px solid rgba(143,227,255,.18); border-radius: var(--radius);
  backdrop-filter: blur(10px); box-shadow: 0 20px 60px rgba(3,16,28,.45);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .1s; } .reveal.d2 { transition-delay: .2s; } .reveal.d3 { transition-delay: .3s; } .reveal.d4 { transition-delay: .4s; }

/* ---------- Drip divider (melting) ---------- */
.drip { position: relative; height: 0; z-index: 5; }
.drip svg { position: absolute; top: -2px; left: 0; width: 100%; height: 90px; display: block; }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; border-top: 1px solid rgba(143,227,255,.18); border-bottom: 1px solid rgba(143,227,255,.18); padding: 16px 0; background: rgba(7,28,46,.4); }
.marquee .track { display: flex; gap: 40px; white-space: nowrap; width: max-content; animation: scrollx 26s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2.2rem); letter-spacing: 2px; color: transparent; -webkit-text-stroke: 1px rgba(143,227,255,.55); text-transform: uppercase; }
.marquee span.solid { color: var(--ice-bright); -webkit-text-stroke: 0; }
@keyframes scrollx { to { transform: translateX(-50%); } }

/* ---------- Footer ---------- */
footer.site {
  position: relative; z-index: 2; padding: 70px 0 40px; border-top: 1px solid rgba(143,227,255,.15);
  background: linear-gradient(180deg, transparent, rgba(4,16,28,.7));
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-grid h4 { font-size: .8rem; letter-spacing: 3px; text-transform: uppercase; color: var(--ice-bright); margin-bottom: 16px; }
.foot-grid a { display: block; color: var(--frost); padding: 6px 0; opacity: .85; transition: color .25s, transform .25s; }
.foot-grid a:hover { color: #fff; transform: translateX(5px); }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 14px; margin-top: 46px; padding-top: 24px; border-top: 1px solid rgba(143,227,255,.12); font-size: .78rem; color: var(--frost); opacity: .7; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }

/* newsletter band */
.foot-cta { border-bottom: 1px solid rgba(143,227,255,.14); padding-bottom: 44px; margin-bottom: 44px; }
.foot-cta-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; align-items: center; }
.foot-big { font-size: clamp(2rem, 5vw, 3.4rem); text-transform: uppercase; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff, #46b4ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.news { display: flex; gap: 10px; }
.news input { flex: 1; padding: 16px 18px; border-radius: 14px; border: 1px solid rgba(143,227,255,.25); background: rgba(7,28,46,.55); color: #fff; font-family: var(--font-body); font-size: .95rem; transition: border-color .25s, box-shadow .25s; }
.news input:focus { outline: none; border-color: var(--ice-bright); box-shadow: 0 0 0 3px rgba(70,180,255,.18); }
.news.ok input { border-color: #2ee6a6; }
.socials { display: flex; gap: 12px; margin-top: 20px; }
.socials a { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.2rem;
  background: rgba(143,227,255,.08); border: 1px solid rgba(143,227,255,.22); transition: transform .25s var(--ease), background .25s, border-color .25s; }
.socials a:hover { transform: translateY(-4px); background: rgba(70,180,255,.2); border-color: var(--ice-bright); }
@media (max-width: 760px) { .foot-cta-grid { grid-template-columns: 1fr; } .news { flex-direction: column; } }

/* ---------- Music toggle ---------- */
.music-toggle {
  position: fixed; bottom: 22px; right: 22px; z-index: 300; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; cursor: none; border: 1px solid rgba(143,227,255,.4);
  background: rgba(6,24,38,.7); backdrop-filter: blur(10px); box-shadow: 0 8px 26px rgba(3,16,28,.5);
}
.music-toggle .bars { display: flex; gap: 3px; align-items: flex-end; height: 20px; }
.music-toggle .bars i { width: 3px; height: 6px; background: var(--ice-bright); border-radius: 2px; }
.music-toggle.playing .bars i { animation: eq .9s ease-in-out infinite; }
.music-toggle .bars i:nth-child(2){ animation-delay:.15s } .music-toggle .bars i:nth-child(3){ animation-delay:.3s } .music-toggle .bars i:nth-child(4){ animation-delay:.45s }
@keyframes eq { 0%,100%{ height:5px } 50%{ height:20px } }

/* ---------- Freeze meter (scroll temp) ---------- */
.freeze-meter {
  position: fixed; top: 50%; left: 16px; transform: translateY(-50%); z-index: 180;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.freeze-meter .tube { width: 8px; height: 180px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; position: relative; }
.freeze-meter .tube i { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(180deg, var(--ice-cyan), var(--ice-bright)); border-radius: 99px; height: 10%; transition: height .2s linear; }
.freeze-meter .temp { font-family: var(--font-display); font-size: 1rem; color: var(--ice-cyan); }
.freeze-meter .lbl { writing-mode: vertical-rl; font-size: .6rem; letter-spacing: 3px; text-transform: uppercase; color: var(--frost); opacity: .6; }
@media (max-width: 1100px) { .freeze-meter { display: none; } }

/* ---------- Chips / badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 12px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 99px; font-size: .78rem; letter-spacing: 1px; text-transform: uppercase;
  background: rgba(143,227,255,.08); border: 1px solid rgba(143,227,255,.22); color: var(--frost); }
.chip b { color: var(--ice-bright); }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-s { margin-top: 18px; } .mt-m { margin-top: 30px; } .mt-l { margin-top: 50px; }
.row { display: flex; gap: 16px; flex-wrap: wrap; }
.spark { color: var(--ice-bright); }

::selection { background: var(--ice-bright); color: #04121f; }

/* ---------- Scroll progress (frozen bar) ---------- */
.scroll-prog { position: fixed; top: 0; left: 0; height: 3px; width: 0; z-index: 9995;
  background: linear-gradient(90deg, var(--ice-blue), var(--ice-bright), var(--ice-cyan)); box-shadow: 0 0 14px var(--glow); transition: width .1s linear; }

/* ---------- Page transition (ice wipe) ---------- */
.page-wipe { position: fixed; inset: 0; z-index: 10001; pointer-events: none; display: grid; place-items: center;
  background: linear-gradient(180deg, #061b2e, #03101c); clip-path: inset(0 0 100% 0); transition: clip-path .55s var(--ease); }
.page-wipe.in { clip-path: inset(0 0 0 0); pointer-events: all; }
.page-wipe.out { clip-path: inset(100% 0 0 0); transition: clip-path .6s var(--ease); }
.page-wipe .pw-logo { font-family: var(--font-display); font-size: clamp(3rem, 12vw, 8rem); letter-spacing: 4px;
  background: linear-gradient(180deg, #fff, #46b4ff); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: 0; transform: scale(.9); transition: opacity .4s, transform .4s; }
.page-wipe.in .pw-logo { opacity: 1; transform: scale(1); }

/* ---------- Click-to-shatter ice cracks ---------- */
.ice-crack { position: absolute; transform: translate(-50%, -50%); }
.ice-crack .flash { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%;
  background: radial-gradient(circle, rgba(207,237,251,.9), transparent 70%); transform: scale(.2); opacity: 0; }
.ice-crack.go .flash { transition: transform .4s var(--ease), opacity .4s; transform: scale(2.4); opacity: 0; animation: flashpop .45s ease-out; }
@keyframes flashpop { 0% { opacity: .9; transform: scale(.2); } 100% { opacity: 0; transform: scale(2.6); } }
.ice-crack .shard { position: absolute; left: 0; top: 0; width: 2px; height: 0; transform-origin: top center;
  background: linear-gradient(180deg, rgba(207,237,251,.95), rgba(143,227,255,0)); border-radius: 2px;
  filter: drop-shadow(0 0 4px rgba(143,227,255,.8)); transition: height .12s ease-out, opacity .5s ease; opacity: 0; }
.ice-crack.go .shard { opacity: 1; }
.ice-crack.go .shard { animation: shardout .7s var(--ease) forwards; }
@keyframes shardout { 0% { opacity: 0; } 18% { opacity: 1; } 100% { opacity: 0; } }
.ice-chip { position: absolute; width: 5px; height: 5px; border-radius: 1px; background: #dff2ff; box-shadow: 0 0 6px var(--glow);
  transform: translate(-50%, -50%); opacity: 0; }
.ice-chip.go { transition: transform .7s var(--ease), opacity .7s ease; transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))); opacity: 0; }
.ice-chip { opacity: 1; }

/* ---------- Snow drift (piles up on scroll) ---------- */
.snow-drift { position: fixed; left: 0; right: 0; bottom: 0; height: 10px; z-index: 150; pointer-events: none; transition: height .15s linear; }
.snow-drift svg { position: absolute; bottom: 0; left: 0; width: 100%; height: 100%; }
.snow-drift svg path { fill: rgba(223,242,255,.9); filter: drop-shadow(0 -2px 10px rgba(143,227,255,.4)); }

/* ---------- Blizzard mode easter egg ---------- */
.blizzard { position: fixed; inset: 0; z-index: 9996; pointer-events: none; opacity: 0; transition: opacity .7s ease;
  background: radial-gradient(circle at 50% 40%, rgba(220,240,255,.25), rgba(180,220,255,.55)); }
.blizzard.on { opacity: 1; }
.blizzard canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.blizzard .bz-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-family: var(--font-display);
  font-size: clamp(2.5rem, 9vw, 7rem); letter-spacing: 4px; color: #fff; text-shadow: 0 0 40px var(--glow), 0 8px 30px rgba(2,12,22,.5);
  text-transform: uppercase; white-space: nowrap; }
.blizzard .bz-text span { display: inline-block; animation: spin 4s linear infinite; }

/* Scrollbar */
::-webkit-scrollbar { width: 11px; }
::-webkit-scrollbar-track { background: #04101c; }
::-webkit-scrollbar-thumb { background: linear-gradient(180deg, var(--ice-blue), var(--ice-navy)); border-radius: 99px; border: 2px solid #04101c; }

/* =========================================================
   RESPONSIVE + CROSS-DEVICE COMPATIBILITY
   ========================================================= */

/* never allow sideways scrolling on any device */
html, body { max-width: 100%; overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; }
img, canvas, video, svg { max-width: 100%; }

/* use the *real* visible viewport height on mobile (no address-bar jump) */
@supports (height: 100svh) {
  .hero-x, .hero { min-height: 100svh; }
  .showcase { min-height: 92svh; }
  .page-hero.hero-img { min-height: 80svh; }
}

/* touch / coarse pointers + narrow windows: restore a real cursor
   (the custom frost cursor is hidden below 820px, so elements that
   set cursor:none must fall back to a normal pointer) */
@media (max-width: 820px), (pointer: coarse) {
  body, a, button, input, select, textarea,
  .btn, .faq-q, .tier, .tilt, .defrost, .qty button,
  .lightbox .arrow, .music-toggle, .theme-toggle, .title-x { cursor: auto; }
  a, button, .btn, .faq-q, .sw, .filterbar button { cursor: pointer; }
  /* disable hover-lift transforms that can stick on touch */
  .btn:hover { transform: none; }
}

/* tablets / small laptops */
@media (max-width: 1024px) {
  .hero-x { padding: 110px 18px 80px; }
  .nav { padding-left: 4vw; padding-right: 4vw; }
}

/* phones */
@media (max-width: 600px) {
  section { padding: clamp(54px, 9vh, 90px) 0; }
  .hero-x { padding: 104px 16px 76px; }
  .hero-date { letter-spacing: 3px; gap: 9px; flex-wrap: wrap; justify-content: center; }
  .hero-x-sub { font-size: 1rem; }
  .scroll-cue { display: none; }
  .foot-bottom { flex-direction: column; align-items: flex-start; }
  .lightbox .arrow { width: 46px; height: 46px; font-size: 1.8rem; }
  .lightbox .arrow.prev { left: 8px; } .lightbox .arrow.next { right: 8px; }
  .marquee span { font-size: 1.3rem; }
  .music-toggle { width: 50px; height: 50px; bottom: 16px; right: 16px; }
}

/* very small phones */
@media (max-width: 380px) {
  .title-x { font-size: clamp(3.4rem, 24vw, 6rem); letter-spacing: 2px; }
}

/* landscape phones / short screens: don't force tall full-height heroes */
@media (max-height: 560px) and (orientation: landscape) {
  .hero-x, .hero, .page-hero.hero-img { min-height: auto; padding-top: 96px; padding-bottom: 60px; }
  .showcase { min-height: auto; }
}

/* respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .hero-x-bg img { animation: none; }
}
