/* Torah Hebrew - landing page (torah/index.html) */

:root {
  --ink: #17251f;
  --muted: #62726b;
  --paper: #f5f8f5;
  --surface: #ffffff;
  --surface-soft: #edf3ef;
  --line: #d6e0da;
  --line-strong: #b9c9c1;
  --green: #176b55;
  --green-dark: #103f35;
  --green-light: #dcefe7;
  --gold: #f2ba4a;
  --gold-soft: #fff2bf;
  --shadow: 0 14px 36px rgba(23, 37, 31, 0.1);
  --ui-font: "Trebuchet MS", Candara, "Segoe UI", sans-serif;
  --display-font: Georgia, "Times New Roman", serif;
  --heb-font: "Taamey D Web", David, "Times New Roman", serif;
  --radius: 7px;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  min-width: 320px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #eef5f1 0, var(--paper) 260px, #f8faf8 100%) fixed;
  font-family: var(--ui-font);
  font-size: 15px;
  line-height: 1.5;
}

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

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

.heb {
  font-family: var(--heb-font);
  direction: rtl;
}

/* Top bar */
.topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px max(20px, calc((100% - 1160px) / 2));
  border-bottom: 1px solid rgba(214, 224, 218, 0.95);
  background: #fff;
  box-shadow: 0 6px 18px rgba(23, 37, 31, 0.05);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--green-dark);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18);
  font-family: var(--heb-font);
  font-size: 22px;
  line-height: 1;
}

.brand-text {
  font-family: var(--display-font);
  font-size: 18px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-weight: 700;
}

.topbar-nav a:not(.button) {
  color: var(--green-dark);
}

.topbar-nav a:not(.button):hover {
  color: var(--green);
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--green-dark);
  font-weight: 700;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, transform 100ms ease;
}

.button:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.button.primary {
  border-color: var(--green-dark);
  background: var(--green);
  color: #fff;
  box-shadow: 0 3px 0 var(--green-dark);
}

.button.primary:hover {
  background: #125d4a;
}

.button.primary:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--green-dark);
}

.button.ghost {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.button.ghost:hover {
  background: rgba(255, 255, 255, 0.18);
}

.button.small {
  height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

/* Layout */
main {
  width: min(1160px, 100%);
  margin: 0 auto;
  padding: 28px 20px 72px;
}

/* Hero */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  gap: 40px;
  overflow: hidden;
  padding: 44px 48px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  color: #fff;
  background-color: var(--green-dark);
  background-image:
    radial-gradient(circle at 88% 12%, rgba(242, 186, 74, 0.22) 0, rgba(242, 186, 74, 0) 36%),
    linear-gradient(120deg, var(--green-dark) 0%, #15584a 62%, #1c6a58 100%);
  box-shadow: var(--shadow);
}

.hero::after {
  position: absolute;
  right: -40px;
  bottom: -70px;
  color: rgba(255, 255, 255, 0.05);
  font-family: var(--heb-font);
  font-size: 300px;
  line-height: 1;
  pointer-events: none;
  content: "\05EA\05D5\05E8\05D4";
}

.hero-copy {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: #bde2d3;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow .heb {
  font-size: 17px;
  letter-spacing: 0;
}

.hero h1 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  font-weight: 400;
  line-height: 1.02;
}

.hero-heb {
  color: var(--gold-soft);
  font-size: clamp(56px, 7vw, 92px);
  text-align: left;
}

.hero-en {
  font-family: var(--display-font);
  font-size: clamp(26px, 3vw, 40px);
}

.lede {
  max-width: 54ch;
  margin: 18px 0 0;
  color: #d9e9e2;
  font-size: 16px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.feature-list {
  position: relative;
  z-index: 1;
  display: grid;
  align-self: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature-list li {
  display: grid;
  gap: 2px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
}

.feature-list strong {
  font-size: 14px;
}

.feature-list span {
  color: #c9ddd5;
  font-size: 13px;
}

/* Books */
.books {
  margin-top: 56px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 20px;
}

.section-head h2 {
  margin: 0;
  font-family: var(--display-font);
  font-size: 30px;
  font-weight: 400;
}

.section-heb {
  margin: 0;
  color: var(--muted);
  font-size: 24px;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 20px;
}

.book-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 7px 18px rgba(23, 37, 31, 0.06);
}

.book-card.is-pending {
  background: var(--surface-soft);
  box-shadow: none;
}

.book-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.book-no {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #c7ddd0;
  border-radius: 50%;
  background: var(--green-light);
  color: var(--green-dark);
  font-family: var(--display-font);
  font-size: 20px;
}

.is-pending .book-no {
  border-color: var(--line);
  background: #e4eae6;
  color: var(--muted);
}

.book-names h3 {
  margin: 0;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  text-align: left;
}

.book-names p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.book-status {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: #7a5608;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.is-pending .book-status {
  background: #e4eae6;
  color: var(--muted);
}

.chapter-list {
  margin: 0;
  padding: 8px 10px 10px;
  list-style: none;
}

.chapter-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0;
}

.chapter-list li + li {
  border-top: 1px solid var(--line);
}

.chapter-link {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 14px;
  min-width: 0;
  padding: 10px;
  border-radius: 6px;
  transition: background 140ms ease;
}

.chapter-link:hover {
  background: var(--surface-soft);
}

.chapter-badge {
  display: grid;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: var(--green-dark);
  color: #fff;
  line-height: 1;
}

.chapter-badge .heb {
  font-size: 19px;
}

.chapter-badge small {
  color: #bde2d3;
  font-size: 10px;
  font-weight: 700;
}

.chapter-copy {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  min-width: 0;
}

.chapter-copy small {
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chapter-copy strong {
  font-size: 15px;
  line-height: 1.25;
}

.chapter-opening {
  overflow: hidden;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.3;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.practice-link {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease;
}

.practice-link:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.practice-link span {
  color: #b17b08;
}

.pending-note {
  margin: 0;
  padding: 18px 20px 22px;
  color: var(--muted);
  font-size: 14px;
}

.coming-note {
  margin: 28px 0 0;
  padding: 16px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.coming-note strong {
  color: var(--ink);
}

.coming-note .heb {
  margin-right: 4px;
  font-size: 17px;
}

/* Footer */
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-footer .heb {
  font-size: 18px;
}

/* Responsive */
@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 34px 28px;
  }

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

@media (max-width: 640px) {
  body {
    font-size: 14px;
  }

  .topbar {
    min-height: 58px;
  }

  .brand-text {
    display: none;
  }

  main {
    padding: 16px 12px 56px;
  }

  .hero {
    padding: 28px 20px;
  }

  .hero::after {
    font-size: 200px;
    right: -30px;
    bottom: -50px;
  }

  .lede {
    font-size: 15px;
  }

  .hero-actions .button {
    flex: 1 1 100%;
    justify-content: center;
  }

  .feature-list {
    grid-template-columns: 1fr;
  }

  .books {
    margin-top: 36px;
  }

  .section-head h2 {
    font-size: 26px;
  }

  .book-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .book-head {
    padding: 14px 16px;
  }

  .book-names h3 {
    font-size: 26px;
  }

  .chapter-list li {
    flex-wrap: wrap;
  }

  .chapter-link {
    padding: 10px 6px;
  }

  .practice-link {
    margin: 0 0 6px 66px;
  }
}
