/* Chiroq website
   One theme by design: the brand is a lamp at night, so the page is night.
   Tokens follow the app's own design system (Commissioner, Amiri, Vollkorn italic for transliteration). */

:root {
  --night: #0C1430;
  --night-deep: #080E24;
  --raised: #121C3D;
  --raised-2: #182450;
  --line: rgba(236, 231, 218, 0.12);
  --line-strong: rgba(236, 231, 218, 0.22);
  --text: #ECE7DA;
  --muted: #A9B0C9;
  --lamp: #F0B35A;
  --lamp-soft: rgba(240, 179, 90, 0.14);
  --ink: #1A1405;

  --r-cell: 28px;
  --r-pill: 999px;

  --f-sans: "Commissioner", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-ar: "Amiri", "Noto Naskh Arabic", serif;
  --f-voice: "Vollkorn", Georgia, serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; }
a { color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3 { margin: 0; font-weight: 600; text-wrap: balance; }

.i { width: 1.25em; height: 1.25em; flex: none; fill: currentColor; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding-inline: clamp(20px, 5vw, 48px); }

.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; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 30; background: var(--lamp); color: var(--ink); padding: 10px 16px; border-radius: 12px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

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

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: var(--r-pill);
  font: 600 16px/1 var(--f-sans); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .15s var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn--primary { background: var(--lamp); color: var(--ink); }
.btn--primary:hover { background: #F6C376; }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: rgba(236, 231, 218, 0.45); }
.btn--line { border-color: rgba(240, 179, 90, 0.4); color: var(--lamp); background: transparent; }
.btn--line:hover { background: var(--lamp-soft); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.actions--center { justify-content: center; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(12, 20, 48, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { height: 68px; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 20px; letter-spacing: -0.02em; }
.brand .mark { width: 34px; height: 34px; border-radius: 9px; }
.brand--sm .mark { width: 28px; height: 28px; border-radius: 7px; }
.brand--sm { font-size: 17px; }
.nav__links { display: flex; gap: 4px; margin-left: 16px; }
.nav__links a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; padding: 12px 12px; border-radius: 10px; transition: color .2s; }
.nav__links a:hover { color: var(--text); }
.nav__end { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: var(--r-pill); }
.lang button {
  min-width: 44px; min-height: 38px; padding: 0 10px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--muted); font: 600 13px/1 var(--f-sans); letter-spacing: 0.04em; cursor: pointer;
  transition: background-color .2s, color .2s;
}
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--raised-2); color: var(--text); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(40px, 7vw, 88px) 0 clamp(72px, 9vw, 120px); }
.hero__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero h1 { font-size: clamp(44px, 6.2vw, 80px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 600; max-width: 11ch; }
.lede { margin-top: 24px; font-size: clamp(18px, 1.5vw, 20px); line-height: 1.6; color: var(--muted); max-width: 36ch; }
.hero .actions { margin-top: 36px; }

/* phone: a working mini preview of the app */
.preview { position: relative; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.preview::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 42%; width: 780px; height: 780px; transform: translate(-50%, -50%); pointer-events: none; background: radial-gradient(closest-side, rgba(240, 179, 90, 0.22), rgba(240, 179, 90, 0.07) 45%, transparent 72%); }
.hero__grid { isolation: isolate; }
.phone {
  width: min(340px, 100%); padding: 11px; border-radius: 50px;
  background: linear-gradient(160deg, #1E2A55, #111A38);
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 90px -30px rgba(3, 6, 20, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.phone__screen {
  position: relative; min-height: 560px; border-radius: 40px; overflow: hidden;
  background: radial-gradient(120% 70% at 50% 0%, #1B2756 0%, #0E1633 60%);
  display: grid;
}
.screen { grid-area: 1 / 1; padding: 44px 26px 32px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 12px; }
.screen[hidden] { display: none; }
.screen__label { font-size: 13px; font-weight: 600; color: var(--lamp); }
.screen__title { font-size: 22px; font-weight: 600; letter-spacing: -0.01em; }
.ar { font-family: var(--f-ar); font-size: 30px; line-height: 1.75; color: var(--text); margin-top: 8px; }
.ar--lg { font-size: 36px; }
.tr { font-family: var(--f-voice); font-style: italic; font-size: 18px; line-height: 1.4; color: #E9C78F; }
.mean { font-size: 16px; line-height: 1.55; color: var(--muted); max-width: 26ch; }
.src { font-size: 13px; color: #8E96B3; }
.chip { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-pill); background: var(--lamp-soft); color: var(--lamp); font-size: 14px; font-weight: 600; }
.notice {
  align-self: stretch; display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 16px; border-radius: 20px; margin-bottom: 18px;
  background: rgba(236, 231, 218, 0.07); border: 1px solid var(--line);
}
.notice .i { width: 30px; height: 30px; color: var(--lamp); }
.notice__t { font-size: 14px; font-weight: 600; }
.notice__s { font-size: 13px; color: var(--muted); }
.play { margin-top: 12px; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--lamp); color: var(--ink); }

.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: var(--r-pill); background: rgba(236, 231, 218, 0.05); border: 1px solid var(--line); max-width: 100%; overflow-x: auto; }
.tabs button {
  min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: transparent;
  color: var(--muted); font: 600 14px/1 var(--f-sans); cursor: pointer; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--lamp-soft); color: var(--lamp); }

/* ---------- section heads ---------- */
.h2 { font-size: clamp(32px, 4.2vw, 52px); line-height: 1.08; letter-spacing: -0.03em; max-width: 18ch; }

/* ---------- inside / bento ---------- */
.inside { padding: clamp(72px, 9vw, 128px) 0; border-top: 1px solid var(--line); }
.bento { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; }
.cell { border-radius: var(--r-cell); padding: clamp(24px, 3vw, 36px); display: flex; flex-direction: column; gap: 14px; position: relative; overflow: hidden; }
.cell h3 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; }
.cell__p { color: var(--muted); font-size: 16px; line-height: 1.6; max-width: 46ch; }
.cell > .i, .cell__head > .i, .cell--mosque__copy > .i { width: 28px; height: 28px; color: var(--lamp); }
.cell__head { display: flex; flex-direction: column; gap: 14px; }

.cell--memo { grid-column: 1 / 5; background: var(--raised); border: 1px solid var(--line); }
.memo { margin-top: auto; padding: 28px 24px 20px; border-radius: 20px; background: var(--night-deep); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.memo__ar { font-family: var(--f-ar); font-size: clamp(26px, 3vw, 34px); line-height: 1.9; text-align: center; }
.memo__ar .w { display: inline-block; padding: 0 2px; transition: color .35s var(--ease), background-size .35s var(--ease); background: linear-gradient(var(--lamp), var(--lamp)) no-repeat 50% 88% / 0% 2px; }
.memo__ar .w.is-hidden { color: transparent; background-size: 80% 2px; }
.memo__mean { text-align: center; color: var(--muted); font-size: 15px; }
.memo__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 6px; flex-wrap: wrap; }
.memo__steps { display: flex; gap: 6px; }
.memo__steps span { width: 18px; height: 4px; border-radius: 2px; background: var(--line-strong); transition: background-color .3s; }
.memo__steps span.on { background: var(--lamp); }

.cell--calm { grid-column: 5 / 7; background: var(--lamp); color: var(--ink); }
.cell--calm > .i { color: var(--ink); }
.cell--calm .cell__p { color: rgba(26, 20, 5, 0.78); }
.cell--calm blockquote { margin: auto 0 0; padding-top: 18px; border-top: 1px solid rgba(26, 20, 5, 0.2); }
.cell--calm blockquote p { font-size: 24px; line-height: 1.3; font-weight: 600; letter-spacing: -0.015em; }
.cell--calm cite { display: block; margin-top: 10px; font-style: normal; font-size: 14px; color: rgba(26, 20, 5, 0.72); }

.cell--adab { grid-column: 1 / 3; background: var(--raised-2); }
.topics { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.topics li { display: flex; align-items: center; gap: 12px; padding: 10px 0; font-size: 15px; font-weight: 500; }
.topics li + li { border-top: 1px solid var(--line); }
.topics .i { width: 22px; height: 22px; padding: 3px; border-radius: 50%; background: var(--lamp-soft); color: var(--lamp); }
.topics .ring { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-strong); }
.topics li:not(.is-done) { color: var(--muted); }

.cell--mosque { grid-column: 3 / 7; flex-direction: row; align-items: stretch; gap: 32px; background: linear-gradient(180deg, var(--raised) 0%, var(--night-deep) 100%); border: 1px solid var(--line); padding-bottom: 0; }
.cell--mosque__copy { display: flex; flex-direction: column; gap: 14px; padding-bottom: clamp(24px, 3vw, 36px); flex: 1 1 auto; }
.arch { flex: 0 0 200px; display: flex; align-items: flex-end; justify-content: center; padding-top: 8px; position: relative; }
.arch::before { content: ""; position: absolute; left: 50%; bottom: 40px; width: 220px; height: 220px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(240, 179, 90, 0.22), transparent 70%); pointer-events: none; }
.arch img { position: relative; width: 150px; height: auto; margin-bottom: -6px; }

/* ---------- name ---------- */
.name { padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--line); }
.name__inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.name__word { font-size: clamp(88px, 17vw, 236px); line-height: 0.9; font-weight: 700; letter-spacing: -0.055em; color: var(--lamp); padding-bottom: 0.08em; }
.name__text { font-size: clamp(19px, 2vw, 24px); line-height: 1.5; max-width: 34ch; color: var(--text); }

/* ---------- languages ---------- */
.langs { padding: clamp(72px, 9vw, 120px) 0; background: var(--night-deep); }
.langs__p { margin-top: 18px; color: var(--muted); font-size: 18px; max-width: 46ch; }
.langs__row { margin-top: clamp(40px, 5vw, 64px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.langs__row figure { margin: 0; padding: 8px clamp(20px, 3vw, 40px) 8px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.langs__row figure:first-child { padding-left: 0; border-left: 0; }
.langs__row blockquote { margin: 0; font-size: clamp(24px, 2.6vw, 34px); line-height: 1.2; letter-spacing: -0.02em; font-weight: 500; }
.langs__row figcaption { font-size: 14px; color: var(--muted); }

/* ---------- privacy ---------- */
.privacy { padding: clamp(72px, 9vw, 128px) 0; }
.privacy__grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.privacy__head { display: flex; flex-direction: column; gap: 18px; }
.privacy__head > .i { width: 32px; height: 32px; color: var(--lamp); }
.privacy__lede { color: var(--muted); font-size: 18px; max-width: 32ch; }
.facts { margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 40px; }
.facts div { padding-top: 20px; border-top: 1px solid var(--line-strong); }
.facts dt { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.facts dd { margin: 8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* ---------- download ---------- */
.download { position: relative; padding: clamp(80px, 10vw, 140px) 0; border-top: 1px solid var(--line); overflow: hidden; }
.download::before { content: ""; position: absolute; left: 50%; top: 40px; width: 640px; height: 640px; transform: translateX(-50%); pointer-events: none; background: radial-gradient(closest-side, rgba(240, 179, 90, 0.16), transparent 70%); }
.download__inner { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.download__mark .mark { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 30px 70px -20px rgba(240, 179, 90, 0.35); }
.download .h2 { margin-top: 12px; max-width: 16ch; }
.download__p { color: var(--muted); font-size: 18px; }
.download .actions { margin-top: 12px; }
.store {
  display: inline-flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 22px 0 18px;
  border-radius: 16px; background: var(--text); color: var(--night); text-decoration: none;
  transition: transform .15s var(--ease), background-color .2s;
}
.store:hover { background: #FFFFFF; }
.store:active { transform: translateY(1px); }
.store .i { width: 28px; height: 28px; }
.store span { display: flex; flex-direction: column; align-items: flex-start; font-size: 18px; font-weight: 600; line-height: 1.1; letter-spacing: -0.01em; }
.store small { font-size: 11px; font-weight: 500; letter-spacing: 0.01em; opacity: 0.75; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); background: var(--night-deep); }
.foot__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; padding-block: 28px; }
.foot__links { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.foot__links a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-size: 15px; padding: 12px; border-radius: 10px; }
.foot__links a:hover { color: var(--text); }
.foot__links .i { width: 18px; height: 18px; }
.foot__c { color: #8E96B3; font-size: 14px; }

/* ---------- motion: one load sequence + responses to actions ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__copy > *, .js .preview { opacity: 0; }
  .js.is-ready .hero__copy > * { animation: rise .9s var(--ease) forwards; }
  .js.is-ready .hero__copy > :nth-child(2) { animation-delay: .08s; }
  .js.is-ready .hero__copy > :nth-child(3) { animation-delay: .16s; }
  .js.is-ready .preview { animation: rise 1s var(--ease) .22s forwards; }
  .screen.is-active { animation: fade .35s var(--ease); }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell--memo { grid-column: 1 / 3; }
  .cell--calm, .cell--adab { grid-column: auto; }
  .cell--mosque { grid-column: 1 / 3; }
}
@media (max-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 13ch; }
  .privacy__grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__inner { gap: 12px; }
  .bento { grid-template-columns: minmax(0, 1fr); }
  .cell--memo, .cell--calm, .cell--adab, .cell--mosque { grid-column: auto; }
  .cell--mosque { flex-direction: column; gap: 8px; }
  .arch { flex-basis: auto; }
  .langs__row { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .langs__row figure { padding: 0; border-left: 0; padding-top: 24px; border-top: 1px solid var(--line); }
  .langs__row figure:first-child { padding-top: 0; border-top: 0; }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .foot__links { margin-left: 0; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .nav .btn--sm { display: none; }
  .hero .actions .btn { flex: 1 1 100%; }
  .phone__screen { min-height: 500px; }
  .tabs button { padding: 0 12px; }
  .store { flex: 1 1 100%; justify-content: center; }
}
