:root {
  --bg: #121014;
  --bg-2: #1a1720;
  --ink: #f4efe8;
  --ink-2: #b8b0a8;
  --ink-3: #7a736d;
  --accent: #e4007c;
  --accent-2: #ff5fb0;
  --gold: #e8b44a;
  --line: rgba(244, 239, 232, 0.12);
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: 16px;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1200px) { :root { --gutter: 56px; } }

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); line-height: 1.5; -webkit-font-smoothing: antialiased;
  min-height: 100dvh; overflow-x: hidden;
}
body.locked { overflow: hidden; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; }

.grain {
  pointer-events: none; position: fixed; inset: 0; z-index: 1; opacity: .055; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.eyebrow {
  margin: 0 0 10px; font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent-2); font-weight: 600;
}
.dot { color: var(--accent); margin: 0 .22em; font-style: italic; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 999px;
  padding: 12px 22px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none;
  transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-accent { background: var(--accent); color: #fff; box-shadow: 0 10px 30px -10px rgba(228, 0, 124, .7); }
.btn-accent:hover { background: #f10a88; box-shadow: 0 14px 34px -10px rgba(228, 0, 124, .9); }
.btn-ghost { background: rgba(255,255,255,.06); border-color: var(--line); color: var(--ink); backdrop-filter: blur(10px); }
.btn-ghost:hover { background: rgba(255,255,255,.1); border-color: rgba(244,239,232,.25); }
.btn-lg { padding: 15px 28px; font-size: 16px; }

/* Gate */
.gate {
  position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter);
  background:
    radial-gradient(900px 600px at 15% 10%, rgba(228,0,124,.22), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(232,180,74,.16), transparent 60%),
    var(--bg);
}
.gate-card {
  width: min(460px, 100%); padding: 40px 32px; border: 1px solid var(--line); border-radius: 24px;
  background: rgba(26,23,32,.7); backdrop-filter: blur(20px); text-align: center;
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.8);
  animation: rise .7s cubic-bezier(.2,.8,.2,1) both;
}
.gate-title {
  font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 7vw, 40px); margin: 0 0 8px; letter-spacing: -.01em; line-height: 1.05;
}
.gate-sub { color: var(--ink-2); margin: 0 0 24px; font-size: 15px; }
.field { display: flex; gap: 8px; }
.field input {
  flex: 1; min-width: 0; padding: 13px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(0,0,0,.35); color: var(--ink); font: inherit; font-size: 17px; letter-spacing: .2em; outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(228,0,124,.2); }
.gate-error { color: #ff8db5; font-size: 14px; margin: 14px 0 0; }
.gate-card.shake { animation: shake .45s ease; }
@keyframes shake { 10%,90% { transform: translateX(-2px) } 20%,80% { transform: translateX(4px) } 30%,50%,70% { transform: translateX(-6px) } 40%,60% { transform: translateX(6px) } }
@keyframes rise { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: none } }

/* Hero */
.hero {
  position: relative; min-height: 86dvh; display: grid; place-items: center; text-align: center; padding: 80px var(--gutter) 60px;
  background:
    radial-gradient(1000px 700px at 20% 0%, rgba(228,0,124,.25), transparent 60%),
    radial-gradient(800px 600px at 85% 100%, rgba(232,180,74,.18), transparent 60%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: -20%; opacity: .5; pointer-events: none;
  background: conic-gradient(from 180deg at 50% 50%, transparent 0 70%, rgba(228,0,124,.08) 80%, transparent 90%);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }
.hero-inner { position: relative; z-index: 2; max-width: 820px; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.hero-title {
  font-family: var(--font-display); font-weight: 300; font-size: clamp(44px, 10vw, 112px); line-height: .98; letter-spacing: -.02em; margin: 0 0 18px;
}
.hero-title .dot { font-weight: 300; }
.hero-meta { color: var(--ink-2); font-size: clamp(15px, 2vw, 18px); margin: 0 0 34px; }
.hero-meta b { color: var(--ink); font-weight: 500; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-scroll { position: absolute; bottom: 22px; left: 50%; width: 1px; height: 46px; background: var(--line); overflow: hidden; }
.hero-scroll span { position: absolute; left: 0; top: -50%; width: 100%; height: 50%; background: var(--accent-2); animation: drop 2s ease-in-out infinite; }
@keyframes drop { to { top: 100% } }

/* Gallery */
.gallery { padding: 20px var(--gutter) 60px; max-width: 1600px; margin: 0 auto; }
.day { margin: 48px 0 0; }
.day-head { display: flex; align-items: baseline; gap: 16px; margin: 0 0 16px; }
.day-title {
  font-family: var(--font-display); font-weight: 500; font-style: italic; font-size: clamp(24px, 3.4vw, 34px); margin: 0; letter-spacing: -.01em;
}
.day-count { color: var(--ink-3); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.day-head::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.grid {
  display: grid; gap: 6px; grid-auto-flow: dense;
  grid-template-columns: repeat(3, 1fr); grid-auto-rows: 31vw;
}
@media (min-width: 560px) { .grid { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 22vw; gap: 8px; } }
@media (min-width: 900px) { .grid { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 14.5vw; } }
@media (min-width: 1400px) { .grid { grid-template-columns: repeat(8, 1fr); grid-auto-rows: 180px; } }
.tile {
  position: relative; padding: 0; border: 0; border-radius: 10px; overflow: hidden; cursor: pointer; background: var(--bg-2);
  isolation: isolate; transform: translateZ(0);
}
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .5s ease, transform .6s cubic-bezier(.2,.8,.2,1);
}
.tile img.loaded { opacity: 1; }
.tile:hover img { transform: scale(1.04); }
.tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
  background: linear-gradient(to top, rgba(0,0,0,.35), transparent 45%); opacity: .8; transition: opacity .2s;
}
.tile:hover::after { opacity: 1; }
.tile:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.badge {
  position: absolute; z-index: 2; left: 8px; bottom: 8px; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px 4px 6px; border-radius: 999px; background: rgba(0,0,0,.55); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
}
.badge svg { width: 14px; height: 14px; }

.foot { text-align: center; color: var(--ink-3); padding: 20px var(--gutter) 50px; font-size: 13px; }

/* Viewer */
.viewer {
  position: fixed; inset: 0; z-index: 100; background: #050406; color: #fff; user-select: none; -webkit-user-select: none;
  animation: fade .25s ease both;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.viewer-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 12px 10px 18px;
  background: linear-gradient(to bottom, rgba(0,0,0,.6), transparent); transition: opacity .3s;
}
.viewer-info { display: flex; align-items: baseline; gap: 14px; }
.viewer-counter { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.viewer-date { color: rgba(255,255,255,.7); font-size: 14px; }
.viewer-tools { display: flex; gap: 4px; }
.ibtn {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; cursor: pointer;
  transition: background .18s;
}
.ibtn:hover { background: rgba(255,255,255,.12); }
.ic-pause { display: none; }
.viewer.playing .ic-play { display: none; }
.viewer.playing .ic-pause { display: block; }
.viewer.playing #vPlay { background: rgba(228,0,124,.35); }

.viewer-stage { position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden; }
.viewer-stage .media {
  position: absolute; inset: 0; display: grid; place-items: center;
  animation: mediaIn .45s cubic-bezier(.2,.8,.2,1) both;
}
.viewer-stage .media.out { animation: mediaOut .3s ease both; pointer-events: none; }
@keyframes mediaIn { from { opacity: 0; transform: scale(.985) } to { opacity: 1; transform: none } }
@keyframes mediaOut { to { opacity: 0 } }
.viewer-stage img, .viewer-stage video {
  max-width: 100vw; max-height: 100dvh; width: auto; height: auto; object-fit: contain; background: #000;
}
.viewer-stage video { width: 100vw; height: 100dvh; outline: none; }
.viewer.playing .media.photo img { animation: kenburns 6s ease-in-out both; }
@keyframes kenburns { from { transform: scale(1) } to { transform: scale(1.06) } }

.nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 5; width: 56px; height: 56px; border: 0; border-radius: 50%;
  background: rgba(0,0,0,.45); color: #fff; display: grid; place-items: center; cursor: pointer; backdrop-filter: blur(6px);
  transition: background .18s, opacity .3s, transform .18s;
}
.nav:hover { background: rgba(228,0,124,.7); }
.nav-prev { left: 14px; } .nav-next { right: 14px; }
@media (max-width: 720px) { .nav { width: 44px; height: 44px; background: rgba(0,0,0,.3); } .nav-prev { left: 8px } .nav-next { right: 8px } }

.viewer-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.12); z-index: 5; opacity: 0; transition: opacity .3s; }
.viewer-progress span { display: block; height: 100%; width: 0; background: var(--accent); }
.viewer.playing .viewer-progress { opacity: 1; }
.viewer-progress span.run { transition: width linear; }

.viewer.idle .viewer-top, .viewer.idle .nav { opacity: 0; pointer-events: none; }
.viewer.idle { cursor: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

@media (max-width: 600px) {
  .viewer-info { flex-direction: column; gap: 2px; }
  .viewer-counter, .viewer-date { white-space: nowrap; font-size: 13px; }
  .viewer-date { font-size: 12px; }
}

/* Highlights (cinema) mode */
.btn-best { background: linear-gradient(135deg, #e8b44a, #e4007c 70%); color: #fff; border: 0; box-shadow: 0 10px 30px -10px rgba(232,180,74,.7); }
.btn-best:hover { filter: brightness(1.08); box-shadow: 0 14px 34px -10px rgba(228,0,124,.8); }
.btn-best small { font-weight: 500; opacity: .85; }

.viewer.cinema .viewer-stage .media { animation: cinemaIn 1s ease both; }
.viewer.cinema .viewer-stage .media.out { animation: cinemaOut .9s ease both; }
@keyframes cinemaIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes cinemaOut { to { opacity: 0 } }
.viewer.cinema .viewer-stage img { max-width: 100vw; max-height: 100dvh; }
.viewer.cinema.playing .media.photo img.kb0 { animation: kbZoomIn 7.5s ease-in-out both; }
.viewer.cinema.playing .media.photo img.kb1 { animation: kbPanLeft 7.5s ease-in-out both; }
.viewer.cinema.playing .media.photo img.kb2 { animation: kbZoomOut 7.5s ease-in-out both; }
.viewer.cinema.playing .media.photo img.kb3 { animation: kbPanRight 7.5s ease-in-out both; }
@keyframes kbZoomIn  { from { transform: scale(1) }            to { transform: scale(1.08) } }
@keyframes kbZoomOut { from { transform: scale(1.08) }         to { transform: scale(1) } }
@keyframes kbPanLeft { from { transform: scale(1.06) translateX(1.5%) }  to { transform: scale(1.06) translateX(-1.5%) } }
@keyframes kbPanRight{ from { transform: scale(1.06) translateX(-1.5%) } to { transform: scale(1.06) translateX(1.5%) } }
.viewer.cinema .viewer-progress span { background: linear-gradient(90deg, #e8b44a, #e4007c); }

.viewer-stage .media.card {
  background:
    radial-gradient(900px 600px at 20% 10%, rgba(228,0,124,.28), transparent 60%),
    radial-gradient(700px 500px at 85% 90%, rgba(232,180,74,.2), transparent 60%),
    #0b0a0d;
  text-align: center; padding: 24px;
}
.card-inner { animation: rise 1.2s cubic-bezier(.2,.8,.2,1) both; }
.card-inner h2 { font-family: var(--font-display); font-weight: 300; font-style: italic; font-size: clamp(42px, 9vw, 110px); line-height: 1; margin: 6px 0 14px; letter-spacing: -.02em; }
.card-sub { color: var(--ink-2); font-size: clamp(15px, 2.2vw, 20px); margin: 0; letter-spacing: .04em; }
