@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/vazirmatn-arabic-wght-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: 'Vazirmatn';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/vazirmatn-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/estedad-arabic-wght-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

@font-face {
  font-family: 'Estedad';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('/fonts/estedad-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #101515;
  --surface: #171e1e;
  --surface-2: #1d2727;
  --ink: #eef4f3;
  --muted: #aebcba;
  --line: rgba(255, 255, 255, 0.1);
  --accent: #00aaa8;
  --accent-soft: #56d5d1;
  --radius: 16px;
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(870px, calc(100% - 40px)); }
.skip-link { position: fixed; top: -80px; right: 20px; z-index: 100; padding: 10px 16px; background: var(--accent); color: #041010; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 76px;
  background: rgba(11, 16, 16, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.header-inner { display: flex; min-height: 76px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: grid; width: 124px; height: 70px; place-items: center; flex: 0 0 auto; }
.brand img { display: block; max-height: 62px; width: auto; }
.main-menu { display: flex; align-items: center; gap: 6px; }
.main-menu a { padding: 8px 10px; color: var(--muted); font-size: 14px; font-weight: 520; text-decoration: none; border-radius: 8px; transition: 160ms ease; }
.main-menu a:hover, .main-menu a:focus-visible { color: var(--ink); background: rgba(255,255,255,.06); }
.menu-toggle { display: none; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 8px; padding: 7px 12px; }

.hero {
  position: relative;
  display: grid;
  min-height: calc(100svh - 76px);
  align-items: center;
  isolation: isolate;
  background: #202525 url('/assets/hero-nader-flipped.jpg?v=6') left center / cover no-repeat;
  overflow: hidden;
}
.hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(270deg, rgba(12,17,17,.98) 12%, rgba(12,17,17,.68) 58%, rgba(12,17,17,.14)); }
.hero::after { content: ''; position: absolute; inset: auto 0 0; height: 35%; z-index: -1; background: linear-gradient(transparent, var(--bg)); }
.hero-content { padding-block: 90px; }
.eyebrow { margin: 0 0 8px; color: var(--accent-soft); font-family: 'Estedad', 'Vazirmatn', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.hero h1 { margin: 0; font-family: 'Estedad', 'Vazirmatn', sans-serif; font-size: clamp(54px, 9vw, 112px); line-height: 1.18; font-weight: 820; letter-spacing: -.025em; }
.hero-lead { max-width: 630px; margin: 22px 0 36px; color: #d1dddb; font-size: clamp(18px, 2.3vw, 26px); font-weight: 380; line-height: 1.9; }
.primary-button, .secondary-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 24px; border: 0; border-radius: 999px; text-decoration: none; cursor: pointer; }
.primary-button { background: var(--accent); color: #051111; font-weight: 700; }
.secondary-button { margin: 34px auto 0; background: transparent; color: var(--ink); border: 1px solid var(--line); }

.section { padding: 100px 0; border-top: 1px solid var(--line); }
.section-tinted { background: var(--surface); }
.section-dark { background: #090e0e; }
.section-heading { margin-bottom: 44px; }
.section-heading span { color: var(--accent-soft); font-family: 'Estedad', 'Vazirmatn', sans-serif; font-size: 13px; font-weight: 650; letter-spacing: .03em; }
.section-heading h2 { margin: 8px 0 0; font-family: 'Estedad', 'Vazirmatn', sans-serif; font-size: clamp(32px, 5vw, 58px); line-height: 1.45; font-weight: 740; letter-spacing: -.018em; }
.section-heading p { margin: 10px 0 0; color: var(--muted); }
.prose p { margin: 0 0 24px; color: #d4dfdd; font-size: 17px; text-align: justify; }
.two-column { display: grid; grid-template-columns: minmax(250px, .75fr) minmax(0, 1.5fr); gap: 80px; align-items: start; }
.sticky-heading { position: sticky; top: 116px; }
.text-list, .poem-lines { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.text-list li, .poem-lines li { padding: 15px 0; color: #d5dfdd; border-bottom: 1px solid var(--line); }
.poem-lines li { padding: 10px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -14px 0 34px; }
.filter-button { padding: 8px 15px; color: var(--muted); background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }
.filter-button:hover, .filter-button.active { color: #061212; background: var(--accent); border-color: var(--accent); }
.books-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px; }
.book-card { min-width: 0; overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
.book-card[hidden] { display: none; }
.book-cover { position: relative; aspect-ratio: 3 / 4; background: linear-gradient(145deg, #253131, #121818); overflow: hidden; }
.book-cover img { position: relative; z-index: 2; display: block; width: 100%; height: 100%; object-fit: cover; }
.book-cover img.is-missing { display: none; }
.book-fallback { position: absolute; inset: 0; display: grid; place-items: center; padding: 18px; color: rgba(255,255,255,.5); text-align: center; }
.book-meta { padding: 14px; }
.book-meta h3 { min-height: 52px; margin: 0 0 6px; font-size: 14px; font-weight: 620; line-height: 1.85; }
.book-meta span { color: var(--muted); font-size: 11px; }
.load-more { display: flex; }

.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.media-card { margin: 0; aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: 10px; overflow: hidden; }
.media-card.is-missing { display: none; }
.media-card a, .media-card img { display: block; width: 100%; height: 100%; }
.media-card img { object-fit: cover; filter: grayscale(100%); transition: 180ms ease; }
.media-card:hover img { filter: grayscale(0); transform: scale(1.025); }
.audio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.audio-card { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.audio-card h3 { margin: 0 0 14px; font-size: 15px; }
.audio-card audio { width: 100%; height: 42px; }

.section-contact { background: linear-gradient(135deg, #111919, #172323); }
.contact-layout { display: grid; grid-template-columns: minmax(240px, .72fr) minmax(0, 1.28fr); gap: 80px; align-items: start; }
.contact-intro .section-heading { margin-bottom: 18px; }
.contact-intro p { max-width: 410px; margin: 0 0 20px; color: var(--muted); }
.contact-email { display: inline-flex; color: var(--accent-soft); font-size: clamp(18px, 2.3vw, 25px); font-weight: 600; text-decoration: none; direction: ltr; }
.contact-email:hover, .contact-email:focus-visible { color: var(--ink); }
.contact-form { position: relative; display: grid; gap: 18px; padding: clamp(22px, 4vw, 42px); background: rgba(255,255,255,.035); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-form label { display: grid; gap: 7px; color: #dbe5e3; font-size: 13px; font-weight: 520; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-form input, .contact-form textarea { width: 100%; color: var(--ink); background: rgba(4,10,10,.55); border: 1px solid rgba(255,255,255,.15); border-radius: 10px; padding: 12px 14px; font: inherit; line-height: 1.6; outline: none; transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form input:focus, .contact-form textarea:focus { background: rgba(4,10,10,.8); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,170,168,.14); }
.contact-submit { justify-self: start; min-width: 150px; }
.form-note { margin: -4px 0 0; color: var(--muted); font-size: 12px; }
.form-trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.contact-status { padding: 12px 15px; color: #d7fffd; background: rgba(0,170,168,.12); border: 1px solid rgba(86,213,209,.35); border-radius: 10px; }
.contact-status.is-error { color: #ffd9d9; background: rgba(204,70,70,.12); border-color: rgba(255,130,130,.35); }

.site-footer { padding: 42px 0; background: #070b0b; border-top: 1px solid var(--line); }
.footer-inner { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 13px; }
.footer-inner img { width: 84px; height: auto; }
.footer-inner p { margin: 0; }
.footer-inner a { margin-right: auto; color: var(--accent-soft); text-decoration: none; }

@media (max-width: 1040px) {
  .books-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .main-menu { gap: 0; }
  .main-menu a { padding-inline: 7px; font-size: 13px; }
}

@media (max-width: 760px) {
  .shell, .narrow { width: min(100% - 28px, 1180px); }
  .site-header, .header-inner { min-height: 66px; }
  .brand { width: 104px; height: 62px; }
  .brand img { max-height: 54px; }
  .menu-toggle { display: inline-flex; }
  .main-menu { position: absolute; top: 66px; right: 14px; left: 14px; display: none; padding: 12px; background: rgba(10,15,15,.98); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); }
  .main-menu.open { display: grid; grid-template-columns: repeat(2, 1fr); }
  .main-menu a { padding: 10px; font-size: 14px; }
  .hero { min-height: 78svh; background-position: 23% center; }
  .hero::before { background: linear-gradient(270deg, rgba(12,17,17,.98), rgba(12,17,17,.58)); }
  .hero-content { padding: 90px 0 60px; }
  .hero h1 { font-size: clamp(48px, 17vw, 80px); letter-spacing: -.025em; }
  .section { padding: 72px 0; }
  .section-heading { margin-bottom: 30px; }
  .prose p { font-size: 15px; text-align: right; }
  .two-column { grid-template-columns: 1fr; gap: 14px; }
  .sticky-heading { position: static; }
  .books-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .book-meta { padding: 11px; }
  .book-meta h3 { min-height: 0; font-size: 13px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .audio-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 28px; }
  .field-grid { grid-template-columns: 1fr; }
  .contact-email { font-size: 18px; }
  .footer-inner { align-items: flex-start; flex-wrap: wrap; }
  .footer-inner a { width: 100%; margin: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
