/* ════════════════════════════════════════════════════════════
   SHABBAT STORIES — "The Golden Hour of the Week"
   Deep indigo twilight × honey-gold candlelight
   ════════════════════════════════════════════════════════════ */

:root {
  --night-deep: #070b1e;
  --night: #0c1230;
  --night-soft: #141b42;
  --indigo: #1d2660;
  --gold: #f3b950;
  --gold-bright: #ffd98a;
  --gold-deep: #c98a2c;
  --cream: #fdf3df;
  --parchment: #f8ecd4;
  --parchment-deep: #efdfbe;
  --ink: #2a2118;
  --ink-soft: #5c4d38;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Nunito Sans", "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow-card: 0 30px 80px -20px rgba(3, 5, 18, 0.8);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--night-deep);
  color: var(--cream);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

img, video { display: block; max-width: 100%; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 560; }

/* ── atmosphere layers ───────────────────────────── */

.grain {
  position: fixed; inset: -50%;
  pointer-events: none; z-index: 90;
  opacity: .055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 9s steps(10) infinite;
}
@keyframes grain-shift {
  0%,100% { transform: translate(0,0) } 20% { transform: translate(-3%,2%) }
  40% { transform: translate(2%,-3%) } 60% { transform: translate(-2%,-2%) }
  80% { transform: translate(3%,3%) }
}

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

/* ── shared bits ─────────────────────────────────── */

.eyebrow {
  font-family: var(--font-body);
  font-size: clamp(.72rem, .9vw, .85rem);
  font-weight: 800;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.1rem;
}
.eyebrow--ink { color: var(--gold-deep); }
.eyebrow--gold { color: var(--gold-bright); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body);
  font-weight: 800;
  text-decoration: none;
  border-radius: 999px;
  padding: 1rem 2.4rem;
  font-size: 1rem;
  letter-spacing: .02em;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .3s;
  will-change: transform;
}
.btn--gold {
  background: linear-gradient(160deg, var(--gold-bright), var(--gold) 55%, var(--gold-deep));
  color: #331f04;
  box-shadow: 0 8px 30px -6px rgba(243, 185, 80, .55), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn--gold:hover { transform: translateY(-3px) scale(1.02); box-shadow: 0 16px 44px -8px rgba(243, 185, 80, .75), inset 0 1px 0 rgba(255,255,255,.5); }
.btn--ghost {
  color: var(--cream);
  border: 1.5px solid rgba(253, 243, 223, .35);
  background: rgba(253, 243, 223, .06);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-3px); }
.btn--small { padding: .65rem 1.6rem; font-size: .9rem; }
.btn--big { padding: 1.25rem 3.4rem; font-size: 1.15rem; }

.glow { position: relative; }
.glow::after {
  content: ""; position: absolute; inset: -3px;
  border-radius: inherit; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 217, 138, .55), transparent);
  filter: blur(18px);
  animation: pulse 2.8s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .55; transform: scale(.97) } 50% { opacity: 1; transform: scale(1.06) } }

/* ── scroll reveals ──────────────────────────────── */

.reveal, .reveal-up {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s var(--ease-out) var(--d, 0s), transform 1.1s var(--ease-out) var(--d, 0s);
}
.reveal.in, .reveal-up.in { opacity: 1; transform: translateY(0); }

/* ════════════════ NAV ════════════════ */

.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  transition: background .45s, box-shadow .45s, padding .45s;
}
.nav.scrolled {
  background: rgba(7, 11, 30, .82);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(243, 185, 80, .14);
  padding-top: .7rem; padding-bottom: .7rem;
}
.nav__logo {
  display: flex; align-items: center; gap: .6rem;
  text-decoration: none; color: var(--cream);
}
.nav__flame svg { width: 17px; height: 24px; }
.flame-outer { fill: var(--gold); opacity: .92; }
.flame-inner { fill: var(--gold-bright); }
.nav__flame { display: grid; place-items: center; filter: drop-shadow(0 0 8px rgba(243,185,80,.7)); animation: flicker 3.4s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes flicker {
  0%,100% { transform: scaleY(1) } 25% { transform: scaleY(1.05) skewX(1.2deg) }
  50% { transform: scaleY(.97) } 72% { transform: scaleY(1.04) skewX(-1.4deg) }
}
.nav__wordmark {
  font-family: var(--font-display);
  font-size: 1.25rem; font-weight: 620; letter-spacing: .01em;
}
.nav__wordmark em { font-style: italic; color: var(--gold-bright); font-weight: 460; }

/* Bond spark mark: twinkle instead of candle flicker */
.nav__spark { animation: spark-twinkle 3.2s ease-in-out infinite; transform-origin: 50% 50%; }
.nav__spark svg { width: 20px; height: 20px; }
@keyframes spark-twinkle {
  0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
  50% { transform: scale(.82) rotate(12deg); opacity: .8; }
}

/* ════════════════ HERO ════════════════ */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: end center;
  isolation: isolate;
}
.hero__media { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.hero__video {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.04);
  animation: hero-drift 24s ease-in-out infinite alternate;
}
@keyframes hero-drift { from { transform: scale(1.04) } to { transform: scale(1.1) } }
.hero__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 55% at 50% 72%, rgba(7,11,30,.55), transparent 80%),
    radial-gradient(120% 90% at 50% 110%, rgba(7,11,30,.95) 8%, rgba(7,11,30,.55) 45%, transparent 75%),
    linear-gradient(to bottom, rgba(7,11,30,.6), rgba(7,11,30,.2) 28%, rgba(7,11,30,.18) 60%, rgba(7,11,30,.97));
}

.hero__content {
  position: relative;
  text-align: center;
  padding: 0 1.4rem clamp(5rem, 11vh, 8.5rem);
  max-width: 1100px;
}
.hero__eyebrow {
  font-size: clamp(.72rem, 1vw, .9rem);
  font-weight: 800; letter-spacing: .34em; text-transform: uppercase;
  color: var(--gold-bright);
  text-shadow: 0 0 22px rgba(243,185,80,.5);
  margin-bottom: 1.6rem;
}
.hero__title {
  font-size: clamp(2.5rem, 6.4vw, 5.4rem);
  line-height: 1.04;
  font-weight: 500;
  letter-spacing: -0.015em;
  text-wrap: balance;
  text-shadow: 0 4px 40px rgba(3,5,18,.85);
}
.hero__title .line { display: block; }
.line--rotator { color: var(--gold-bright); font-style: italic; font-variation-settings: "SOFT" 80, "WONK" 1; }

.rotator { position: relative; display: inline-grid; text-align: center; }
.rotator__word {
  grid-area: 1 / 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(.55em) rotateX(45deg);
  filter: blur(6px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out), filter .7s var(--ease-out);
}
.rotator__word.is-active { opacity: 1; transform: none; filter: none; }
.rotator__word.is-leaving { opacity: 0; transform: translateY(-.5em); filter: blur(6px); }

.hero__sub {
  margin: 1.6rem auto 2.4rem;
  max-width: 34rem;
  font-size: clamp(1.02rem, 1.45vw, 1.25rem);
  line-height: 1.65;
  color: rgba(253, 243, 223, .88);
  font-weight: 500;
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero__scrollcue {
  position: absolute; bottom: 1.6rem; left: 50%;
  width: 26px; height: 42px;
  margin-left: -13px;
  border: 1.5px solid rgba(253,243,223,.4);
  border-radius: 14px;
}
.hero__scrollcue span {
  position: absolute; top: 7px; left: 50%;
  width: 4px; height: 8px; margin-left: -2px;
  border-radius: 4px; background: var(--gold-bright);
  animation: cue 2s ease-in-out infinite;
}
@keyframes cue { 0% { transform: translateY(0); opacity: 1 } 70% { transform: translateY(14px); opacity: 0 } 100% { opacity: 0 } }

/* ════════════════ OPPORTUNITY ════════════════ */

.opportunity {
  position: relative;
  background:
    radial-gradient(90% 60% at 80% 0%, rgba(29, 38, 96, .55), transparent 60%),
    linear-gradient(var(--night-deep), var(--night) 30%, var(--night-deep));
  padding: clamp(5rem, 10vh, 9rem) clamp(1.2rem, 5vw, 4rem);
}
.opportunity__inner {
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 6rem);
  max-width: 1280px;
  margin: 0 auto;
}
.opportunity__sticky {
  position: sticky;
  top: clamp(6rem, 22vh, 11rem);
  align-self: start;
  padding-bottom: 4rem;
}
.opportunity__title {
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 1.12;
  font-weight: 520;
  letter-spacing: -.01em;
}
.opportunity__title .ellipsis { color: var(--gold); }
.opportunity__hint {
  margin-top: 2rem;
  color: rgba(253,243,223,.45);
  font-weight: 700; font-size: .9rem; letter-spacing: .08em;
}

.opportunity__cards { display: flex; flex-direction: column; gap: clamp(16rem, 42vh, 24rem); padding-bottom: 12vh; }

.op-card {
  position: sticky;
  top: calc(clamp(5rem, 16vh, 8rem) + var(--i) * 2.2rem);
  display: grid;
  grid-template-columns: 42% 1fr;
  background: linear-gradient(140deg, rgba(29,38,96,.55), rgba(12,18,48,.92));
  border: 1px solid rgba(243, 185, 80, .18);
  border-radius: 26px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(6px);
  min-height: clamp(320px, 46vh, 430px);
  transform-origin: top center;
}
.op-card__img { position: relative; overflow: hidden; }
.op-card__img::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to right, transparent 60%, rgba(12,18,48,.55));
}
.op-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease-out); }
.op-card:hover .op-card__img img { transform: scale(1.06); }
.op-card__body {
  padding: clamp(1.6rem, 3vw, 2.8rem);
  display: flex; flex-direction: column; justify-content: center; gap: .7rem;
}
.op-card__num {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--gold);
  font-size: 1rem; letter-spacing: .2em;
}
.op-card__body h3 {
  font-size: clamp(1.45rem, 2.3vw, 2.1rem);
  line-height: 1.18; font-weight: 540;
  color: var(--gold-bright);
}
.op-card__body p {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.6;
  color: rgba(253,243,223,.82);
  max-width: 26rem;
}

/* ════════════════ HOW IT WORKS ════════════════ */

.how {
  position: relative;
  background:
    radial-gradient(80% 50% at 15% 8%, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(var(--parchment), var(--parchment-deep));
  color: var(--ink);
  padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 5vw, 4rem) clamp(6rem, 14vh, 10rem);
  border-radius: 42px 42px 0 0;
  margin-top: -42px;
  z-index: 3;
}
/* torn-paper-ish top edge shimmer */
.how::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201,138,44,.5), transparent);
}
.how__head { text-align: center; margin-bottom: clamp(3rem, 7vh, 5.5rem); }
.how__head h2 {
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  font-weight: 540; letter-spacing: -.015em;
  color: var(--ink);
}

.how__steps {
  max-width: 1080px; margin: 0 auto;
  display: flex; flex-direction: column;
  gap: clamp(3.5rem, 9vh, 6.5rem);
}
.step {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.step--flip .step__media { order: 2; }
.step--flip .step__text { order: 1; text-align: right; }
.step--flip .step__text p { margin-left: auto; }

.step__media {
  position: relative;
  border-radius: 24px;
  transform: rotate(-1.6deg);
  transition: transform .8s var(--ease-out);
}
.step--flip .step__media { transform: rotate(1.6deg); }
.step:hover .step__media { transform: rotate(0) scale(1.015); }
.step__media img,
.step__media video {
  width: 100%;
  border-radius: 24px;
  box-shadow: 0 24px 60px -18px rgba(74, 51, 13, .45), 0 0 0 6px rgba(255,255,255,.55);
}
.step__badge {
  position: absolute; top: -22px; left: -22px;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-style: italic;
  font-size: 1.7rem; font-weight: 600;
  color: #331f04;
  background: linear-gradient(160deg, var(--gold-bright), var(--gold));
  border-radius: 50%;
  box-shadow: 0 10px 26px -6px rgba(201,138,44,.65), inset 0 1px 0 rgba(255,255,255,.6);
}
.step--flip .step__badge { left: auto; right: -22px; }

.step__text h3 {
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  line-height: 1.16; font-weight: 540;
  margin-bottom: 1rem;
  color: var(--ink);
}
.step__text p {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  line-height: 1.7;
  color: var(--ink-soft);
  max-width: 26rem;
}
.step__text strong { color: var(--gold-deep); }

/* ════════════════ JOIN / PRICING ════════════════ */

.join {
  position: relative;
  min-height: 92svh;
  display: grid; place-items: center;
  isolation: isolate;
  overflow: hidden;
  border-radius: 42px 42px 0 0;
  margin-top: -42px;
  z-index: 4;
}
.join__bg { position: absolute; inset: 0; z-index: -1; }
.join__bg img, .join__bg video { width: 100%; height: 100%; object-fit: cover; }
.join__veil {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 60% at 50% 58%, rgba(7,11,30,.25), rgba(7,11,30,.88) 95%),
    linear-gradient(to bottom, rgba(7,11,30,.5), transparent 30%, rgba(7,11,30,.92));
}
.join__content { text-align: center; padding: 6rem 1.4rem; }
.join__price {
  display: flex; align-items: baseline; justify-content: center;
  font-family: var(--font-display);
  color: var(--cream);
  text-shadow: 0 6px 50px rgba(3,5,18,.9);
  margin: .5rem 0 1.2rem;
}
.join__currency { font-size: clamp(2.4rem, 6vw, 4.5rem); color: var(--gold-bright); font-weight: 500; margin-right: .1em; }
.join__amount { font-size: clamp(6.5rem, 17vw, 12.5rem); font-weight: 560; line-height: 1; letter-spacing: -.03em; }
.join__per {
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: var(--gold-bright); margin-left: .35em;
}
.join__sub {
  max-width: 30rem; margin: 0 auto 2.6rem;
  font-size: clamp(1.02rem, 1.4vw, 1.2rem); line-height: 1.7;
  color: rgba(253,243,223,.9);
}
.join__micro { margin-top: 1.4rem; font-size: .85rem; color: rgba(253,243,223,.55); font-weight: 600; }

/* ── signup form ─────────────────────────────────── */
.signup { max-width: 34rem; margin: 0 auto; }
.signup__row {
  display: grid; gap: .7rem; margin-bottom: 1rem;
}
@media (min-width: 620px) {
  .signup__row { grid-template-columns: 1fr 1fr; }
  .signup__row .signup__input:first-child { grid-column: 1 / -1; }
}
.signup__input {
  width: 100%;
  padding: 1rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--cream);
  background: rgba(7, 11, 30, .55);
  border: 1px solid rgba(243, 185, 80, .32);
  border-radius: 14px;
  backdrop-filter: blur(6px);
  transition: border-color .25s var(--ease-out), box-shadow .25s var(--ease-out), background .25s;
}
.signup__input::placeholder { color: rgba(253, 243, 223, .5); }
.signup__input:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(7, 11, 30, .72);
  box-shadow: 0 0 0 3px rgba(243, 185, 80, .18);
}
.signup__input--error { border-color: #e9706b; box-shadow: 0 0 0 3px rgba(233, 112, 107, .18); }
.signup__submit { width: 100%; border: none; cursor: pointer; font-family: var(--font-body); }
.signup__submit[aria-busy="true"] { opacity: .7; pointer-events: none; }
.signup__msg {
  min-height: 1.2em; margin-top: 1rem;
  font-size: .92rem; font-weight: 700; line-height: 1.5;
}
.signup__msg--error { color: #ffb4af; }
.signup__msg--ok { color: var(--gold-bright); }

/* ════════════════ FOOTER ════════════════ */

.footer {
  background: var(--night-deep);
  text-align: center;
  padding: 3.2rem 1.4rem 3.6rem;
  border-top: 1px solid rgba(243,185,80,.12);
  color: rgba(253,243,223,.6);
  font-weight: 600;
}
.footer__flame { display: block; font-size: 1.4rem; margin-bottom: .8rem; filter: drop-shadow(0 0 10px rgba(243,185,80,.6)); }
.footer__shalom {
  margin-top: .6rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
}

/* ════════════════ RESPONSIVE ════════════════ */

@media (max-width: 860px) {
  .opportunity__inner { grid-template-columns: 1fr; }
  .opportunity__sticky {
    position: static;
    padding-bottom: 0; margin-bottom: 2.5rem;
    text-align: center;
  }
  .opportunity__hint { display: none; }
  .op-card { grid-template-columns: 1fr; top: calc(4.5rem + var(--i) * 1.4rem); }
  .op-card__img { aspect-ratio: 16 / 10; }
  .op-card__img::after { background: linear-gradient(to bottom, transparent 55%, rgba(12,18,48,.6)); }

  .step, .step--flip { grid-template-columns: 1fr; gap: 2.2rem; }
  .step--flip .step__media { order: 0; }
  .step--flip .step__text { order: 1; text-align: left; }
  .step--flip .step__text p { margin-left: 0; }
  .step__badge { left: -10px; top: -16px; width: 48px; height: 48px; font-size: 1.4rem; }
  .step--flip .step__badge { right: auto; left: -10px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01s !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal-up { opacity: 1; transform: none; }
}
