/* ===== Buttons ===== */
.btn {
  --pad-y: .85rem;
  --pad-x: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: var(--pad-y) var(--pad-x);
  border-radius: var(--r-full);
  border: 1px solid transparent;
  font-family: var(--ff-ar-ui);
  font-weight: 600;
  font-size: var(--step-0);
  line-height: 1;
  transition: transform .2s var(--ease), background .2s, color .2s, box-shadow .3s, border-color .2s;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
}
.btn--sm { --pad-y: .6rem; --pad-x: 1rem; font-size: var(--step--1); }
.btn--lg { --pad-y: 1.1rem; --pad-x: 1.8rem; font-size: var(--step-1); }
.btn--primary {
  background: var(--g-700);
  color: #fbf7ed;
  box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, 0 8px 24px -8px rgba(15,77,42,.6);
}
.btn--primary:hover { background: var(--g-800); transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.2) inset, 0 14px 30px -10px rgba(15,77,42,.7); }
.btn--gold {
  background: linear-gradient(180deg, var(--y-500), var(--y-700));
  color: #2a1d05;
  box-shadow: 0 1px 0 rgba(255,255,255,.4) inset, 0 10px 28px -10px rgba(168,134,57,.6);
}
.btn--gold:hover { transform: translateY(-1px); }
.btn--ghost {
  background: transparent;
  color: var(--fg);
  border-color: var(--c-line-strong);
}
.btn--ghost:hover { background: rgba(15,77,42,.06); border-color: var(--g-700); color: var(--g-700); }
.btn--on-dark { color: #fbf7ed; border-color: rgba(255,255,255,.2); }
.btn--on-dark:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.35); }

/* Store buttons */
.store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .72rem;
  padding: .82rem 1.15rem;
  border-radius: 999px;
  background: linear-gradient(180deg, #23684f, #1C5842);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 18px 34px -24px rgba(28,88,66,.54), 0 1px 0 rgba(255,255,255,.14) inset;
  transition: transform .2s var(--ease), background .2s, border-color .2s, box-shadow .2s;
  min-width: 220px;
}
.store-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #287257, #184C39);
  border-color: rgba(230,207,154,.34);
  box-shadow: 0 22px 40px -24px rgba(28,88,66,.62), 0 1px 0 rgba(255,255,255,.16) inset;
}
.store-btn__icon {
  width: 28px;
  height: 28px;
  flex: none;
  display: grid;
  place-items: center;
}
.store-btn__icon-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  opacity: .96;
}
.store-btn__txt {
  display: grid;
  gap: .08rem;
  line-height: 1.05;
  text-align: start;
}
.store-btn__txt small {
  font-size: .6rem;
  opacity: 1;
  font-family: var(--ff-ar-ui);
  letter-spacing: .01em;
  text-transform: none;
  color: rgba(255,255,255,.74);
}
.store-btn__txt b {
  font-size: 1rem;
  font-family: var(--ff-ar-ui);
  font-weight: 700;
  color: #ffffff;
}
.store-btn--light {
  background: #fbf7ed;
  color: var(--c-ink);
  border-color: var(--c-line-strong);
  box-shadow: 0 18px 34px -28px rgba(15,77,42,.18), 0 1px 0 rgba(255,255,255,.92) inset;
}
.store-btn--light .store-btn__icon-img { filter: brightness(0) saturate(100%); opacity: .88; }
.store-btn--light .store-btn__txt small { color: rgba(26,22,17,.7); }
.store-btn--light .store-btn__txt b { color: var(--g-800); }

/* ===== Cards ===== */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  position: relative;
  transition: transform .3s var(--ease), box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--sh-md); border-color: var(--c-line-strong); }

/* ===== Pills / badges ===== */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .7rem;
  border-radius: var(--r-full);
  font-size: var(--step--1);
  font-weight: 500;
  background: rgba(15,77,42,.08);
  color: var(--g-700);
  border: 1px solid rgba(15,77,42,.15);
}
.pill--gold { background: rgba(201,169,97,.12); color: var(--y-800); border-color: rgba(201,169,97,.3); }
.pill--dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ===== Nav ===== */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 100;
  background:
    linear-gradient(180deg, rgba(245, 239, 222, 0.78), rgba(245, 239, 222, 0.48)),
    radial-gradient(circle at 14% 20%, rgba(28, 88, 66, 0.08), transparent 34%),
    radial-gradient(circle at 82% 12%, rgba(201, 169, 97, 0.12), transparent 28%);
  backdrop-filter: blur(16px) saturate(145%);
  -webkit-backdrop-filter: blur(16px) saturate(145%);
  border-bottom: 1px solid rgba(28,88,66,.08);
  transition: background .3s, border-color .3s;
}
.nav.is-scrolled {
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  border-color: var(--line);
}
.nav.is-menu-open { z-index: 180; }
.nav__wrap {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
  display: flex; align-items: center; gap: 2rem;
  height: 72px;
}
.nav__brand { display: flex; align-items: center; }
.nav__logo { width: 164px; height: 56px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(15,77,42,.2)); }
.nav__links { display: flex; gap: 1.75rem; margin-inline: auto; }
.nav__links a {
  font-size: var(--step--1);
  color: var(--fg-soft);
  font-weight: 500;
  position: relative;
  padding: .3rem 0;
  transition: color .2s;
}
.nav__links a:hover { color: var(--g-700); }
.nav__links a::after {
  content: ""; position: absolute; bottom: 0; inset-inline: 50%; width: 0; height: 2px;
  background: var(--y-600); border-radius: 2px;
  transition: width .3s var(--ease), inset-inline .3s var(--ease);
}
.nav__links a:hover::after { inset-inline: 0; width: 100%; }
.nav__cta { display: flex; align-items: center; gap: .75rem; }
.nav__menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255,255,255,.92), rgba(245,239,222,.9));
  color: var(--g-700);
  align-items: center;
  justify-content: center;
  transition: border-color .2s, color .2s, background .2s, transform .2s;
}
.nav__menu-btn:hover {
  border-color: rgba(201,169,97,.6);
  color: var(--y-800);
  transform: translateY(-1px);
}
.nav__menu-btn:active { transform: translateY(0); }
.nav__menu-icon {
  width: 18px;
  display: grid;
  gap: 4px;
}
.nav__menu-icon span {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
  transition: transform .28s var(--ease), opacity .2s;
}
.nav__menu-btn.is-active .nav__menu-icon span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__menu-btn.is-active .nav__menu-icon span:nth-child(2) { opacity: 0; }
.nav__menu-btn.is-active .nav__menu-icon span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__mobile-actions { display: none; }
.nav__mobile-download {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem .72rem;
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(15,77,42,.12), rgba(15,77,42,.04));
  border: 1px solid rgba(15,77,42,.18);
  color: var(--g-800);
  font-family: var(--ff-en-ui);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  transition: color .2s, border-color .2s, background .2s;
}
.nav__mobile-download:hover { color: var(--y-800); border-color: rgba(201,169,97,.55); }

.nav__drawer-layer { display: none; }
.nav__drawer {
  border-inline-start: 1px solid rgba(15,77,42,.12);
}
.nav__drawer-kicker {
  margin: 0;
  font-family: var(--ff-ar-ui);
}

body.is-nav-open { overflow: hidden; touch-action: none; }
.lang-switch {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .4rem .7rem;
  border: 1px solid var(--c-line-strong);
  border-radius: var(--r-full);
  background: transparent;
  color: var(--fg-soft);
  font-family: var(--ff-en-ui);
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .08em;
  transition: border-color .2s, color .2s;
}
.lang-switch:hover { border-color: var(--g-700); color: var(--g-700); }
.lang-switch__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--y-600); }

.nav__progress {
  position: absolute; bottom: 0; inset-inline-start: 0;
  height: 2px; width: 0%;
  background: linear-gradient(to right, var(--g-700), var(--y-600));
}

@media (max-width: 900px) {
  .nav__links { display: none; }
}

/* ===== Ornament SVG frames ===== */
.ornament-frame {
  position: absolute;
  pointer-events: none;
  color: var(--y-600);
  opacity: .3;
}

/* ===== Ayah card ===== */
.ayah-card {
  background: linear-gradient(180deg, #fdfaf1, #f5edd9);
  border: 1px solid var(--y-300);
  border-radius: var(--r-lg);
  padding: 2rem 2.25rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--sh-md);
}
.ayah-card__pattern {
  position: absolute; inset: 0;
  opacity: .08;
  pointer-events: none;
}
.ayah-card__text {
  font-family: var(--ff-ar-display);
  font-size: clamp(1.3rem, 2.5vw, 1.9rem);
  line-height: 2.1;
  color: var(--g-800);
  text-align: center;
  position: relative;
  z-index: 1;
}
.ayah-card__footer {
  margin-top: 1rem;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--y-800);
  font-size: var(--step--1);
  position: relative;
  z-index: 1;
}

/* ===== Kbd ===== */
kbd {
  font-family: var(--ff-mono);
  padding: .12rem .42rem;
  border: 1px solid var(--c-line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--c-paper);
  font-size: .78rem;
  color: var(--fg-soft);
}

/* Feature tile */
.tile {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 1.75rem;
  display: grid;
  gap: 1rem;
  grid-template-rows: auto 1fr auto;
  transition: transform .35s var(--ease), box-shadow .35s, border-color .3s, background .3s;
  position: relative;
  overflow: hidden;
  min-height: 280px;
}
.tile::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(201,169,97,.18), transparent 50%);
  opacity: 0;
  transition: opacity .4s;
  pointer-events: none;
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--sh-lg); border-color: var(--c-line-strong); }
.tile:hover::before { opacity: 1; }
.tile__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--g-700), var(--g-800));
  color: var(--y-400);
  box-shadow: var(--sh-md);
  position: relative;
}
.tile__icon::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.15);
}
.tile__title { font-family: var(--ff-ar-display); font-size: var(--step-2); color: var(--fg); line-height: 1.2; }
.tile__title-en { font-family: var(--ff-en-display); font-style: italic; font-size: var(--step-0); color: var(--fg-muted); font-weight: 500; }
.tile__desc { color: var(--fg-muted); font-size: var(--step-0); line-height: 1.65; }
.tile__more {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--g-700);
  font-weight: 600;
  font-size: var(--step--1);
}

/* Tile variants */
.tile--wide { grid-column: span 2; }
.tile--dark {
  background: linear-gradient(160deg, var(--g-800), var(--g-900));
  color: #f3ece0;
  border-color: rgba(201,169,97,.18);
}
.tile--dark .tile__title { color: #fbf7ed; }
.tile--dark .tile__desc { color: rgba(243,236,224,.75); }
.tile--dark .tile__icon { background: linear-gradient(145deg, var(--y-500), var(--y-700)); color: #2a1d05; }
.tile--dark .tile__more { color: var(--y-400); }

.tile--cream { background: var(--c-cream-2); }
