/* ============================================================
   BILL FUNK — style.css
   ============================================================ */

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

:root {
  --ink:    #08000F;
  --pink:   #FF00CC;
  --yellow: #FFE600;
  --cyan:   #00F5FF;
  --green:  #00FF66;
  --purple: #9900FF;
  --orange: #FF6600;
}

html, body { height: 100%; overflow: hidden; }

body {
  background-color: var(--ink);
  background-image:
    linear-gradient(rgba(153,0,255,0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(153,0,255,0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: 'Press Start 2P', monospace;
  color: var(--yellow);
  cursor: crosshair;
}

/* CRT scanlines overlay */
body::before {
  content: ''; position: fixed; inset: 0;
  background: repeating-linear-gradient(
    to bottom, transparent 0px, transparent 3px,
    rgba(0,0,0,0.18) 3px, rgba(0,0,0,0.18) 4px
  );
  pointer-events: none; z-index: 9999;
}

/* ── STARFIELD ── */
#starfield { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ============================================================
   DESKTOP LAYOUT — strict vh zones
   header (rainbow + title + ticker) : 20vh
   gap above buttons                  :  5vh
   buttons                            : 10vh
   gap below buttons                  :  5vh
   photo                              : 50vh
   footer (text + rainbow)            : 10vh
   ============================================================ */

/* ── RAINBOW BARS ── */
.rainbow {
  height: 8px; flex-shrink: 0;
  background: linear-gradient(90deg,
    #FF0000,#FF7700,#FFFF00,#00FF00,
    #00FFFF,#0066FF,#9900FF,#FF00CC,#FF0000);
  background-size: 300% 100%;
  animation: rbow 3s linear infinite;
}
@keyframes rbow { from{background-position:0%} to{background-position:300%} }

/* ── HEADER ZONE: 20vh ── */
.zone-header {
  height: 20vh;
  display: flex; flex-direction: column;
  flex-shrink: 0; overflow: hidden;
}

header {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  padding: 0 24px;
}
header::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% -30%, rgba(153,0,255,0.3) 0%, transparent 65%);
  pointer-events: none;
}

.bill-title {
  font-size: clamp(1.9rem, 6.5vw, 5.2rem);
  color: var(--yellow); line-height: 1; display: inline-block;
  text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 rgba(153,0,255,0.6);
  animation: glitch 5s steps(1) infinite;
  letter-spacing: 0.08em;
}
@keyframes glitch {
  0%,83%,100% {
    transform: none;
    text-shadow: 5px 5px 0 var(--pink), 10px 10px 0 rgba(153,0,255,0.6);
    color: var(--yellow);
  }
  84% { transform:translate(-5px,1px) skewX(-3deg); color:var(--cyan);  text-shadow:4px 4px 0 var(--yellow),-3px -1px 0 var(--pink); }
  85% { transform:translate(5px,-1px) skewX(3deg);  color:var(--pink);  text-shadow:-5px 5px 0 var(--cyan),3px -3px 0 var(--purple); }
  86% { transform:none; color:var(--yellow); text-shadow:5px 5px 0 var(--pink),10px 10px 0 rgba(153,0,255,0.6); }
}

/* ── TICKER ── */
.ticker-wrap {
  flex-shrink: 0; background: var(--pink); padding: 5px 0;
  border-top: 2px solid var(--yellow); border-bottom: 2px solid var(--yellow);
  overflow: hidden; white-space: nowrap;
}
.ticker-inner {
  display: inline-flex; font-size: 0.62rem; color: var(--ink);
  animation: ticker 36s linear infinite;
  white-space: nowrap;
}
.ticker-text { padding-right: 60px; }
/* Two identical copies + animate -50% = seamless gapless loop */
@keyframes ticker { from{transform:translateX(0)} to{transform:translateX(-50%)} }

/* ── GAPS ── */
.gap-top    { height: 5vh; flex-shrink: 0; }
.gap-bottom { height: 5vh; flex-shrink: 0; }

/* ── BUTTONS ZONE: 10vh ── */
.zone-buttons {
  height: 10vh; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  gap: 16px;
}
.btn {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(0.42rem, 1.1vw, 0.66rem);
  padding: 13px 24px; text-decoration: none; border: 2px solid;
  letter-spacing: 0.08em; transition: transform 0.07s, box-shadow 0.07s;
  display: inline-block; cursor: pointer; white-space: nowrap;
}
.btn:hover  { transform: translate(-3px,-3px); }
.btn:active { transform: translate(2px,2px); }

.btn-sc { color:var(--yellow); border-color:var(--yellow); background:rgba(255,230,0,0.04); box-shadow:4px 4px 0 var(--pink); }
.btn-sc:hover { background:var(--yellow); color:var(--ink); box-shadow:7px 7px 0 var(--pink); }

.btn-ig { color:var(--pink); border-color:var(--pink); background:rgba(255,0,204,0.04); box-shadow:4px 4px 0 var(--cyan); }
.btn-ig:hover { background:var(--pink); color:var(--ink); box-shadow:7px 7px 0 var(--cyan); }

/* ── PHOTO ZONE: 50vh ── */
.zone-photo {
  height: 50vh; flex-shrink: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: flex-start;
  gap: 8px;
}

/* Head scene contains the rings and the canvas */
.head-scene {
  position: relative;
  height: calc(50vh - 36px);
  aspect-ratio: 2 / 3;
  display: flex; align-items: center; justify-content: center;
}

.ring-circle, .ring-triangle {
  position: absolute;
  top: 50%; left: 50%;
  pointer-events: none;
}

/* Outer ring: true circle (sized from height to clear the portrait) */
.ring-circle {
  height: calc(100% + 44px);
  aspect-ratio: 1 / 1;
  transform: translate(-50%, -50%);
  border: 2px dashed var(--cyan);
  border-radius: 50%;
  animation: spin-c 11s linear infinite;
}
@keyframes spin-c {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}

/* Inner ring: equilateral triangle SVG, centered at (100,100) in viewBox */
.ring-triangle {
  height: calc(100% + 80px);
  aspect-ratio: 1 / 1;
  overflow: visible;
  animation: spin-t 18s linear infinite reverse;
}
@keyframes spin-t {
  from { transform: translate(-50%,-50%) rotate(0deg); }
  to   { transform: translate(-50%,-50%) rotate(360deg); }
}

.head-wrap {
  position: absolute;
  inset: 0;
}

#parallax-canvas {
  width: 100%; height: 100%; display: block;
  outline: 3px solid var(--cyan);
  box-shadow:
    0 0 16px var(--cyan),
    0 0 50px rgba(0,245,255,0.28),
    0 0 80px rgba(153,0,255,0.2);
}

/* ── EQUALIZER ── */
.eq { display:flex; align-items:flex-end; gap:4px; height:20px; flex-shrink:0; }
.eq-bar { width:6px; min-height:2px; animation:eq-anim var(--d) ease-in-out infinite alternate; }
@keyframes eq-anim { from{height:2px;opacity:0.4} to{height:100%;opacity:1} }

/* ── FOOTER ZONE: 10vh ── */
.zone-footer {
  height: 10vh; flex-shrink: 0;
  display: flex; flex-direction: column;
}
footer {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(0.44rem, 1vw, 0.6rem);
  color: var(--purple); border-top: 2px solid rgba(153,0,255,0.35);
  letter-spacing: 0.12em; text-align: center; padding: 0 16px;
}

/* ============================================================
   MOBILE — scrollable, natural flow (≤680px)
   ============================================================ */
@media (max-width: 680px) {
  html, body { overflow: auto; height: auto; }

  .zone-header, .zone-photo, .zone-buttons, .zone-footer,
  .gap-top, .gap-bottom { height: auto; }

  .zone-header { padding-bottom: 0; }
  header { padding: 20px 20px 14px; justify-content: center; min-height: 80px; }
  .bill-title { font-size: clamp(1.8rem, 9vw, 2.6rem); }

  .gap-top    { height: 20px; }
  .gap-bottom { height: 20px; }

  .zone-buttons { height: auto; padding: 0 20px; flex-wrap: wrap; gap: 14px; }
  .btn { font-size: 0.46rem; padding: 13px 18px; }

  .zone-photo { height: auto; padding: 0 0 20px; gap: 14px; }
  .head-scene { height: auto; width: min(70vw, 280px); }
  .head-wrap  { position: relative; inset: auto; width: 100%; aspect-ratio: 2/3; }

  .zone-footer { height: auto; }
  footer { min-height: 50px; }
}
