:root {
  --navy: #0a1a2f;
  --navy-deep: #06101c;
  --navy-soft: #13283f;
  --gold: #c4a35a;
  --gold-bright: #e0c57a;
  --gold-dim: #8a7340;
  --ink: #f3ead7;
  --ink-muted: #c8bda6;
  --parchment: #e8dcc4;
  --line: rgba(196, 163, 90, 0.35);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --font-display: "Frank Ruhl Libre", "Times New Roman", serif;
  --font-body: "Noto Sans Hebrew", "Frank Ruhl Libre", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(196, 163, 90, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 30%, rgba(19, 40, 63, 0.9), transparent 50%),
    linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 40%, #0d2035 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.07;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(243, 234, 215, 0.03) 2px,
      rgba(243, 234, 215, 0.03) 3px
    );
  z-index: 0;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

p {
  margin: 0 0 1rem;
}

.scroll-progress {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform-origin: right center;
  transform: scaleX(0);
  z-index: 100;
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: linear-gradient(180deg, rgba(6, 16, 28, 0.92), rgba(6, 16, 28, 0.55) 70%, transparent);
  backdrop-filter: blur(8px);
}

.logo {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.5vw, 1.6rem);
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  font-size: 0.95rem;
  color: var(--ink-muted);
}

.nav a {
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav a::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}

.nav a:hover {
  color: var(--gold-bright);
}

.nav a:hover::after {
  transform: scaleX(1);
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem 1.35rem;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 55%, var(--gold) 100%);
  color: var(--navy-deep);
  border-color: var(--gold-dim);
  box-shadow: 0 8px 24px rgba(196, 163, 90, 0.25);
}

.btn-gold:hover {
  background: linear-gradient(135deg, var(--gold-bright), #f0d98a);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.btn-block {
  width: 100%;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero- ken 18s ease-in-out infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 16, 28, 0.35) 0%, rgba(6, 16, 28, 0.55) 40%, rgba(6, 16, 28, 0.92) 100%),
    linear-gradient(90deg, rgba(6, 16, 28, 0.55), transparent 45%);
}

.hero-copy {
  position: relative;
  padding: clamp(6rem, 14vh, 9rem) clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 8vh, 5rem);
  max-width: 44rem;
  animation: rise 1.1s var(--ease) both;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7vw, 5.2rem);
  font-weight: 900;
  color: var(--gold-bright);
  margin: 0 0 0.4rem;
  line-height: 1.05;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);
  animation: brand-glow 4s ease-in-out infinite alternate;
}

.hero h1 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--parchment);
  margin-bottom: 1rem;
}

.lede {
  color: var(--ink-muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 36rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.section {
  position: relative;
  padding: clamp(4rem, 10vh, 7rem) 0;
  z-index: 1;
}

.section-inner {
  width: min(1120px, calc(100% - 2.5rem));
  margin-inline: auto;
}

.section-head {
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 3rem;
}

.eyebrow {
  color: var(--gold);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

.section-sub {
  color: var(--ink-muted);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split-reverse {
  grid-template-columns: 0.85fr 1.15fr;
}

.prose h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--parchment);
}

.prose p {
  color: var(--ink-muted);
}

.pillars {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 0.75rem;
}

.pillars li {
  position: relative;
  padding: 0.85rem 1rem 0.85rem 1.1rem;
  border-right: 3px solid var(--gold);
  background: linear-gradient(270deg, rgba(196, 163, 90, 0.1), transparent);
  color: var(--ink);
}

.media-frame {
  margin: 0;
  position: relative;
}

.media-frame img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(0.92) contrast(1.05);
  box-shadow: var(--shadow);
}

.media-frame.portrait img {
  aspect-ratio: 3 / 4;
  max-height: 560px;
  object-position: center top;
}

.media-frame figcaption {
  margin-top: 0.75rem;
  color: var(--gold);
  font-size: 0.95rem;
}

.section-wisdom {
  background:
    radial-gradient(ellipse at center top, rgba(196, 163, 90, 0.08), transparent 55%),
    linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.2), transparent);
}

.section-wisdom::before,
.section-wisdom::after {
  content: "✡";
  position: absolute;
  color: var(--gold);
  opacity: 0.12;
  font-size: 4rem;
  pointer-events: none;
}

.section-wisdom::before {
  top: 2rem;
  right: 4%;
}

.section-wisdom::after {
  bottom: 3rem;
  left: 5%;
}

.wisdom-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.wisdom {
  margin: 0;
  padding: 1.4rem 1.25rem 1.2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(19, 40, 63, 0.55), rgba(10, 26, 47, 0.2));
}

.wisdom p {
  font-family: var(--font-display);
  font-size: 1.08rem;
  color: var(--parchment);
  margin-bottom: 0.85rem;
}

.wisdom cite {
  display: block;
  font-style: normal;
  font-size: 0.85rem;
  color: var(--gold-dim);
}

.wisdom-banner {
  margin: 3rem 0 0;
  position: relative;
  overflow: hidden;
}

.wisdom-banner img {
  width: 100%;
  aspect-ratio: 21 / 8;
  object-fit: cover;
  filter: brightness(0.55) saturate(0.9);
}

.wisdom-banner-text {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
}

.wisdom-banner-text p {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.8vw, 1.85rem);
  color: var(--gold-bright);
  max-width: 38rem;
  margin: 0;
  text-shadow: 0 4px 24px rgba(0, 0, 0, 0.7);
}

.midrash {
  margin-top: 3.5rem;
  padding: 2rem clamp(1.25rem, 3vw, 2.5rem);
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(196, 163, 90, 0.07), transparent 40%),
    rgba(6, 16, 28, 0.55);
}

.midrash h3 {
  color: var(--gold-bright);
  font-size: 1.45rem;
}

.midrash p {
  color: var(--ink-muted);
}

.inline-quote {
  margin: 1.5rem 0 0;
  padding: 1rem 0 1rem 0;
  border-right: 3px solid var(--gold);
  padding-right: 1rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--gold-bright);
}

.shiur-visual {
  margin: 0 0 2.5rem;
}

.shiur-visual img {
  width: 100%;
  aspect-ratio: 16 / 8;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.flow-step {
  padding: 0.5rem 0.25rem;
}

.flow-num {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.flow-step h3 {
  font-size: 1.25rem;
  color: var(--parchment);
}

.flow-step p {
  color: var(--ink-muted);
  margin: 0;
}

.more-wisdom {
  margin-bottom: 3rem;
}

.more-wisdom h3 {
  color: var(--gold-bright);
  margin-bottom: 1rem;
}

.more-wisdom ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.more-wisdom li {
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(196, 163, 90, 0.18);
  color: var(--ink-muted);
  font-family: var(--font-display);
  font-size: 1.05rem;
}

.cta-band {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  background:
    radial-gradient(ellipse at center, rgba(196, 163, 90, 0.16), transparent 65%),
    linear-gradient(180deg, rgba(19, 40, 63, 0.8), rgba(6, 16, 28, 0.9));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.brand-mini {
  font-family: var(--font-display);
  color: var(--gold);
  font-size: 1.1rem;
  margin-bottom: 0.35rem;
}

.cta-band h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--parchment);
}

.cta-band p {
  color: var(--ink-muted);
  max-width: 28rem;
  margin: 0 auto 1.5rem;
}

.site-footer {
  padding: 3rem 1.5rem 4rem;
  text-align: center;
  color: var(--ink-muted);
  border-top: 1px solid rgba(196, 163, 90, 0.2);
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-bright);
  margin-bottom: 0.35rem;
}

.footer-note {
  margin-top: 1rem;
  color: var(--gold-dim);
  font-family: var(--font-display);
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 16, 0.78);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(420px, 100%);
  padding: 2rem 1.6rem 1.75rem;
  background:
    linear-gradient(160deg, rgba(19, 40, 63, 0.98), rgba(8, 18, 32, 0.98));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: modal-in 0.35s var(--ease);
}

.modal-close {
  position: absolute;
  top: 0.6rem;
  left: 0.75rem;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}

.modal-lead {
  color: var(--ink-muted);
  margin-bottom: 1.25rem;
}

.login-form {
  display: grid;
  gap: 1rem;
}

.login-form label {
  display: grid;
  gap: 0.4rem;
  color: var(--parchment);
  font-size: 0.95rem;
}

.login-form input {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  background: rgba(6, 16, 28, 0.75);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}

.login-form input:focus {
  border-color: var(--gold);
}

.form-note {
  min-height: 1.4em;
  margin: 0;
  font-size: 0.9rem;
  color: var(--gold);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes brand-glow {
  from {
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 0 0 transparent;
  }
  to {
    text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55), 0 0 28px rgba(196, 163, 90, 0.35);
  }
}

@keyframes hero-ken {
  from {
    transform: scale(1.05) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(-1.5%, 1%, 0);
  }
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 960px) {
  .nav {
    display: none;
  }

  .split,
  .split-reverse,
  .wisdom-grid,
  .flow {
    grid-template-columns: 1fr;
  }

  .wisdom-banner img {
    aspect-ratio: 16 / 10;
  }
}

@media (max-width: 640px) {
  .hero-copy {
    padding-bottom: 2.5rem;
  }

  .brand {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .site-header {
    padding-inline: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-media img,
  .brand,
  .reveal {
    animation: none !important;
    transition: none !important;
    opacity: 1;
    transform: none;
  }
}
