/* SHELAYMA — The Fire Circle
   Charred wood, flame, ash. One glow, fed by scroll. */

:root {
  --char: #120b06;
  --char-2: #1b1109;
  --char-3: #26170c;
  --flame: #f28c38;
  --flame-deep: #c9541c;
  --gold: #ffd9a0;
  --ash: #e9ddc8;
  --smoke: #a3937d;
  --smoke-dim: #6f6353;
  --hairline: rgba(233, 221, 200, 0.14);
  --display: "Cormorant Upright", Georgia, serif;
  --body: "Alegreya", Georgia, serif;
  --hebrew: "Frank Ruhl Libre", serif;
  --measure: 33em;
}

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

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

body {
  background: var(--char);
  color: var(--ash);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-x: hidden;
}

::selection { background: var(--flame-deep); color: var(--gold); }

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(--flame); outline-offset: 3px; }

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

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

.fire-glow {
  --glow: 0.4;
  position: fixed;
  left: 50%; bottom: -42vh;
  width: 130vw; height: 90vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center,
    rgba(242, 140, 56, calc(var(--glow) * 0.32)) 0%,
    rgba(201, 84, 28, calc(var(--glow) * 0.16)) 34%,
    rgba(18, 11, 6, 0) 68%);
  z-index: 0; pointer-events: none;
  transition: opacity 0.6s ease;
}

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

.eyebrow {
  font-family: var(--body);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--smoke);
}

/* ---------- topbar ---------- */

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  z-index: 10;
  background: linear-gradient(rgba(18, 11, 6, 0.85), rgba(18, 11, 6, 0));
  transition: background 0.4s ease, backdrop-filter 0.4s ease;
}
.topbar.scrolled {
  background: linear-gradient(rgba(18, 11, 6, 0.94), rgba(18, 11, 6, 0.55));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.34em;
  text-decoration: none;
  color: var(--gold);
}

.topbar nav { display: flex; gap: clamp(1rem, 3vw, 2.2rem); align-items: center; }

.topbar nav a {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--smoke);
  transition: color 0.25s ease;
}
.topbar nav a:hover { color: var(--gold); }

.nav-cta {
  border: 1px solid var(--hairline);
  padding: 0.42rem 0.95rem;
  border-radius: 99px;
  color: var(--ash) !important;
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}
.nav-cta:hover { border-color: var(--flame); background: rgba(242, 140, 56, 0.08); }

/* ---------- shared layout ---------- */

main { position: relative; z-index: 2; }

section { padding: clamp(5rem, 12vh, 9rem) clamp(1.25rem, 5vw, 4rem); }

.section-head { max-width: 40em; margin: 0 auto 4rem; text-align: center; }

.section-head h2, .circle-copy h2, .seats-copy h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2rem, 4.6vw, 3.1rem);
  line-height: 1.12;
  color: var(--gold);
  margin: 0.9rem 0 1.1rem;
}

.section-lede { max-width: var(--measure); margin: 0 auto; color: var(--smoke); font-size: 1.02rem; }

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

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.9s ease, transform 0.9s 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;
  position: relative;
  padding-top: 6rem;
}

.hebrew-ghost {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -58%);
  font-family: var(--hebrew);
  font-weight: 300;
  font-size: clamp(11rem, 32vw, 26rem);
  color: rgba(242, 140, 56, 0.055);
  user-select: none;
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
}

.wordmark {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(3.4rem, 11vw, 7.5rem);
  line-height: 0.98;
  color: var(--ash);
  margin: 1.4rem 0 1.6rem;
  text-wrap: balance;
}

.hero-thesis {
  max-width: 34em;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: var(--smoke);
}

.hero-meta {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 0.65rem;
  margin-top: 2.1rem;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--smoke-dim);
}
.hero-meta .dot { color: var(--flame); }

.down-cue { margin-top: 3.4rem; display: inline-block; }
.cue-line {
  display: block; width: 1px; height: 64px;
  background: linear-gradient(var(--flame), transparent);
  animation: cueDrop 2.4s ease-in-out infinite;
}
@keyframes cueDrop {
  0%, 100% { transform: scaleY(0.55); transform-origin: top; opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .cue-line { animation: none; } }

/* ---------- the night (movements + fuse) ---------- */

.movements {
  position: relative;
  max-width: 44em;
  margin: 0 auto;
  padding-left: clamp(3.4rem, 7vw, 5rem);
}

.fuse {
  position: absolute;
  left: clamp(1rem, 2.5vw, 1.6rem);
  top: 0.4rem; bottom: 0.4rem;
  width: 2px;
  background: rgba(233, 221, 200, 0.1);
}
.fuse-fill {
  position: absolute; top: 0; left: 0; width: 100%;
  height: calc(var(--burn, 0) * 100%);
  background: linear-gradient(var(--flame-deep), var(--flame));
}
.fuse-tip {
  position: absolute;
  top: calc(var(--burn, 0) * 100%);
  left: 50%;
  width: 9px; height: 9px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: var(--gold);
  box-shadow: 0 0 14px 4px rgba(242, 140, 56, 0.65);
}
@media (prefers-reduced-motion: no-preference) {
  .fuse-tip { animation: tipBreathe 1.8s ease-in-out infinite; }
  @keyframes tipBreathe {
    0%, 100% { box-shadow: 0 0 10px 3px rgba(242, 140, 56, 0.5); }
    50% { box-shadow: 0 0 20px 6px rgba(242, 140, 56, 0.8); }
  }
}

.movement {
  display: grid;
  grid-template-columns: 4.2rem 1fr;
  gap: 1.4rem;
  padding: 2.2rem 0;
}
.movement + .movement { border-top: 1px solid var(--hairline); }

.movement-time {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--flame);
  line-height: 1.2;
}

.movement-body h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.65rem;
  color: var(--ash);
  margin-bottom: 0.25rem;
}

.fire-note {
  font-style: italic;
  color: var(--flame);
  font-size: 0.95rem;
  margin-bottom: 0.7rem;
}

.movement-body p:not(.fire-note) { max-width: var(--measure); color: var(--smoke); }

.movement-photo { grid-column: 1 / -1; margin-top: 1.6rem; }
.movement-photo img {
  border-radius: 4px;
  max-height: 460px;
  width: auto;
  margin: 0 auto;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.55);
}
.movement-photo figcaption { text-align: center; margin-top: 0.9rem; }

/* ---------- the circle ---------- */

.circle {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: 74em;
  margin: 0 auto;
}

.circle-photo img {
  border-radius: 4px;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.6);
}

.circle-copy p:not(.eyebrow) { max-width: var(--measure); color: var(--smoke); margin-bottom: 1rem; }
.circle-copy em { color: var(--ash); }

.know-list { list-style: none; margin-top: 1.8rem; border-top: 1px solid var(--hairline); }
.know-list li {
  display: grid;
  grid-template-columns: 6.4rem 1fr;
  gap: 1rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 0.98rem;
}
.know-list li span {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--flame);
  padding-top: 0.28em;
}

/* ---------- seats ---------- */

.seats { padding-bottom: clamp(6rem, 14vh, 10rem); }

.seats-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  max-width: 68em;
  margin: 0 auto;
}

.ring-wrap { max-width: 420px; margin: 0 auto; width: 100%; }

.seat-ring { width: 100%; height: auto; display: block; }

.pit-flame { fill: var(--flame); }
@media (prefers-reduced-motion: no-preference) {
  .pit-flame {
    transform-origin: 150px 145px;
    animation: flameSway 3.2s ease-in-out infinite;
  }
  @keyframes flameSway {
    0%, 100% { transform: scale(1) rotate(-1.6deg); }
    38% { transform: scale(1.06, 0.97) rotate(1.4deg); }
    70% { transform: scale(0.96, 1.05) rotate(-0.6deg); }
  }
}

.seat-dots circle {
  fill: rgba(233, 221, 200, 0.16);
  transition: fill 0.5s ease;
}
.seat-dots circle.taken { fill: var(--flame-deep); }
.seat-dots circle.open { fill: none; stroke: var(--gold); stroke-width: 1.4; }

.ring-count {
  font-family: var(--body);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  fill: var(--smoke);
}

.seats-copy .seats-lede { max-width: var(--measure); color: var(--smoke); margin-bottom: 1.8rem; }

.seat-form { display: flex; gap: 0.7rem; flex-wrap: wrap; max-width: 30em; }

.seat-form input {
  flex: 1 1 14em;
  background: var(--char-2);
  border: 1px solid var(--hairline);
  border-radius: 3px;
  color: var(--ash);
  font-family: var(--body);
  font-size: 1rem;
  padding: 0.85rem 1rem;
}
.seat-form input::placeholder { color: var(--smoke-dim); }
.seat-form input:focus-visible { outline-offset: 0; border-color: var(--flame); }

.seat-form button {
  background: var(--flame);
  color: var(--char);
  border: 0;
  border-radius: 3px;
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.5rem;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.seat-form button:hover { background: var(--gold); transform: translateY(-1px); }

.form-note { margin-top: 1rem; font-size: 0.85rem; color: var(--smoke-dim); }
.form-note.sent { color: var(--gold); }

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

.site-foot {
  position: relative; z-index: 2;
  border-top: 1px solid var(--hairline);
  padding: 3.4rem clamp(1.25rem, 5vw, 4rem) 2.6rem;
  background: rgba(18, 11, 6, 0.72);
}

.foot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 2rem;
  max-width: 74em;
  margin: 0 auto 2.4rem;
  font-size: 0.92rem;
  color: var(--smoke);
}

.brand-foot {
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.34em;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.foot-grid a { color: var(--ash); text-decoration-color: var(--flame-deep); }

.foot-fine {
  max-width: 74em; margin: 0 auto;
  font-size: 0.8rem; font-style: italic;
  color: var(--smoke-dim);
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .circle, .seats-inner { grid-template-columns: 1fr; }
  .circle-photo { order: -1; }
  .ring-wrap { max-width: 330px; }
  .movement { grid-template-columns: 3.2rem 1fr; gap: 1rem; }
  .movement-time { font-size: 1.2rem; }
}

@media (max-width: 560px) {
  .topbar nav a:not(.nav-cta) { display: none; }
  .movements { padding-left: 2.4rem; }
  .fuse { left: 0.55rem; }
}
