/*
  FajrPlus website styles.
  Colours, radii and type follow the app's theme
  (Prayed/Assets.xcassets/Theme, Shared/Theme/AppMetrics.swift, AppFont.swift).
*/

@font-face {
  font-family: "Red Hat Display";
  src: url("../fonts/RedHatDisplay.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  /* Wait for the font rather than flashing the system font and swapping:
     every page preloads it, so the wait is a few milliseconds. */
  font-display: block;
}

/* ---------- Tokens ---------- */

:root {
  color-scheme: light dark;

  --bg: #E4E5F7;
  --card: #FFFFFF;
  --control: #EDEEF8;
  --text: #14142B;
  --muted: #5F5F7C;
  --accent: #4F52E8;
  --on-accent: #FFFFFF;
  --accent-soft: rgb(79 82 232 / 0.12);
  --wave: #CED2F2;
  --line: rgb(95 95 124 / 0.16);
  --shadow: 0 10px 30px rgb(20 20 43 / 0.07);
  --shadow-lift: 0 18px 50px rgb(20 20 43 / 0.12);

  /* Night and dawn: the same in both themes, as in the app's first run. */
  --night-1: #0D0D29;
  --night-2: #1C1A4D;
  --night-3: #332B78;
  --dawn-1: #6B61D1;
  --dawn-2: #BDB3F5;
  --dawn-3: #F7E6F2;
  --premium-dawn: linear-gradient(90deg, #B8ADFF, #FAA8DB, #FFCCA3);
  --bedtime: linear-gradient(135deg, #292961, #3D338C, #5C4DB8);
  --cream: #FAF2D1;

  /* Wake mode tints (Theme/Mode*.colorset) */
  --mode-math: #7B4FC9;
  --mode-quiz: #2F6FD0;
  --mode-memory: #A83DB8;
  --mode-dhikr: #7A4B2A;
  --mode-verse: #D6437F;
  --mode-faceid: #3B4FD8;
  --mode-shake: #E0552F;
  --mode-walk: #4E9A3C;
  --mode-qr: #4B5568;
  --mode-nfc: #1F8A8A;

  --r-card: 18px;
  --r-large: 28px;
  --r-tab: 14px;
  --gutter: 20px;
  --max: 1120px;

  --font: "Red Hat Display", ui-rounded, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F18;
    --card: #1C1C2A;
    --control: #2B2B3D;
    --text: #F4F4FA;
    --muted: #8A8AA2;
    --accent: #8A8DFF;
    --on-accent: #0F0F18;
    --accent-soft: rgb(138 141 255 / 0.14);
    --wave: #2C2F5C;
    --line: rgb(138 138 162 / 0.18);
    --shadow: 0 10px 30px rgb(0 0 0 / 0.35);
    --shadow-lift: 0 18px 50px rgb(0 0 0 / 0.45);

    --mode-math: #9B74DD;
    --mode-quiz: #5B94E6;
    --mode-memory: #C56FD3;
    --mode-dhikr: #9C6C49;
    --mode-verse: #E46D9C;
    --mode-faceid: #6B7CEC;
    --mode-shake: #EA7B59;
    --mode-walk: #6DB55B;
    --mode-qr: #8794AB;
    --mode-nfc: #3CA8A8;
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 3px; }

h1, h2, h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.35rem, 5.6vw, 4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.25rem; line-height: 1.25; }

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

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

@media (max-width: 520px) {
  :root { --gutter: 16px; }
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 10;
  background: var(--card);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--r-tab);
  font-weight: 700;
}
.skip:focus { left: 12px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

/* Section header label: footnote size, ExtraBold, uppercase, spaced, muted (RowSystem.swift). */
.label {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  line-height: 1.5;
}

section { padding: clamp(72px, 10vw, 128px) 0; }

.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head .lead { margin-top: 16px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.card {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

/* Chips are the only capsules, as in the app. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 800;
  white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  padding: 20px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 22.5%;
  box-shadow: 0 6px 16px rgb(0 0 0 / 0.25);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav a {
  color: rgb(255 255 255 / 0.86);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9375rem;
}
.nav a:hover { color: #fff; }

.chip.soon {
  background: rgb(255 255 255 / 0.12);
  color: #fff;
  border: 1px solid rgb(255 255 255 / 0.22);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 860px) {
  .nav .nav-link { display: none; }
}

/* Inner pages have a plain header on the page colour. */
.site-header.plain { position: static; }
.site-header.plain .brand { color: var(--text); }
.site-header.plain .brand img { box-shadow: 0 4px 12px rgb(20 20 43 / 0.12); }
.site-header.plain .nav a { color: var(--muted); }
.site-header.plain .nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 0;
  color: #fff;
  background: linear-gradient(180deg,
    var(--night-1) 0%,
    var(--night-2) 28%,
    var(--night-3) 52%,
    var(--dawn-1) 74%,
    var(--dawn-2) 90%,
    var(--dawn-3) 100%);
  overflow: hidden;
}

.hero { --dawn: 0; }

.hero::before {
  content: "";
  position: absolute;
  inset: 0 0 30% 0;
  background: url("../img/stars.svg") center top / cover no-repeat;
  opacity: calc(0.9 - var(--dawn) * 0.75);
  pointer-events: none;
}

/* The app's dawn layer (OnboardingSky), faded in as the page scrolls. */
.hero-dawn {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, #333080 0%, #6B61D1 45%, #BDB3F5 75%, #F7E6F2 100%);
  opacity: calc(var(--dawn) * 0.85);
  pointer-events: none;
}

/* A warm sun glow that rises behind the waves. */
.hero-sun {
  position: absolute;
  left: 50%;
  bottom: -38%;
  width: min(1100px, 150vw);
  aspect-ratio: 1;
  translate: -50% calc((1 - var(--dawn)) * 22%);
  background: radial-gradient(closest-side, rgb(255 214 170 / 0.95), rgb(250 168 219 / 0.55) 45%, transparent 72%);
  opacity: calc(0.12 + var(--dawn) * 0.88);
  pointer-events: none;
}

.twinkles {
  position: absolute;
  inset: 0 0 35% 0;
  opacity: calc(1 - var(--dawn));
  pointer-events: none;
}

.twinkles i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 6px 1px rgb(255 255 255 / 0.7);
  animation: twinkle var(--t, 4s) ease-in-out var(--d, 0s) infinite;
}

.shooting-star {
  position: absolute;
  top: 16%;
  left: 18%;
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgb(255 255 255 / 0.9), transparent);
  opacity: 0;
  transform: rotate(-18deg);
  animation: shoot 11s ease-in 3s infinite;
  pointer-events: none;
}

@keyframes twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50% { opacity: 1; transform: scale(1); }
}

@keyframes shoot {
  0% { opacity: 0; transform: rotate(-18deg) translateX(0); }
  2% { opacity: 1; }
  7% { opacity: 0; transform: rotate(-18deg) translateX(-320px); }
  100% { opacity: 0; transform: rotate(-18deg) translateX(-320px); }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(-3deg); }
}

/* The hero phone leans toward the pointer (set by site.js). */
.hero-phone .phone {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.4s ease-out;
  will-change: transform;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  align-items: center;
  gap: 48px;
  padding-top: clamp(120px, 14vw, 170px);
  padding-bottom: clamp(120px, 12vw, 170px);
}

.hero-copy .lead {
  margin-top: 22px;
  max-width: 520px;
  color: rgb(255 255 255 / 0.84);
}

.hero-copy h1 { max-width: 620px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 34px;
}

/* The app's primary button shape: radius 18 rounded rectangle, never a pill. */
.button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px 16px 16px;
  border-radius: var(--r-card);
  background: #fff;
  color: #3B3ED0;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 10px 28px rgb(13 13 41 / 0.35);
}

.button .glyph {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3B3ED0;
  color: #fff;
}

.button small {
  display: block;
  color: #5F5F7C;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
}

.hero-note {
  color: rgb(255 255 255 / 0.84);
  font-weight: 600;
  font-size: 0.9375rem;
}

.moon {
  position: absolute;
  top: clamp(90px, 11vw, 120px);
  right: clamp(-10px, 4vw, 70px);
  width: clamp(70px, 9vw, 116px);
  aspect-ratio: 1;
  filter: drop-shadow(0 0 28px rgb(250 242 209 / 0.45));
  opacity: calc(0.95 - var(--dawn) * 0.55);
  translate: 0 calc(var(--dawn) * 90px);
  pointer-events: none;
}

.moon svg { width: 100%; height: 100%; animation: float 7s ease-in-out infinite; }

.hero-phone {
  position: relative;
  justify-self: center;
}

.hero-phone::before {
  content: "";
  position: absolute;
  inset: 12% -18% 8% -18%;
  background: radial-gradient(closest-side, rgb(214 194 250 / 0.55), transparent);
  filter: blur(10px);
  z-index: -1;
}

.hero-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  width: 100%;
  height: clamp(60px, 9vw, 120px);
  pointer-events: none;
}

.hero-waves .back { fill: var(--wave); opacity: 0.85; }
.hero-waves .front { fill: var(--bg); }

@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 56px;
  }
  .hero-copy h1,
  .hero-copy .lead { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .moon { right: 16px; top: 96px; width: 44px; }
}

/* ---------- Phone frame ---------- */

.phone {
  --w: 300px;
  width: min(var(--w), 76vw);
  padding: 10px;
  border-radius: calc(min(var(--w), 76vw) * 0.17);
  background: #16161F;
  box-shadow:
    inset 0 0 0 1.5px rgb(255 255 255 / 0.12),
    0 0 0 1px rgb(0 0 0 / 0.4),
    var(--shadow-lift);
}

.phone picture { display: block; }

.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(min(var(--w), 76vw) * 0.145);
  background: var(--bg);
  object-fit: cover;
}

.phone.small { --w: 250px; }

/* ---------- Why ---------- */

.why {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.why .card { padding: 28px 26px; }
.why h3 { margin-bottom: 10px; }
.why p { color: var(--muted); }

.why-quote {
  grid-column: 1 / -1;
  padding: clamp(28px, 4vw, 44px);
  border-radius: var(--r-large);
}

.why-quote p {
  font-size: clamp(1.4rem, 2.8vw, 2rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text);
  max-width: 860px;
}

.why-quote p + p {
  margin-top: 12px;
  font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
  font-weight: 600;
  color: var(--muted);
}

@media (max-width: 860px) {
  .why { grid-template-columns: 1fr; }
}

/* ---------- How it works ---------- */

.how {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.steps {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 24px 24px 24px 84px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 24px;
  top: 22px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-tab);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); }

.alarm-note {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-top: 14px;
  padding: 22px 24px;
  border-radius: var(--r-card);
  background: var(--accent-soft);
}

.alarm-note svg { flex: none; color: var(--accent); margin-top: 2px; }
.alarm-note strong { display: block; margin-bottom: 2px; }
.alarm-note p { color: var(--muted); }

@media (max-width: 860px) {
  .how { grid-template-columns: 1fr; }
  .how .phone { justify-self: center; }
}

/* ---------- Wake modes ---------- */

.modes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.mode {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
}

/* Solid tint tile with a white glyph, as the wake mode tiles in the app. */
.mode .icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-tab);
  color: #fff;
  background: var(--tint);
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tint) 30%, transparent);
}

.mode .icon svg { width: 26px; height: 26px; }

.mode h3 { font-size: 1.0625rem; }
.mode p { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }

.mode .tag {
  align-self: flex-start;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 800;
}

.protection {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
  margin-top: 18px;
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--r-large);
  overflow: hidden;
}

.protection h3 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); }
.protection p { color: var(--muted); margin-top: 10px; max-width: 520px; }

/* ---------- Protection builder ---------- */

.mode-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.mode-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--control);
  color: var(--text);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.mode-chip .tile {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--tint);
  color: #fff;
}

.mode-chip:hover { transform: translateY(-1px); }
.mode-chip:active { transform: scale(0.95); }

.mode-chip[aria-pressed="true"] {
  background: var(--card);
  border-color: var(--accent);
  box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 22%, transparent);
}

.mode-chip[aria-pressed="false"] .tile { opacity: 0.55; }

.switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 520px;
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--r-card);
  background: var(--control);
  cursor: pointer;
}

.switch-text { display: grid; }
.switch-text span { color: var(--muted); font-size: 0.875rem; }

/* An iOS style switch in the accent colour. */
.switch {
  appearance: none;
  flex: none;
  position: relative;
  width: 52px;
  height: 32px;
  margin: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 35%, transparent);
  cursor: pointer;
  transition: background-color 0.25s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.2);
  transition: translate 0.25s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.switch:checked { background: var(--accent); }
.switch:checked::after { translate: 20px 0; }

.meter {
  display: grid;
  gap: 10px;
  max-width: 520px;
  margin: 18px 0 16px;
  padding: 18px;
  border-radius: var(--r-card);
  background: var(--accent-soft);
}

.meter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.meter-title {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
}

.meter-level { font-size: 1.375rem; font-weight: 800; }
.meter-level.pop { animation: pop 0.45s cubic-bezier(0.3, 1.6, 0.5, 1); }

.meter-bars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.meter-bars span {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--accent) 16%, var(--card));
  overflow: hidden;
}

.meter-bars span::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.meter-bars span.on::after { transform: scaleX(1); }
.meter-bars span:nth-child(2)::after { transition-delay: 0.05s; }
.meter-bars span:nth-child(3)::after { transition-delay: 0.1s; }
.meter-bars span:nth-child(4)::after { transition-delay: 0.15s; }

.meter-advice { margin: 0 !important; color: var(--muted); font-size: 0.9375rem; min-height: 1.5em; }

.small-note { font-size: 0.9375rem; }

@keyframes pop {
  0% { transform: scale(1); }
  40% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ---------- Try a wake mode ---------- */

.try {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.try-controls { display: grid; gap: 18px; justify-items: start; }

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: var(--r-card);
  background: var(--control);
}

.segmented button {
  min-width: 100px;
  padding: 11px 16px;
  border: 0;
  border-radius: var(--r-tab);
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.segmented button[aria-checked="true"] {
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

.segmented button:disabled { cursor: default; }

/* Same shape as the app's Add wake mode button. */
.ring-button {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 24px 16px 16px;
  border: 0;
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--on-accent);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 35%, transparent);
  transition: transform 0.2s cubic-bezier(0.3, 1.4, 0.5, 1);
}

.ring-button:hover { transform: translateY(-2px); }

/* While the alarm rings, the button is the way to stop it. */
.ring-button[data-role="stop"] { background: #fff; color: #3B3ED0; box-shadow: 0 8px 22px rgb(20 20 43 / 0.12), inset 0 0 0 2px var(--accent); }
.ring-button[data-role="stop"] .glyph { background: var(--accent); color: #fff; }
.ring-button[data-role="stop"] { animation: glow-accent 1.4s ease-in-out infinite; }

@keyframes glow-accent {
  0%, 100% { box-shadow: 0 8px 22px rgb(20 20 43 / 0.12), inset 0 0 0 2px var(--accent), 0 0 0 0 color-mix(in srgb, var(--accent) 40%, transparent); }
  50% { box-shadow: 0 8px 22px rgb(20 20 43 / 0.12), inset 0 0 0 2px var(--accent), 0 0 0 8px transparent; }
}

/* During the wake mode it quietly offers a way out of the demo. */
.ring-button[data-role="reset"] { background: var(--accent-soft); color: var(--accent); box-shadow: none; }
.ring-button[data-role="reset"] .glyph { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.ring-button:active { transform: scale(0.97); }

.ring-button .glyph {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.22);
}

.try-hint { color: var(--muted); font-size: 0.9375rem; min-height: 1.5em; }

@media (max-width: 860px) {
  .try { grid-template-columns: 1fr; }
  .try .demo-phone { justify-self: center; }
  .try-controls { justify-items: stretch; }
  .segmented button { min-width: 0; }
}

/* The demo phone: a drawn screen, sized by its own width (container units). */
.phone.demo { --w: 300px; }

.demo-screen {
  position: relative;
  aspect-ratio: 1206 / 2622;
  border-radius: calc(min(var(--w), 76vw) * 0.145);
  overflow: hidden;
  container-type: inline-size;
  background: #E4E5F7;
  color: #14142B;
  isolation: isolate;
}

.demo-lock,
.demo-mode,
.demo-done {
  position: absolute;
  inset: 0;
  transition: opacity 0.45s ease, transform 0.45s ease;
}

/* Lock Screen */

.demo-lock {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4cqw 6cqw;
  color: #fff;
  background: linear-gradient(180deg, #0D0D29, #1C1A4D 45%, #332B78 80%, #4A3F9E);
}

.demo-status {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 3.6cqw 7cqw 0;
  color: #fff;
  font-size: 4.2cqw;
  font-weight: 700;
  transition: color 0.3s ease;
  pointer-events: none;
}

.demo-status .demo-bars { justify-self: end; }
.demo[data-state="mode"] .demo-status,
.demo[data-state="done"] .demo-status { color: #14142B; }

.demo-island {
  width: 30cqw;
  height: 9cqw;
  border-radius: 99px;
  background: #000;
}

.demo-bars {
  width: 9cqw;
  height: 4cqw;
  border: 1.5px solid currentColor;
  border-radius: 1.4cqw;
  background: linear-gradient(90deg, currentColor 75%, transparent 75%) content-box;
  padding: 0.6cqw;
  opacity: 0.9;
}

.demo-clock {
  margin-top: 22cqw;
  font-size: 22cqw;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.demo-date { margin-top: 2cqw; font-size: 4.6cqw; font-weight: 600; opacity: 0.8; }

.demo-alert {
  width: 100%;
  margin-top: auto;
  margin-bottom: 18cqw;
  padding: 4.5cqw;
  border-radius: 7cqw;
  background: rgb(255 255 255 / 0.14);
  border: 1px solid rgb(255 255 255 / 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.demo-alert-top { display: flex; align-items: center; gap: 3.5cqw; }
.demo-alert-top img { width: 12cqw; height: 12cqw; aspect-ratio: 1; border-radius: 22.5%; background: none; }
.demo-alert-top div { display: grid; line-height: 1.2; }
.demo-alert-top span { font-size: 3.8cqw; opacity: 0.75; }
.demo-alert-top strong { font-size: 5.4cqw; }
.demo-bell { width: 7cqw; height: 7cqw; margin-left: auto; }

.demo-stop {
  width: 100%;
  margin-top: 4cqw;
  padding: 3.4cqw;
  border: 0;
  border-radius: 99px;
  background: rgb(255 255 255 / 0.22);
  color: #fff;
  font: inherit;
  font-size: 4.8cqw;
  font-weight: 800;
  cursor: pointer;
}

.demo-stop:disabled { opacity: 0.45; cursor: default; }

.demo-ring {
  position: absolute;
  left: 50%;
  bottom: 30%;
  width: 60cqw;
  aspect-ratio: 1;
  border: 2px solid rgb(184 173 255 / 0.6);
  border-radius: 50%;
  translate: -50% 50%;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}

/* Ringing: the phone buzzes, the bell swings, rings spread. */
.demo[data-state="ringing"] { animation: buzz 1.1s ease-in-out infinite; }
.demo[data-state="ringing"] .demo-bell { animation: swing 0.5s ease-in-out infinite; }
.demo[data-state="ringing"] .demo-ring { animation: spread 2s ease-out infinite; }
.demo[data-state="ringing"] .demo-ring.r2 { animation-delay: 1s; }
.demo[data-state="ringing"] .demo-stop:not(:disabled) { background: #fff; color: #3B3ED0; animation: glow 1.4s ease-in-out infinite; }

@keyframes buzz {
  0%, 36%, 100% { transform: translateX(0) rotate(0); }
  6% { transform: translateX(-2px) rotate(-0.6deg); }
  12% { transform: translateX(2px) rotate(0.6deg); }
  18% { transform: translateX(-2px) rotate(-0.6deg); }
  24% { transform: translateX(2px) rotate(0.6deg); }
  30% { transform: translateX(0); }
}

@keyframes swing {
  0%, 100% { transform: rotate(-14deg); }
  50% { transform: rotate(14deg); }
}

@keyframes spread {
  0% { opacity: 0.8; scale: 0.4; }
  100% { opacity: 0; scale: 1.6; }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0.5); }
  50% { box-shadow: 0 0 0 8px rgb(255 255 255 / 0); }
}

/* Wake mode, in the app's light look (ChallengeChrome, MathKeypad, MemoryTile) */

.demo-mode {
  display: flex;
  flex-direction: column;
  padding: 14cqw 5.5cqw 6cqw;
  background: #E4E5F7;
  opacity: 0;
  transform: translateY(6%);
  pointer-events: none;
}

.demo-head { display: grid; justify-items: center; gap: 3.2cqw; }

.demo-head img {
  width: 12cqw;
  height: 12cqw;
  aspect-ratio: 1;
  border-radius: 2.8cqw;
  background: none;
  box-shadow: 0 0 0 1px rgb(95 95 124 / 0.15);
}

.demo-badge { display: inline-flex; align-items: center; gap: 2cqw; font-size: 4.4cqw; }

.demo-badge-tile {
  display: grid;
  place-items: center;
  width: 6cqw;
  height: 6cqw;
  border-radius: 1.9cqw;
  background: var(--tile, #7B4FC9);
  color: #fff;
}

.demo-badge-tile svg { width: 3.8cqw; height: 3.8cqw; }

.demo-mode-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 4.5cqw;
  margin-top: 5cqw;
  min-height: 0;
}

/* Math */

.math-card {
  display: grid;
  place-items: center;
  flex: 1;
  min-height: 30cqw;
  border-radius: 6cqw;
  background: #fff;
  box-shadow: 0 3cqw 8cqw rgb(20 20 43 / 0.06);
  font-size: 13cqw;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.math-answer {
  position: relative;
  display: grid;
  place-items: center;
  height: 17cqw;
  border-radius: 4.4cqw;
  background: #fff;
  box-shadow: inset 0 0 0 2px #4F52E8;
  font-size: 8.5cqw;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.math-answer:empty::before {
  content: "";
  width: 2px;
  height: 7cqw;
  background: #14142B;
  animation: caret 1s steps(1) infinite;
}

.math-answer::after {
  position: absolute;
  right: 5cqw;
  font-size: 6cqw;
}

.math-answer.right { background: #12A064; color: #fff; box-shadow: none; }
.math-answer.right::after { content: "✓"; }
.math-answer.wrong { background: #EF4444; color: #fff; box-shadow: none; animation: nope 0.4s ease; }
.math-answer.wrong::after { content: "✕"; }

@keyframes caret { 50% { opacity: 0; } }

@keyframes nope {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.math-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.6cqw;
}

.math-keys button {
  height: 13cqw;
  border: 0;
  border-radius: 4.4cqw;
  background: #fff;
  color: #14142B;
  font: inherit;
  font-size: 6.4cqw;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.5, 1), box-shadow 0.15s ease;
}

.math-keys button:active { transform: scale(0.9); box-shadow: inset 0 0 0 2px rgb(79 82 232 / 0.6); }
.math-keys .del { background: #EDEEF8; color: #5F5F7C; }
.math-keys .ok { background: #4F52E8; color: #fff; }
.math-keys svg { width: 6cqw; height: 6cqw; margin: auto; display: block; }

/* Memory */

.memory-caption { text-align: center; }
.memory-caption strong { display: block; font-size: 6.6cqw; line-height: 1.2; transition: color 0.2s ease; }
.memory-caption span { display: block; margin-top: 1cqw; color: #5F5F7C; font-size: 4cqw; }
.memory-caption.wrong strong { color: #EF4444; }
.memory-caption.solved strong { color: #12A064; }

.memory-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.4cqw;
  margin: auto 0;
}

.memory-grid button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 5.5cqw;
  background: #fff;
  box-shadow: 0 1cqw 3cqw rgb(20 20 43 / 0.06);
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.memory-grid button:active:not(:disabled) { transform: scale(0.92); }
.memory-grid button:disabled { cursor: default; }
.memory-grid button.open { background: #4F52E8; box-shadow: 0 2cqw 6cqw rgb(79 82 232 / 0.35); }
.memory-grid button.found { background: #12A064; box-shadow: 0 2cqw 6cqw rgb(18 160 100 / 0.35); }
.memory-grid button.wrong { background: #EF4444; box-shadow: 0 2cqw 6cqw rgb(239 68 68 / 0.35); }

/* Shake */

.shake-stage {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3.5cqw;
  flex: 1;
  text-align: center;
}

.shake-icon { color: #4F52E8; transition: color 0.2s ease; }
.shake-icon svg { width: 30cqw; height: 30cqw; }
.shake-icon.jolt { animation: jolt 0.3s ease; }
.shake-stage.done .shake-icon { color: #12A064; }

@keyframes jolt {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-14deg); }
  75% { transform: rotate(14deg); }
}

.shake-count { font-size: 15cqw; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.shake-count small { color: #5F5F7C; font-size: 6.6cqw; font-weight: 700; }
.shake-stage.done .shake-count > span { color: #12A064; }

.shake-bar {
  width: 100%;
  height: 4.2cqw;
  border-radius: 99px;
  background: rgb(95 95 124 / 0.18);
  overflow: hidden;
}

.shake-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #4F52E8;
  transition: width 0.25s ease, background-color 0.2s ease;
}

.shake-stage.done .shake-bar span { background: #12A064; }
.shake-note { color: #5F5F7C; font-size: 4.2cqw; font-weight: 600; }
.shake-stage.done .shake-note { color: #12A064; }

.shake-button {
  width: 100%;
  height: 14cqw;
  border: 0;
  border-radius: 4.4cqw;
  background: #4F52E8;
  color: #fff;
  font: inherit;
  font-size: 5cqw;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.shake-button:active { transform: scale(0.95); }

/* Awake */

.demo-done {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14cqw 6cqw 8cqw;
  text-align: center;
  background: #E4E5F7;
  opacity: 0;
  transform: scale(0.96);
  pointer-events: none;
}

.demo-tick { width: 24cqw; height: 24cqw; filter: drop-shadow(0 3cqw 6cqw rgb(18 160 100 / 0.35)); }
.demo-tick circle { fill: #12A064; }
.demo-tick path {
  fill: none;
  stroke: #fff;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 48;
}

.demo[data-state="done"] .demo-tick { animation: pop 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
.demo[data-state="done"] .demo-tick path { animation: draw 0.5s ease-out 0.2s backwards; }

@keyframes draw { from { stroke-dashoffset: 48; } to { stroke-dashoffset: 0; } }

.demo-done h3 { margin-top: 5cqw; font-size: 9cqw; }
.demo-done-line { margin-top: 1.5cqw; color: #5F5F7C; font-size: 4.2cqw; font-weight: 600; }

.demo-dua {
  margin-top: 7cqw;
  padding: 5cqw;
  border-radius: 6cqw;
  background: #F9F6FF;
  color: #14142B;
}

.demo-dua .ar { font-family: "Amiri Quran", "Geeza Pro", serif; font-size: 6.2cqw; line-height: 1.9; color: #7B4EBE; }
.demo-dua .mn { margin-top: 2.5cqw; font-size: 3.9cqw; font-weight: 700; line-height: 1.4; }
.demo-dua .src { margin-top: 2cqw; font-size: 3.4cqw; color: #5F5F7C; font-weight: 700; }

.demo[data-state="done"] .demo-done > * { animation: rise 0.5s ease backwards; }
.demo[data-state="done"] .demo-done > :nth-child(2) { animation-delay: 0.3s; }
.demo[data-state="done"] .demo-done > :nth-child(3) { animation-delay: 0.4s; }
.demo[data-state="done"] .demo-done > :nth-child(4) { animation-delay: 0.65s; }

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

/* State switching: the Lock Screen slides up like an unlock. */

.demo[data-state="mode"] .demo-lock,
.demo[data-state="done"] .demo-lock { opacity: 0; transform: translateY(-12%); pointer-events: none; }
.demo[data-state="mode"] .demo-mode { opacity: 1; transform: none; pointer-events: auto; }
.demo[data-state="done"] .demo-done { opacity: 1; transform: none; pointer-events: auto; }

@media (max-width: 760px) {
  .protection { grid-template-columns: 1fr; }
  .protection .phone { justify-self: center; }
}

/* ---------- Sounds ---------- */

.split {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}

.split.reverse { grid-template-columns: minmax(0, 1fr) auto; }

.sound-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 8px;
}

.sound-list .card { padding: 22px; }
.sound-list h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.sound-list p { color: var(--muted); font-size: 0.9375rem; line-height: 1.45; }

@media (max-width: 860px) {
  .split,
  .split.reverse { grid-template-columns: 1fr; }
  .split .phone { justify-self: center; }
  .split.reverse .phone { order: 2; }
}

@media (max-width: 520px) {
  .sound-list { grid-template-columns: 1fr; }
}

/* ---------- Nights ---------- */

.night {
  position: relative;
  overflow: hidden;
  padding: clamp(32px, 6vw, 64px);
  border-radius: var(--r-large);
  background: var(--bedtime);
  color: #fff;
}

.night::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/stars.svg") center / cover no-repeat;
  opacity: 0.6;
  pointer-events: none;
}

.night > * { position: relative; }
.night .label { color: rgb(255 255 255 / 0.78); }
.night .lead { color: rgb(255 255 255 / 0.84); margin-top: 16px; }

.night-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(32px, 6vw, 72px);
  align-items: center;
}

.night-points {
  display: grid;
  gap: 12px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.night-points li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-card);
  background: rgb(255 255 255 / 0.1);
  border: 1px solid rgb(255 255 255 / 0.12);
}

.night-points svg { flex: none; color: var(--cream); margin-top: 3px; }
.night-points strong { display: block; }
.night-points span { color: rgb(255 255 255 / 0.8); font-size: 0.9375rem; }

@media (max-width: 860px) {
  .night-grid { grid-template-columns: 1fr; }
  .night .phone { justify-self: center; }
}

/* ---------- Lock Screen ---------- */

.lock {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.lock-stage {
  position: relative;
  display: grid;
  gap: 18px;
  justify-items: center;
  padding: clamp(28px, 4vw, 44px) clamp(18px, 3vw, 36px);
  border-radius: var(--r-large);
  background:
    url("../img/stars.svg") center / cover no-repeat,
    linear-gradient(180deg, var(--night-1), var(--night-3) 70%, var(--dawn-1));
  overflow: hidden;
}

.island {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(250px, 100%);
  padding: 8px 14px 8px 8px;
  border-radius: 999px;
  background: #000;
  color: #fff;
  box-shadow: 0 8px 22px rgb(0 0 0 / 0.35);
}

.island img { width: 26px; height: 26px; border-radius: 50%; }
.island b { color: #A9ABFF; font-variant-numeric: tabular-nums; font-size: 1.0625rem; }

.activity {
  width: min(360px, 100%);
  padding: 16px;
  border-radius: 24px;
  background: #fff;
  color: #14142B;
  box-shadow: 0 16px 40px rgb(0 0 0 / 0.3);
}

.activity-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.activity-top img { width: 44px; height: 44px; border-radius: 22.5%; }
.activity-top .t { font-weight: 800; }
.activity-top .s { color: #5F5F7C; font-size: 0.875rem; font-weight: 600; }

.activity-count {
  margin-left: auto;
  color: #4F52E8;
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.activity-skip {
  margin-top: 14px;
  padding: 11px;
  border-radius: var(--r-tab);
  background: rgb(79 82 232 / 0.12);
  color: #3B3ED0;
  text-align: center;
  font-weight: 800;
}

.widget-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.widget {
  position: relative;
  width: 158px;
  height: 158px;
  padding: 16px;
  border-radius: 26px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #1C1C4A, #332E7A 60%, #5C4DB3);
  box-shadow: 0 14px 36px rgb(0 0 0 / 0.3);
}

.widget::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 70%;
  background: radial-gradient(closest-side, rgb(214 194 250 / 0.35), transparent);
}

.widget .k {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.8);
}

.widget .v {
  margin-top: 4px;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.widget .d { margin-top: 4px; font-size: 0.8125rem; font-weight: 600; color: rgb(255 255 255 / 0.8); }

.widget .a {
  position: absolute;
  left: 16px;
  bottom: 14px;
  z-index: 1;
  display: inline-flex;
  gap: 6px;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.16);
  font-size: 0.8125rem;
  font-weight: 800;
}

.lock-list {
  display: grid;
  gap: 14px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.lock-list li {
  padding: 20px 22px;
}

.lock-list strong { display: block; margin-bottom: 4px; }
.lock-list p { color: var(--muted); }

@media (max-width: 860px) {
  .lock { grid-template-columns: 1fr; }
}

/* ---------- Hadith ---------- */

.hadith {
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hadith .ar {
  font-family: "Amiri Quran", "Geeza Pro", serif;
  font-size: clamp(1.9rem, 4.6vw, 2.9rem);
  line-height: 1.9;
  color: var(--text);
}

.hadith .en {
  margin-top: 18px;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  font-weight: 800;
  line-height: 1.3;
}

.hadith .src {
  margin-top: 14px;
  color: var(--muted);
  font-weight: 700;
}

/* ---------- Premium ---------- */

.offer {
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 5vw, 60px);
  border-radius: var(--r-large);
  color: #fff;
  background: linear-gradient(180deg, var(--night-1), var(--night-2) 45%, var(--night-3));
}

.offer::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/stars.svg") center / cover no-repeat;
  opacity: 0.55;
  pointer-events: none;
}

.offer > * { position: relative; }
.offer .label { color: rgb(255 255 255 / 0.78); }
.offer h2 { max-width: 640px; }
.offer .lead { color: rgb(255 255 255 / 0.84); margin-top: 16px; max-width: 620px; }

.dawn-text {
  background: var(--premium-dawn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.offer-moon {
  position: absolute;
  top: clamp(24px, 4vw, 48px);
  right: clamp(24px, 4vw, 56px);
  width: clamp(54px, 7vw, 84px);
  transform: rotate(-18deg);
  filter: drop-shadow(0 0 26px rgb(250 168 219 / 0.55));
}

.plans {
  width: 100%;
  margin-top: 36px;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--r-card);
  overflow: hidden;
  background: rgb(255 255 255 / 0.06);
  border: 1px solid rgb(255 255 255 / 0.12);
}

.plans th,
.plans td {
  padding: 15px 18px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid rgb(255 255 255 / 0.1);
}

.plans tr:last-child td { border-bottom: 0; }

.plans thead th {
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.78);
}

.plans thead th.premium-col {
  background: var(--premium-dawn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.plans td:first-child { font-weight: 700; }
.plans td { color: rgb(255 255 255 / 0.88); font-size: 0.9375rem; }
.plans td.no { color: rgb(255 255 255 / 0.6); }
.plans .yes { display: inline-flex; align-items: center; gap: 8px; }
.plans .yes svg { flex: none; color: #B8ADFF; }

.plans col.feature { width: 36%; }

/* The Premium column is lifted, as in the app's offer. */
.plans td:nth-child(3),
.plans th:nth-child(3) { background-color: rgb(255 255 255 / 0.06); }

.offer-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  margin-top: 26px;
  color: rgb(255 255 255 / 0.84);
  font-weight: 600;
}

.offer-foot .chip {
  background: var(--premium-dawn);
  color: #291F5C;
}

@media (max-width: 640px) {
  .offer { padding: 32px 14px 28px; }
  .offer > .label,
  .offer > h2,
  .offer > .lead,
  .offer-foot { padding: 0 6px; }
  .offer-moon { width: 44px; top: 22px; right: 18px; }
  .plans th, .plans td { padding: 12px 10px; font-size: 0.875rem; line-height: 1.35; }
  .plans col.feature { width: 32%; }
}

/* ---------- Privacy ---------- */

.promises {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.promises .card { padding: 26px; }
.promises svg { color: var(--accent); margin-bottom: 14px; width: 30px; height: 30px; }
.promises h3 { margin-bottom: 6px; }
.promises p { color: var(--muted); }

.more { margin-top: 22px; font-weight: 700; }

@media (max-width: 760px) {
  .promises { grid-template-columns: 1fr; }
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 820px;
}

.faq details {
  background: var(--card);
  border-radius: var(--r-card);
  box-shadow: var(--shadow);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
  font-size: 1.0625rem;
}

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

.faq summary::after {
  content: "";
  flex: none;
  width: 10px;
  height: 10px;
  border-right: 2.5px solid var(--muted);
  border-bottom: 2.5px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after { transform: rotate(225deg) translate(-2px, -2px); }

.faq details p {
  padding: 0 22px 22px;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after { transition: none; }
}

/* ---------- Closing ---------- */

.closing {
  text-align: center;
  padding-top: 0;
}

.closing img {
  width: 88px;
  height: 88px;
  margin: 0 auto 24px;
  border-radius: 22.5%;
  box-shadow: 0 6px 14px rgb(0 0 0 / 0.12), 0 0 0 1px var(--line);
}

.closing .lead { margin: 16px auto 0; max-width: 520px; }

.closing .chip {
  margin-top: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 10px 18px;
  font-size: 0.9375rem;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer a { color: var(--muted); font-weight: 700; text-decoration: none; }

.site-footer .trademarks {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.5;
}
.site-footer a:hover { color: var(--text); }

/* ---------- Inner pages ---------- */

.page {
  padding: 32px 0 96px;
}

.page .wrap { max-width: calc(760px + var(--gutter) * 2); }

.page h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
.page .updated { margin-top: 10px; color: var(--muted); font-weight: 600; }

.prose { margin-top: 36px; }
.prose h2 { font-size: 1.5rem; margin: 40px 0 12px; }
.prose p,
.prose li { color: var(--text); }
.prose p + p { margin-top: 14px; }
.prose ul { padding-left: 1.2em; margin: 14px 0 0; }
.prose li + li { margin-top: 10px; }
.prose .card { padding: 26px; margin-top: 16px; }

.contact-card {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 36px;
  padding: 26px;
}

.contact-card p { color: var(--muted); }

.contact-card a.mail {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  text-decoration: none;
}

.not-found {
  display: grid;
  place-items: center;
  min-height: 70vh;
  text-align: center;
  padding: 40px 0;
}

.not-found .lead { margin: 14px auto 28px; max-width: 460px; }

.not-found a.home {
  display: inline-flex;
  padding: 14px 22px;
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
  text-decoration: none;
}

/* ---------- Gentle reveal (only when scripts run and motion is welcome) ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Hover: things lift and grow a little under the pointer ---------- */
/* Uses translate and scale, which leave the reveal's transform alone. */

.card,
.mode,
.phone,
.faq details,
.mode-chip,
.widget,
.activity,
.island,
.promises .card,
.night-points li {
  transition:
    translate 0.35s cubic-bezier(0.25, 1.2, 0.4, 1),
    scale 0.35s cubic-bezier(0.25, 1.2, 0.4, 1),
    box-shadow 0.35s ease,
    background-color 0.2s ease,
    border-color 0.2s ease;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .why .card:hover,
  .steps li:hover,
  .sound-list .card:hover,
  .promises .card:hover,
  .lock-list li:hover {
    translate: 0 -4px;
    scale: 1.015;
    box-shadow: var(--shadow-lift);
  }

  .mode:hover {
    translate: 0 -6px;
    scale: 1.04;
    box-shadow: 0 18px 40px color-mix(in srgb, var(--tint) 22%, transparent);
  }

  .mode .icon { transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .mode:hover .icon { transform: scale(1.12) rotate(-6deg); }

  .mode-chip:hover { translate: 0 -2px; scale: 1.05; }
  .mode-chip:hover .tile { opacity: 1; }

  .faq details:hover { translate: 0 -2px; box-shadow: var(--shadow-lift); }

  .split .phone:hover,
  .how .phone:hover,
  .night .phone:hover,
  .protection .phone:hover { translate: 0 -8px; scale: 1.03; }

  .night-points li:hover { translate: 4px 0; background-color: rgb(255 255 255 / 0.16); }

  .widget:hover,
  .activity:hover,
  .island:hover { scale: 1.04; }

  .alarm-note { transition: scale 0.35s cubic-bezier(0.25, 1.2, 0.4, 1); }
  .alarm-note:hover { scale: 1.015; }

  .plans tbody tr { transition: background-color 0.2s ease; }
  .plans tbody tr:hover { background-color: rgb(255 255 255 / 0.05); }

  .segmented button:hover:not([aria-checked="true"]) { color: var(--text); background: color-mix(in srgb, var(--accent) 8%, transparent); }

  .site-footer a,
  .nav a { transition: color 0.2s ease; }

  .more a { transition: letter-spacing 0.3s ease; }
  .more a:hover { letter-spacing: 0.02em; }

  .brand img { transition: rotate 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .brand:hover img { rotate: -8deg; }

  .closing img { transition: rotate 0.5s cubic-bezier(0.3, 1.6, 0.5, 1), scale 0.5s cubic-bezier(0.3, 1.6, 0.5, 1); }
  .closing img:hover { rotate: -6deg; scale: 1.08; }
}

/* Pressing gives a small give, like the app's buttons. */
@media (prefers-reduced-motion: no-preference) {
  .mode:active { scale: 0.99; }
}

/* ---------- Voices badge in the hero ---------- */

.voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
  padding: 7px 16px 7px 7px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.12);
  border: 1px solid rgb(255 255 255 / 0.22);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background-color 0.2s ease, translate 0.3s cubic-bezier(0.25, 1.2, 0.4, 1);
}

.voice-badge-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--premium-dawn);
  color: #291F5C;
}

@media (hover: hover) {
  .voice-badge:hover { background: rgb(255 255 255 / 0.2); translate: 0 -2px; }
}

/* ---------- What makes FajrPlus different ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: minmax(210px, auto);
  gap: 16px;
}

.bento-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 26px;
  border-radius: var(--r-large);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition:
    translate 0.35s cubic-bezier(0.25, 1.2, 0.4, 1),
    scale 0.35s cubic-bezier(0.25, 1.2, 0.4, 1),
    box-shadow 0.35s ease;
}

.bento-card h3 { font-size: 1.25rem; }
.bento-card p { color: var(--muted); }

.bento-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 4px;
  border-radius: var(--r-tab);
  background: var(--tint);
  color: #fff;
  box-shadow: 0 6px 14px color-mix(in srgb, var(--tint) 30%, transparent);
  transition: transform 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.bento-chip {
  align-self: flex-start;
  margin-top: auto;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* The voices card: large, on the night-to-dawn sky, with a moving voice wave. */
.bento-voices {
  grid-column: span 2;
  grid-row: span 2;
  justify-content: flex-start;
  padding: clamp(28px, 4vw, 44px);
  color: #fff;
  background:
    url("../img/stars.svg") center top / cover no-repeat,
    linear-gradient(160deg, #0D0D29 0%, #1C1A4D 35%, #332B78 65%, #6B61D1 100%);
}

.bento-voices h3 { font-size: clamp(1.75rem, 3.4vw, 2.5rem); max-width: 520px; }
.bento-voices p { color: rgb(255 255 255 / 0.84); font-size: 1.0625rem; max-width: 560px; }

.bento-tag,
.recorded-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--premium-dawn);
  color: #291F5C;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.recorded-tag { margin-bottom: 14px; }

.voice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  max-width: 600px;
}

.voice-list li {
  position: relative;
  padding-left: 22px;
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
}

.voice-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--premium-dawn);
}

.voice-wave {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  height: 64px;
  margin-top: auto;
  padding-top: 24px;
}

.voice-wave span {
  flex: 1;
  max-width: 8px;
  height: 20%;
  border-radius: 99px;
  background: linear-gradient(180deg, #FFCCA3, #FAA8DB, #B8ADFF);
  opacity: 0.9;
  animation: voice 1.6s ease-in-out infinite;
}

.voice-wave span:nth-child(3n) { animation-duration: 1.2s; }
.voice-wave span:nth-child(3n + 1) { animation-duration: 1.9s; }
.voice-wave span:nth-child(4n) { animation-delay: -0.4s; }
.voice-wave span:nth-child(5n) { animation-delay: -0.9s; }
.voice-wave span:nth-child(7n) { animation-delay: -1.3s; }

@keyframes voice {
  0%, 100% { height: 18%; }
  50% { height: 100%; }
}

/* Stacked wake mode tiles that fan out on hover. */
.stack-tiles {
  position: relative;
  width: 110px;
  height: 52px;
  margin-bottom: 4px;
}

.stack-tiles span {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--r-tab);
  background: var(--tint);
  color: #fff;
  box-shadow: 0 6px 14px rgb(20 20 43 / 0.18);
  transition: translate 0.45s cubic-bezier(0.3, 1.5, 0.5, 1), rotate 0.45s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.stack-tiles span:nth-child(1) { translate: 0 0; rotate: -6deg; z-index: 3; }
.stack-tiles span:nth-child(2) { translate: 14px 2px; rotate: 0deg; z-index: 2; }
.stack-tiles span:nth-child(3) { translate: 28px 4px; rotate: 6deg; z-index: 1; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .bento-card:hover { translate: 0 -5px; scale: 1.015; box-shadow: var(--shadow-lift); }
  .bento-card:hover .bento-icon { transform: scale(1.1) rotate(-6deg); }
  .bento-stack:hover .stack-tiles span:nth-child(2) { translate: 56px 0; rotate: 0deg; }
  .bento-stack:hover .stack-tiles span:nth-child(3) { translate: 112px 0; rotate: 0deg; }
  .bento-stack:hover .stack-tiles span:nth-child(1) { rotate: 0deg; }
}

@media (max-width: 900px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bento-voices { grid-column: 1 / -1; grid-row: auto; }
}

@media (max-width: 600px) {
  .bento { grid-template-columns: 1fr; }
  .voice-list { grid-template-columns: 1fr; }
  .voice-wave span:nth-child(even) { display: none; }
}

/* ---------- At a glance ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 8px clamp(18px, 3vw, 32px);
  border-radius: var(--r-large);
}

.facts > div {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.facts > div:nth-child(odd) { padding-right: 24px; }
.facts > div:nth-child(even) { padding-left: 24px; border-left: 1px solid var(--line); }
.facts > div:nth-last-child(-n + 2) { border-bottom: 0; }

.facts dt {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 2px;
}

.facts dd { margin: 0; color: var(--text); font-size: 0.9375rem; }

@media (max-width: 760px) {
  .facts { grid-template-columns: 1fr; }
  .facts > div,
  .facts > div:nth-child(odd),
  .facts > div:nth-child(even) { padding: 16px 0; border-left: 0; }
  .facts > div:nth-last-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .facts > div:last-child { border-bottom: 0; }
  .facts > div { grid-template-columns: 1fr; gap: 4px; }
}

/* ---------- Guides ---------- */

.article .wrap { max-width: calc(760px + var(--gutter) * 2); }
.article h1 { margin-top: 6px; font-size: clamp(2.2rem, 5vw, 3.2rem); }
.article .label { margin: 0; color: var(--accent); }

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.article-lead {
  margin-top: 26px;
  font-size: clamp(1.125rem, 2vw, 1.3rem);
  line-height: 1.55;
  color: var(--text);
}

.prose .article-lead { margin-top: 0; }

.toc {
  margin: 30px 0 10px;
  padding: 20px 24px;
  border-radius: var(--r-card);
  background: var(--accent-soft);
}

.toc strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc ol { margin: 0; padding-left: 1.2em; }
.toc li + li { margin-top: 4px; }
.toc a { color: var(--text); font-weight: 700; text-decoration: none; }
.toc a:hover { color: var(--accent); }

.prose h2 { scroll-margin-top: 24px; }
.prose h3 { font-size: 1.125rem; margin-bottom: 6px; }
.prose ul li::marker { color: var(--accent); }

.tip {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 16px;
  margin-top: 14px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: translate 0.35s cubic-bezier(0.25, 1.2, 0.4, 1), box-shadow 0.35s ease;
}

.tip-n {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-tab);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}

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

.article-hadith {
  margin: 40px 0 0;
  padding: 28px;
  border-radius: var(--r-large);
  background: var(--card);
  box-shadow: var(--shadow);
  text-align: center;
}

.article-hadith .ar { font-family: "Amiri Quran", "Geeza Pro", serif; font-size: 1.9rem; line-height: 1.9; }
.article-hadith p + p { margin-top: 10px; font-weight: 800; font-size: 1.125rem; }
.article-hadith cite { display: block; margin-top: 10px; color: var(--muted); font-style: normal; font-weight: 700; }

.table-wrap { margin-top: 18px; overflow-x: auto; border-radius: var(--r-card); box-shadow: var(--shadow); }

table.data {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.9375rem;
}

table.data th,
table.data td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

table.data thead th {
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
}

table.data tbody tr:last-child td { border-bottom: 0; }
table.data td:first-child { font-weight: 700; }
table.numbers td:not(:first-child),
table.numbers th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

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

.checklist { list-style: none; padding: 0 !important; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

.sources { padding-left: 1.2em; color: var(--muted); font-size: 0.9375rem; }
.sources li { color: var(--muted) !important; }

.prose .faq { margin-top: 16px; }

.app-box {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-top: 48px;
  padding: 26px;
  border-radius: var(--r-large);
  color: #fff;
  background:
    url("../img/stars.svg") center / cover no-repeat,
    linear-gradient(150deg, #0D0D29, #332B78 70%, #6B61D1);
}

.app-box img { flex: none; width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 6px 16px rgb(0 0 0 / 0.3); }
.app-box strong { display: block; font-size: 1.125rem; }
.app-box p { margin-top: 6px; color: rgb(255 255 255 / 0.84); }
.app-box a { display: inline-block; margin-top: 12px; color: #fff; font-weight: 800; }

.related { padding: 56px 0 0; }
.related h2 { font-size: 1.5rem; margin-bottom: 16px; }

.guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.guide-grid.wide { margin-top: 36px; grid-template-columns: 1fr; }

.guide-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  border-radius: var(--r-card);
  background: var(--card);
  box-shadow: var(--shadow);
  color: var(--text);
  text-decoration: none;
  transition: translate 0.35s cubic-bezier(0.25, 1.2, 0.4, 1), scale 0.35s cubic-bezier(0.25, 1.2, 0.4, 1), box-shadow 0.35s ease;
}

.guide-card strong { font-size: 1.1875rem; line-height: 1.25; }
.guide-kicker { color: var(--accent); font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.guide-desc { color: var(--muted); font-size: 0.9375rem; }
.guide-more { margin-top: auto; padding-top: 8px; color: var(--accent); font-weight: 800; font-size: 0.9375rem; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .guide-card:hover { translate: 0 -4px; scale: 1.015; box-shadow: var(--shadow-lift); }
  .tip:hover { translate: 0 -3px; box-shadow: var(--shadow-lift); }
}

@media (max-width: 600px) {
  .guide-grid { grid-template-columns: 1fr; }
  .tip { grid-template-columns: 1fr; gap: 10px; }
  .app-box { flex-direction: column; }
}

/* Guides on the home page */
.home-guides .guide-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .home-guides .guide-grid { grid-template-columns: 1fr; } }

/* ---------- Phones ---------- */

/* Menu: the header links behind one labelled button below tablet width. */
.site-header .wrap { position: relative; }

.menu-button {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: var(--r-tab);
  background: rgb(255 255 255 / 0.12);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.2s ease;
}
.menu-button:active { transform: scale(0.95); }
.menu-button[aria-expanded="true"] { background: rgb(255 255 255 / 0.22); }

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: var(--gutter);
  z-index: 6;
  display: grid;
  width: min(260px, calc(100% - var(--gutter) * 2));
  padding: 8px;
  border-radius: var(--r-large);
  background: var(--card);
  box-shadow: var(--shadow-lift);
  transform-origin: top right;
}
.menu-panel[hidden] { display: none; }
.menu-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: var(--r-tab);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}
.menu-panel a:hover,
.menu-panel a:active { background: var(--accent-soft); color: var(--accent); }
.menu-panel a:nth-child(6) { margin-top: 6px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r-tab) var(--r-tab); }

@media (prefers-reduced-motion: no-preference) {
  .menu-panel:not([hidden]) { animation: menu-in 0.22s cubic-bezier(0.25, 1.2, 0.4, 1); }
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(0.96); }
}

@media (max-width: 860px) {
  .menu-button { display: inline-flex; }
}

/* Press feedback where hover does not exist. */
.guide-card:active,
.faq summary:active,
.segmented button:active,
.demo-stop:active:not(:disabled) { transform: scale(0.98); }
.guide-card,
.faq summary { transition: transform 0.15s ease; }

@media (max-width: 600px) {
  section { padding: 56px 0; }
  .section-head { margin-bottom: 28px; }
  .nav { gap: 12px; }
  .nav .chip.soon { display: none; }

  /* Wake modes as compact rows, icon on the left, like the app's lists. */
  .modes { grid-template-columns: 1fr; gap: 10px; }
  .mode {
    display: grid;
    grid-template-columns: 44px auto minmax(0, 1fr);
    align-items: center;
    column-gap: 14px;
    row-gap: 2px;
    padding: 14px 16px;
  }
  .mode .icon { grid-row: 1 / span 2; width: 44px; height: 44px; align-self: center; }
  .mode .icon svg { width: 24px; height: 24px; }
  .mode h3 { grid-column: 2; }
  .mode .tag { grid-column: 3; grid-row: 1; justify-self: start; }
  .mode p { grid-column: 2 / -1; font-size: 0.875rem; }

  /* The feature cards the same way; the voices card stays as it is. */
  .bento { grid-auto-rows: auto; gap: 12px; }
  .bento-card:not(.bento-voices) {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    column-gap: 16px;
    row-gap: 4px;
    align-content: start;
    padding: 20px;
  }
  .bento-card:not(.bento-voices) > .bento-icon,
  .bento-card:not(.bento-voices) > .stack-tiles { grid-row: 1 / span 3; margin: 0; }
  .bento-card:not(.bento-voices) > :not(.bento-icon):not(.stack-tiles) { grid-column: 2; }
  .bento-card:not(.bento-voices) h3 { font-size: 1.125rem; }
  .bento-card:not(.bento-voices) p { font-size: 0.9375rem; }
  .bento-chip { margin-top: 6px; }
  /* Three stacked tiles in a 48 point column: fan them a little less. */
  .bento-stack .stack-tiles { width: 48px; }
  .bento-stack .stack-tiles span:nth-child(2) { translate: 5px 4px; }
  .bento-stack .stack-tiles span:nth-child(3) { translate: 10px 8px; }

  .why .card { padding: 22px 20px; }
  .hadith .ar { font-size: 1.6rem; }

  /* Wide tables: tighter cells, the first column stays while the rest scrolls. */
  table.data { font-size: 0.875rem; }
  table.data th,
  table.data td { padding: 10px 12px; }
  table.data.numbers td,
  table.data.numbers th { white-space: nowrap; }
  table.data.numbers th:first-child,
  table.data.numbers td:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    min-width: 132px;
    white-space: normal;
    background: var(--card);
    box-shadow: 1px 0 0 var(--line);
  }
  table.data.numbers thead th:first-child { background: color-mix(in srgb, var(--accent) 12%, var(--card)); }
}
