/* MadrassaHub marketing site — shared styles for every page. */

/* Portal documentation: readable guides and real desktop screens. */
.portal-crumb { font-size: 13px; color: var(--muted); margin-bottom: 32px; }
.portal-crumb a { color: var(--blue); text-underline-offset: 4px; }
.portal-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .13em; color: var(--blue); margin-bottom: 16px; }
.portal-hero { padding-bottom: 48px; }
.portal-note { color: var(--muted); font-size: 13px; max-width: 640px; margin-top: 24px; line-height: 1.7; }
.portal-directory { padding-bottom: 32px; }
.portal-role { display: grid; grid-template-columns: 40px 1fr 42%; gap: 32px; align-items: center; padding: 40px 0; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.portal-role h2 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 12px; }
.portal-role p { max-width: 440px; color: var(--text); line-height: 1.7; }
.portal-role img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 14px; }
.portal-role-number { color: var(--blue); font-size: 13px; align-self: start; padding-top: 10px; }
.portal-read { display: inline-block; margin-top: 20px; color: var(--blue); font-size: 14px; font-weight: 600; }
.portal-role:hover .portal-read { text-decoration: underline; text-underline-offset: 5px; }
.portal-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 64px; align-items: start; }
.portal-sidebar { position: sticky; top: 110px; }
.portal-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.portal-sidebar p { font-size: 11px; font-weight: 700; letter-spacing: .1em; margin-bottom: 16px; color: var(--muted); }
.portal-sidebar a { color: var(--text); text-decoration: none; padding: 10px 12px; font-size: 13px; border-radius: 4px; }
.portal-sidebar a[aria-current="page"] { background: var(--mist); color: var(--blue); font-weight: 700; }
.portal-sidebar a:hover { color: var(--blue); }
.portal-toc { display: flex; flex-wrap: wrap; gap: 12px 24px; border-block: 1px solid var(--line); padding: 20px 0; }
.portal-toc a { color: var(--blue); font-size: 13px; text-underline-offset: 4px; }
.portal-feature { padding: 56px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 110px; }
.portal-feature h2 { font-size: clamp(30px, 4vw, 46px); margin-bottom: 20px; }
.portal-feature > p:not(.portal-eyebrow), .portal-feature li { color: var(--text); line-height: 1.8; max-width: 720px; }
.portal-feature ol { padding-left: 24px; margin: 24px 0 32px; }
.portal-feature li { padding-left: 8px; margin-bottom: 8px; }
.portal-feature li::marker { color: var(--blue); font-weight: 600; }
.portal-shot { margin: 0; }
.portal-shot a { display: block; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.portal-shot img { display: block; width: 100%; height: auto; }
.portal-shot figcaption { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.6; }
.portal-help { max-width: 720px; text-align: center; }
.portal-help h2 { font-size: 40px; margin-bottom: 20px; }
.portal-help p { color: var(--text); line-height: 1.8; margin-bottom: 24px; }
@media (max-width: 960px) {
  .portal-layout { grid-template-columns: 1fr; gap: 28px; }
  .portal-sidebar { position: static; }
  .portal-sidebar nav { flex-direction: row; flex-wrap: wrap; }
  .portal-sidebar p { flex-basis: 100%; margin-bottom: 8px; }
  .portal-role { grid-template-columns: 28px 1fr; gap: 20px; }
  .portal-role img { grid-column: 2; max-width: 560px; }
  .portal-feature { padding: 40px 0; }
}
@media (max-width: 540px) {
  .portal-role { gap: 14px; padding: 28px 0; }
  .portal-role img { grid-column: 1 / -1; }
  .portal-sidebar a { font-size: 12px; padding: 8px; }
}

@font-face {
  font-family: Jakarta;
  src: url("/assets/fonts/jakarta-400.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Jakarta;
  src: url("/assets/fonts/jakarta-600.ttf") format("truetype");
  font-weight: 500 600;
  font-display: swap;
}
@font-face {
  font-family: Jakarta;
  src: url("/assets/fonts/jakarta-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("/assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: Newsreader;
  src: url("/assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Colors mirror madrassa-mobile/src/theme/brand.ts (brandColors, brandChart). */
  --paper: #f4f7f9; /* background */
  --paper-2: #ebf1f5; /* surfaceMuted */
  --card: #ffffff; /* surface */
  --ink: #172f40; /* foreground */
  --text: #3e5566; /* slate accent ink */
  --muted: #586d7b; /* mutedForeground */
  --subtle: #617381; /* subtleForeground */
  --line: #dce7ed; /* surfaceStrong */
  --line-strong: #c8d0da; /* checkboxBorder */
  --blue: #126f98; /* primary */
  --blue-deep: #0b5678; /* primaryPressed */
  --sky: #72cdf4; /* logoBlue */
  --sky-shade: #5ab5e2; /* logoBlueShade */
  --mist: #e4f3fa; /* primarySoft */
  --night: #172f40; /* foreground, used as the dark plate */
  --night-2: #141a23; /* logoInk */
  --on-night: #ffffff;
  --on-night-text: #d5f1ff; /* illustrationHighlight */
  --on-night-muted: #a4c6d7; /* illustrationLine */
  --on-night-line: rgba(164, 198, 215, 0.2);

  /* brandChart */
  --chart-good: #147648;
  --chart-attention: #e08a1e;
  --chart-info: #126f98;
  --chart-neutral: #a9b8c3;
  --chart-track: #ebf1f5;

  /* brandShadows */
  --shadow-card: 0 4px 16px rgba(23, 47, 64, 0.04);
  --shadow-raised: 0 12px 32px -8px rgba(23, 47, 64, 0.16);
  --shadow-action: 0 6px 12px rgba(18, 111, 152, 0.22);

  --serif: Newsreader, "Iowan Old Style", Georgia, serif;
  --sans: Jakarta, ui-sans-serif, system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(88px, 11vw, 168px);
  --radius: 26px; /* brandRadii.large */
  --radius-control: 16px; /* brandRadii.medium */
  --ease: cubic-bezier(0.22, 0.7, 0.2, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 16.5px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
::selection {
  background: var(--sky);
  color: var(--ink);
}
:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 6px;
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
figure,
blockquote {
  margin: 0;
}
h1,
h2,
.display {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.022em;
  font-optical-sizing: auto;
  text-wrap: balance;
}
h1 {
  font-size: clamp(46px, 6.6vw, 96px);
  line-height: 0.98;
}
h2 {
  font-size: clamp(34px, 4.4vw, 60px);
  line-height: 1.04;
}
h1 em,
h2 em,
.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--blue);
}
h3 {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
p {
  text-wrap: pretty;
}
.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--text);
  max-width: 34em;
}
.kicker {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 20px;
}
.small {
  font-size: 13.5px;
  color: var(--muted);
}

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  padding-inline: var(--gutter);
  margin-inline: auto;
}
.section {
  padding-block: var(--section);
}
.section + .section.tight-top {
  padding-top: 0;
}
.rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 0;
}

.skip {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
}
.skip:focus {
  top: 16px;
}

/* Buttons and links */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--radius-control);
  border: 1px solid var(--blue);
  background: var(--blue);
  color: #fff;
  box-shadow: var(--shadow-action);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition:
    background 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}
.button:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}
.button:active {
  transform: translateY(1px);
}
.button.ghost {
  background: var(--paper-2);
  color: var(--blue);
  border-color: var(--paper-2);
  box-shadow: none;
}
.button.ghost:hover {
  background: var(--mist);
  border-color: var(--mist);
}
.button.light {
  background: var(--card);
  color: var(--blue);
  border-color: var(--card);
  box-shadow: none;
}
.button.light:hover {
  background: var(--mist);
  border-color: var(--mist);
}
.button.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 14px;
}
.link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  transition: text-decoration-color 0.2s;
}
.link:hover {
  text-decoration-color: currentColor;
}
.link svg,
.button svg {
  width: 16px;
  height: 16px;
  flex: none;
  transition: transform 0.25s var(--ease);
}
.link:hover svg,
.button:hover svg {
  transform: translateX(3px);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 28px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
}
.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  margin-right: auto;
}
.brand img {
  width: 26px;
  height: auto;
}
.brand span span {
  font-weight: 400;
  color: var(--blue);
}
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a:not(.button) {
  padding: 8px 13px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
  transition:
    color 0.2s,
    background 0.2s;
}
.nav a:not(.button):hover {
  color: var(--ink);
  background: var(--paper-2);
}
.nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.nav .button {
  margin-left: 14px;
}
.nav small,
.nav-foot p {
  display: none;
}
.nav-foot {
  display: flex;
}
.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--card);
  box-shadow: var(--shadow-card);
  position: relative;
}
.menu-toggle span {
  position: absolute;
  left: 13px;
  right: 13px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.menu-toggle span:first-child {
  top: 17px;
}
.menu-toggle span:last-child {
  top: 25px;
}
.menu-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(4px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-4px) rotate(-45deg);
}

/* Screens: real app captures shown without a device mockup */
.screen {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
  box-shadow:
    0 0 0 1px rgba(23, 47, 64, 0.08),
    0 2px 4px rgba(23, 47, 64, 0.04),
    0 40px 70px -40px rgba(23, 47, 64, 0.45);
  flex: none;
}
.screen img {
  width: 100%;
  height: auto;
  aspect-ratio: 1206 / 2622;
}
.on-dark .screen,
.screen.on-dark {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 50px 90px -40px rgba(0, 0, 0, 0.7);
}
.caption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
}

/* Pattern used on dark plates: an eight-point star lattice */
.pattern {
  background-color: var(--night);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'%3E%3Cg fill='none' stroke='%2372cdf4' stroke-opacity='.09' stroke-width='1'%3E%3Crect x='28' y='28' width='40' height='40'/%3E%3Crect x='28' y='28' width='40' height='40' transform='rotate(45 48 48)'/%3E%3Cpath d='M0 48h19.7M76.3 48H96M48 0v19.7M48 76.3V96'/%3E%3Ccircle cx='48' cy='48' r='9'/%3E%3C/g%3E%3C/svg%3E");
  color: var(--on-night-text);
}
.pattern h2,
.pattern h3,
.pattern .display {
  color: var(--on-night);
}
.pattern h2 em {
  color: var(--sky);
}
.pattern .link {
  color: var(--on-night);
  text-decoration-color: rgba(255, 255, 255, 0.35);
}
.pattern .small,
.pattern .caption {
  color: var(--on-night-muted);
}

/* Home: hero */
.hero {
  padding-top: clamp(48px, 7vw, 104px);
}
.hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 40px 64px;
  align-items: end;
}
.hero h1 {
  max-width: 11.5em;
}
.hero-side .lead {
  margin-bottom: 32px;
}
.hero-plate {
  margin-top: clamp(48px, 6vw, 80px);
  border-radius: var(--radius);
  height: clamp(420px, 52vw, 640px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero-plate::before {
  content: "";
  position: absolute;
  inset: auto -10% -40% -10%;
  height: 80%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(114, 205, 244, 0.22), transparent 70%);
  z-index: -1;
}
.hero-screens {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(16px, 3vw, 44px);
  padding-top: clamp(40px, 5vw, 72px);
}
.hero-screens .screen {
  width: clamp(170px, 21vw, 300px);
}
.hero-screens .screen:nth-child(1),
.hero-screens .screen:nth-child(3) {
  margin-top: clamp(50px, 6vw, 96px);
  width: clamp(150px, 18.5vw, 266px);
}
.hero-plate::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 30%;
  background: linear-gradient(transparent, var(--night));
  pointer-events: none;
}

/* Home: problem statement */
.statement {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 2fr);
  gap: 40px 64px;
}
.statement .display {
  font-size: clamp(28px, 3.1vw, 44px);
  line-height: 1.2;
  letter-spacing: -0.015em;
}
.statement .display span {
  color: var(--muted);
}
.compare {
  margin-top: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--ink);
}
.compare-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 64px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.compare-row.head {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  padding: 14px 0;
}
.compare-row h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.01em;
}
.compare-row .before {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-color: rgba(88, 109, 123, 0.45);
  text-decoration-thickness: 1px;
}
.compare-row .after {
  color: var(--ink);
}

/* Home: a day at the madrassa, sticky screen story */
.day-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px 64px;
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 88px);
}
.day {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 64px;
}
.day-steps {
  list-style: none;
  padding: 0;
}
.day-step {
  min-height: 72vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0;
  max-width: 470px;
  opacity: 0.35;
  transition: opacity 0.5s var(--ease);
}
.day-step.active,
.no-story .day-step {
  opacity: 1;
}
.day-step:first-child {
  min-height: 56vh;
  justify-content: flex-start;
  padding-top: 8vh;
}
.day-step time {
  font-family: var(--serif);
  font-size: 22px;
  font-style: italic;
  color: var(--blue);
  margin-bottom: 14px;
}
.day-step h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 2.8vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  margin-bottom: 18px;
}
.day-step .who {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 22px;
}
.day-step .screen {
  display: none;
}
.day-stage {
  position: sticky;
  top: 12vh;
  height: 76vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--mist);
  display: grid;
  place-items: center;
}
.day-stage .screen {
  position: absolute;
  height: 84%;
  width: auto;
  aspect-ratio: 1206 / 2622;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition:
    opacity 0.6s var(--ease),
    transform 0.8s var(--ease);
}
.day-stage .screen img {
  height: 100%;
}
.day-stage .screen.active {
  opacity: 1;
  transform: none;
}

/* Modules overview */
.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 64px;
  align-items: end;
  margin-bottom: clamp(40px, 5vw, 72px);
}
.section-head.stack {
  grid-template-columns: minmax(0, 46rem);
}
.section-head .lead {
  max-width: 30em;
}
.modules {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.module {
  position: relative;
  padding: 36px 32px 34px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  min-height: 300px;
  text-decoration: none;
  transition: background 0.3s var(--ease);
}
a.module:hover {
  background: var(--card);
}
.module h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 28px;
  letter-spacing: -0.015em;
  margin-bottom: 12px;
}
.module p {
  color: var(--text);
}
.module ul {
  list-style: none;
  padding: 0;
  margin-top: auto;
  padding-top: 26px;
  font-size: 14px;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
}
.module ul li:not(:last-child)::after {
  content: "·";
  margin: 0 8px;
}
.module .more {
  position: absolute;
  top: 34px;
  right: 30px;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition:
    transform 0.3s var(--ease),
    color 0.3s;
}
a.module:hover .more {
  transform: translate(3px, -3px);
  color: var(--blue);
}

/* Roles */
.roles {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr) auto;
  gap: 48px 64px;
  align-items: center;
}
.role-tabs {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}
.role-tabs button {
  appearance: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  padding: 14px 0;
  font-family: var(--serif);
  font-size: clamp(22px, 2.1vw, 28px);
  letter-spacing: -0.012em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.role-tabs button::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
  transform: scale(0);
  transition: transform 0.3s var(--ease);
}
.role-tabs button:hover {
  color: var(--ink);
}
.role-tabs button[aria-selected="true"] {
  color: var(--ink);
}
.role-tabs button[aria-selected="true"]::after {
  transform: scale(1);
}
.role-panel h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.role-panel ul {
  list-style: none;
  padding: 0;
  margin: 28px 0 32px;
  border-top: 1px solid var(--line);
}
.role-panel li {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 15.5px;
}
.role-screen {
  width: clamp(220px, 21vw, 290px);
}
.role-screen img {
  transition: opacity 0.25s;
}
.role-screen.swapping img {
  opacity: 0;
}

/* Trust band */
.trust {
  border-radius: var(--radius);
  padding: clamp(40px, 6vw, 88px);
}
.trust-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr);
  gap: 48px 80px;
}
.facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 40px;
}
.facts > div {
  padding: 22px 0;
  border-top: 1px solid var(--on-night-line);
}
.facts h3 {
  margin-bottom: 6px;
}
.facts p {
  font-size: 15px;
  color: var(--on-night-text);
}
.pattern .facts h3 {
  color: var(--on-night);
}

/* FAQ */
.faq {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr);
  gap: 40px 80px;
  align-items: start;
}
.faq-list {
  border-top: 1px solid var(--ink);
}
.faq-list details {
  border-bottom: 1px solid var(--line);
}
.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 24px 48px 24px 0;
  position: relative;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.faq-list summary::-webkit-details-marker {
  display: none;
}
.faq-list summary::before,
.faq-list summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 14px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}
.faq-list summary::after {
  transform: rotate(90deg);
}
.faq-list details[open] summary::after {
  transform: rotate(0deg);
}
.faq-list details p {
  padding: 0 48px 26px 0;
  max-width: 40em;
}
.faq-list details p + p {
  margin-top: -12px;
}

/* Request form */
.request {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px 88px;
  align-items: start;
}
.request-copy h2 {
  margin-bottom: 24px;
}
.request-copy .lead {
  margin-bottom: 40px;
}
.contact-lines {
  border-top: 1px solid var(--line);
}
.contact-lines > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}
.contact-lines dt {
  color: var(--muted);
}
.contact-lines dd {
  margin: 0;
  color: var(--ink);
}
.contact-lines a {
  text-underline-offset: 4px;
}
.form {
  background: var(--card);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 48px);
  box-shadow: var(--shadow-card);
}
.form h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.015em;
  margin-bottom: 6px;
}
.form > p {
  margin-bottom: 28px;
  color: var(--muted);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 16px;
}
.field.wide {
  grid-column: 1 / -1;
}
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 7px;
}
.field input,
.field select {
  width: 100%;
  height: 52px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius-control);
  background: var(--paper-2);
  font-size: 15.5px;
  color: var(--ink);
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23172f40' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field input::placeholder {
  color: var(--chart-neutral);
}
.field input:focus,
.field select:focus {
  outline: none;
  background: var(--card);
  box-shadow: 0 0 0 2px var(--blue);
}
.optional-fields {
  margin: 22px 0 26px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.optional-fields summary {
  cursor: pointer;
  padding: 16px 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
  list-style: none;
  display: flex;
  justify-content: space-between;
}
.optional-fields summary::-webkit-details-marker {
  display: none;
}
.optional-fields summary::after {
  content: "+";
  font-weight: 400;
  font-size: 20px;
  line-height: 1;
}
.optional-fields[open] summary::after {
  content: "–";
}
.optional-fields .form-grid {
  padding-bottom: 22px;
}
.form .button {
  width: 100%;
}
.form-status {
  font-size: 14px;
  color: var(--blue);
  margin-top: 14px;
}
.form-status:empty {
  display: none;
}
.form-privacy {
  font-size: 13px;
  color: var(--muted);
  margin-top: 16px;
}
.form-privacy a {
  color: var(--ink);
}

/* Closing call to action used on sub pages */
.cta {
  border-radius: var(--radius);
  padding: clamp(48px, 7vw, 104px) clamp(28px, 6vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 32px 64px;
  align-items: end;
}
.cta p {
  margin-top: 20px;
  max-width: 32em;
  color: var(--on-night-text);
}

/* Sub page hero */
.page-hero {
  padding-top: clamp(56px, 8vw, 120px);
  padding-bottom: clamp(56px, 7vw, 104px);
}
.page-hero h1 {
  font-size: clamp(44px, 6vw, 84px);
  max-width: 12em;
  margin-bottom: 32px;
}
.page-hero .lead {
  max-width: 38em;
}
.page-hero .actions {
  margin-top: 36px;
}

/* Feature chapters on sub pages */
.chapter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 56px 96px;
  align-items: center;
  padding-block: clamp(64px, 8vw, 120px);
  border-top: 1px solid var(--line);
}
.chapter.flip .chapter-visual {
  order: -1;
}
.chapter h2 {
  font-size: clamp(32px, 3.6vw, 50px);
  margin-bottom: 22px;
}
.chapter .lead {
  margin-bottom: 8px;
}
.chapter-visual {
  border-radius: 26px;
  background: var(--mist);
  aspect-ratio: 1 / 1.02;
  display: grid;
  place-items: center;
  overflow: hidden;
  position: relative;
}
.chapter-visual.sand {
  background: var(--paper-2);
}
.chapter-visual.pattern {
  background-color: var(--night);
}
.chapter-visual .screen {
  width: 52%;
}
.chapter-visual.pair {
  display: flex;
  justify-content: center;
  gap: 5%;
}
.chapter-visual.pair .screen {
  width: 42%;
}
.chapter-visual.pair .screen:last-child {
  margin-top: 14%;
}
.points {
  list-style: none;
  padding: 0;
  margin-top: 32px;
  border-top: 1px solid var(--line);
}
.points li {
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.points strong {
  display: block;
  color: var(--ink);
  font-weight: 600;
  margin-bottom: 2px;
}
.points span {
  color: var(--text);
  font-size: 15.5px;
}

/* Features index page */
.features-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 64px;
  align-items: start;
}
.toc {
  position: sticky;
  top: 108px;
  font-size: 14.5px;
}
.toc p {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.toc ol {
  list-style: none;
  padding: 0;
  border-left: 1px solid var(--line);
}
.toc a {
  display: block;
  padding: 7px 0 7px 18px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  text-decoration: none;
  color: var(--muted);
  transition:
    color 0.2s,
    border-color 0.2s;
}
.toc a:hover,
.toc a.active {
  color: var(--ink);
  border-left-color: var(--ink);
}
.feature-group {
  padding-bottom: clamp(56px, 7vw, 96px);
  margin-bottom: clamp(56px, 7vw, 96px);
  border-bottom: 1px solid var(--line);
}
.feature-group:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}
.feature-group-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px 48px;
  align-items: start;
  margin-bottom: 40px;
}
.feature-group h2 {
  font-size: clamp(32px, 3.4vw, 48px);
  margin-bottom: 16px;
}
.feature-group-head .screen {
  width: 170px;
}
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 48px;
}
.feature-list > div {
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.feature-list h3 {
  margin-bottom: 6px;
}
.feature-list p {
  font-size: 15.5px;
}

/* Role pages */
.role-chapter .chapter-visual {
  aspect-ratio: 1 / 1.08;
}
.role-label {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--blue);
  margin-bottom: 10px;
  display: block;
}

/* Steps on the werkwijze page */
.steps {
  list-style: none;
  padding: 0;
  counter-reset: step;
  border-top: 1px solid var(--ink);
}
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 16px 48px;
  padding: 40px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.steps li::before {
  content: counter(step);
  font-family: var(--serif);
  font-size: 56px;
  line-height: 1;
  color: var(--blue);
  font-weight: 300;
}
.steps h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.steps p + p {
  margin-top: 12px;
}

/* Long-form text (privacy, terms, support) */
.prose-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 46rem) minmax(0, 1fr);
}
.prose-layout > * {
  grid-column: 2;
}
.prose {
  padding-bottom: var(--section);
}
.prose .meta {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
  display: block;
}
.prose h1 {
  font-size: clamp(42px, 5.4vw, 72px);
  margin-bottom: 28px;
}
.prose .intro {
  font-size: 20px;
  line-height: 1.55;
  color: var(--ink);
  padding-bottom: 40px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.prose h2 {
  font-size: 30px;
  letter-spacing: -0.015em;
  margin: 48px 0 14px;
}
.prose p,
.prose li {
  font-size: 16.5px;
}
.prose p + p {
  margin-top: 14px;
}
.prose ul {
  padding-left: 1.2em;
  margin: 12px 0 16px;
}
.prose li + li {
  margin-top: 6px;
}
.prose a {
  color: var(--blue);
  text-underline-offset: 3px;
}

/* Footer */
.site-footer {
  background: var(--night);
  color: var(--on-night-text);
  padding-top: clamp(64px, 8vw, 112px);
  margin-top: var(--section);
}
.site-footer.flush {
  margin-top: 0;
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(0, 1fr));
  gap: 48px;
  padding-bottom: 72px;
}
.footer-top .brand {
  color: var(--on-night);
  margin-bottom: 22px;
}
.footer-top .brand span span {
  color: var(--sky);
}
.footer-claim {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1.2;
  color: var(--on-night);
  max-width: 13em;
  letter-spacing: -0.012em;
}
.footer-top h4 {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--on-night);
  margin-bottom: 16px;
}
.footer-top ul {
  list-style: none;
  padding: 0;
}
.footer-top li + li {
  margin-top: 10px;
}
.footer-top a,
.footer-bottom a {
  color: var(--on-night-text);
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s;
}
.footer-top a:hover,
.footer-bottom a:hover {
  color: var(--on-night);
}
.footer-bottom {
  border-top: 1px solid var(--on-night-line);
  padding: 26px 0 34px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 32px;
  font-size: 13.5px;
}
.footer-bottom nav {
  display: flex;
  gap: 24px;
}
.footer-bottom a {
  font-size: 13.5px;
}

/* Reveal on scroll (only when JS enables it) */
.js-motion .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
}
.js-motion .reveal.visible {
  opacity: 1;
  transform: none;
}
.hero h1,
.hero-side,
.hero-plate {
  animation: rise 1s var(--ease) both;
}
.hero-side {
  animation-delay: 0.12s;
}
.hero-plate {
  animation-delay: 0.22s;
}
.hero-screens .screen {
  animation: rise 1.2s var(--ease) both;
}
.hero-screens .screen:nth-child(1) {
  animation-delay: 0.45s;
}
.hero-screens .screen:nth-child(2) {
  animation-delay: 0.35s;
}
.hero-screens .screen:nth-child(3) {
  animation-delay: 0.55s;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}

/* Responsive */
@media (max-width: 1100px) {
  .nav a:not(.button) {
    padding: 8px 9px;
    font-size: 14px;
  }
  .roles {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  }
  .role-screen {
    display: none;
  }
  .footer-top {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .footer-top > :first-child {
    grid-column: 1 / -1;
  }
  .features-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .toc {
    display: none;
  }
}

@media (max-width: 960px) {
  .menu-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: 76px 0 0 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    background: var(--paper);
    border-top: 1px solid var(--line);
    overflow-y: auto;
    overscroll-behavior: contain;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
      transform 0.3s var(--ease),
      visibility 0s 0.3s;
  }
  .nav.open {
    visibility: visible;
    transform: none;
    transition: transform 0.3s var(--ease);
  }
  .nav > a:not(.button) {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 2px 16px;
    padding: 18px 4px;
    border-radius: 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--serif);
    font-size: 30px;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.015em;
    color: var(--ink);
  }
  .nav > a:not(.button)::after {
    content: "";
    grid-row: 1 / 3;
    grid-column: 2;
    width: 9px;
    height: 9px;
    border-top: 1.5px solid var(--muted);
    border-right: 1.5px solid var(--muted);
    transform: rotate(45deg);
  }
  .nav > a small {
    display: block;
    grid-column: 1;
    font-family: var(--sans);
    font-size: 14px;
    letter-spacing: 0;
    color: var(--muted);
  }
  .nav > a:not(.button):hover,
  .nav > a:not(.button):active {
    background: none;
    color: var(--blue);
  }
  .nav > a[aria-current="page"] {
    color: var(--blue);
    font-weight: 400;
  }
  .nav > a[aria-current="page"]::after {
    border-color: var(--blue);
  }
  .nav .nav-foot {
    margin-top: auto;
    padding-top: 32px;
    display: block;
  }
  .nav .nav-foot .button {
    width: 100%;
    min-height: 52px;
    margin: 0;
    font-size: 15.5px;
  }
  .nav-foot p {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 22px;
    margin-top: 20px;
    font-size: 14px;
  }
  .nav-foot p a {
    color: var(--muted);
    text-decoration: none;
  }
  .nav-foot p a:hover {
    color: var(--ink);
  }
  html.menu-open,
  html.menu-open body {
    overflow: hidden;
  }
  html.menu-open .site-header {
    border-bottom-color: transparent;
  }
  .hero-top,
  .statement,
  .day-head,
  .section-head,
  .trust-grid,
  .faq,
  .request,
  .chapter,
  .cta {
    grid-template-columns: minmax(0, 1fr);
  }
  .chapter.flip .chapter-visual {
    order: 0;
  }
  .chapter-visual {
    aspect-ratio: 1 / 0.95;
  }
  .modules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .day {
    grid-template-columns: minmax(0, 1fr);
  }
  .day-stage {
    display: none;
  }
  .day-step,
  .day-step:first-child {
    min-height: 0;
    opacity: 1;
    padding: 40px 0;
    max-width: none;
    border-top: 1px solid var(--line);
  }
  .day-step .screen {
    display: block;
    width: min(260px, 70%);
    margin-top: 32px;
  }
  .roles {
    grid-template-columns: minmax(0, 1fr);
  }
  .compare-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px 24px;
  }
  .compare-row h3 {
    grid-column: 1 / -1;
  }
  .compare-row.head {
    display: none;
  }
  .steps li {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .steps li > :last-child {
    grid-column: 2;
  }
  .steps li::before {
    font-size: 42px;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 16px;
  }
  .header-inner {
    height: 68px;
  }
  .nav {
    inset: 68px 0 0 0;
  }
  .hero-plate {
    height: 440px;
    border-radius: 22px;
    margin-inline: calc(var(--gutter) * -0.5);
  }
  .hero-screens {
    gap: 12px;
    padding-top: 36px;
  }
  .hero-screens .screen {
    width: 200px;
  }
  .hero-screens .screen:nth-child(1),
  .hero-screens .screen:nth-child(3) {
    width: 160px;
    margin-top: 64px;
  }
  .modules {
    grid-template-columns: minmax(0, 1fr);
  }
  .module {
    min-height: 0;
    padding: 30px 24px;
  }
  .compare-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .facts {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-group-head {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-group-head .screen {
    display: none;
  }
  .form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-lines > div {
    grid-template-columns: 96px 1fr;
  }
  .chapter-visual .screen {
    width: 58%;
  }
  .chapter-visual.pair .screen {
    width: 44%;
  }
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .footer-bottom {
    flex-direction: column;
  }
  .cta {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .js-motion .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Graphics ---------- */

/* Arch: a pointed mihrab silhouette used to frame visuals */
.arch {
  --arch: polygon(
    0% 100%, 0% 34%, 1.2% 27.6%, 3.6% 22.3%, 7.4% 17.5%, 12.4% 13.2%,
    18.5% 9.4%, 25.6% 6.2%, 33.4% 3.6%, 41.5% 1.6%, 50% 0%,
    58.5% 1.6%, 66.6% 3.6%, 74.4% 6.2%, 81.5% 9.4%, 87.6% 13.2%,
    92.6% 17.5%, 96.4% 22.3%, 98.8% 27.6%, 100% 34%, 100% 100%
  );
  clip-path: var(--arch);
}
.hero-plate.arch-wrap {
  overflow: visible;
  background: none;
  height: auto;
  isolation: isolate;
}
.hero-arch {
  position: relative;
  height: clamp(460px, 56vw, 700px);
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}
.hero-arch .arch {
  position: absolute;
  inset: 0;
  border-radius: 0 0 28px 28px;
}
.arch-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

/* Floating product fragments */
.chip-card {
  position: absolute;
  z-index: 3;
  background: var(--card);
  border-radius: var(--radius-control);
  padding: 16px 18px;
  box-shadow: var(--shadow-raised);
  color: var(--ink);
  font-size: 13.5px;
  line-height: 1.4;
  width: 230px;
}
.chip-card .t {
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.chip-card .s {
  color: var(--muted);
  font-size: 12.5px;
}
.chip-card .bar {
  height: 6px;
  border-radius: 6px;
  background: var(--chart-track);
  margin-top: 12px;
  overflow: hidden;
}
.chip-card .bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}
.chip-card .dots {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
  margin-top: 12px;
}
.chip-card .dots i {
  aspect-ratio: 1;
  border-radius: 3px;
  background: var(--chart-good);
}
.chip-card .dots i.o {
  background: var(--chart-attention);
}
.chip-card .dots i.e {
  background: var(--chart-track);
}
.chip-card .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--mist);
  color: var(--blue-deep);
  font-size: 11px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex: none;
}
.chip-card .row {
  display: flex;
  gap: 11px;
  align-items: center;
}
.chip-card .ar {
  font-family: "Geeza Pro", "Noto Naskh Arabic", "Arabic Typesetting", serif;
  font-size: 15px;
  color: var(--blue-deep);
}
.float-a {
  animation: drift 7s ease-in-out infinite;
}
.float-b {
  animation: drift 8s ease-in-out -3s infinite;
}
@keyframes drift {
  50% {
    transform: translateY(-8px);
  }
}

/* Surah map: 114 cells, one per surah */
.surah-map {
  display: grid;
  grid-template-columns: repeat(19, minmax(0, 1fr));
  gap: 5px;
}
.surah-map i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: var(--chart-track);
  transition: transform 0.3s var(--ease);
}
.surah-map i.m {
  background: var(--chart-good);
}
.surah-map i.p {
  background: var(--chart-info);
}
.surah-map i.r {
  background: var(--chart-attention);
}
.surah-map i:hover {
  transform: scale(1.25);
}
.surah-card {
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 56px);
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.surah-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 26px;
  font-size: 13.5px;
  color: var(--muted);
}
.surah-legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: -1px;
  background: var(--c);
}
.surah-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.surah-head .num {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.03em;
}
.surah-head .num small {
  font-size: 0.36em;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 6px;
}
.quran-feature {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px 88px;
  align-items: center;
}

/* Visual wrapper allowing chips to overlap the screen */
.composite {
  position: relative;
}
.chapter-visual .chip-card {
  width: min(240px, 46%);
}
.cv-tl {
  top: 12%;
  left: 6%;
}
.cv-br {
  bottom: 12%;
  right: 6%;
}
.cv-tr {
  top: 14%;
  right: 6%;
}
.cv-bl {
  bottom: 14%;
  left: 6%;
}

/* Hand-drawn style line icons for modules */
.glyph {
  width: 44px;
  height: 44px;
  color: var(--blue);
  margin-bottom: 28px;
}
.glyph * {
  vector-effect: non-scaling-stroke;
}

@media (max-width: 960px) {
  .quran-feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-arch .chip-card {
    display: none;
  }
}
@media (max-width: 640px) {
  .surah-map {
    gap: 3px;
  }
  .chapter-visual .chip-card {
    display: none;
  }
}

/* Hero arch composition */
.arch-wrap::before,
.arch-wrap::after {
  display: none;
}
.hero-arch-fill {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-arch-fill::before {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  top: 20%;
  height: 90%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(114, 205, 244, 0.28), transparent 70%);
}
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34%;
  background: linear-gradient(rgba(23, 47, 64, 0), var(--night) 85%);
}
.hero-chip-a {
  left: -1%;
  top: 52%;
}
.hero-chip-b {
  right: -1%;
  top: 34%;
  width: 250px;
}

/* Screens rise from the bottom edge of their plate instead of being cut at the top */
.chapter-visual {
  align-items: start;
  padding-top: 9%;
}
.chapter-visual .screen {
  width: 50%;
}
.chapter-visual.pair {
  align-items: flex-start;
}

/* Wider surah map on the Koran page */
.surah-map.wide {
  grid-template-columns: repeat(38, minmax(0, 1fr));
  gap: 6px;
}

/* Features page: group content beside a sticky screen */
.feature-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 56px;
  align-items: start;
}
.feature-group-head {
  display: block;
}
.feature-group > .screen {
  position: sticky;
  top: 108px;
}

/* Plain text jump links */
.jump {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin-top: 36px;
  font-size: 15px;
}
.jump a {
  color: var(--ink);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 6px;
}
.jump a:hover {
  text-decoration-color: currentColor;
}

@media (max-width: 960px) {
  .arch-wrap .chip-card {
    display: none;
  }
  .surah-map.wide {
    grid-template-columns: repeat(19, minmax(0, 1fr));
  }
  .feature-group {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature-group > .screen {
    display: none;
  }
}

/* Long Dutch compounds ("Gebruiksvoorwaarden") must not push the page sideways */
h1,
h2 {
  overflow-wrap: break-word;
}
@media (max-width: 640px) {
  h1,
  h2 {
    hyphens: auto;
  }
}

/* ---------- Legal documents and support ---------- */
.doc-hero {
  padding-bottom: clamp(40px, 5vw, 72px);
}
.doc-meta {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 18px;
}
.doc-summary-title {
  font-size: clamp(26px, 2.6vw, 34px);
  margin-bottom: 20px;
}
.doc-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.doc-summary > div {
  background: var(--card);
  border-radius: var(--radius);
  padding: 26px 26px 28px;
  box-shadow: var(--shadow-card);
}
.doc-summary h3 {
  margin-bottom: 8px;
}
.doc-summary p {
  font-size: 15px;
}
.doc-summary-note {
  margin-top: 16px;
}
.doc-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}
.doc-toc {
  position: sticky;
  top: 100px;
  font-size: 14.5px;
}
.doc-toc p {
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.doc-toc ol {
  list-style: none;
  padding: 0;
  counter-reset: toc;
  border-left: 1px solid var(--line);
}
.doc-toc li {
  counter-increment: toc;
}
.doc-toc a {
  display: flex;
  gap: 12px;
  padding: 7px 0 7px 18px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--muted);
  text-decoration: none;
  transition:
    color 0.2s,
    border-color 0.2s;
}
.doc-toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-variant-numeric: tabular-nums;
  color: var(--line-strong);
}
.doc-toc a:hover,
.doc-toc a.active {
  color: var(--ink);
  border-left-color: var(--blue);
}
.doc-toc a.active::before {
  color: var(--blue);
}
.doc-body {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 5vw, 64px);
  max-width: 820px;
}
.doc-section {
  scroll-margin-top: 100px;
}
.doc-section + .doc-section {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--paper-2);
}
.doc-section h2 {
  font-size: clamp(24px, 2.4vw, 30px);
  letter-spacing: -0.012em;
  margin-bottom: 14px;
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.doc-section h2 span {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.doc-section p,
.doc-section li {
  font-size: 16px;
  line-height: 1.7;
}
.doc-section p + p {
  margin-top: 12px;
}
.doc-section ul {
  padding-left: 1.2em;
  margin: 12px 0 16px;
}
.doc-section li + li {
  margin-top: 6px;
}
.doc-section li::marker {
  color: var(--blue);
}
.doc-section a,
.doc-end a:not(.link),
.help-card p a {
  color: var(--blue);
  text-underline-offset: 3px;
}
.doc-end {
  margin-top: clamp(48px, 6vw, 80px);
  padding-top: 40px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px 64px;
}
.doc-end h2 {
  font-size: clamp(26px, 2.6vw, 34px);
  margin-bottom: 12px;
}
.doc-end ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
  align-content: start;
}

.notice {
  margin-top: 36px;
  max-width: 40em;
  background: #fff1de; /* warningBackground */
  color: #7a3a07;
  border-radius: var(--radius-control);
  padding: 16px 20px;
  font-size: 15px;
}
.notice strong {
  color: #b54708; /* warning */
}
.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.help-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(28px, 3.5vw, 44px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  scroll-margin-top: 100px;
}
.help-card .glyph,
.help-availability .glyph {
  width: 40px;
  height: 40px;
  padding: 9px;
  box-sizing: content-box;
  background: var(--mist);
  border-radius: var(--radius-control);
  margin-bottom: 24px;
}
.help-card h2,
.help-availability h2 {
  font-size: clamp(24px, 2.2vw, 28px);
  letter-spacing: -0.012em;
  margin-bottom: 12px;
}
.help-card p {
  font-size: 15.5px;
}
.help-card > :last-child {
  margin-top: auto;
  padding-top: 24px;
}
.help-availability {
  margin-top: 16px;
  display: flex;
  gap: 24px;
  align-items: flex-start;
  background: var(--paper-2);
  border-radius: var(--radius);
  padding: clamp(28px, 3.5vw, 44px);
}
.help-availability .glyph {
  background: var(--card);
  margin-bottom: 0;
  flex: none;
}

@media (max-width: 960px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .doc-toc {
    position: static;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 22px 24px;
  }
  .doc-summary,
  .help-grid,
  .doc-end {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .doc-body {
    padding: 26px 20px;
    border-radius: 22px;
  }
  .help-availability {
    flex-direction: column;
  }
}

/* Footer logo: dark-background variant, slightly larger */

/* ---------- App stores and web login ---------- */
.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 8px 20px 8px 16px;
  border-radius: var(--radius-control);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  transition: background 0.2s;
}
.store:hover {
  background: var(--night-2);
}
.store svg {
  width: 24px;
  height: 24px;
  flex: none;
}
.store span {
  display: flex;
  flex-direction: column;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.store small {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0;
  opacity: 0.8;
}

.nav-foot .nav-apps {
  display: none;
}

/* Homepage app band */
.app-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px 64px;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: clamp(32px, 5vw, 72px) clamp(28px, 5vw, 72px) 0;
  overflow: hidden;
}
.app-band-copy {
  padding-bottom: clamp(32px, 5vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.app-band-copy h2 {
  margin-bottom: -4px;
}
.app-band-screens {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 20px;
  align-self: end;
  height: clamp(300px, 34vw, 440px);
  overflow: hidden;
}
.app-band-screens .screen {
  width: 46%;
  max-width: 230px;
}
.app-band-screens .screen:last-child {
  margin-top: 48px;
}

@media (max-width: 960px) {
  .nav-foot .nav-apps {
    display: flex;
  }
  .app-band {
    grid-template-columns: minmax(0, 1fr);
  }
  .app-band-screens {
    height: 300px;
  }
}
@media (max-width: 640px) {
  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stores {
    width: 100%;
  }
  .store {
    flex: 1 1 160px;
    justify-content: center;
    padding-inline: 12px;
  }
}

/* ---------- Fully rounded controls and chips ---------- */
.button,
.store,
.field input,
.field select {
  border-radius: 999px;
}
.field input,
.field select {
  padding-inline: 20px;
}
.field select {
  background-position: right 20px center;
}
.store {
  padding: 8px 24px 8px 20px;
}
.menu-toggle {
  border-radius: 50%;
}
.chip-card {
  border-radius: 20px;
  padding: 16px 18px;
}
.chip-card .bar {
  border-radius: 999px;
}
.chip-card .dots i {
  border-radius: 50%;
}
.nav-foot {
  align-items: center;
}

/* Continuous (squircle) corners on card surfaces, like the app's borderCurve: continuous.
   Browsers without corner-shape keep the regular radius above. */
@supports (corner-shape: squircle) {
  .chip-card {
    border-radius: 32px;
    corner-shape: squircle;
  }
  .form,
  .surah-card,
  .app-band,
  .doc-summary > div,
  .doc-body,
  .doc-toc,
  .help-card,
  .help-availability,
  .trust,
  .cta,
  .chapter-visual,
  .day-stage,
  .notice {
    corner-shape: squircle;
    border-radius: 40px;
  }
}

/* ---------- Language switch ---------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.lang-switch {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--paper-2);
  flex: none;
}
.lang-switch a {
  min-width: 38px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  color: var(--muted);
  text-decoration: none;
  transition:
    background 0.2s,
    color 0.2s;
}
.lang-switch a:hover {
  color: var(--ink);
}
.lang-switch a[aria-current="true"] {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-card);
}
.header-inner {
  gap: 20px;
}
.nav .button {
  margin-left: 8px;
}
@media (max-width: 960px) {
  .header-inner {
    gap: 12px;
  }
}

.notice-info {
  background: var(--mist);
  color: var(--text);
}
.notice-info a {
  color: var(--blue);
  font-weight: 600;
  text-underline-offset: 3px;
}
