* { box-sizing: border-box; }

[hidden] { display: none !important; }

:root {
  --bg: #ffffff;
  --bg-soft: #f2f2ef;
  --ink: #0a0a0a;
  --line: #d8d8d4;
  --line-strong: #0a0a0a;
  --green: #2f6b26;
  --green-bright: #3fae2f;
  --red: #b00020;
  --content-max: 1280px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

body {
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

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

.section-full {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-title {
  font-size: clamp(40px, 7vw, 110px);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: -0.01em;
  margin: 0 0 40px;
  text-transform: uppercase;
}

.tilt-1 { transform: rotate(-1.2deg); }

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 700;
  font-size: clamp(15px, 1.6vw, 18px);
  letter-spacing: 0.02em;
  padding: 18px 32px;
  border: 2px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, transform 120ms ease;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #fff; color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-small { padding: 12px 20px; font-size: 14px; }
.btn:active { transform: scale(0.96); }

/* hero */

.ticker-tag {
  display: inline-block;
  margin: 0 0 28px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 2px solid var(--line-strong);
}

.cuke-stage {
  position: relative;
  z-index: 1;
  overflow: visible;
  width: min(560px, 78vw);
  margin: 0 auto 30px;
}
.cuke-img {
  width: 100%;
  height: auto;
  cursor: pointer;
  user-select: none;
  -webkit-user-drag: none;
  transform: rotate(0deg) scale(1);
  transition: transform 220ms cubic-bezier(.34,1.4,.64,1);
  will-change: transform;
  animation: cukeFloat 5s ease-in-out infinite;
}

@keyframes cukeFloat {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -10px; }
}

.title {
  font-size: clamp(56px, 13vw, 160px);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 0.95;
  margin: 0 0 10px;
}

.subtitle {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 700;
  margin: 0 0 6px;
}

.small-line {
  font-size: 16px;
  color: #555;
  margin: 0 0 34px;
}

.cta-row {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.counter {
  font-size: 14px;
  color: #444;
  margin: 4px 0 2px;
}

.chaos-msg {
  min-height: 22px;
  font-size: 15px;
  font-weight: 800;
  color: var(--red);
  margin: 4px 0 0;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.chaos-msg.show { opacity: 1; transform: translateY(0); }

/* what is this */

.what-is-answer {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  margin: 0 0 30px;
}
.what-is-body {
  font-size: clamp(18px, 2.2vw, 24px);
  color: #444;
  line-height: 1.7;
  margin: 0 0 30px;
}
.what-is-punch {
  font-size: clamp(24px, 3.2vw, 36px);
  font-weight: 800;
  margin: 0;
}

/* analysis / scanner */

.scan-frame {
  position: relative;
  width: min(480px, 82vw);
  aspect-ratio: 1 / 1;
  margin: 0 auto 40px;
  border: 2px solid var(--line-strong);
  background: var(--bg-soft);
  overflow: hidden;
}
.scan-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
}
.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--green-bright), transparent);
  box-shadow: 0 0 12px var(--green-bright);
  animation: scanMove 3.2s ease-in-out infinite;
}
@keyframes scanMove {
  0%, 100% { top: 6%; }
  50% { top: 92%; }
}
.scan-corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--green-bright);
}
.c-tl { top: 8px; left: 8px; border-right: none; border-bottom: none; }
.c-tr { top: 8px; right: 8px; border-left: none; border-bottom: none; }
.c-bl { bottom: 8px; left: 8px; border-right: none; border-top: none; }
.c-br { bottom: 8px; right: 8px; border-left: none; border-top: none; }
.scan-tag {
  position: absolute;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 700;
  background: var(--ink);
  color: var(--green-bright);
  padding: 3px 7px;
  letter-spacing: 0.04em;
}
.tag-1 { top: 14%; left: 8%; }
.tag-2 { top: 40%; right: 6%; }
.tag-3 { bottom: 26%; left: 10%; }
.tag-4 { top: 60%; left: 42%; }
.tag-5 { bottom: 8%; right: 10%; }

.scan-boot {
  min-height: 20px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--green);
  margin: 0 0 18px;
}

.scan-crosshair {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0.6;
}
.scan-crosshair::before,
.scan-crosshair::after {
  content: "";
  position: absolute;
  background: var(--green-bright);
}
.scan-crosshair::before { top: 50%; left: 0; right: 0; height: 1px; }
.scan-crosshair::after { left: 50%; top: 0; bottom: 0; width: 1px; }

.scan-coords {
  position: absolute;
  bottom: 8px;
  left: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: var(--green);
  opacity: 0.8;
  letter-spacing: 0.03em;
}
.scan-rec {
  position: absolute;
  top: 8px;
  right: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  animation: recBlink 1.4s steps(1) infinite;
}

.scan-result {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: rgba(255,255,255,0.98);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  opacity: 0;
  transition: opacity 300ms ease;
}
.scan-result.show { opacity: 1; }
.scan-result-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #777;
  margin: 0 0 10px;
}
.scan-result-main {
  font-size: clamp(30px, 6vw, 52px);
  font-weight: 900;
  margin: 0 0 10px;
}
.scan-result-match {
  font-size: 15px;
  font-weight: 700;
  color: var(--green);
  margin: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 18px 26px;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  text-align: left;
}
.stat-grid dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #777;
  text-transform: uppercase;
}
.stat-grid dd {
  margin: 4px 0 0;
  font-size: 22px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--green);
}

.sentiment-line {
  margin: 34px 0 0;
  font-size: 13px;
  color: #666;
  letter-spacing: 0.02em;
}
.sentiment-line #sentimentValue {
  font-weight: 800;
  color: var(--ink);
  display: inline-block;
  transition: transform 150ms ease;
}
.sentiment-line #sentimentValue.pulse { transform: scale(1.15); }

/* make it more cucumber */

.grow-stage {
  position: relative;
  z-index: 1;
  width: min(480px, 78vw);
  margin: 0 auto 36px;
  overflow: visible;
}
.grow-img {
  width: 100%;
  height: auto;
  transform: scale(1);
  transition: transform 260ms cubic-bezier(.3,1.2,.6,1);
  will-change: transform;
}
.more-btn { position: relative; z-index: 2001; }

.grow-warning {
  font-size: 13px;
  font-weight: 800;
  color: var(--red);
  margin: 0 0 14px;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 200ms ease, transform 200ms ease;
}
.grow-warning:not([hidden]) { opacity: 1; transform: translateY(0); }

.grow-toast {
  min-height: 20px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  margin: 14px 0 0;
  opacity: 0;
  transition: opacity 300ms ease;
}
.grow-toast.show { opacity: 1; }

.grow-stripes {
  position: fixed;
  inset: 0;
  z-index: 4800;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms ease;
  border: 16px solid transparent;
  border-image: repeating-linear-gradient(45deg, #f4c400 0 22px, #111 22px 44px) 16;
}
.grow-stripes.show { opacity: 0.9; }

/* cam */

.cam-frame {
  position: relative;
  width: min(680px, 90vw);
  aspect-ratio: 16 / 10;
  margin: 0 auto 22px;
  border: 2px solid #000;
  background: #000;
  overflow: hidden;
}
.cam-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.2) brightness(0.75) sepia(0.15) hue-rotate(70deg) saturate(2);
  transition: transform 300ms ease;
}
.cam-scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0,0,0,0.18) 0px,
    rgba(0,0,0,0.18) 1px,
    transparent 2px,
    transparent 3px
  );
  mix-blend-mode: multiply;
}
.cam-scanlines::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 80px rgba(0,0,0,0.7);
}
.cam-rec {
  position: absolute;
  top: 12px;
  left: 12px;
  color: #ff4d4d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.05em;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  animation: recBlink 1s steps(1) infinite;
}
@keyframes recBlink { 50% { opacity: 0.25; } }
.cam-id {
  position: absolute;
  top: 12px;
  right: 12px;
  color: #cfe;
  font-size: 12px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cam-timestamp {
  position: absolute;
  bottom: 12px;
  left: 12px;
  color: #cfe;
  font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cam-status {
  position: absolute;
  bottom: 12px;
  right: 12px;
  color: #cfe;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.cam-note {
  font-size: 15px;
  font-weight: 700;
  min-height: 22px;
}

.cam-track {
  position: absolute;
  top: 30%;
  left: 30%;
  width: 40%;
  height: 40%;
  border: 2px solid #ff4d4d;
  z-index: 2;
  opacity: 0;
  transition: opacity 200ms ease;
}
.cam-track.show { opacity: 1; }

.cam-big {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ff4d4d;
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 900;
  letter-spacing: 0.05em;
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 150ms ease;
  pointer-events: none;
}
.cam-big.show { opacity: 1; }

/* finale */

.finale-stage {
  width: min(300px, 60vw);
  margin: 0 auto 20px;
}
.finale-text {
  font-size: clamp(26px, 4.5vw, 52px);
  font-weight: 800;
  margin: 0 0 10px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.finale-text.in-view { opacity: 1; transform: translateY(0); }
.finale-ticker {
  font-size: 13px;
  font-weight: 700;
  color: #777;
  margin: 0 0 26px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 2px solid var(--line-strong);
  color: var(--ink);
  text-decoration: none;
}
.icon-btn:hover { background: var(--ink); color: #fff; }

.ca-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 8px 8px 8px 12px;
  max-width: 100%;
}
.ca-label { font-size: 11px; font-weight: 700; color: #777; }
.ca-value {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 220px;
}
.copy-btn {
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  background: #fff;
  cursor: pointer;
}
.copy-btn:hover { background: var(--ink); color: #fff; }
.copy-btn.copied { background: var(--green); color: #fff; border-color: var(--green); }

.status-line {
  margin-top: 20px;
  font-size: 11px;
  color: #999;
}

.falling-cucumber {
  position: absolute;
  top: -80px;
  left: 50%;
  width: 56px;
  transform: translate(-50%, 0) rotate(0deg);
  opacity: 0;
  transition: top 900ms cubic-bezier(.4,0,.6,1), opacity 200ms ease;
}
.falling-cucumber.drop { top: 100%; opacity: 1; }

/* boot screen */

.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 260ms ease;
  animation: bootFallbackHide 0.01s 2.6s forwards;
}
.boot-screen.hide { opacity: 0; pointer-events: none; }
@keyframes bootFallbackHide {
  to { opacity: 0; pointer-events: none; visibility: hidden; }
}
.boot-line {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.boot-percent {
  font-size: 26px;
  font-weight: 800;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* flash + shake */

.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 99000;
  background: #d40000;
  opacity: 0;
  pointer-events: none;
}
.flash-overlay.flash { opacity: 0.85; transition: opacity 100ms ease; }

@keyframes pageShake {
  0% { transform: translate(0, 0); }
  25% { transform: translate(var(--shake-amt, 2px), calc(var(--shake-amt, 2px) * -1)); }
  50% { transform: translate(calc(var(--shake-amt, 2px) * -1), var(--shake-amt, 2px)); }
  75% { transform: translate(var(--shake-amt, 2px), var(--shake-amt, 2px)); }
  100% { transform: translate(0, 0); }
}
body.shake { animation: pageShake 320ms ease; }

/* sound toggle */

.sound-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 5000;
  font: inherit;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.9);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(4px);
}
.sound-toggle[aria-pressed="true"] { background: var(--ink); color: #fff; }

/* news alert */

.news-alert {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4000;
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  background: #111;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  padding: 10px 16px;
  transform: translateY(-100%);
  transition: transform 260ms ease;
}
.news-alert.show { transform: translateY(0); }
.news-tag { background: var(--red); padding: 1px 6px; font-size: 10px; letter-spacing: 0.05em; }

/* emergency popup */

.emergency-popup {
  position: fixed;
  top: 54px;
  right: 12px;
  z-index: 4500;
  width: 250px;
  background: #fff;
  border: 2px solid var(--red);
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  transform: translateX(8px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}
.emergency-popup.show { opacity: 1; transform: translateX(0); }
.emergency-title { margin: 0 0 4px; font-size: 13px; font-weight: 800; color: var(--red); letter-spacing: 0.05em; }
.emergency-body { margin: 0 0 10px; font-size: 12px; color: #333; }
.emergency-row { display: flex; gap: 8px; }
.emergency-row .btn { flex: 1; padding: 8px 6px; font-size: 11px; }

/* overload overlay */

.overload-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(255,255,255,0.97);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}
.overload-title { font-size: clamp(30px, 6vw, 52px); font-weight: 900; color: var(--red); margin: 0 0 10px; }
.overload-body { font-size: 15px; font-weight: 700; margin: 0 0 10px; }
.overload-sub { font-size: 11px; font-weight: 700; color: #888; letter-spacing: 0.04em; margin: 0 0 22px; }

/* cinematic */

.cinematic-overlay {
  position: fixed;
  inset: 0;
  z-index: 7000;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 400ms ease;
}
.cinematic-overlay.show { opacity: 1; }
.cinematic-img {
  width: 220px;
  filter: brightness(0.55) drop-shadow(0 0 60px rgba(255,255,255,0.25));
  margin-bottom: 24px;
}
.cinematic-text {
  color: #fff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0.06em;
  opacity: 0;
  transition: opacity 500ms ease;
}
.cinematic-text.show { opacity: 1; }
.cinematic-img.spin { animation: cinematicSpin 6s linear infinite; }
@keyframes cinematicSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* crash dialog */

.crash-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9000;
  width: min(340px, 88vw);
  background: #ececec;
  border: 1px solid #888;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  padding: 20px;
  text-align: center;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.crash-title { font-size: 13px; font-weight: 700; margin: 0 0 16px; }
.crash-row { display: flex; gap: 8px; justify-content: center; }
.crash-row .btn { flex: 1; padding: 10px 8px; font-size: 11px; }
.crash-status { font-size: 12px; font-weight: 700; margin: 14px 0 0; min-height: 16px; }

/* spawn layer / mini cucumbers */

.spawn-layer {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  overflow: hidden;
}
.mini-cuke {
  position: absolute;
  width: 44px;
  opacity: 0;
  top: -60px;
  transform: scale(0.4) rotate(0deg);
  transition: opacity 200ms ease, transform 200ms cubic-bezier(.34,1.6,.64,1), top 1100ms cubic-bezier(.3,0,.7,1);
}
.mini-cuke.in { opacity: 1; transform: scale(1) rotate(var(--r, 0deg)); }
.mini-cuke.fall { top: 100vh; }
.mini-cuke.ambient-fall { transition: opacity 200ms ease, transform 200ms ease, top 1300ms cubic-bezier(.2,1.4,.4,1); }

@media (max-width: 640px) {
  .section-full { padding: 60px 20px; min-height: 92vh; }
  .cta-row { gap: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .cuke-img, .chaos-msg, .news-alert, .emergency-popup, .cinematic-overlay,
  .cinematic-text, .finale-text, body.shake, .scan-line, .cam-big, .cam-track,
  .grow-toast, .grow-warning, .grow-stripes, .scan-result {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
  .cuke-img, .cinematic-img.spin { animation: none; }
}
