:root {
  --plum: #2c1438;
  --plum-deep: #1b0e24;
  --gold-ink: #7a5412;
  --coral: #b83d2b;
  --coral-deep: #8c2c1d;
  --cream: #f3eee6;
  --paper: #fffcf8;
  --ink: #241820;
  --muted: #5c5148;
  --line: #e4d9cc;
  --focus: #8c2c1d;
  --shadow: 0 18px 40px rgba(36, 20, 40, 0.08);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: linear-gradient(90deg, var(--coral) 0 6px, transparent 6px), var(--cream);
  min-height: 100vh;
}

html[lang="ar"] body {
  font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.125rem;
  line-height: 1.85;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .brand-name,
html[lang="ar"] .footer-word {
  font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif;
}

img { max-width: 100%; height: auto; }

a { color: var(--coral-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--plum); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip {
  position: absolute;
  inset-inline-start: 0.75rem;
  top: 0.75rem;
  transform: translateY(-160%);
  background: var(--plum);
  color: var(--paper);
  padding: 0.6rem 0.9rem;
  z-index: 20;
}
.skip:focus { transform: none; }

.topstrip { background: var(--plum-deep); color: #f6efe4; font-size: 0.82rem; }
.topstrip-inner,
.header-inner,
.shell,
.footer-inner { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.topstrip-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
}
.langs { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.langs a {
  color: #f6efe4;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  min-height: 1.8rem;
  display: inline-flex;
  align-items: center;
}
.langs a[aria-current="true"] { border-color: #e7c27a; color: #f3d48a; }
.age { font-weight: 600; }

.site-header {
  background: rgba(255, 252, 248, 0.94);
  border-block-end: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "brand toggle" "search search" "nav nav";
  gap: 0.7rem 1rem;
  align-items: center;
  padding-block: 0.8rem 0.9rem;
}
.brand {
  grid-area: brand;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  min-height: 44px;
}
.brand img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; background: var(--plum); }
.brand-name {
  font-family: Fraunces, Georgia, serif;
  font-size: 1.45rem;
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1;
}
.brand small {
  display: block;
  margin-top: 0.18rem;
  color: var(--muted);
  font-family: Outfit, "Segoe UI", sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.nav-toggle {
  grid-area: toggle;
  justify-self: end;
  min-height: 44px;
  min-width: 44px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding-inline: 0.9rem;
  cursor: pointer;
}
.site-nav { grid-area: nav; display: none; flex-wrap: wrap; gap: 0.35rem 0.9rem; margin: 0; padding: 0; list-style: none; }
.site-nav.is-open { display: flex; }
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  padding-block: 0.35rem;
  border-block-end: 2px solid transparent;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.site-nav a[aria-current="page"] { border-color: var(--coral); color: var(--coral-deep); }
.search { grid-area: search; position: relative; display: flex; gap: 0.4rem; }
.search input {
  flex: 1;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid #cbbbaa;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  padding-inline: 1rem;
}
.search button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--plum);
  color: #fffaf4;
  font: inherit;
  font-weight: 600;
  padding-inline: 1rem;
  cursor: pointer;
}
.search-results {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 0.35rem);
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  z-index: 12;
}
.search-results a { display: block; padding: 0.55rem 0.7rem; border-radius: 10px; text-decoration: none; color: var(--ink); }
.search-results a:hover,
.search-results a:focus-visible { background: var(--cream); }

.shell { padding-block: 1rem 3.5rem; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 0.35rem 0.45rem; list-style: none; margin: 0 0 1rem; padding: 0; color: var(--muted); font-size: 0.92rem; }
.crumbs li:not(:last-child)::after { content: "/"; margin-inline-start: 0.45rem; color: #b3a394; }

.hero {
  display: grid;
  gap: 1.25rem;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}
.kicker { margin: 0 0 0.4rem; color: var(--gold-ink); font-size: 0.82rem; font-weight: 650; letter-spacing: 0.06em; text-transform: uppercase; }
h1, h2, h3, h4 { font-family: Fraunces, Georgia, serif; font-weight: 560; letter-spacing: -0.025em; line-height: 1.18; margin: 0 0 0.7rem; }
h1 { font-size: clamp(2rem, 4.6vw, 3.45rem); color: var(--plum-deep); }
h2 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.4rem; }
h4 { font-size: 1.08rem; margin-top: 1.1rem; }
.lead p, .prose p { margin: 0 0 0.9rem; }
.lead p:first-child::first-line { font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1rem 0 0.4rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0.7rem 1.05rem; border-radius: 999px; text-decoration: none; font-weight: 650; line-height: 1.2; border: 0; cursor: pointer; font: inherit; font-weight: 650; }
.btn-primary { background: var(--coral); color: #fffaf6; }
.btn-primary:hover { background: var(--coral-deep); color: #fffaf6; }
.btn-ghost { background: transparent; color: var(--plum); border: 1.5px solid var(--plum); }
.trust { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 0.9rem 0 0; padding: 0; list-style: none; }
.trust li { background: var(--cream); border-radius: 999px; padding: 0.28rem 0.7rem; font-size: 0.86rem; color: var(--muted); }
.hero-media, .frame { margin: 0; background: #e7dfd4; overflow: hidden; }
.hero-media { aspect-ratio: 16 / 9; border-radius: 20px; }
.frame { aspect-ratio: 16 / 9; border-radius: 18px; border: 1px solid var(--line); }
.frame.portrait { aspect-ratio: 3 / 4; max-width: 420px; }
.hero-media img, .frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
figcaption { color: var(--muted); font-size: 0.88rem; padding: 0.45rem 0.1rem 0; }
.page-head { max-width: 74ch; margin-bottom: 1rem; }
.prose { max-width: 74ch; }
.prose ul, .prose ol { margin: 0 0 1rem; padding-inline-start: 1.2rem; }
.prose li + li { margin-top: 0.35rem; }
.note, .author-card, .faq details, .sheet { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; }
.note { padding: 0.9rem 1rem; margin: 1rem 0 1.2rem; }
.steps { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 0.7rem; }
.steps li { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: start; background: var(--paper); border: 1px solid var(--line); border-radius: 16px; padding: 0.85rem 0.95rem; }
.steps b { font-family: Fraunces, Georgia, serif; font-size: 1.4rem; color: var(--gold-ink); font-weight: 560; line-height: 1; }
.sheet { width: 100%; border-collapse: collapse; overflow: hidden; margin: 0 0 1.1rem; }
.sheet th, .sheet td { text-align: start; padding: 0.75rem 0.85rem; border-block-end: 1px solid var(--line); vertical-align: top; }
.sheet th { background: #f7f1e8; font-size: 0.92rem; }
.faq { display: grid; gap: 0.55rem; margin-top: 0.6rem; }
.faq details { padding: 0.75rem 0.95rem; }
.faq summary { cursor: pointer; font-weight: 650; min-height: 44px; display: flex; align-items: center; }
.author-card { display: grid; grid-template-columns: 84px 1fr; gap: 0.9rem; padding: 0.9rem; margin-top: 2rem; align-items: center; }
.author-card img { width: 84px; height: 84px; object-fit: cover; border-radius: 16px; background: #e7dfd4; }
.author-card p { margin: 0.2rem 0 0; color: var(--muted); }
.contact-form { display: grid; gap: 0.75rem; max-width: 38rem; }
.contact-form label { display: grid; gap: 0.3rem; font-weight: 600; }
.contact-form input, .contact-form textarea { min-height: 46px; border-radius: 12px; border: 1px solid #cbbbaa; background: var(--paper); font: inherit; color: var(--ink); padding: 0.65rem 0.8rem; }
.contact-form textarea { min-height: 140px; resize: vertical; }

.site-footer { background: var(--plum-deep); color: #f6efe4; padding-block: 2.2rem 1.4rem; }
.footer-word { font-family: Fraunces, Georgia, serif; font-size: clamp(2.4rem, 7vw, 4.5rem); line-height: 0.9; margin: 0 0 1rem; color: #f3d48a; }
.footer-grid { display: grid; gap: 1.2rem; }
.site-footer h2 { font-family: Outfit, "Segoe UI", sans-serif; font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 0.55rem; color: #f3d48a; }
html[lang="ar"] .site-footer h2, html[lang="ar"] .brand small { font-family: "Noto Naskh Arabic", "Segoe UI", Tahoma, sans-serif; letter-spacing: 0; text-transform: none; }
.site-footer a { color: #f6efe4; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.35rem; }
.legal-line { margin-top: 1.4rem; padding-top: 0.9rem; border-top: 1px solid rgba(246, 239, 228, 0.18); color: #e6d8c8; font-size: 0.92rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (min-width: 880px) {
  .header-inner { grid-template-columns: auto 1fr minmax(240px, 320px); grid-template-areas: "brand nav search"; align-items: center; }
  .nav-toggle { display: none; }
  .site-nav { display: flex; justify-content: center; }
  .hero { grid-template-columns: 1.15fr 0.85fr; padding: 1.35rem 1.35rem 1.35rem 1.5rem; gap: 1.5rem; }
  .footer-grid { grid-template-columns: 1.3fr 0.7fr 0.8fr 0.9fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print {
  .topstrip, .search, .nav-toggle, .cta-row, .site-footer { display: none; }
  body { background: white; }
}
