:root {
  --bg: #f6f7f9;
  --fg: #1c2a3a;
  --card: #ffffff;
  --primary: #16324f;
  --primary-fg: #f7f8fa;
  --secondary: #eef1f5;
  --muted: #5c6b7a;
  --accent: #e0a23a;
  --accent-fg: #1a2740;
  --border: #e2e6ec;
  --font: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --display: "Noto Kufi Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.35;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
}

.skip,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip:focus {
  position: fixed;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  z-index: 80;
  width: auto;
  height: auto;
  margin: 0;
  clip: auto;
  background: var(--accent);
  color: var(--accent-fg);
  padding: 0.5rem 1rem;
}

.wrap {
  width: min(72rem, calc(100% - 2.5rem));
  margin-inline: auto;
}

.stack {
  display: flex;
  flex-direction: column;
}

.stack-2 { gap: 0.5rem; }
.stack-3 { gap: 0.75rem; }
.stack-4 { gap: 1rem; }
.stack-5 { gap: 1.25rem; }
.stack-6 { gap: 1.5rem; }
.stack-10 { gap: 2.5rem; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  color: var(--primary);
  font-family: var(--display);
  font-weight: 600;
  text-decoration: none;
}

.nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.875rem;
  text-decoration: none;
}

.nav a:hover {
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.375rem;
  font-weight: 600;
}

.price-desktop {
  display: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0 1.5rem;
  border: 0;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.9;
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0 1rem;
  font-size: 0.875rem;
}

.btn-block {
  width: 100%;
}

.btn .long {
  display: none;
}

.btn-ghost,
.text-button {
  border: 0;
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  border: 1px solid var(--border);
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-ghost:hover {
  background: var(--secondary);
}

.text-button {
  padding: 0;
  color: var(--muted);
  text-align: inherit;
}

.text-button:hover,
.footer-links a:hover,
.contact-list a:hover,
.prose a:hover,
.back:hover {
  color: var(--fg);
  text-decoration: underline;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero {
  padding: 3rem 0;
}

.hero-grid,
.cta-grid {
  display: flex;
  flex-direction: column-reverse;
  gap: 2.5rem;
}

.hero-copy,
.cta-copy,
.author-copy,
.intro {
  display: flex;
  flex-direction: column;
}

.hero-copy,
.cta-copy {
  gap: 1.5rem;
  max-width: 36rem;
}

.intro {
  gap: 0.75rem;
  max-width: 40rem;
}

.kicker {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 500;
}

.kicker .sep {
  display: none;
  color: var(--border);
}

.hero h1 {
  color: var(--primary);
  font-size: 2.25rem;
}

.lede {
  color: var(--muted);
  font-size: 1.125rem;
}

.muted {
  color: var(--muted);
}

.note {
  color: var(--muted);
  font-size: 0.875rem;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.actions .price {
  justify-content: center;
}

.en {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: right;
}

.book {
  width: min(100%, 24rem);
  margin-inline: auto;
}

.book-frame,
.portrait {
  overflow: hidden;
  background: var(--secondary);
}

.book-frame {
  aspect-ratio: 4 / 5;
}

.book-frame img,
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.caption {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 0.75rem;
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
}

.band,
.section,
.cta,
.legal {
  padding: 4rem 0;
}

.band,
.portrait {
  background: var(--secondary);
}

.section h2,
.band h2 {
  color: var(--primary);
  font-size: 1.875rem;
}

section[id] {
  scroll-margin-top: 5rem;
}

.cards,
.quotes,
.footer-grid {
  display: grid;
  gap: 2rem;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
}

.card h3,
.chapter h3,
.sheet h2,
.prose h2 {
  font-size: 1.25rem;
}

.icon,
.contact-list svg {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  color: var(--primary);
}

.contact-list svg {
  width: 1rem;
  height: 1rem;
  margin-top: 0.3rem;
  color: var(--muted);
}

.chapters {
  margin: 0;
  padding: 0;
  list-style: none;
  border-bottom: 1px solid var(--border);
}

.chapter {
  display: grid;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.chapter-label {
  margin: 0;
  color: var(--primary);
  font-family: var(--display);
  font-size: 0.875rem;
  font-weight: 600;
}

.author-grid {
  display: grid;
  gap: 2.5rem;
}

.author-copy {
  gap: 1rem;
}

.portrait {
  width: min(100%, 20rem);
  margin-inline: auto;
  aspect-ratio: 4 / 5;
}

.portrait img {
  object-position: center 20%;
}

.quote {
  margin: 0;
  border-top: 2px solid var(--accent);
  padding-top: 1.25rem;
}

.quote blockquote {
  margin: 0;
}

.quote figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding-top: 1rem;
}

.quote strong {
  color: var(--primary);
}

.cta {
  background: var(--primary);
  color: var(--primary-fg);
}

.cta h2 {
  color: inherit;
}

.cta .lede {
  color: color-mix(in srgb, var(--primary-fg) 78%, transparent);
}

.cta .book-frame {
  background: color-mix(in srgb, white 12%, transparent);
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0;
}

.brand-lg,
.footer-title {
  margin: 0;
  color: var(--primary);
  font-weight: 600;
}

.brand-lg {
  font-family: var(--display);
  font-size: 1.125rem;
}

.footer-links,
.contact-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links a,
.contact-list a,
.prose a,
.back {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 4px;
}

.prose a,
.back {
  color: var(--primary);
}

.contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--muted);
}

address {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-style: normal;
}

.copy {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.legal article {
  width: min(40rem, 100%);
  margin-inline: auto;
}

.legal h1 {
  color: var(--primary);
  font-size: 1.875rem;
}

.prose {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prose h2 {
  margin-top: 0.5rem;
  color: var(--primary);
}

.updated {
  color: var(--muted);
  font-size: 0.875rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th,
td {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0.5rem;
  text-align: right;
  vertical-align: top;
}

th {
  color: var(--primary);
  font-weight: 600;
}

.sheet {
  width: min(28rem, calc(100% - 2rem));
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.sheet::backdrop {
  background: color-mix(in srgb, var(--primary) 62%, transparent);
}

.sheet-card {
  background: var(--card);
  color: var(--fg);
  box-shadow: 0 16px 40px rgb(22 50 79 / 18%);
}

.sheet-head,
.sheet-body {
  padding: 1.25rem;
}

.sheet-head {
  border-bottom: 1px solid var(--border);
}

.sheet-grid {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 1rem;
}

.sheet-grid .book {
  width: 100%;
}

.center {
  text-align: center;
}

.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  padding: 1rem 0;
  background: var(--primary);
  color: var(--primary-fg);
  box-shadow: 0 -8px 24px rgb(22 50 79 / 16%);
}

html.has-consent .cookie-banner {
  display: none;
}

html:not(.has-consent) body {
  padding-bottom: 11rem;
}

.cookie-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-inner p {
  font-size: 0.9375rem;
}

.cookie-inner a {
  color: var(--accent);
}

.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cookie-actions .btn-ghost {
  border-color: color-mix(in srgb, white 30%, transparent);
  color: var(--primary-fg);
}

.cookie-actions .btn-ghost:hover {
  background: color-mix(in srgb, white 10%, transparent);
}

@media (min-width: 640px) {
  .hero h1 {
    font-size: 3rem;
  }

  .section h2,
  .band h2,
  .cta h2 {
    font-size: 2.25rem;
  }

  .kicker {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
  }

  .kicker .sep {
    display: inline;
  }

  .actions,
  .cookie-actions {
    flex-direction: row;
    align-items: center;
  }

  .actions .btn-block,
  .cookie-actions .btn,
  .cookie-actions .btn-ghost {
    width: auto;
  }

  .cookie-actions .btn-ghost {
    padding-inline: 1rem;
  }

  .actions .price {
    justify-content: flex-start;
  }

  .btn .short {
    display: none;
  }

  .btn .long {
    display: inline;
  }
}

@media (min-width: 768px) {
  .nav {
    display: flex;
  }

  .hero,
  .section,
  .band,
  .cta,
  .legal {
    padding: 5rem 0;
  }

  .cards,
  .quotes,
  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
  }

  .author-grid {
    grid-template-columns: 1fr 18rem;
    align-items: center;
    gap: 3.5rem;
  }

  .portrait {
    width: 100%;
    margin: 0;
  }

  .cta-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .chapter {
    grid-template-columns: 7rem 1fr;
    gap: 2rem;
  }

  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-inner p {
    max-width: 46rem;
  }

  html:not(.has-consent) body {
    padding-bottom: 6.5rem;
  }
}

@media (min-width: 1024px) {
  .price-desktop {
    display: inline-flex;
  }

  .hero-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .book-hero {
    width: 22rem;
    margin: 0;
  }

  .inside {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 4rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
