/* SHELAYMA — The Melave Malka Sessions
   Bottle-green velvet, brass, candle wax. A taper in the margin
   burns down as you read. */

:root {
  --velvet: #0d1410;
  --velvet-2: #142019;
  --velvet-3: #1b2a21;
  --brass: #d9a453;
  --brass-hot: #f0c37c;
  --wax: #efe6d2;
  --wax-dim: #c7bba4;
  --wine: #b0575f;
  --wine-hot: #cf7d84;
  --quiet: #7d8a7a;
  --hairline: rgba(239, 230, 210, 0.13);
  --display: "Gloock", Georgia, serif;
  --body: "Hanken Grotesk", -apple-system, sans-serif;
  --hebrew: "Frank Ruhl Libre", serif;
  --measure: 33rem;
  --pad: clamp(1.25rem, 4vw, 3rem);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--velvet);
  color: var(--wax);
  font-family: var(--body);
  font-weight: 300;
  font-size: 1.04rem;
  line-height: 1.7;
  overflow-x: hidden;
}

::selection { background: var(--brass); color: var(--velvet); }

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

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; }

/* ---------- atmosphere ---------- */

#glow {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: 0; pointer-events: none;
}

.page { position: relative; z-index: 2; }

/* ---------- the margin taper ---------- */

.taper {
  position: fixed;
  right: clamp(0.9rem, 2.4vw, 2.2rem);
  top: 12vh;
  height: 76vh;
  width: 14px;
  z-index: 5;
  pointer-events: none;
}

.taper-wax {
  position: absolute;
  left: 3px; right: 3px;
  bottom: 12px;
  top: calc(var(--burn, 0) * (76vh - 60px));
  background: linear-gradient(180deg, var(--wax) 0%, #ded1b8 55%, #cfc0a4 100%);
  border-radius: 4px 4px 2px 2px;
  box-shadow: inset -2px 0 3px rgba(13, 20, 16, 0.28);
}

.taper-flame {
  position: absolute;
  left: 50%;
  top: calc(var(--burn, 0) * (76vh - 60px) - 22px);
  transform: translateX(-50%);
  width: 12px; height: 20px;
}
.taper-flame i {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 78%, #fff5dd 0%, var(--brass-hot) 42%, rgba(217, 164, 83, 0.14) 78%, transparent 100%);
  border-radius: 50% 50% 46% 54% / 62% 62% 38% 38%;
  transform-origin: 50% 92%;
}
@media (prefers-reduced-motion: no-preference) {
  .taper-flame i { animation: flick 2.1s ease-in-out infinite; }
  @keyframes flick {
    0%, 100% { transform: rotate(-2.4deg) scale(1); opacity: 0.95; }
    30% { transform: rotate(2deg) scale(1.06, 0.95); opacity: 1; }
    62% { transform: rotate(-1deg) scale(0.95, 1.06); opacity: 0.9; }
  }
}

.taper-plate {
  position: absolute;
  bottom: 0; left: -4px; right: -4px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, var(--brass) 0%, rgba(217, 164, 83, 0.35) 62%, transparent 78%);
}

@media (max-width: 900px) { .taper { display: none; } }

/* ---------- home brand ---------- */

.home-brand {
  position: fixed;
  top: 1.15rem; left: clamp(1.25rem, 4vw, 3rem);
  z-index: 6;
  font-family: var(--display);
  font-size: 0.98rem;
  color: var(--wax);
  text-decoration: none;
  letter-spacing: 0.04em;
  opacity: 0.85;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.home-brand:hover { opacity: 1; color: var(--brass-hot); }

/* ---------- type utilities ---------- */

.eyebrow {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.71rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--quiet);
}
.eyebrow .dot { color: var(--brass); }

.wrap { max-width: 72em; margin: 0 auto; padding: 0 var(--pad); }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.95s ease, transform 0.95s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- hero ---------- */

.hero {
  min-height: 100svh;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  text-align: center;
  padding: 5rem var(--pad) 4rem;
  position: relative;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.7rem, 8.4vw, 6rem);
  line-height: 1.02;
  margin: 1.3rem 0 1.5rem;
}
.hero .lit {
  color: var(--brass);
  text-shadow: 0 0 44px rgba(217, 164, 83, 0.35);
}

.thesis {
  max-width: 36em;
  font-size: clamp(1.02rem, 1.7vw, 1.2rem);
  color: var(--wax-dim);
}
.thesis em { color: var(--wax); }

.nights-nav { display: flex; gap: 0.9rem; margin-top: 2.4rem; flex-wrap: wrap; justify-content: center; }

.night-chip {
  display: inline-flex; align-items: center; gap: 0.7rem;
  padding: 0.68rem 1.25rem;
  border: 1px solid var(--hairline);
  border-radius: 99px;
  text-decoration: none;
  font-size: 0.95rem;
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}
.night-chip:hover { transform: translateY(-2px); }
.night-chip.a:hover { border-color: var(--brass); background: rgba(217, 164, 83, 0.07); }
.night-chip.b:hover { border-color: var(--wine); background: rgba(176, 87, 95, 0.09); }

.night-chip .tag {
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
}
.night-chip.b .tag { color: var(--wine-hot); }

.hero-candles {
  display: flex; gap: 1.6rem; align-items: flex-end;
  margin-top: 3.2rem;
  height: 74px;
}
.hc {
  position: relative;
  display: block;
  width: 9px;
  height: calc(40px * var(--h, 1));
  background: linear-gradient(180deg, var(--wax), #d6c8ac);
  border-radius: 3px 3px 1px 1px;
}
.hc i {
  position: absolute;
  left: 50%; top: -14px;
  width: 9px; height: 14px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 80%, #fff4da 0%, var(--brass-hot) 45%, transparent 80%);
  border-radius: 50% 50% 44% 56% / 60% 60% 40% 40%;
  transform-origin: 50% 95%;
}
@media (prefers-reduced-motion: no-preference) {
  .hc i { animation: flick 2.3s ease-in-out infinite; animation-delay: var(--d, 0s); }
}

.scroll-cue {
  margin-top: 2.6rem;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--quiet);
}

/* ---------- ritual ---------- */

.ritual { padding: clamp(5rem, 12vh, 8.5rem) 0; }

.section-head { max-width: 42em; margin-bottom: 3.6rem; }
.section-head h2, .list-section h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.1;
  margin: 0.9rem 0 1rem;
}
.lede { max-width: var(--measure); color: var(--wax-dim); }

.ritual-list { list-style: none; border-top: 1px solid var(--hairline); max-width: 56em; }
.ritual-list li {
  display: grid;
  grid-template-columns: 4.6rem 15em 1fr;
  gap: 1.4rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--hairline);
}
.ritual-list .when {
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--brass);
}
.ritual-list .what { font-weight: 500; color: var(--wax); }
.ritual-list .why { color: var(--wax-dim); font-size: 0.97rem; }

@media (max-width: 760px) {
  .ritual-list li { grid-template-columns: 3.6rem 1fr; }
  .ritual-list .why { grid-column: 2; }
}

/* ---------- nights ---------- */

.night { padding: clamp(4.5rem, 11vh, 8rem) 0; }
.night .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2.2rem, 6vw, 5.5rem);
  align-items: start;
}
.night.flip .wrap { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }

.night-b { background: linear-gradient(rgba(20, 32, 25, 0), rgba(20, 32, 25, 0.55) 18%, rgba(20, 32, 25, 0.55) 82%, rgba(20, 32, 25, 0)); }

.night-mark { display: flex; align-items: center; gap: 1.1rem; margin-bottom: 1rem; }
.tag-big {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
}
.night-b .tag-big { color: var(--wine-hot); }
.night-mark .rule { flex: 0 1 72px; height: 1px; background: var(--hairline); }
.night-mark .heb {
  font-family: var(--hebrew);
  font-size: 1.5rem;
  color: var(--wax-dim);
}

.night h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.3rem, 5.6vw, 4rem);
  line-height: 1;
  margin-bottom: 1.2rem;
}

.fmt-lede { max-width: var(--measure); color: var(--wax-dim); margin-bottom: 1.5rem; }
.fmt-lede em { color: var(--wax); }

.artist { display: flex; flex-direction: column; gap: 0.15rem; margin-bottom: 1.8rem; }
.artist .name {
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--brass-hot);
}
.night-b .artist .name { color: var(--wine-hot); }
.artist .bio { font-size: 0.92rem; color: var(--quiet); }

/* liner notes */

.liner {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 1.3rem 1.4rem 1.1rem;
  background: rgba(13, 20, 16, 0.55);
  margin-bottom: 1.6rem;
  max-width: 34em;
}
.liner-head { margin-bottom: 0.8rem; }
.liner ol { list-style: none; }
.liner li {
  display: flex; align-items: baseline; gap: 0.7rem;
  padding: 0.42rem 0;
  font-size: 0.96rem;
  transition: padding-left 0.3s ease;
}
.liner li:hover { padding-left: 0.4rem; }
.liner li:hover .song { color: var(--brass-hot); }
.night-b .liner li:hover .song { color: var(--wine-hot); }
.liner .song { transition: color 0.3s ease; }
.liner .tno {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--brass);
  min-width: 1.2em;
}
.night-b .liner .tno { color: var(--wine-hot); }
.liner .song { color: var(--wax); }
.liner .dots {
  flex: 1;
  border-bottom: 1px dotted rgba(239, 230, 210, 0.25);
  transform: translateY(-3px);
}
.liner .dur { font-size: 0.8rem; color: var(--quiet); font-variant-numeric: tabular-nums; }

/* listen button */

.listen {
  display: inline-flex; align-items: center; gap: 0.8rem;
  background: none;
  border: 1px solid var(--hairline);
  border-radius: 99px;
  color: var(--wax);
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.7rem 1.3rem;
  cursor: pointer;
  margin-bottom: 2rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}
.listen:hover { border-color: var(--brass); background: rgba(217, 164, 83, 0.07); }
.listen .disc {
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--brass);
  position: relative;
  transition: background 0.3s ease;
}
.listen[data-playing="true"] .disc {
  background: var(--brass-hot);
  box-shadow: 0 0 0 4px rgba(217, 164, 83, 0.18);
}
@media (prefers-reduced-motion: no-preference) {
  .listen[data-playing="true"] .disc { animation: discPulse 1.1s ease-in-out infinite; }
  @keyframes discPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(217, 164, 83, 0.12); }
    50% { box-shadow: 0 0 0 7px rgba(217, 164, 83, 0.22); }
  }
}
.listen .hint { font-size: 0.72rem; color: var(--quiet); letter-spacing: 0.04em; }

/* ticket stubs */

.stubs { display: flex; gap: 1.1rem; flex-wrap: wrap; }

.stub {
  display: flex;
  background: var(--velvet-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease;
}
.stub:hover { transform: rotate(-1.2deg) translateY(-3px); border-color: rgba(217, 164, 83, 0.5); }

.stub-tab {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--velvet);
  background: var(--brass);
  padding: 0.9rem 0.34rem;
  display: flex; align-items: center; justify-content: center;
}
.night-b .stub-tab { background: var(--wine); color: var(--wax); }

.stub-body { padding: 1rem 1.25rem 1.05rem; border-left: 1px dashed rgba(13, 20, 16, 0.9); }
.stub .day {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--quiet);
}
.stub .date {
  font-family: var(--display);
  font-size: 1.7rem;
  color: var(--wax);
  margin: 0.1rem 0 0.4rem;
}
.stub .meta { font-size: 0.82rem; color: var(--wax-dim); line-height: 1.5; }
.stub .left { margin-top: 0.55rem; font-size: 0.82rem; color: var(--brass-hot); }
.night-b .stub .left { color: var(--wine-hot); }
.stub .left b { font-size: 1.05rem; }

/* media column */

.night-media { position: sticky; top: 7vh; }
.night-media img {
  border-radius: 6px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.night-media figcaption {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--quiet);
}

/* ---------- interlude ---------- */

.interlude { padding: clamp(5rem, 12vh, 9rem) 0; }
.interlude .wrap {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: 62em;
}
.interlude img {
  border-radius: 6px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.5);
  max-width: 340px;
}
.interlude blockquote {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  line-height: 1.3;
}
.interlude .wine { color: var(--wine-hot); }
.interlude cite {
  display: block;
  margin-top: 1.4rem;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--quiet);
}

/* ---------- list ---------- */

.list-section {
  text-align: center;
  padding: clamp(5rem, 12vh, 9rem) 0;
  background: linear-gradient(rgba(20, 32, 25, 0), rgba(20, 32, 25, 0.6));
}
.list-section .lede { margin: 0 auto 2.4rem; }

.list-form { max-width: 34em; margin: 0 auto; }

.pick-nights { border: 0; margin-bottom: 1.4rem; }
.pick-nights legend { margin: 0 auto 1.2rem; float: none; width: 100%; }

.pick { display: inline-block; margin: 0 0.3rem 0.6rem; cursor: pointer; }
.pick input { position: absolute; opacity: 0; }
.pick span {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--hairline);
  border-radius: 99px;
  font-size: 0.9rem;
  color: var(--wax-dim);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.pick input:checked + span {
  border-color: var(--brass);
  color: var(--wax);
  background: rgba(217, 164, 83, 0.1);
}
.pick input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }

.email-row { display: flex; gap: 0.7rem; flex-wrap: wrap; justify-content: center; }
.email-row input {
  flex: 1 1 15em;
  background: rgba(239, 230, 210, 0.05);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  color: var(--wax);
  font-family: var(--body);
  font-size: 0.98rem;
  padding: 0.85rem 1rem;
}
.email-row input::placeholder { color: var(--quiet); }
.email-row input:focus-visible { outline-offset: 0; border-color: var(--brass); }

.email-row button {
  background: var(--brass);
  color: var(--velvet);
  border: 0;
  border-radius: 4px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.email-row button:hover { background: var(--brass-hot); transform: translateY(-1px); }

.form-note { margin-top: 1.1rem; font-size: 0.84rem; color: var(--quiet); }
.form-done { display: none; margin-top: 1.3rem; color: var(--brass-hot); }
.list-form.sent .email-row, .list-form.sent .pick-nights, .list-form.sent .form-note { display: none; }
.list-form.sent .form-done { display: block; }

/* ---------- footer ---------- */

footer { border-top: 1px solid var(--hairline); padding: 3.2rem 0 2.8rem; }
footer .wrap {
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
  font-size: 0.92rem; color: var(--wax-dim);
}
footer .brand {
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--wax);
  margin-bottom: 0.4rem;
}
footer nav { display: flex; flex-direction: column; gap: 0.45rem; text-align: right; }
footer nav a { text-decoration-color: rgba(217, 164, 83, 0.5); }

@media (max-width: 900px) {
  .night .wrap, .night.flip .wrap { grid-template-columns: 1fr; }
  .night-media { position: static; order: -1; max-width: 560px; }
  .interlude .wrap { grid-template-columns: 1fr; }
  .interlude img { margin: 0 auto; }
  footer nav { text-align: left; }
}
