:root {
  color-scheme: dark;
  --bg: #07111f;
  --bg-2: #0d1b2f;
  --ink: #f8efd9;
  --muted: #cdbd9b;
  --gold: #d9ad55;
  --gold-bright: #ffd98a;
  --gold-deep: #8a6429;
  --stone: #dde0d4;
  --line: rgba(255, 217, 138, 0.2);
  --panel: rgba(11, 24, 42, 0.78);
  --panel-strong: rgba(12, 25, 42, 0.92);
  --shadow: rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 12%, rgba(217, 173, 85, 0.18), transparent 28rem),
    radial-gradient(circle at 88% 0%, rgba(102, 151, 189, 0.2), transparent 24rem),
    linear-gradient(135deg, #050a13 0%, var(--bg) 48%, #0f1c2f 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, #000, transparent 78%);
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.site-shell {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

.site-shell::before,
.site-shell::after {
  position: absolute;
  z-index: 0;
  color: rgba(255, 217, 138, 0.08);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1;
  pointer-events: none;
}

.site-shell::before {
  content: "א";
  top: 7rem;
  right: -2.7rem;
  font-size: clamp(9rem, 17vw, 18rem);
}

.site-shell::after {
  content: "ת";
  left: -2rem;
  bottom: 5rem;
  font-size: clamp(8rem, 14vw, 15rem);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 16px 0;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark,
.footer-mark {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 217, 138, 0.34);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255, 217, 138, 0.24), rgba(255, 217, 138, 0.06)),
    rgba(8, 17, 30, 0.8);
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.brand-mark {
  width: 44px;
  height: 44px;
  font-size: 30px;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  letter-spacing: 0;
}

.brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.topnav a {
  padding: 10px 12px;
  border-radius: var(--radius);
  transition:
    color 180ms ease,
    background 180ms ease;
}

.topnav a:hover,
.topnav a:focus-visible {
  color: var(--ink);
  background: rgba(255, 217, 138, 0.11);
}

.hero {
  position: relative;
  z-index: 1;
  width: min(1160px, calc(100% - 32px));
  margin: 10px auto 0;
  min-height: clamp(680px, calc(100svh - 96px), 800px);
  border: 1px solid rgba(255, 217, 138, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  background: #07111f;
  box-shadow: 0 28px 70px var(--shadow);
}

.hero-art {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(90deg, rgba(5, 10, 19, 0.93) 0%, rgba(5, 10, 19, 0.74) 48%, rgba(5, 10, 19, 0.4) 100%),
    linear-gradient(180deg, rgba(5, 10, 19, 0.12), rgba(5, 10, 19, 0.78)),
    url("./assets/manuscript-hero.png");
  background-position: center;
  background-size: cover;
  transform: scale(1.02);
}

.hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(520px, 1.18fr);
  gap: clamp(24px, 4vw, 46px);
  min-height: clamp(680px, calc(100svh - 96px), 800px);
  align-items: center;
  padding: clamp(22px, 4vw, 48px);
}

.hero-copy {
  max-width: 760px;
}

.hebrew-line {
  margin: 0 0 18px;
  color: var(--gold-bright);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 52px);
  line-height: 1;
  text-shadow: 0 0 34px rgba(255, 217, 138, 0.3);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  max-width: 780px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 7vw, 82px);
  font-weight: 740;
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-subtitle {
  max-width: 620px;
  margin-top: 22px;
  color: #eadfc5;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  margin-top: 28px;
  padding: 0 18px;
  border: 1px solid rgba(255, 217, 138, 0.55);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #f4cb77, #af7e31);
  color: #07111f;
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 15px 34px rgba(155, 105, 34, 0.33);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.primary-action span {
  display: grid;
  place-items: center;
  font-size: 18px;
}

.primary-action:hover,
.primary-action:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px rgba(214, 164, 77, 0.4);
}

.study-panel {
  display: grid;
  gap: 18px;
  align-content: end;
  min-height: 255px;
  padding: 22px;
  border: 1px solid rgba(255, 217, 138, 0.24);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(15, 31, 52, 0.72), rgba(6, 13, 23, 0.82)),
    rgba(8, 17, 30, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
}

.panel-script {
  color: rgba(255, 217, 138, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 74px;
  line-height: 0.85;
}

.study-panel p {
  color: #eadfc5;
  font-size: 16px;
  line-height: 1.55;
}

.resources-section {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0;
  padding: clamp(16px, 2vw, 22px);
  border: 1px solid rgba(255, 217, 138, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(13, 27, 47, 0.9), rgba(8, 17, 30, 0.86)),
    rgba(8, 17, 30, 0.8);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.28);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  align-items: start;
  margin-bottom: 14px;
}

.section-kicker {
  margin-bottom: 7px;
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.02;
  letter-spacing: 0;
}

.section-head > p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.resource-card {
  position: relative;
  isolation: isolate;
  min-height: 144px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(255, 217, 138, 0.2);
  border-radius: var(--radius);
  overflow: hidden;
  background:
    radial-gradient(circle at var(--pointer-x, 78%) var(--pointer-y, 18%), rgba(255, 217, 138, 0.14), transparent 34%),
    linear-gradient(145deg, rgba(255, 217, 138, 0.11), transparent 42%),
    linear-gradient(180deg, rgba(18, 38, 63, 0.92), rgba(8, 17, 30, 0.94));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 42px rgba(0, 0, 0, 0.24);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.resource-card::before {
  content: "";
  position: absolute;
  inset: auto 18px 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  opacity: 0.62;
}

.card-glow {
  position: absolute;
  inset: -35% -30% auto auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 217, 138, 0.14);
  filter: blur(24px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.resource-card:hover,
.resource-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(255, 217, 138, 0.58);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.09),
    0 24px 56px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 217, 138, 0.1);
}

.resource-card:hover .card-glow,
.resource-card:focus-visible .card-glow {
  opacity: 1;
}

.icon-wrap {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 217, 138, 0.28);
  border-radius: var(--radius);
  color: var(--gold-bright);
  background: rgba(255, 217, 138, 0.08);
  font-size: 22px;
}

.card-content {
  display: grid;
  gap: 9px;
}

.card-content strong {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.08;
  letter-spacing: 0;
}

.card-content span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.card-arrow {
  justify-self: end;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--radius);
  color: var(--gold-bright);
  background: rgba(255, 217, 138, 0.08);
  transition:
    transform 180ms ease,
    background 180ms ease;
}

.resource-card:hover .card-arrow,
.resource-card:focus-visible .card-arrow {
  transform: translate(2px, -2px);
  background: rgba(255, 217, 138, 0.15);
}

.footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(1160px, calc(100% - 32px));
  margin: 28px auto 0;
  padding: 20px 0 34px;
  color: var(--muted);
  font-size: 14px;
}

.footer-mark {
  width: 34px;
  height: 34px;
  font-size: 24px;
}

:focus-visible {
  outline: 3px solid rgba(255, 217, 138, 0.55);
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .study-panel {
    max-width: 520px;
    min-height: 190px;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .resource-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .topbar {
    width: min(100% - 24px, 1160px);
    padding: 12px 0;
  }

  .topnav {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
    font-size: 27px;
  }

  .brand strong {
    font-size: 18px;
  }

  .hero,
  .footer {
    width: min(100% - 24px, 1160px);
  }

  .resources-section {
    width: 100%;
  }

  .hero {
    min-height: 560px;
  }

  .hero-art {
    background-image:
      linear-gradient(180deg, rgba(5, 10, 19, 0.91) 0%, rgba(5, 10, 19, 0.74) 52%, rgba(5, 10, 19, 0.86) 100%),
      url("./assets/manuscript-hero.png");
    background-position: 62% center;
  }

  .hero-grid {
    min-height: 560px;
    gap: 20px;
    padding: 24px;
  }

  h1 {
    font-size: clamp(39px, 12vw, 58px);
  }

  .hero-subtitle {
    font-size: 17px;
  }

  .primary-action {
    width: 100%;
    justify-content: center;
  }

  .study-panel {
    padding: 18px;
  }

  .panel-script {
    font-size: 58px;
  }

  .resources-section {
    padding: 20px;
  }

  .resource-grid {
    grid-template-columns: 1fr;
  }

  .resource-card {
    min-height: 178px;
  }

  .card-content strong {
    font-size: 23px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
