@import url("https://fonts.googleapis.com/css2?family=Noto+Naskh+Arabic:wght@400;500;600;700&family=Reem+Kufi:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap");

:root {
  --bg: #f8f4eb;
  --bg-soft: #f3ede0;
  --surface: #fffdf9;
  --card: #ffffff;
  --border: #e6dbc8;
  --text: #201b14;
  --muted: #6f675b;
  --primary: #0f6b4a;
  --primary-soft: #5e987f;
  --gold: #c79a3b;
  --gold-soft: #ecd29a;
  --ring: rgba(19, 120, 85, 0.38);
  --shadow-sm: 0 8px 24px rgba(14, 67, 48, 0.08);
  --shadow-md: 0 20px 40px rgba(14, 67, 48, 0.14);
  --shadow-lg: 0 30px 60px rgba(14, 67, 48, 0.2);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --content: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(140deg, #fbf8f2 0%, #f4eee2 45%, #f8f4eb 100%);
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background:
    radial-gradient(circle at 8% 12%, rgba(15, 107, 74, 0.08), transparent 35%),
    radial-gradient(circle at 90% 8%, rgba(199, 154, 59, 0.12), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(15, 107, 74, 0.07), transparent 45%);
}

body::after {
  z-index: -1;
  opacity: 0.2;
  background-image:
    linear-gradient(30deg, rgba(15, 107, 74, 0.14) 12%, transparent 12.5%, transparent 87%, rgba(15, 107, 74, 0.14) 87.5%, rgba(15, 107, 74, 0.14)),
    linear-gradient(150deg, rgba(199, 154, 59, 0.13) 12%, transparent 12.5%, transparent 87%, rgba(199, 154, 59, 0.13) 87.5%, rgba(199, 154, 59, 0.13)),
    linear-gradient(90deg, rgba(34, 28, 20, 0.04) 2%, transparent 3%, transparent 97%, rgba(34, 28, 20, 0.04) 98%);
  background-size: 72px 126px;
  background-position: 0 0, 0 0, 0 0;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: #0b583d;
}

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

.container {
  width: min(var(--content), calc(100% - 48px));
  margin-inline: auto;
  padding: 24px 0;
}

.grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 880px) {
  .grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* Navigation */
header.nav {
  position: sticky;
  top: var(--utility-offset, 0px);
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(253, 250, 243, 0.84);
  border-bottom: 1px solid rgba(199, 154, 59, 0.2);
}

.nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: "Reem Kufi", "Space Grotesk", sans-serif;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: #143327;
}

.brand .logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background-image: url("content/logo_shayan.jpg");
  background-position: center;
  background-size: cover;
  box-shadow: 0 8px 22px rgba(15, 107, 74, 0.25);
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.menu {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1100;
  width: min(92vw, 430px);
  max-height: min(88svh, 700px);
  display: flex;
  flex-direction: column;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 12px 12px;
  background: linear-gradient(155deg, #fffdf8 0%, #f5efe4 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  transform: translate(-50%, -50%) scale(0.98);
  transition: transform 220ms ease, opacity 220ms ease, visibility 0s linear 220ms;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  list-style: none;
  margin: 0;
}

.menu a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: #2c251c;
  border: 1px solid transparent;
  transition: 180ms ease;
  margin-bottom: 4px;
}

.menu a:hover,
.menu a.active {
  background: rgba(15, 107, 74, 0.09);
  border-color: rgba(15, 107, 74, 0.2);
  transform: translateY(-1px);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(44, 37, 28, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: #2c251c;
  cursor: pointer;
  transition: 180ms ease;
}

.menu.is-open {
  transform: translate(-50%, -50%) scale(1);
  transition: transform 220ms ease, opacity 220ms ease;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-toggle:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.nav-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.nav-toggle-box,
.hamburger {
  display: inline-grid;
  gap: 4px;
}

.nav-toggle-bar,
.hamburger::before,
.hamburger::after,
.hamburger {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

.nav-overlay,
#navOverlay {
  position: fixed;
  inset: 0;
  background: rgba(14, 11, 8, 0.42);
  backdrop-filter: blur(5px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 1090;
}

.nav-overlay.is-active,
#navOverlay.is-active {
  opacity: 1;
  visibility: visible;
}

body.no-scroll {
  overflow: hidden;
}

header.nav.is-compact {
  backdrop-filter: blur(18px);
  background: rgba(253, 250, 243, 0.92);
}

header.nav.is-compact .nav-toggle {
  display: inline-flex;
}

/* Typography */
h1,
h2,
h3,
h4,
.title {
  margin: 0;
  color: #1f1811;
  font-family: "Reem Kufi", "Space Grotesk", sans-serif;
  line-height: 1.15;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.5rem, 2.8vw, 2.3rem);
  margin-bottom: 10px;
}

h3 {
  font-size: clamp(1.12rem, 2.1vw, 1.45rem);
  margin-bottom: 8px;
}

p,
li,
small,
.muted {
  font-size: 1rem;
}

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

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.68rem;
  font-weight: 600;
  color: #886a39;
  margin-bottom: 12px;
}

.kicker::before {
  content: "";
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, rgba(199, 154, 59, 0), rgba(199, 154, 59, 0.95));
}

/* Hero */
.hero {
  padding: clamp(48px, 8vw, 92px) 0 clamp(18px, 4vw, 34px);
}

.hero-glow {
  position: relative;
  isolation: isolate;
}

.hero-glow::before {
  content: "";
  position: absolute;
  inset: -40px -12px -10px;
  z-index: -1;
  filter: blur(20px);
  background:
    radial-gradient(500px 240px at 12% 15%, rgba(15, 107, 74, 0.18), transparent 65%),
    radial-gradient(420px 220px at 88% 8%, rgba(199, 154, 59, 0.2), transparent 68%),
    radial-gradient(420px 220px at 70% 95%, rgba(15, 107, 74, 0.13), transparent 65%);
}

.hero-layout {
  display: grid;
  gap: 26px;
  align-items: center;
}

.hero .title {
  font-size: clamp(2rem, 4.2vw, 3.65rem);
  margin-bottom: 12px;
  max-width: 16ch;
}

.hero .subtitle {
  margin: 0;
  max-width: 62ch;
  color: #4f473d;
  font-size: clamp(1rem, 1.9vw, 1.25rem);
}

.hero-copy .muted {
  margin-top: 10px;
  max-width: 64ch;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.badge {
  border-radius: 999px;
  border: 1px solid rgba(15, 107, 74, 0.17);
  background: rgba(15, 107, 74, 0.08);
  color: #1d4a38;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 6px 12px;
}

.hero-visual {
  position: relative;
  min-height: 340px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.hero-image {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  border-radius: calc(var(--radius-lg) - 2px);
  filter: saturate(1.02) contrast(1.05);
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(to top, rgba(10, 8, 6, 0.55), rgba(10, 8, 6, 0.08) 52%, rgba(10, 8, 6, 0.28));
}

.hero-visual-caption,
.hero-chip,
.hero-orb {
  position: absolute;
  z-index: 2;
}

.hero-visual-caption {
  left: 16px;
  right: 16px;
  bottom: 16px;
  color: #f6efe4;
  border: 1px solid rgba(236, 210, 154, 0.45);
  background: rgba(20, 15, 10, 0.4);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  backdrop-filter: blur(8px);
  font-size: 0.92rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8f2e7;
  border: 1px solid rgba(236, 210, 154, 0.58);
  background: rgba(22, 17, 12, 0.48);
  border-radius: 999px;
  padding: 7px 11px;
  backdrop-filter: blur(6px);
}

.hero-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #f9e6b8, #c79a3b 78%);
}

.hero-chip.top {
  top: 15px;
  right: 15px;
}

.hero-chip.bottom {
  left: 15px;
  top: 15px;
}

.hero-orb {
  width: 150px;
  aspect-ratio: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.hero-orb.a {
  right: -35px;
  top: -35px;
  background: radial-gradient(circle at 35% 35%, rgba(199, 154, 59, 0.54), rgba(199, 154, 59, 0));
}

.hero-orb.b {
  left: -38px;
  bottom: -30px;
  background: radial-gradient(circle at 35% 35%, rgba(16, 124, 86, 0.5), rgba(16, 124, 86, 0));
}

@media (min-width: 980px) {
  .hero-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }
}

/* Buttons */
.btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 12px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-125%);
  background: linear-gradient(95deg, transparent 22%, rgba(255, 255, 255, 0.35), transparent 78%);
  transition: transform 320ms ease;
}

.btn:hover::after {
  transform: translateX(125%);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.btn:active {
  transform: translateY(0);
}

.btn {
  background: linear-gradient(135deg, #0f6b4a, #128057);
  color: #fefcf8;
  box-shadow: 0 14px 24px rgba(15, 107, 74, 0.26);
}

.btn.secondary {
  background: linear-gradient(135deg, #fffefb, #fbf2e1);
  border-color: rgba(199, 154, 59, 0.45);
  color: #6f5323;
  box-shadow: 0 10px 20px rgba(199, 154, 59, 0.2);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(15, 107, 74, 0.3);
  color: #0f6b4a;
  box-shadow: none;
}

/* Layout Blocks */
.section {
  padding: clamp(20px, 3.2vw, 34px) 0;
}

.card {
  position: relative;
  background: linear-gradient(170deg, #fffdf9 0%, #fcf7ec 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(16px, 2vw, 20px);
  box-shadow: var(--shadow-sm);
  transition: transform 260ms ease, box-shadow 260ms ease, border-color 260ms ease;
  overflow: hidden;
  will-change: transform;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 130px;
  height: 130px;
  background: radial-gradient(circle at 30% 30%, rgba(199, 154, 59, 0.24), transparent 70%);
  opacity: 0;
  transition: opacity 260ms ease;
}

.card:hover {
  transform: translateY(-4px);
  border-color: rgba(199, 154, 59, 0.46);
  box-shadow: var(--shadow-md);
}

.card:hover::before {
  opacity: 1;
}

.banner {
  border-radius: var(--radius-md);
  border: 1px solid rgba(199, 154, 59, 0.45);
  background: linear-gradient(145deg, #fff9ec, #f7efdd);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.pricing .price {
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-family: "Reem Kufi", "Space Grotesk", sans-serif;
  color: #214734;
}

.pricing .tag {
  display: inline-block;
  margin-left: 8px;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.72rem;
  color: #fefcf8;
  background: linear-gradient(135deg, #0f6b4a, #128057);
}

ul,
ol {
  margin: 0;
  padding-left: 18px;
}

li + li {
  margin-top: 6px;
}

hr {
  border: none;
  border-top: 1px solid rgba(44, 37, 28, 0.14);
  margin: 18px 0;
}

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

.accordion details {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
  padding: 12px;
}

.accordion details + details {
  margin-top: 10px;
}

.accordion summary {
  cursor: pointer;
  font-weight: 600;
  color: #2f271c;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
}

.table th,
.table td {
  text-align: left;
  padding: 10px 12px;
}

.table tr {
  background: #fffefb;
}

.table tr td:first-child,
.table tr th:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.table tr td:last-child,
.table tr th:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.callout {
  border-left: 3px solid var(--gold);
  border-radius: 0 var(--radius-xs) var(--radius-xs) 0;
  background: rgba(199, 154, 59, 0.13);
  padding: 10px 12px;
}

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: #fffaf1;
  padding: 10px 12px;
  overflow: auto;
}

.reel {
  display: flex;
  gap: 12px;
  overflow: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}

.reel .chip {
  min-width: 200px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #fffefb;
  padding: 12px;
  scroll-snap-align: center;
}

/* IPC check controls */
.q {
  margin-bottom: 14px;
}

.q label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.scale-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.scale button {
  appearance: none;
  border: 1px solid rgba(44, 37, 28, 0.16);
  background: #fffefb;
  color: #2b241c;
  border-radius: 10px;
  min-width: 35px;
  padding: 7px 9px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.scale button:hover,
.scale button:focus-visible {
  outline: none;
  border-color: rgba(15, 107, 74, 0.52);
  box-shadow: 0 0 0 3px rgba(15, 107, 74, 0.18);
}

.scale button.active {
  background: linear-gradient(135deg, #0f6b4a, #128057);
  color: #fff;
  border-color: rgba(15, 107, 74, 0.65);
}

.scale .hint {
  display: block;
  margin-top: 7px;
  font-size: 0.84rem;
  color: var(--muted);
}

/* Interactive switcher */
.feature-switcher {
  padding: clamp(16px, 3.5vw, 28px);
}

.switcher-head {
  margin-bottom: 14px;
}

.switcher-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.switch-pill {
  border: 1px solid rgba(15, 107, 74, 0.2);
  border-radius: 999px;
  background: rgba(15, 107, 74, 0.07);
  color: #1d4a38;
  padding: 7px 13px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: 180ms ease;
}

.switch-pill:hover,
.switch-pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 107, 74, 0.17);
}

.switch-pill.is-active {
  color: #fffdf8;
  border-color: rgba(15, 107, 74, 0.8);
  background: linear-gradient(140deg, #0f6b4a, #13865d);
}

.switch-panel {
  display: none;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 107, 74, 0.18);
  padding: 14px;
  background: rgba(15, 107, 74, 0.05);
}

.switch-panel.is-active {
  display: block;
  animation: panelIn 220ms ease;
}

.switch-panel p {
  margin: 0;
}

/* Footer */
footer {
  margin-top: 28px;
  border-top: 1px solid rgba(44, 37, 28, 0.12);
  background: rgba(253, 250, 244, 0.9);
}

footer .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

footer .foot a {
  color: #4f473d;
}

footer .foot a:hover {
  color: #1c4635;
}

.legal-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  text-align: center;
}

/* Dialog cards */
dialog {
  border: 1px solid rgba(15, 107, 74, 0.25);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  background: #fffdf9;
}

dialog::backdrop {
  background: rgba(18, 14, 10, 0.54);
  backdrop-filter: blur(4px);
}

/* Reveal and motion */
.reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.985);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.floating {
  animation: floatY 7s ease-in-out infinite;
}

@keyframes floatY {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-8px);
  }
}

@keyframes panelIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Utilities */
.text-center {
  text-align: center;
}

.centered {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

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

/* Motion reduction */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal.is-visible {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* Mobile adjustments */
@media (max-width: 879px) {
  .container {
    width: min(var(--content), calc(100% - 34px));
  }

  .hero .title,
  .hero .subtitle,
  .hero-copy .muted {
    max-width: none;
  }

  .hero-visual {
    min-height: 290px;
  }

  .hero-image {
    min-height: 290px;
  }

  .btns {
    gap: 10px;
  }

  .btn {
    flex: 1 1 auto;
  }

  footer .foot {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .badge {
    font-size: 0.76rem;
  }

  .hero-chip {
    font-size: 0.72rem;
  }

  .hero-visual-caption {
    font-size: 0.84rem;
  }

  .scale button {
    min-width: 31px;
    padding: 7px 8px;
  }
}

/* Utility bar (language, dates, bismillah, theme) */
.utility-bar {
  position: sticky;
  top: 0;
  z-index: 65;
  border-bottom: 1px solid rgba(199, 154, 59, 0.22);
  background: linear-gradient(
    120deg,
    rgba(15, 107, 74, 0.11),
    rgba(199, 154, 59, 0.13) 52%,
    rgba(15, 107, 74, 0.08)
  );
  backdrop-filter: blur(10px);
}

.utility-inner {
  width: min(var(--content), calc(100% - 48px));
  margin: 0 auto;
  min-height: 42px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
}

.bismillah {
  font-family: "Noto Naskh Arabic", serif;
  color: #184736;
  font-size: 1.02rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-footer {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 107, 74, 0.16);
  background: linear-gradient(180deg, rgba(245, 239, 228, 0.55), rgba(245, 239, 228, 0.94));
  backdrop-filter: blur(4px);
  display: grid;
  gap: 6px;
}

.menu-date-stack {
  display: grid;
  gap: 5px;
}

.menu-date-item {
  font-size: 0.72rem;
  font-weight: 500;
  color: #4e4437;
  border: 1px solid rgba(15, 107, 74, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  padding: 5px 9px;
}

.date-badge {
  font-size: 0.8rem;
  font-weight: 500;
  color: #4e4437;
  border: 1px solid rgba(15, 107, 74, 0.19);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  padding: 7px 12px;
  white-space: nowrap;
}

.utility-controls {
  display: grid;
  align-items: center;
  gap: 8px;
}

.language-select,
.theme-toggle {
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid rgba(15, 107, 74, 0.24);
  background: rgba(255, 255, 255, 0.7);
  color: #214332;
  min-height: 32px;
  padding: 6px 10px;
}

.theme-toggle {
  cursor: pointer;
}

.language-select:focus-visible,
.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

/* Focus switcher color states */
.feature-switcher {
  --focus-color: #2f68bf;
  --focus-bg: rgba(47, 104, 191, 0.1);
  --focus-border: rgba(47, 104, 191, 0.28);
}

.feature-switcher[data-focus="klar"] {
  --focus-color: #2f68bf;
  --focus-bg: rgba(47, 104, 191, 0.1);
  --focus-border: rgba(47, 104, 191, 0.28);
}

.feature-switcher[data-focus="druck"] {
  --focus-color: #5a7aa1;
  --focus-bg: rgba(90, 122, 161, 0.11);
  --focus-border: rgba(90, 122, 161, 0.3);
}

.feature-switcher[data-focus="antrieb"] {
  --focus-color: #1f8a60;
  --focus-bg: rgba(31, 138, 96, 0.11);
  --focus-border: rgba(31, 138, 96, 0.32);
}

.feature-switcher[data-focus="unklar"] {
  --focus-color: #8b6a2f;
  --focus-bg: rgba(139, 106, 47, 0.1);
  --focus-border: rgba(139, 106, 47, 0.3);
}

.feature-switcher .switch-pill {
  border-color: var(--focus-border);
  background: var(--focus-bg);
  color: #1f2f3d;
}

.feature-switcher .switch-pill.is-active {
  border-color: var(--focus-color);
  background: linear-gradient(140deg, var(--focus-color), #17324a);
  color: #fff;
}

.feature-switcher .switch-panel {
  border-color: var(--focus-border);
  background: var(--focus-bg);
}

.niyyah-box {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--focus-border);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.8), var(--focus-bg));
  padding: 12px;
  margin: 2px 0 14px;
}

.feature-switcher:not(.is-engaged) .niyyah-box {
  max-height: 0;
  opacity: 0;
  margin: 0;
  padding-top: 0;
  padding-bottom: 0;
  border-width: 0;
  overflow: hidden;
  pointer-events: none;
}

.niyyah-arrow {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  color: #fff;
  background: var(--focus-color);
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}

.niyyah-content {
  min-width: 0;
}

.niyyah-text {
  margin: 0;
  font-size: 0.92rem;
  color: #3b342a;
}

.dua-mini {
  margin-top: 9px;
  padding: 10px 11px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--focus-border);
  background: rgba(255, 255, 255, 0.65);
  color: #182f40;
  font-family: "Noto Naskh Arabic", "Reem Kufi", serif;
  font-size: 1.04rem;
  line-height: 1.55;
}

.dua-mini-label {
  display: inline-flex;
  margin-bottom: 6px;
  margin-inline-end: 8px;
  font-family: "Space Grotesk", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6f5325;
}

/* Spiritual library cards */
.spiritual-intro {
  border-style: solid;
}

.spiritual-stack {
  display: grid;
  gap: 10px;
}

.spiritual-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.spiritual-card summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  font-weight: 600;
  color: #2e261d;
}

.spiritual-card summary::-webkit-details-marker {
  display: none;
}

.spiritual-ref {
  font-size: 0.74rem;
  color: #876836;
  letter-spacing: 0.04em;
}

.spiritual-body {
  border-top: 1px solid rgba(44, 37, 28, 0.12);
  padding: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.arabic {
  margin: 0 0 8px;
  font-family: "Noto Naskh Arabic", serif;
  font-size: 1.22rem;
  line-height: 1.8;
  color: #1d3d30;
}

.spiritual-meta {
  margin: 6px 0 0;
  font-size: 0.88rem;
  color: #514838;
}

.spiritual-meta b {
  color: #2f271d;
}

.quran-item + .quran-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(44, 37, 28, 0.14);
}

.note-soft {
  margin-top: 8px;
  border-radius: 10px;
  border: 1px solid rgba(139, 106, 47, 0.32);
  background: rgba(139, 106, 47, 0.1);
  color: #5f4d2f;
  padding: 7px 9px;
  font-size: 0.82rem;
}

/* Certification cards and lightbox */
.cert-block + .cert-block {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed rgba(44, 37, 28, 0.16);
}

.cert-grid {
  display: grid;
  gap: 10px;
}

@media (min-width: 700px) {
  .cert-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.cert-item {
  appearance: none;
  text-align: left;
  border: 1px solid rgba(15, 107, 74, 0.2);
  border-radius: var(--radius-sm);
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.88), rgba(248, 243, 233, 0.95));
  color: #1f1811;
  padding: 12px;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.cert-item:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 107, 74, 0.38);
  box-shadow: var(--shadow-sm);
}

.cert-item:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
}

.cert-label {
  display: block;
  font-weight: 600;
}

.cert-file {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 4px;
}

.cert-hint {
  margin-top: 9px;
  font-size: 0.88rem;
}

.media-dialog {
  width: min(980px, calc(100% - 24px));
  max-height: calc(100dvh - 24px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: linear-gradient(165deg, #fffefb 0%, #f7f0e4 100%);
}

.media-dialog::backdrop {
  background: rgba(14, 11, 8, 0.68);
}

.media-close {
  border: 1px solid rgba(44, 37, 28, 0.2);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 7px 12px;
  cursor: pointer;
}

.media-title {
  margin: 10px 0 12px;
}

.media-view {
  min-height: 280px;
}

.media-image {
  width: 100%;
  max-height: calc(100dvh - 170px);
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.media-frame {
  width: 100%;
  height: min(74dvh, 840px);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}

/* Dark mode */
html[data-theme="dark"] {
  --bg: #12110e;
  --bg-soft: #1a1814;
  --surface: #1f1c16;
  --card: #1f1b15;
  --border: #3d3428;
  --text: #f0e8da;
  --muted: #b6a993;
  --primary: #5ebd95;
  --primary-soft: #7ec8ab;
  --gold: #e0b75f;
  --gold-soft: #f2dba3;
  --ring: rgba(123, 206, 172, 0.4);
  --shadow-sm: 0 12px 24px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 20px 40px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 30px 60px rgba(0, 0, 0, 0.52);
}

html[data-theme="dark"] body {
  background: linear-gradient(140deg, #12110e 0%, #171510 42%, #11100d 100%);
}

html[data-theme="dark"] body::before {
  background:
    radial-gradient(circle at 8% 12%, rgba(94, 189, 149, 0.16), transparent 36%),
    radial-gradient(circle at 90% 8%, rgba(224, 183, 95, 0.2), transparent 42%),
    radial-gradient(circle at 50% 100%, rgba(94, 189, 149, 0.13), transparent 45%);
}

html[data-theme="dark"] body::after {
  opacity: 0.1;
}

html[data-theme="dark"] header.nav {
  background: rgba(26, 22, 17, 0.82);
}

html[data-theme="dark"] .utility-bar {
  background: linear-gradient(
    120deg,
    rgba(94, 189, 149, 0.2),
    rgba(224, 183, 95, 0.2) 52%,
    rgba(94, 189, 149, 0.15)
  );
}

html[data-theme="dark"] .date-badge,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .language-select {
  background: rgba(23, 20, 15, 0.78);
  color: #f1e8d8;
  border-color: rgba(126, 200, 171, 0.36);
}

html[data-theme="dark"] .menu-date-item {
  background: rgba(23, 20, 15, 0.78);
  color: #f1e8d8;
  border-color: rgba(126, 200, 171, 0.36);
}

html[data-theme="dark"] .menu-footer {
  background: linear-gradient(180deg, rgba(32, 28, 21, 0.55), rgba(23, 20, 15, 0.95));
}

html[data-theme="dark"] .bismillah {
  color: #f3d699;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .switch-panel,
html[data-theme="dark"] .niyyah-box,
html[data-theme="dark"] .spiritual-card,
html[data-theme="dark"] dialog {
  background: linear-gradient(165deg, #1f1b15 0%, #16130f 100%);
}

html[data-theme="dark"] .menu a {
  color: #f0e6d2;
}

html[data-theme="dark"] h1,
html[data-theme="dark"] h2,
html[data-theme="dark"] h3,
html[data-theme="dark"] h4,
html[data-theme="dark"] .title {
  color: #f4ebdc;
}

html[data-theme="dark"] .hero .subtitle,
html[data-theme="dark"] .hero-copy .muted,
html[data-theme="dark"] .muted {
  color: #cbbda5;
}

html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] .btn.ghost {
  color: #f2ddad;
  background: rgba(37, 33, 25, 0.75);
}

html[data-theme="dark"] .kicker,
html[data-theme="dark"] .spiritual-ref {
  color: #e0b75f;
}

html[data-theme="dark"] .arabic {
  color: #a8dcbf;
}

html[data-theme="dark"] .feature-switcher .switch-pill {
  color: #f0e6d2;
}

html[data-theme="dark"] .niyyah-text {
  color: #eadfca;
}

html[data-theme="dark"] .dua-mini {
  color: #d4eedf;
  background: rgba(21, 29, 24, 0.72);
}

html[data-theme="dark"] .dua-mini-label {
  color: #f4cc7e;
}

html[data-theme="dark"] .spiritual-card summary {
  color: #f0e6d2;
}

html[data-theme="dark"] .spiritual-meta {
  color: #d3c8b2;
}

html[data-theme="dark"] .spiritual-meta b {
  color: #f1e6d0;
}

html[data-theme="dark"] .note-soft {
  color: #f4e4bf;
  border-color: rgba(224, 183, 95, 0.38);
  background: rgba(78, 61, 28, 0.4);
}

html[data-theme="dark"] .cert-item {
  color: #f1e7d4;
  border-color: rgba(126, 200, 171, 0.35);
  background: linear-gradient(165deg, #221d16 0%, #1a1611 100%);
}

html[data-theme="dark"] .cert-file {
  color: #cfbea3;
}

html[data-theme="dark"] .media-dialog {
  background: linear-gradient(165deg, #201c16 0%, #17130f 100%);
}

html[data-theme="dark"] .media-close {
  color: #f2e8d6;
  border-color: rgba(126, 200, 171, 0.36);
  background: rgba(23, 20, 15, 0.78);
}

html[data-theme="dark"] footer {
  background: rgba(20, 18, 14, 0.86);
}

html[data-theme="dark"] .menu {
  background: linear-gradient(155deg, #201c15 0%, #17140f 100%);
}

/* RTL support */
html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .utility-inner {
  justify-content: center;
}

html[dir="rtl"] .menu {
  text-align: right;
}

html[dir="rtl"] ul,
html[dir="rtl"] ol {
  padding-right: 18px;
  padding-left: 0;
}

html[dir="rtl"] .hero-chip.top {
  left: 15px;
  right: auto;
}

html[dir="rtl"] .hero-chip.bottom {
  right: 15px;
  left: auto;
}

html[dir="rtl"] .kicker::before {
  background: linear-gradient(
    270deg,
    rgba(199, 154, 59, 0),
    rgba(199, 154, 59, 0.95)
  );
}

@media (max-width: 879px) {
  .utility-inner {
    width: min(var(--content), calc(100% - 34px));
    justify-content: center;
  }

  .bismillah {
    width: 100%;
    text-align: center;
    justify-self: center;
  }

  .menu {
    width: min(94vw, 360px);
    max-height: min(88svh, 620px);
  }
}
