@import url('https://fonts.googleapis.com/css2?family=Special+Elite&family=Inter:wght@300;400;500&display=swap');

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

body {
  font-family: 'Inter', sans-serif;
  background: #faf9f7;
  color: #1a1a1a;
  min-height: 100vh;
}

body::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.4;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 48px;
  background: rgba(250,249,247,0.92);
  backdrop-filter: blur(8px);
  z-index: 100;
  border-bottom: 1px solid #e8e4de;
}
.logo {
  font-family: 'Special Elite', cursive;
  font-size: 1.4rem; color: #1a1a1a; cursor: pointer;
}
nav ul { list-style: none; display: flex; gap: 32px; }
nav ul a {
  text-decoration: none; color: #888; font-size: 0.82rem;
  letter-spacing: 0.02em; cursor: pointer; transition: color 0.2s;
}
nav ul a:hover, nav ul a.active { color: #1a1a1a; }

/* ── PAGES ── */
.page { display: none; position: relative; z-index: 1; }
.page.active { display: block; }

/* ── BUTTONS ── */
.btn {
  display: inline-block; background: #1a1a1a; color: #faf9f7;
  padding: 14px 36px; font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; border: none;
  cursor: pointer; transition: background 0.2s, transform 0.15s;
  font-family: 'Inter', sans-serif; text-decoration: none;
}
.btn:hover { background: #333; transform: translateY(-1px); }
.btn.outline { background: transparent; color: #1a1a1a; border: 1px solid #1a1a1a; }
.btn.outline:hover { background: #1a1a1a; color: #faf9f7; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ── LANDING ── */
.hero {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; text-align: center;
  padding: 140px 24px 60px; min-height: 60vh;
}
.hero-logo {
  font-family: 'Special Elite', cursive;
  font-size: clamp(3rem, 10vw, 7rem);
  line-height: 1; letter-spacing: -2px; margin-bottom: 24px;
}
.hero-tagline {
  font-size: 1.05rem; color: #888; font-weight: 300;
  max-width: 380px; line-height: 1.7; margin-bottom: 40px;
}

/* ── COMMUNITY WALL ── */
.wall-section { padding: 0 24px 80px; max-width: 1100px; margin: 0 auto; }
.wall-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px; flex-wrap: wrap; gap: 12px;
}
.wall-title { font-family: 'Special Elite', cursive; font-size: 1.4rem; color: #1a1a1a; }
.wall-sub { font-size: 0.75rem; color: #bbb; margin-top: 4px; }
.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 20px;
}
.wall-strip {
  background: #fff; padding: 7px 7px 22px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.07);
  display: flex; flex-direction: column; gap: 4px;
  transform: rotate(var(--r));
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
  animation: fadeUp 0.5s ease both;
}
.wall-strip:hover { transform: rotate(0deg) scale(1.04); box-shadow: 0 8px 32px rgba(0,0,0,0.13); }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px) rotate(var(--r)); }
  to   { opacity: 1; }
}
.wall-strip img { width: 100%; display: block; object-fit: cover; aspect-ratio: 4/3; }
.wall-strip-caption { font-family: 'Special Elite', cursive; font-size: 0.55rem; text-align: center; color: #aaa; margin-top: 4px; }
.wall-strip-date    { font-family: 'Special Elite', cursive; font-size: 0.48rem; text-align: center; color: #ccc; }
.wall-strip-expiry  { font-size: 0.42rem; text-align: center; color: #ddd; margin-top: 2px; }
.wall-empty   { text-align: center; padding: 60px 24px; color: #ccc; font-size: 0.9rem; font-weight: 300; grid-column: 1/-1; }
.wall-loading { text-align: center; padding: 40px; color: #ccc; font-size: 0.82rem; grid-column: 1/-1; font-family: 'Special Elite', cursive; letter-spacing: 0.05em; }

/* ── ABOUT ── */
.about-inner { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 120px 24px 80px; }
.about-content { max-width: 520px; width: 100%; }
.section-label { font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; color: #bbb; margin-bottom: 32px; display: block; }
.about-heading { font-family: 'Special Elite', cursive; font-size: clamp(2.2rem, 6vw, 3.8rem); line-height: 1.1; margin-bottom: 32px; color: #1a1a1a; }
.about-divider { width: 40px; height: 1px; background: #ccc; margin-bottom: 32px; }
.about-body { font-size: 1rem; color: #888; font-weight: 300; line-height: 1.85; margin-bottom: 20px; }

/* ── BOOTH ── */
#booth { min-height: 100vh; padding: 100px 24px 60px; }
.booth-inner { max-width: 900px; margin: 0 auto; }
.booth-header { text-align: center; margin-bottom: 40px; }
.booth-header h2 { font-family: 'Special Elite', cursive; font-size: 2.2rem; margin-bottom: 8px; }
.booth-header p { color: #999; font-size: 0.85rem; font-weight: 300; }
.booth-layout { display: grid; grid-template-columns: 1fr 220px; gap: 40px; align-items: start; }

/* Camera */
.camera-wrap { position: relative; background: #111; overflow: hidden; width: 100%; }
#video { width: 100%; display: block; transform: scaleX(-1); }
#video.grayscale { filter: grayscale(1); }
#video.sepia     { filter: sepia(0.8); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; transition: opacity 0.05s; }
.flash.pop { opacity: 1; }

/* Controls */
.controls { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.ctrl-section label { display: block; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #aaa; margin-bottom: 8px; }
.filter-btns { display: flex; gap: 8px; }
.filter-btn {
  flex: 1; padding: 8px 4px; font-size: 0.75rem; font-family: 'Inter', sans-serif;
  background: #fff; border: 1px solid #e0dbd4; cursor: pointer; color: #666; transition: all 0.15s;
}
.filter-btn.active, .filter-btn:hover { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.caption-input {
  width: 100%; padding: 10px 12px; font-family: 'Special Elite', cursive;
  font-size: 0.95rem; border: 1px solid #e0dbd4; background: #fff; color: #1a1a1a; outline: none;
}
.caption-input:focus { border-color: #1a1a1a; }
.date-toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.date-toggle input { accent-color: #1a1a1a; width: 16px; height: 16px; cursor: pointer; }
.date-toggle span { font-size: 0.82rem; color: #666; }
.shot-dots { display: flex; gap: 8px; margin-top: 8px; }
.dot { width: 24px; height: 24px; border-radius: 50%; background: #e8e4de; transition: background 0.3s; }
.dot.taken { background: #1a1a1a; }
.shoot-btn { width: 100%; padding: 16px; font-size: 0.85rem; letter-spacing: 0.1em; }

/* Strip panel */
.strip-panel { position: sticky; top: 100px; display: flex; flex-direction: column; align-items: center; }
.strip-panel-label { font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: #aaa; margin-bottom: 12px; }
.printer-wrap { position: relative; width: 180px; background: #e8e4de; border-radius: 3px 3px 0 0; padding: 6px 6px 0; }
.printer-slot { width: 100%; height: 8px; background: #ccc8c0; border-radius: 2px; margin-bottom: 4px; box-shadow: inset 0 1px 3px rgba(0,0,0,0.15); }
.strip-outer { overflow: hidden; width: 180px; }
.strip-preview {
  background: #fff; padding: 8px 8px 28px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  display: flex; flex-direction: column; gap: 5px;
  transform: translateY(-100%); transition: transform 0s;
}
.strip-frame-slot {
  width: 100%; aspect-ratio: 4/3; background: #f0ece6;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.strip-frame-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.strip-frame-slot .empty-icon { color: #ccc; font-size: 1.2rem; }
.strip-caption { font-family: 'Special Elite', cursive; font-size: 0.6rem; text-align: center; color: #999; margin-top: 4px; min-height: 12px; }
.strip-date    { font-family: 'Special Elite', cursive; font-size: 0.5rem; text-align: center; color: #bbb; }

.strip-actions { display: flex; flex-direction: column; gap: 8px; width: 180px; margin-top: 12px; }
.strip-actions .btn { display: none; width: 100%; padding: 11px; font-size: 0.78rem; }
.share-btn { background: #4a4a4a !important; }
.share-btn:hover { background: #2a2a2a !important; }
#downloadPrintBtn { background: #3a3a3a !important; }
#downloadPrintBtn:hover { background: #222 !important; }

/* Share modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 300; display: none; align-items: center; justify-content: center; padding: 24px;
}
.modal-overlay.show { display: flex; }
.modal { background: #faf9f7; padding: 40px; max-width: 400px; width: 100%; text-align: center; }
.modal h3 { font-family: 'Special Elite', cursive; font-size: 1.6rem; margin-bottom: 12px; }
.modal p { font-size: 0.85rem; color: #888; font-weight: 300; line-height: 1.6; margin-bottom: 28px; }
.modal-preview { width: 120px; margin: 0 auto 24px; }
.modal-preview img { width: 100%; display: block; }
.modal-actions { display: flex; flex-direction: column; gap: 10px; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 400; display: none; align-items: center; justify-content: center; }
.lightbox.show { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; box-shadow: 0 8px 60px rgba(0,0,0,0.5); }
.lightbox-close { position: absolute; top: 24px; right: 32px; color: #fff; font-size: 2rem; cursor: pointer; font-family: 'Special Elite', cursive; }

/* Countdown */
#countdown-display {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  display: none; align-items: center; justify-content: center;
  z-index: 200; font-family: 'Special Elite', cursive; font-size: 10rem; color: #fff;
}
#countdown-display.show { display: flex; }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  nav { padding: 16px 20px; }
  .booth-layout { grid-template-columns: 1fr; }
  .strip-panel { position: static; }
  .wall-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
}
