/* ============================================================
   Farewell, Oded — warm, modern, editorial. Fun but grown-up.
   Fonts: Bricolage Grotesque (characterful display) + Inter (body).
   Palette: warm cream + charcoal + one confident coral, restrained accents.
   ============================================================ */

:root {
  --bg: #f4efe6;
  --ink: #1b1712;
  --ink-soft: #756b5d;
  --card: #fffdf8;
  --card-edge: #e4dccd;
  --primary: #db4a2b;   /* confident coral-red */
  --primary-ink: #fff9f2;
  --teal: #1f6f68;
  --gold: #bf8a2e;
  --plum: #7b4b7e;
  --shadow-sm: 0 2px 6px rgba(27, 23, 18, 0.06);
  --shadow-md: 0 14px 34px -14px rgba(27, 23, 18, 0.32);
  --shadow-lg: 0 30px 70px -24px rgba(27, 23, 18, 0.42);
  --radius: 18px;
  --font-display: "Bricolage Grotesque", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16130e;
    --ink: #f2ece0;
    --ink-soft: #a89d8b;
    --card: #211d16;
    --card-edge: #362f23;
    --primary: #f2603f;
    --primary-ink: #16130e;
    --teal: #4cb3aa;
    --gold: #e0ad57;
    --plum: #c091c3;
    --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 16px 40px -14px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 34px 80px -24px rgba(0, 0, 0, 0.7);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- password gate ---- */
.gate {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(900px 500px at 20% -10%, color-mix(in srgb, var(--primary) 22%, var(--bg)), transparent 60%),
    var(--bg);
}
.gate[hidden] { display: none; }
.gate-card {
  width: min(440px, 100%);
  text-align: center;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 22px;
  padding: 2.4rem 1.8rem;
  box-shadow: var(--shadow-lg);
}
.gate-emoji { font-size: 2.6rem; display: block; }
.gate-title { font-family: var(--font-display); font-weight: 800; font-size: clamp(1.5rem, 5vw, 2rem); letter-spacing: -0.02em; margin: 0.6rem 0 0.4rem; color: var(--ink); }
.gate-sub { color: var(--ink-soft); margin: 0 0 1.6rem; line-height: 1.45; }
#gateForm { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; }
#gatePass {
  flex: 1 1 200px;
  font-family: var(--font-body); font-size: 1rem; font-weight: 500;
  color: var(--ink); background: var(--bg);
  border: 1px solid var(--card-edge); border-radius: 999px;
  padding: 0.72em 1.1em;
}
#gatePass:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-color: transparent; }
#gateForm .btn { flex: 0 0 auto; }
.gate-error { color: var(--primary); font-weight: 600; margin: 1rem 0 0; }

/* subtle atmospheric glow — no toy blobs */
.blobs { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.22; }
.b1 { width: 620px; height: 620px; left: -180px; top: -160px; background: var(--primary); }
.b2 { width: 520px; height: 520px; right: -160px; top: 22%; background: var(--teal); opacity: 0.16; }
.b3 { width: 460px; height: 460px; left: 30%; bottom: -220px; background: var(--gold); opacity: 0.14; }
@media (prefers-color-scheme: dark) { .blob { opacity: 0.3; } .b2 { opacity: 0.22; } .b3 { opacity: 0.2; } }

#confetti { position: fixed; inset: 0; z-index: 60; pointer-events: none; }

/* ---- hero ---- */
.hero {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: clamp(3.5rem, 10vw, 7rem) 1.25rem 1.5rem;
  max-width: 920px;
  margin: 0 auto;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(0.82rem, 1.9vw, 0.98rem);
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  border: 1px solid var(--card-edge);
  background: var(--card);
  padding: 0.5em 1em;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  margin: 0 0 1.6rem;
}

.title {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 0.94;
  margin: 0;
  font-size: clamp(3rem, 13vw, 8rem);
  letter-spacing: -0.03em;
}
.title-line { display: block; color: var(--ink); }
.title-name { display: block; color: var(--primary); }
.wave {
  display: inline-block;
  font-size: 0.42em;
  vertical-align: middle;
  margin-bottom: 0.4em;
  animation: wave 2.6s ease-in-out infinite;
  transform-origin: 70% 80%;
}
@keyframes wave { 0%,60%,100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-6deg); } 45% { transform: rotate(12deg); } }

.tagline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 3vw, 1.7rem);
  color: var(--ink);
  margin: 1.5rem auto 0.2rem;
  max-width: 30ch;
  letter-spacing: -0.01em;
}
.lastday {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0.7rem 0 0;
}

.hero-actions { display: flex; gap: 0.7rem; justify-content: center; flex-wrap: wrap; margin-top: 2rem; }
.hint { color: var(--ink-soft); margin-top: 1.1rem; font-size: 0.92rem; }

/* ---- buttons ---- */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.72em 1.35em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); }
.btn-ghost { background: var(--card); color: var(--ink); border-color: var(--card-edge); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--ink-soft); }

/* ---- the wall ---- */
main { position: relative; z-index: 1; }
.wall {
  max-width: 1160px;
  margin: 1.5rem auto 3rem;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.5rem;
}

.card {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: var(--radius);
  padding: 0.6rem 0.6rem 1.1rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  transform: rotate(var(--tilt, 0deg));
}
.card:hover, .card:focus-visible {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--ink-soft);
  outline: none;
}

/* featured "play all" card — cinematic full-width banner */
.card.featured {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  padding: 0;
  border-color: var(--primary);
  border-width: 2px;
}
.featured-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  transform: scale(1.2);
  filter: blur(30px) brightness(0.5) saturate(1.15);
}
.featured-bg::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(10,8,6,0.7) 0%, rgba(10,8,6,0.35) 55%, rgba(10,8,6,0.15) 100%);
}
.featured-body {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 1.8rem;
  padding: 1.6rem;
}
.featured-body .thumb { flex: 0 0 180px; width: 180px; aspect-ratio: 3 / 4; box-shadow: var(--shadow-md); }
.featured-text { text-align: left; color: #fff; }
.featured-text .card-name { color: #fff; font-size: clamp(1.6rem, 4vw, 2.5rem); margin: 0; letter-spacing: -0.01em; }
.featured-text .card-role { color: #fff; opacity: 0.92; font-size: 0.82rem; margin-top: 0.45rem; }
.featured-text .card-caption { color: rgba(255,255,255,0.88); font-size: 1.05rem; margin-top: 0.55rem; }
.featured-cta {
  display: inline-flex; align-items: center; margin-top: 1.1rem;
  background: var(--primary); color: var(--primary-ink);
  font-family: var(--font-body); font-weight: 700; font-size: 0.95rem;
  padding: 0.62em 1.2em; border-radius: 999px; box-shadow: var(--shadow-md);
  transition: transform 0.15s ease;
}
.card.featured:hover .featured-cta { transform: translateY(-2px); }
.badge {
  display: inline-block; margin-bottom: 0.85rem;
  background: var(--primary); color: var(--primary-ink);
  font-family: var(--font-body); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.4em 0.8em; border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
@media (max-width: 560px) {
  .featured-body { flex-direction: column; text-align: center; gap: 1.1rem; padding: 1.3rem; }
  .featured-text { text-align: center; }
  .featured-body .thumb { flex-basis: auto; width: 150px; }
}

.thumb {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--ink), var(--ink-soft));
  display: grid;
  place-items: center;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .thumb-fallback { font-size: 2.6rem; opacity: 0.9; }
.thumb::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.35), transparent 55%); }
.play {
  position: absolute;
  z-index: 1;
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.92);
  color: var(--ink);
  display: grid; place-items: center;
  font-size: 1.05rem; padding-left: 3px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
}
.card:hover .play { transform: scale(1.1); }

.accent-bar { height: 3px; width: 46px; border-radius: 999px; margin: 1rem 0.5rem 0.5rem; background: var(--card-edge); }

.card-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em; margin: 0 0.5rem; }
.card-role { color: var(--ink-soft); font-weight: 600; font-size: 0.76rem; margin: 0.25rem 0.5rem 0; text-transform: uppercase; letter-spacing: 0.08em; }
.card-caption { color: var(--ink); font-weight: 500; margin: 0.6rem 0.5rem 0; line-height: 1.45; font-size: 0.98rem; }

/* ---- footer ---- */
.footer { position: relative; z-index: 1; text-align: center; padding: 3rem 1.25rem 4.5rem; border-top: 1px solid var(--card-edge); margin-top: 2rem; }
.credit { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--ink); margin: 0 0 1.2rem; }
.footer-actions { display: flex; justify-content: center; }
.domain { margin-top: 1.4rem; color: var(--ink-soft); font-weight: 600; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* ---- modal ---- */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 1.25rem; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(15, 12, 8, 0.7); backdrop-filter: blur(6px); }
.modal-card {
  position: relative;
  width: min(430px, 100%);
  background: var(--card);
  border: 1px solid var(--card-edge);
  border-radius: 20px;
  padding: 0.85rem;
  box-shadow: var(--shadow-lg);
  animation: pop 0.22s ease;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-close {
  position: absolute; top: -16px; right: -16px;
  width: 42px; height: 42px; border-radius: 50%;
  border: none; background: var(--primary); color: var(--primary-ink);
  font-size: 1.05rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: transform 0.2s ease;
}
.modal-close:hover { transform: rotate(90deg); }
.modal-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--card-edge); background: var(--card); color: var(--ink);
  font-family: var(--font-display); font-size: 1.6rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center; z-index: 2;
  box-shadow: var(--shadow-md);
  transition: transform 0.15s ease, background 0.15s ease;
}
.modal-nav:hover { background: var(--primary); color: var(--primary-ink); border-color: transparent; }
.modal-nav:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.modal-nav.prev { left: -22px; padding-right: 3px; }
.modal-nav.next { right: -22px; padding-left: 3px; }
@media (max-width: 640px) {
  .modal-nav.prev { left: 6px; }
  .modal-nav.next { right: 6px; }
}
.modal-stage {
  aspect-ratio: 9 / 16;
  height: min(72vh, 620px);
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.modal-stage video, .modal-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.modal-stage video { object-fit: cover; transform-origin: center center; }
.modal-stage iframe { object-fit: contain; }
.modal-meta { padding: 0.9rem 0.5rem 0.3rem; }
.modal-meta strong { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; display: block; letter-spacing: -0.01em; }
.modal-meta span { color: var(--ink-soft); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .wave { animation: none; }
  .card { transform: none !important; }
  .btn:hover, .card:hover { transform: none; }
  #confetti { display: none; }
  html { scroll-behavior: auto; }
}
