/* ============================================
   TORAH WEEKLY - Design System & Global Styles
   torahweekly.org
   ============================================ */

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* Core Palette */
  --sand: #F5F0E8;
  --sand-dark: #E8E0D0;
  --sand-light: #FAF7F2;
  --ink: #1A1A1A;
  --ink-light: #4A4A4A;
  --ink-muted: #7A7A7A;
  --ink-faint: #A8A8A8;
  --gold: #C4A265;
  --gold-light: #D4B97A;
  --gold-dark: #A8883F;
  --gold-faint: rgba(196, 162, 101, 0.1);
  --cream: #FDFBF7;
  --blue-deep: #2C3E6B;
  --blue-soft: #4A5F8F;
  --blue-faint: rgba(44, 62, 107, 0.05);
  --white: #FFFFFF;
  --border: rgba(26, 26, 26, 0.08);
  --border-hover: rgba(196, 162, 101, 0.3);
  --shadow-sm: 0 2px 8px rgba(26, 26, 26, 0.04);
  --shadow-md: 0 8px 32px rgba(26, 26, 26, 0.06);
  --shadow-lg: 0 16px 48px rgba(26, 26, 26, 0.08);

  /* Typography Scale */
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'DM Sans', 'Helvetica Neue', sans-serif;
  --text-xs: 0.7rem;
  --text-sm: 0.82rem;
  --text-base: 0.95rem;
  --text-md: 1.05rem;
  --text-lg: 1.15rem;
  --text-xl: 1.35rem;
  --text-2xl: 1.6rem;
  --text-3xl: clamp(2rem, 3.5vw, 2.8rem);
  --text-4xl: clamp(2.2rem, 4vw, 3.2rem);
  --text-hero: clamp(3rem, 7vw, 5.5rem);

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  --space-4xl: 6rem;

  /* Layout */
  --container-max: 1100px;
  --container-narrow: 780px;
  --container-wide: 1280px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 100px;

  /* Transitions */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 0.15s;
  --duration-base: 0.25s;
  --duration-slow: 0.4s;
  --duration-reveal: 0.7s;
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-base) ease;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: none;
  outline: none;
}

input {
  font-family: var(--font-body);
  outline: none;
}

ul, ol {
  list-style: none;
}

::selection {
  background: var(--gold-faint);
  color: var(--ink);
}

/* ===== LAYOUT ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: var(--space-xl);
  padding-right: var(--space-xl);
}

.container--narrow {
  max-width: var(--container-narrow);
}

.container--wide {
  max-width: var(--container-wide);
}

/* ===== NAVIGATION ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.25rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(253, 251, 247, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.nav--scrolled {
  padding: 0.9rem 3rem;
  box-shadow: var(--shadow-sm);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.nav__logo span {
  color: var(--gold);
}

.nav__links {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

.nav__link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--duration-base) ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width var(--duration-base) ease;
}

.nav__link:hover {
  color: var(--gold-dark);
}

.nav__link:hover::after {
  width: 100%;
}

.nav__link--active {
  color: var(--ink);
}

.nav__link--active::after {
  width: 100%;
  background: var(--gold);
}

.nav__cta {
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background var(--duration-base) ease;
}

.nav__cta:hover {
  background: var(--blue-deep);
  color: var(--cream);
}

/* Mobile nav toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: all 0.3s ease;
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.nav__mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--cream);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.nav__mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.nav__mobile-menu a {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 400;
  color: var(--ink);
}

.nav__mobile-menu a:hover {
  color: var(--gold-dark);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem var(--space-xl) var(--space-3xl);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -20%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--gold-faint) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--blue-faint) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero__content {
  max-width: var(--container-narrow);
  position: relative;
  z-index: 1;
}

.hero__tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: var(--space-xl);
}

.hero__tag::before,
.hero__tag::after {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--gold);
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: var(--space-lg);
}

.hero__title em {
  font-style: italic;
  font-weight: 500;
  color: var(--blue-deep);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: var(--ink-muted);
  max-width: 520px;
  margin: 0 auto var(--space-2xl);
  font-weight: 400;
}

.hero__actions {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
}

.hero__scroll span {
  font-size: var(--text-xs);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 0.9rem 2.2rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: all var(--duration-base) ease;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.btn--primary:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}

.btn--secondary:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn--gold:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  transform: translateY(-1px);
}

.btn--small {
  padding: 0.6rem 1.4rem;
  font-size: var(--text-sm);
}

.btn--large {
  padding: 1.1rem 2.8rem;
  font-size: 1rem;
}

/* ===== SECTION PRIMITIVES ===== */
.section {
  padding: var(--space-4xl) var(--space-xl);
}

.section--white {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section--cream {
  background: var(--cream);
}

.section--sand {
  background: var(--sand);
}

.section--dark {
  background: var(--ink);
  color: var(--cream);
}

.section__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
}

.section--dark .section__label {
  color: var(--gold-light);
}

.section__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.section__subtitle {
  color: var(--ink-muted);
  font-size: var(--text-base);
  max-width: 520px;
  margin-top: var(--space-sm);
}

.section--dark .section__subtitle {
  color: rgba(255, 255, 255, 0.5);
}

/* ===== PARASHA HEADER ===== */
.parasha-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-2xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.parasha-meta {
  text-align: right;
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.parasha-meta__hebrew {
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--ink);
  display: block;
  margin-bottom: var(--space-xs);
  direction: rtl;
  font-weight: 400;
}

/* ===== CARDS ===== */
.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
}

.card {
  background: var(--cream);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.card--featured {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--sand) 0%, var(--cream) 100%);
  border-color: rgba(196, 162, 101, 0.15);
  padding: var(--space-2xl);
}

.card--white {
  background: var(--white);
}

.card__label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.card__label .icon {
  font-size: 1rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.card__text {
  color: var(--ink-light);
  font-size: var(--text-base);
  line-height: 1.8;
}

.card__text p + p {
  margin-top: var(--space-md);
}

/* ===== THEME TAGS ===== */
.themes {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-top: var(--space-lg);
}

.theme-tag {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink-light);
  transition: all var(--duration-base) ease;
  cursor: default;
}

.theme-tag:hover {
  border-color: var(--gold);
  color: var(--gold-dark);
}

/* ===== COMMANDMENTS ===== */
.commandments {
  margin-top: var(--space-2xl);
}

.commandments__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 400;
}

.commandments__title span {
  color: var(--ink-muted);
  font-size: 1rem;
}

.commandments__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-top: var(--space-lg);
}

.commandment {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--cream);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--duration-base) ease;
}

.commandment:hover {
  border-color: var(--border-hover);
  background: var(--sand);
}

.commandment__num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  min-width: 24px;
}

.commandment__text {
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.5;
}

/* ===== GLOSSARY ===== */
.glossary__search {
  margin-bottom: var(--space-xl);
}

.glossary__input {
  width: 100%;
  max-width: 480px;
  padding: 0.9rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: var(--text-base);
  color: var(--ink);
  transition: border-color var(--duration-base) ease;
}

.glossary__input::placeholder {
  color: var(--ink-muted);
}

.glossary__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-faint);
}

.glossary__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-md);
}

.glossary-item {
  padding: var(--space-lg);
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all var(--duration-base) ease;
}

.glossary-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
}

.glossary-item__term {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
}

.glossary-item__hebrew {
  font-size: var(--text-base);
  color: var(--gold-dark);
  margin-bottom: var(--space-sm);
  direction: rtl;
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 500;
}

.glossary-item__def {
  font-size: 0.88rem;
  color: var(--ink-light);
  line-height: 1.7;
}

/* ===== STEPS / HOW IT WORKS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: var(--space-2xl);
}

.step {
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
}

.step__num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--gold);
  line-height: 1;
  margin-bottom: var(--space-md);
}

.step__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.step__desc {
  font-size: 0.9rem;
  color: var(--ink-muted);
  line-height: 1.7;
}

/* ===== NEWSLETTER / CTA ===== */
.newsletter {
  text-align: center;
}

.newsletter__content {
  max-width: 560px;
  margin: 0 auto;
}

.newsletter__title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 400;
  margin-bottom: var(--space-md);
}

.newsletter__text {
  color: var(--ink-muted);
  margin-bottom: var(--space-xl);
  font-size: var(--text-base);
}

.email-form {
  display: flex;
  gap: 0.75rem;
  max-width: 460px;
  margin: 0 auto;
  border: none;
  padding: 0;
}

.email-form__input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: 0.9rem;
  transition: border-color var(--duration-base) ease;
}

.email-form__input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-faint);
}

.email-form__btn {
  background: var(--ink);
  color: var(--cream);
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: background var(--duration-base) ease;
  white-space: nowrap;
}

.email-form__btn:hover {
  background: var(--blue-deep);
}

.newsletter__msg {
  margin-top: var(--space-md);
  font-size: var(--text-sm);
  color: var(--gold-dark);
  display: none;
}

.newsletter__msg.visible {
  display: block;
}

/* ===== ABOUT PAGE SPECIFIC ===== */
.about-hero {
  padding: 10rem var(--space-xl) var(--space-4xl);
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.about-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xl);
}

.about-hero__title em {
  font-weight: 500;
  font-style: italic;
  color: var(--blue-deep);
}

.about-body {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 var(--space-xl) var(--space-4xl);
}

.about-body p {
  font-size: var(--text-md);
  color: var(--ink-light);
  line-height: 1.9;
  margin-bottom: var(--space-lg);
}

.about-body p:first-of-type {
  font-size: var(--text-lg);
  color: var(--ink);
}

/* ===== PARASHA ARCHIVE ===== */
.archive-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
}

.archive-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg) var(--space-xl);
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: all var(--duration-base) ease;
  text-decoration: none;
  color: var(--ink);
}

.archive-item:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-sm);
  transform: translateX(4px);
}

.archive-item__name {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
}

.archive-item__details {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  color: var(--ink-muted);
  font-size: var(--text-sm);
}

.archive-item__arrow {
  color: var(--gold);
  font-size: 1.2rem;
  transition: transform var(--duration-base) ease;
}

.archive-item:hover .archive-item__arrow {
  transform: translateX(4px);
}

/* ===== FOOTER ===== */
.footer {
  padding: var(--space-3xl) var(--space-xl);
  background: var(--ink);
  color: rgba(255, 255, 255, 0.5);
}

.footer__inner {
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-3xl);
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: var(--space-sm);
}

.footer__logo span {
  color: var(--gold);
}

.footer__tagline {
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 300px;
}

.footer__heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--duration-base) ease;
}

.footer__link:hover {
  color: var(--gold-light);
}

.footer__bottom {
  max-width: var(--container-max);
  margin: var(--space-2xl) auto 0;
  padding-top: var(--space-xl);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50% { opacity: 1; transform: scaleY(1.2); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

/* Entrance animations */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: all var(--duration-reveal) var(--ease-out);
}

.anim-fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.anim-fade-in {
  opacity: 0;
  transition: opacity var(--duration-reveal) var(--ease-out);
}

.anim-fade-in.visible {
  opacity: 1;
}

/* Staggered children */
.anim-stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: all var(--duration-slow) var(--ease-out);
}

.anim-stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(2) { transition-delay: 0.08s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(3) { transition-delay: 0.16s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(4) { transition-delay: 0.24s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(5) { transition-delay: 0.32s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(6) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(7) { transition-delay: 0.48s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(8) { transition-delay: 0.56s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(9) { transition-delay: 0.64s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(10) { transition-delay: 0.72s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(11) { transition-delay: 0.8s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(12) { transition-delay: 0.88s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(13) { transition-delay: 0.96s; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(n+14) { transition-delay: 1s; opacity: 1; transform: translateY(0); }

/* Hero-specific entrance */
.hero .hero__tag { opacity: 0; animation: fadeUp 0.8s ease 0.2s forwards; }
.hero .hero__title { opacity: 0; animation: fadeUp 0.8s ease 0.4s forwards; }
.hero .hero__subtitle { opacity: 0; animation: fadeUp 0.8s ease 0.6s forwards; }
.hero .hero__actions { opacity: 0; animation: fadeUp 0.8s ease 0.8s forwards; }
.hero .hero__scroll { opacity: 0; animation: fadeUp 0.8s ease 1.2s forwards; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
  }
}

@media (max-width: 768px) {
  .nav {
    padding: 1rem 1.5rem;
  }

  .nav__links {
    display: none;
  }

  .nav__toggle {
    display: flex;
  }

  .nav__mobile-menu {
    display: flex;
  }

  .hero {
    padding: 7rem 1.5rem 3rem;
    min-height: auto;
    padding-bottom: 4rem;
  }

  .hero__scroll {
    display: none;
  }

  .hero__subtitle {
    font-size: var(--text-base);
  }

  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
  }

  .section {
    padding: var(--space-3xl) var(--space-lg);
  }

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

  .steps {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .commandments__grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .commandment {
    padding: 0.75rem 1rem;
  }

  .commandment__num {
    font-size: 1.2rem;
    min-width: 20px;
  }

  .commandment__text {
    font-size: 0.82rem;
  }

  .card--featured {
    padding: var(--space-lg);
  }

  .card {
    padding: var(--space-lg);
  }

  .card__title {
    font-size: var(--text-xl);
  }

  .themes {
    gap: 0.4rem;
  }

  .theme-tag {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
  }

  .section__title {
    font-size: clamp(1.8rem, 4vw, 3.2rem);
  }

  .parasha-meta__hebrew {
    font-size: 1.8rem;
  }

  .email-form {
    flex-direction: column;
  }

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

  .parasha-meta {
    text-align: left;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .footer__bottom {
    flex-direction: column;
    gap: var(--space-sm);
    text-align: center;
  }

  .archive-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }
}

@media (max-width: 480px) {
  .commandments__grid {
    grid-template-columns: 1fr;
  }

  .hero__title {
    font-size: 2.2rem;
  }

  .section {
    padding: var(--space-2xl) var(--space-md);
  }

  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }

  .newsletter__title {
    font-size: 1.8rem;
  }

  .step__num {
    font-size: 2.5rem;
  }

  .glossary-item {
    padding: var(--space-md);
  }

  .glossary-item__term {
    font-size: var(--text-lg);
  }
}

/* ===== PRINT STYLES ===== */
@media print {
  .nav,
  .hero__scroll,
  .newsletter,
  .footer {
    display: none;
  }

  .section {
    padding: 2rem 0;
    border: none;
  }

  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
}
