/* Google fonts already loaded in HTML */

/* Custom properties — cyberpunk palette */
:root {
  --bg: #00060a;
  --fg: #cff4ff;
  --accent: #00e5ff;
  --accent-dim: #002233;
  --muted: #1e4455;
  --border: #071318;
  --terminal-bg: #00050d;
  --terminal-green: #00e5ff;
  --terminal-green-dim: #001622;
  --success: #aaff00;
  --error: #ff003c;
  --font-terminal: 'VT323', monospace;
  --font-display: 'Bebas Neue', 'Arial Black', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-mono);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Circuit-board grid pattern */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.035;
  background-image:
    linear-gradient(rgba(0, 229, 255, 0.6) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.6) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Noise overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

.hidden {
  display: none !important;
}

/* CRT vignette */
#crt-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9997;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
}

/* Drifting scan-bar */
#scan-bar {
  position: fixed;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 229, 255, 0.12) 20%, rgba(0, 229, 255, 0.35) 50%, rgba(0, 229, 255, 0.12) 80%, transparent 100%);
  pointer-events: none;
  z-index: 9996;
  animation: scanDrift 8s linear infinite;
  top: -4px;
}

@keyframes scanDrift {
  0%   { top: -4px; opacity: 0; }
  3%   { opacity: 1; }
  97%  { opacity: 1; }
  100% { top: 100vh; opacity: 0; }
}

/* =========================================
   ACCESS SCREEN
   ========================================= */

#access-screen {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--terminal-bg);
  font-family: var(--font-terminal);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.terminal-body {
  animation: crtFlicker 10s linear infinite;
}

@keyframes crtFlicker {
  0%, 100% { opacity: 1; }
  92%  { opacity: 1; }
  92.5% { opacity: 0.82; }
  93%  { opacity: 1; }
  97%  { opacity: 1; }
  97.2% { opacity: 0.6; }
  97.5% { opacity: 1; }
}

.scanlines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.05) 2px,
    rgba(0, 229, 255, 0.05) 4px
  );
  z-index: 1;
}

.terminal-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  z-index: 2;
  padding: 2rem;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
}

.terminal-header {
  width: 100%;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-bottom: 1px solid rgba(0, 229, 255, 0.1);
  color: var(--terminal-green);
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0;
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.04), 0 0 20px rgba(0, 229, 255, 0.08);
}

.terminal-body {
  width: 100%;
  border: 1px solid rgba(0, 229, 255, 0.25);
  border-top: none;
  padding: 2rem;
  min-height: 200px;
  box-shadow: inset 0 0 40px rgba(0, 229, 255, 0.03), 0 0 30px rgba(0, 229, 255, 0.06);
}

.terminal-line {
  color: var(--terminal-green);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.terminal-line.muted {
  opacity: 0.4;
  font-size: 0.9rem;
}

.input-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  border-top: 1px solid var(--terminal-green-dim);
  padding-top: 1.5rem;
}

.prompt {
  color: var(--terminal-green);
  font-size: 1.5rem;
}

#code-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--terminal-green);
  font-family: var(--font-terminal);
  font-size: 1.8rem;
  flex: 1;
  caret-color: var(--terminal-green);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#code-input::placeholder {
  opacity: 0.3;
}

.access-message {
  margin-top: 1.5rem;
  font-size: 1.4rem;
  min-height: 2rem;
  letter-spacing: 0.15em;
}

.access-message.error {
  color: var(--error);
  animation: glitch 0.3s ease;
}

.access-message.success {
  color: var(--success);
}

.access-message.pending {
  color: var(--terminal-green);
  opacity: 0.7;
}

#enter-btn {
  margin-top: 1.5rem;
  background: transparent;
  border: 1px solid var(--terminal-green-dim);
  color: var(--terminal-green);
  font-family: var(--font-terminal);
  font-size: 1.2rem;
  padding: 0.75rem 2rem;
  cursor: pointer;
  letter-spacing: 0.2em;
  transition: all 0.15s;
}

#enter-btn:hover {
  background: var(--terminal-green);
  color: var(--terminal-bg);
}

.blink-block {
  animation: blink 1s step-end infinite;
}

/* =========================================
   ANIMATIONS
   ========================================= */

@keyframes blink {
  0%,
  100% { opacity: 1; }
  50% { opacity: 0; }
}

@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 0); filter: hue-rotate(90deg); }
  40% { transform: translate(3px, 0); }
  60% { transform: translate(-1px, 0); filter: hue-rotate(-90deg); }
  80% { transform: translate(1px, 0); }
  100% { transform: translate(0); filter: none; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-30px); }
}

@keyframes progressPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#access-screen.fade-out {
  animation: slideUp 0.5s ease forwards;
}

/* =========================================
   MAIN SITE
   ========================================= */

#main-site {
  background: var(--bg);
  color: var(--fg);
  min-height: 100vh;
}

#main-site.fade-in {
  animation: fadeIn 0.8s ease forwards;
}

/* =========================================
   HERO
   ========================================= */

#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  position: relative;
}

.hero-content {
  width: 100%;
  max-width: 1200px;
}

.hero-bar {
  height: 3px;
  background: var(--accent);
  margin: 1.5rem 0;
  width: 100%;
  transition: background 0.12s ease;
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.9), 0 0 40px rgba(0, 229, 255, 0.4), 0 0 80px rgba(0, 229, 255, 0.15);
  animation: barStrobe 4s ease-in-out infinite;
}

@keyframes barStrobe {
  0%, 100% { opacity: 1; box-shadow: 0 0 12px rgba(0,229,255,0.9), 0 0 40px rgba(0,229,255,0.4), 0 0 80px rgba(0,229,255,0.15); }
  48%  { opacity: 1; }
  50%  { opacity: 0.3; box-shadow: 0 0 4px rgba(0,229,255,0.3); }
  52%  { opacity: 1; box-shadow: 0 0 12px rgba(0,229,255,0.9), 0 0 40px rgba(0,229,255,0.4), 0 0 80px rgba(0,229,255,0.15); }
  74%  { opacity: 1; }
  75%  { opacity: 0.5; }
  76%  { opacity: 1; }
}

.hero-content:has(.hero-letter--cursed:hover) .hero-bar {
  background: #ffe600;
  box-shadow: 0 0 18px rgba(255, 230, 0, 0.5);
}

.hero-name {
  font-family: var(--font-display);
  font-size: clamp(5rem, 18vw, 18rem);
  color: var(--fg);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0;
  user-select: none;
  text-shadow:
    0 0 60px rgba(0, 229, 255, 0.2),
    3px 0 0 rgba(255, 0, 60, 0.12),
    -3px 0 0 rgba(0, 229, 255, 0.12);
  animation: heroIdle 12s ease-in-out infinite;
  position: relative;
}

/* Glitch pseudo-layers */
.hero-name::before,
.hero-name::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero-name::before {
  color: rgba(255, 0, 60, 0.55);
  animation: heroGlitchR 12s ease-in-out infinite;
  clip-path: inset(0);
}

.hero-name::after {
  color: rgba(0, 229, 255, 0.55);
  animation: heroGlitchC 12s ease-in-out infinite;
  clip-path: inset(0);
}

@keyframes heroIdle {
  0%, 100% { text-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 3px 0 0 rgba(255,0,60,0.12), -3px 0 0 rgba(0,229,255,0.12); }
  /* glitch burst at 20% */
  19.5% { text-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 3px 0 0 rgba(255,0,60,0.12), -3px 0 0 rgba(0,229,255,0.12); }
  20%   { text-shadow: 0 0 80px rgba(0, 229, 255, 0.6), 8px 0 0 rgba(255,0,60,0.8), -8px 0 0 rgba(0,229,255,0.8); }
  20.3% { text-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 3px 0 0 rgba(255,0,60,0.12), -3px 0 0 rgba(0,229,255,0.12); }
  /* second burst at 65% */
  64.5% { text-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 3px 0 0 rgba(255,0,60,0.12), -3px 0 0 rgba(0,229,255,0.12); }
  65%   { text-shadow: 0 0 100px rgba(0, 229, 255, 0.7), 12px 0 0 rgba(255,0,60,0.9), -12px 0 0 rgba(0,229,255,0.9); }
  65.5% { text-shadow: 0 0 60px rgba(0, 229, 255, 0.2), 3px 0 0 rgba(255,0,60,0.12), -3px 0 0 rgba(0,229,255,0.12); }
}

@keyframes heroGlitchR {
  0%, 19.4%, 20.4%, 64.4%, 66%, 100% { transform: translate(0); clip-path: inset(100% 0 0 0); }
  20%  { transform: translateX(6px); clip-path: inset(15% 0 60% 0); }
  20.2% { transform: translateX(-4px); clip-path: inset(55% 0 10% 0); }
  65%  { transform: translateX(10px); clip-path: inset(5% 0 70% 0); }
  65.5% { transform: translateX(-6px); clip-path: inset(60% 0 5% 0); }
}

@keyframes heroGlitchC {
  0%, 19.4%, 20.4%, 64.4%, 66%, 100% { transform: translate(0); clip-path: inset(100% 0 0 0); }
  20%  { transform: translateX(-6px); clip-path: inset(60% 0 10% 0); }
  20.2% { transform: translateX(4px); clip-path: inset(10% 0 55% 0); }
  65%  { transform: translateX(-10px); clip-path: inset(70% 0 5% 0); }
  65.5% { transform: translateX(6px); clip-path: inset(5% 0 65% 0); }
}

.hero-letter {
  display: inline-block;
  transition: color 0.12s ease;
  cursor: default;
}

.hero-letter:hover {
  color: var(--accent);
  text-shadow: 0 0 20px rgba(255, 0, 204, 0.6);
}

.hero-letter--cursed {
  cursor: pointer;
}

.cursed-toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-align: right;
  max-width: 260px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  pointer-events: none;
  z-index: 9999;
}

.cursed-toast.cursed-visible {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 6rem);
  color: var(--muted);
  letter-spacing: 0.1em;
  margin: 1rem 0;
}

/* =========================================
   EVENT INFO
   ========================================= */

#event-info {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.info-grid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4rem;
  flex-wrap: wrap;
}

.info-block {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.info-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--muted);
  text-transform: uppercase;
}

.info-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  color: var(--fg);
  letter-spacing: 0.05em;
}

.info-divider {
  font-family: var(--font-mono);
  font-size: 2rem;
  color: #00ffee;
  opacity: 0.5;
}

/* =========================================
   SECTION SEPARATOR
   ========================================= */

.section-sep {
  height: 1px;
  background: var(--border);
  margin: 0;
  width: 100%;
}

/* =========================================
   RSVP
   ========================================= */

#rsvp {
  padding: 8rem 2rem;
  text-align: center;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  color: var(--fg);
  letter-spacing: 0.05em;
  margin-bottom: 3rem;
}

.rsvp-row {
  display: flex;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.rsvp-btn {
  background: transparent;
  border: 2px solid var(--muted);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 3rem;
  padding: 1.5rem 4rem;
  cursor: pointer;
  letter-spacing: 0.2em;
  transition: all 0.15s;
  min-width: 180px;
}

.rsvp-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

.rsvp-btn.selected-yes {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
}

.rsvp-btn.selected-no {
  background: var(--muted);
  border-color: var(--muted);
  color: var(--bg);
}

.rsvp-btn.dimmed {
  opacity: 0.25;
}

.rsvp-status {
  margin-top: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--muted);
}

/* =========================================
   GIFTS SECTION
   ========================================= */

#gifts {
  padding: 6rem 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.no-money-block {
  margin: 3rem 0;
  padding: 2rem;
  border-left: 4px solid var(--accent);
}

.no-money-headline {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.gift-invite {
  font-size: 0.9rem;
  color: var(--fg);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.no-money-rule {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 1rem;
}

/* =========================================
   DROP ZONE
   ========================================= */

#drop-zone {
  border: 2px dashed var(--border);
  padding: 4rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin: 3rem 0;
  position: relative;
}

#drop-zone:hover,
#drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.04);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.08);
}

.drop-icon {
  font-size: 3rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.drop-text {
  font-family: var(--font-display);
  font-size: 2.5rem;
  letter-spacing: 0.1em;
  color: var(--fg);
}

.drop-subtext {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-top: 0.5rem;
}

.drop-filename {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--accent);
  margin-top: 1rem;
  letter-spacing: 0.1em;
}

/* =========================================
   DESCRIPTION INPUT
   ========================================= */

.desc-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2rem;
}

.desc-prompt {
  color: var(--accent);
  font-family: var(--font-terminal);
  font-size: 1.5rem;
  padding-top: 0.3rem;
}

#gift-desc {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  padding: 0.5rem 0;
  resize: none;
  outline: none;
  letter-spacing: 0.05em;
}

#gift-desc::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

/* =========================================
   UPLOAD BUTTON
   ========================================= */

#upload-btn {
  background: transparent;
  border: 2px solid var(--muted);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 2rem;
  padding: 1rem 3rem;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.15s;
  margin-bottom: 1.5rem;
}

#upload-btn:not(:disabled):hover {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 12px rgba(0, 229, 255, 0.3);
}

#upload-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* =========================================
   PROGRESS BAR
   ========================================= */

.upload-progress {
  height: 2px;
  background: var(--border);
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease;
}

.upload-progress.active .progress-bar {
  animation: progressPulse 1s infinite;
}

/* =========================================
   UPLOAD STATUS
   ========================================= */

.upload-status {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  min-height: 2rem;
}

.upload-status.success {
  color: var(--success);
}

.upload-status.error {
  color: var(--error);
}

/* =========================================
   TRANSMISSIONS
   ========================================= */

.transmissions {
  margin-top: 4rem;
  border-top: 1px solid var(--border);
  padding-top: 3rem;
}

.transmissions-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

.transmission-item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.t-name {
  color: var(--fg);
  flex: 1;
  font-family: var(--font-mono);
}

.t-type {
  color: var(--muted);
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.t-time {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

/* =========================================
   NAV
   ========================================= */

#main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  justify-content: flex-end;
  gap: 2.5rem;
  padding: 1.1rem 1.8rem;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.95) 60%, transparent 100%);
  pointer-events: none;
}

#main-nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-decoration: none;
  pointer-events: all;
  transition: color 0.15s;
}

#main-nav a:hover {
  color: var(--accent);
}

/* =========================================
   GALLERY
   ========================================= */

#archive {
  padding: 6rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery {
  margin-top: 5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.gallery-item {
  display: flex;
  align-items: center;
  gap: 5rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  will-change: opacity, transform;
  contain: layout style;
}

.gallery-item.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

.gallery-item--reverse {
  flex-direction: row-reverse;
}

.gallery-sentinel {
  height: 1px;
  visibility: hidden;
}

.gallery-image {
  flex: 0 0 62%;
  overflow: hidden;
  line-height: 0;
  position: relative;
}

.gallery-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    transparent 0px,
    transparent 2px,
    rgba(0, 229, 255, 0.04) 2px,
    rgba(0, 229, 255, 0.04) 3px
  );
  pointer-events: none;
  z-index: 1;
  animation: scanlinesDrift 5s linear infinite;
}

@keyframes scanlinesDrift {
  from { background-position: 0 0; }
  to { background-position: 0 60px; }
}

@keyframes signalBreak {
  0% { transform: none; filter: grayscale(0.75) contrast(1.35) brightness(0.55) hue-rotate(185deg) saturate(0.5); clip-path: inset(0% 0% 0% 0%); }
  6% { transform: translateX(-22px); filter: grayscale(0) contrast(6) brightness(3) hue-rotate(185deg) saturate(4); clip-path: inset(22% 0% 48% 0%); }
  12% { transform: translateX(16px) skewX(-4deg); filter: grayscale(1) contrast(8) brightness(0.03); clip-path: inset(0% 0% 32% 0%); }
  18% { transform: translateX(-10px) skewX(2deg); filter: grayscale(0) contrast(4) brightness(2) hue-rotate(185deg) saturate(3); clip-path: inset(44% 0% 0% 0%); }
  26% { transform: translateX(5px); filter: grayscale(0.75) contrast(1.5) brightness(0.5) hue-rotate(185deg); clip-path: inset(0% 0% 0% 0%); }
  100% { transform: none; filter: grayscale(0.75) contrast(1.35) brightness(0.55) hue-rotate(185deg) saturate(0.5); clip-path: inset(0% 0% 0% 0%); }
}

.gallery-image img.signal-break {
  transition: none;
  animation: signalBreak 0.55s linear forwards;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
  display: block;
  filter: grayscale(0.85) contrast(1.4) brightness(0.45) hue-rotate(185deg) saturate(0.4);
  transition: filter 0.6s ease;
}

.gallery-item.visible .gallery-image img {
  filter: grayscale(0.75) contrast(1.35) brightness(0.55) hue-rotate(185deg) saturate(0.5);
}

.gallery-caption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-caption span {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 3rem);
  color: var(--muted);
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
}

.identity-badge {
  position: fixed;
  top: 1.2rem;
  right: 1.5rem;
  font-family: var(--font-terminal);
  font-size: 1.1rem;
  color: var(--muted);
  letter-spacing: 0.15em;
  z-index: 100;
  pointer-events: none;
}

footer {
  padding: 4rem 2rem;
  text-align: center;
  border-top: 1px solid var(--border);
}

.footer-text {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  color: var(--muted);
}

/* =========================================
   CONFESSIONAL
   ========================================= */

.confessional {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.confessional.hidden {
  display: none;
}

.conf-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 229, 255, 0.05) 2px,
    rgba(0, 229, 255, 0.05) 4px
  );
  pointer-events: none;
  z-index: 1;
}

.conf-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--terminal-green);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 10;
  opacity: 0.4;
  transition: opacity 0.15s;
  line-height: 1;
}

.conf-close:hover {
  opacity: 1;
}

.conf-state {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 680px;
  font-family: var(--font-terminal);
}

.conf-state.hidden {
  display: none;
}

.conf-header {
  font-size: 1rem;
  color: var(--terminal-green);
  letter-spacing: 0.15em;
  margin-bottom: 2.5rem;
  opacity: 0.6;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.conf-line {
  color: var(--terminal-green);
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  margin-bottom: 0.6rem;
  opacity: 0.8;
}

.conf-line.dim {
  opacity: 0.35;
  font-size: 1rem;
}

.conf-question {
  color: var(--terminal-green);
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  margin: 2.5rem 0 1.5rem;
  opacity: 0.9;
}

.conf-input-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  border-top: 1px solid var(--terminal-green-dim);
  padding-top: 1.25rem;
}

.conf-prompt-char {
  color: var(--terminal-green);
  font-size: 1.5rem;
  padding-top: 0.2rem;
  opacity: 0.7;
}

#conf-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--terminal-green);
  font-family: var(--font-terminal);
  font-size: 1.4rem;
  line-height: 1.5;
  resize: none;
  caret-color: var(--terminal-green);
  letter-spacing: 0.05em;
}

#conf-input::placeholder {
  opacity: 0.25;
}

.conf-msg {
  margin-top: 1rem;
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  min-height: 1.5rem;
}

.conf-msg.error { color: var(--error); }
.conf-msg.success { color: var(--success); }
.conf-msg.hidden { display: none; }

#conf-submit,
#conf-see-others {
  margin-top: 1.5rem;
  background: transparent;
  border: 1px solid var(--terminal-green-dim);
  color: var(--terminal-green);
  font-family: var(--font-terminal);
  font-size: 1.2rem;
  padding: 0.6rem 2rem;
  cursor: pointer;
  letter-spacing: 0.2em;
  transition: all 0.15s;
}

#conf-submit:hover,
#conf-see-others:hover {
  background: var(--terminal-green);
  color: #000;
}

#conf-feed {
  margin-top: 1.5rem;
  max-height: 60vh;
  overflow-y: auto;
  scrollbar-width: none;
}

#conf-feed::-webkit-scrollbar {
  display: none;
}

.conf-secret-line {
  color: var(--terminal-green);
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--terminal-green-dim);
  opacity: 0;
  animation: confReveal 0.4s ease forwards;
  line-height: 1.5;
}

.conf-secret-line::before {
  content: '> ';
  opacity: 0.4;
}

@keyframes signalJitter {
  0% { transform: translate(0, 0) skewX(0deg); opacity: 1; }
  10% { transform: translate(-4px, 1px) skewX(-1.5deg); opacity: 0.85; clip-path: inset(5% 0 10% 0); }
  20% { transform: translate(3px, -1px) skewX(1deg); opacity: 1; clip-path: inset(0); }
  30% { transform: translate(-2px, 0) skewX(0deg); opacity: 0.9; }
  40% { transform: translate(5px, 1px) skewX(-2deg); opacity: 0.7; clip-path: inset(20% 0 5% 0); }
  50% { transform: translate(-1px, 0) skewX(1deg); opacity: 1; clip-path: inset(0); }
  60% { transform: translate(2px, -1px) skewX(0deg); opacity: 0.95; }
  70% { transform: translate(-3px, 1px) skewX(-1deg); opacity: 0.8; clip-path: inset(10% 0 15% 0); }
  80% { transform: translate(1px, 0) skewX(0.5deg); opacity: 1; clip-path: inset(0); }
  100% { transform: translate(0, 0) skewX(0deg); opacity: 1; clip-path: inset(0); }
}

.jitter { animation: signalJitter 0.35s steps(1, end); }

@keyframes confReveal {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: translateX(0); }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 768px) {
  .terminal-wrap { padding: 1rem; }
  .terminal-body { padding: 1.25rem; }
  #code-input { font-size: 1.4rem; }
  .hero-name { font-size: clamp(4rem, 20vw, 10rem); }
  .hero-subtitle { font-size: clamp(1.5rem, 8vw, 3rem); }
  .info-grid { flex-direction: column; gap: 2rem; text-align: center; }
  .info-divider { display: none; }
  .info-value { font-size: clamp(1.5rem, 8vw, 3rem); }
  #rsvp { padding: 4rem 1.5rem; }
  .rsvp-btn { font-size: 2rem; padding: 1rem 2.5rem; min-width: 140px; }
  #gifts { padding: 4rem 1.5rem; }
  .no-money-headline { font-size: clamp(2rem, 8vw, 3.5rem); }
  .section-heading { font-size: clamp(2.5rem, 10vw, 5rem); }
  #drop-zone { padding: 2.5rem 1rem; }
  .drop-text { font-size: 1.8rem; }
  #upload-btn { font-size: 1.5rem; padding: 0.75rem 2rem; }
  #archive { padding: 4rem 1.5rem; }
  .gallery-item, .gallery-item--reverse { flex-direction: column; gap: 2rem; }
  .gallery-image { flex: none; width: 100%; }
  .gallery-caption { justify-content: flex-start; }
  .gallery-caption span { writing-mode: horizontal-tb; transform: none; font-size: clamp(1.2rem, 6vw, 2rem); }
}

/* =========================================
   GAME OVERLAY
   ========================================= */

#game-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
}

#game-modal {
  background: #080808;
  border: 1px solid #00e5ff;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(520px, 100vw - 16px);
  max-height: 100dvh;
  overflow: hidden;
  box-shadow: 0 0 40px rgba(0, 229, 255, 0.25);
}

#game-hud {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  border-bottom: 1px solid #1a1a1a;
  font-size: 11px;
  color: #555;
  letter-spacing: 0.1em;
}

#game-hud-title { color: #00e5ff; }
#game-hud-score { font-variant-numeric: tabular-nums; }

#game-canvas-wrap { position: relative; width: 100%; }

#game-canvas {
  display: block;
  width: 100%;
  background: #080808;
}

#game-mobile-ctrls {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px;
  background: #080808;
  border-top: 1px solid #1a1a1a;
}

@media (pointer: coarse) {
  #game-mobile-ctrls { display: flex; }
}

.dpad-mid { display: flex; gap: 2px; }

.dpad-btn {
  width: 44px;
  height: 44px;
  background: #111;
  border: 1px solid #333;
  color: #00e5ff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
}

.dpad-btn:active { background: #1a1a1a; border-color: #00e5ff; }

#game-start-screen,
#game-over-screen,
#game-lb-screen {
  width: 100%;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.game-sys-label {
  font-size: 11px;
  color: #00e5ff;
  letter-spacing: 0.2em;
  opacity: 0.7;
}

#game-start-title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 5vw, 2.2rem);
  color: #ffffff;
  letter-spacing: 0.12em;
}

#game-start-flavor {
  font-size: 12px;
  color: #555;
  letter-spacing: 0.05em;
  font-style: italic;
  max-width: 300px;
}

#game-start-hint {
  font-size: 11px;
  color: #333;
  letter-spacing: 0.08em;
  margin: 0;
}

.game-btn {
  background: transparent;
  border: 1px solid #00e5ff;
  color: #00e5ff;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  padding: 8px 24px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  min-width: 140px;
}

.game-btn:hover { background: #00e5ff; color: #080808; }

.game-btn-dim { border-color: #333; color: #333; }
.game-btn-dim:hover { background: #333; color: #080808; }

#game-over-score-display {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 4vw, 1.8rem);
  color: #00e5ff;
  letter-spacing: 0.1em;
}

.game-hint-text {
  font-size: 11px;
  color: #555;
  letter-spacing: 0.08em;
  margin: 0;
}

.game-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #333;
  padding-bottom: 4px;
  width: 100%;
  max-width: 280px;
}

.game-input-row span { color: #555; font-size: 14px; }

.game-input-row input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.game-input-row input::placeholder { color: #333; }

#game-offense-meter { font-size: 11px; letter-spacing: 0.08em; min-height: 16px; }
#game-score-preview { font-size: 12px; color: #555; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; }

#game-pure-warn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}

#game-pure-msg { font-size: 11px; color: #556677; letter-spacing: 0.05em; margin: 0; }

#game-lb-list {
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #333 #080808;
  text-align: left;
}

.game-lb-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ── Agenda ─────────────────────────────────────── */

#agenda {
  padding: 4rem var(--page-pad, 2rem);
  max-width: 860px;
  margin: 0 auto;
}

.agenda-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2.5rem;
}

.agenda-day-label {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 0.3em;
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.agenda-events {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.agenda-event {
  display: flex;
  gap: 1.5rem;
  align-items: baseline;
}

.agenda-time {
  font-family: var(--font-terminal);
  font-size: 1.35rem;
  color: var(--accent);
  min-width: 4.5rem;
  letter-spacing: 0.1em;
  opacity: 0.6;
}

.agenda-desc {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  color: var(--fg);
  opacity: 0.75;
  text-transform: uppercase;
  line-height: 1.5;
}

@media (max-width: 600px) {
  .agenda-event { flex-direction: column; gap: 0.2rem; }
  .agenda-time { font-size: 1.1rem; }
}

@keyframes agendaShake {
  0%   { transform: translate(0, 0) skewX(0deg); }
  10%  { transform: translate(-3px, 1px) skewX(-1deg); }
  20%  { transform: translate(4px, -1px) skewX(1.5deg); }
  30%  { transform: translate(-2px, 0) skewX(0deg); }
  40%  { transform: translate(5px, 1px) skewX(-1.5deg); }
  50%  { transform: translate(-1px, 0) skewX(0.5deg); }
  60%  { transform: translate(3px, -1px) skewX(1deg); }
  70%  { transform: translate(-4px, 1px) skewX(-0.5deg); }
  80%  { transform: translate(2px, 0) skewX(0deg); }
  90%  { transform: translate(-1px, 0) skewX(0.5deg); }
  100% { transform: translate(0, 0) skewX(0deg); }
}

.agenda-event.jitter {
  animation: agendaShake 0.4s steps(1, end);
}
