/* Midhana website — shared chrome and tokens.
   Ported from the design board; page-specific layout stays inline in the Blade
   views, exactly as the board authored it. No build step: this file is served
   as-is. Scroll-driven animations (animation-timeline) are progressive — a
   browser without them renders the finished state. */

:root {
  --teal-deep: #0C3A33;
  --teal: #14584E;
  --teal-soft: #7CC3B3;
  --gold: #B08D4C;
  --gold-hover: #C2A468;
  --gold-light: #D6B87D;
  --gold-pale: #E8D2A0;
  --gold-ink: #7C6120;
  --paper: #F6F4EE;
  --paper-2: #EFEBE0;
  --paper-3: #F0E7D1;
  --line: #E4DFD2;
  --line-2: #DDD8CA;
  --line-3: #D9D3C4;
  --ink: #182320;
  --ink-2: #3E4844;
  --ink-3: #61706B;
  --ink-4: #8A8E83;
  --night: #07120F;
  --night-2: #0C1211;
  --mist: #E9F2EE;
  --mist-2: #E9EDE7;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --arabic: 'Amiri', serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--sans); overflow-x: clip; }
img { max-width: 100%; }
h1, h2, h3, p { overflow-wrap: break-word; }
[lang="ar"] { font-family: var(--arabic); }

body.theme-dark { background: var(--night); color: var(--mist-2); }
body.theme-dark a { color: var(--gold-light); }
body.theme-dark a:hover { color: var(--gold-pale); }
body.theme-light { background: var(--paper); color: var(--ink); }
body.theme-light a { color: var(--teal); }
body.theme-light a:hover { color: var(--teal-deep); }

@view-transition { navigation: auto; }

.wrap { max-width: 1180px; margin: 0 auto; }
.pad { padding-left: clamp(20px, 4vw, 32px); padding-right: clamp(20px, 4vw, 32px); }
.eyebrow { font: 500 11.5px var(--mono); letter-spacing: .2em; text-transform: uppercase; color: var(--gold-light); }
.eyebrow--ink { color: var(--gold-ink); }
.eyebrow--muted { color: var(--ink-4); letter-spacing: .16em; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Nav ────────────────────────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 32px);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid color-mix(in oklab, currentColor 10%, transparent);
  color: inherit; background: transparent;
  transition: color .35s ease, background .35s ease;
}
/* On paper pages the nav sits over the teal band in mist; once the band has
   scrolled away it picks up paper ink (site.js toggles .nav--band). */
.nav[data-tone="band"] { color: var(--mist); }
.nav--band { color: var(--ink) !important; background: rgba(246, 244, 238, .86); }

/* Home: the live next-prayer card's rows (filled by site.js). */
.np-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; padding-top: 12px; border-top: 1px solid rgba(233, 242, 238, .1); min-height: 44px; }
.np-row { display: flex; flex-direction: column; gap: 3px; opacity: .62; }
.np-row--active { opacity: 1; }
.np-label { font: 500 10.5px var(--mono); letter-spacing: .08em; color: rgba(233, 237, 231, .7); }
.np-row--active .np-label { color: var(--gold-light); }
.np-time { font: 500 13px var(--sans); font-variant-numeric: tabular-nums; white-space: nowrap; }
.np-locate { appearance: none; border: 0; background: transparent; color: var(--gold-light); font: 500 12.5px var(--sans); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0; }
.np-locate:hover { color: var(--gold-pale); }
.nav__brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit !important; view-transition-name: midhana-logo; }
.nav__brand img { width: 28px; height: 28px; display: block; }
.nav__word { font: 600 17px/1 var(--sans); letter-spacing: -.01em; }
.nav__ar { font: 400 17px/1 var(--arabic); opacity: .7; transform: translateY(1px); }
.nav__links { display: flex; align-items: center; gap: 30px; font: 500 14px var(--sans); }
.nav__links a { color: inherit !important; text-decoration: none; opacity: .68; border-bottom: 1.5px solid transparent; padding-bottom: 3px; }
.nav__links a:hover { opacity: 1; }
.nav__links a[aria-current="page"] { opacity: 1; border-bottom-color: var(--gold); }
.nav__right { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav__menu { position: relative; }
.nav__menu summary { list-style: none; cursor: pointer; width: 38px; height: 38px; border-radius: 12px; border: 1px solid color-mix(in oklab, currentColor 22%, transparent); display: grid; place-items: center; }
.nav__menu summary::-webkit-details-marker { display: none; }
.nav__sheet {
  position: absolute; right: 0; top: 48px; min-width: 230px; padding: 8px; border-radius: 16px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 20px 50px rgba(24, 30, 27, .22), 0 0 0 1px rgba(24, 30, 27, .08);
  display: flex; flex-direction: column; font: 500 15px var(--sans);
}
.nav__sheet a { color: inherit !important; text-decoration: none; padding: 12px 14px; border-radius: 10px; }
.nav__sheet a:hover { background: var(--paper-2); }
@media (max-width: 820px) { .nav__links, .nav__ar, .cta-long { display: none !important; } }
@media (min-width: 821px) { .nav__menu, .cta-short { display: none !important; } }

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 22px; border-radius: 14px; border: 0; font: 600 15px var(--sans); text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.btn--sm { height: 38px; padding: 0 16px; border-radius: 12px; font-size: 13.5px; }
.btn--form { height: 52px; }
.btn--gold { background: var(--gold); color: #1A1508 !important; }
.btn--gold:hover { background: var(--gold-hover); }
.btn--teal { background: var(--teal-deep); color: #F1F7F4 !important; }
.btn--teal:hover { background: var(--teal); }
.btn--ghost-dark { background: transparent; border: 1px solid rgba(233, 242, 238, .22); color: var(--mist-2) !important; font-weight: 500; padding: 0 20px; }
.btn--ghost-dark:hover { border-color: rgba(233, 242, 238, .5); }
.btn--ghost-light { background: transparent; border: 1px solid var(--line-3); color: var(--ink) !important; font-weight: 500; padding: 0 20px; }
.btn--ghost-light:hover { border-color: var(--ink); }
.link-gold { color: var(--gold-light) !important; text-decoration: none; border-bottom: 1px solid rgba(214, 184, 125, .4); padding-bottom: 2px; font: 500 15px var(--sans); }

/* ── Band: the teal header on paper pages ───────────────────────────────── */
.band { background: var(--teal-deep); color: var(--mist); position: relative; overflow: hidden; }
.band a { color: var(--gold-light); }
.band__pattern { position: absolute; inset: 0; opacity: .07; background: url('assets/mark-white.svg') 0 0/104px 104px repeat; mask-image: linear-gradient(180deg, #000, transparent); -webkit-mask-image: linear-gradient(180deg, #000, transparent); pointer-events: none; }
.band__inner { position: relative; max-width: 1180px; margin: 0 auto; padding: 150px clamp(20px, 4vw, 32px) 80px; }
.band__inner--stack { display: flex; flex-direction: column; gap: 18px; }
.band__title { margin: 0; font: 600 clamp(40px, 5.6vw, 72px)/1 var(--sans); letter-spacing: -.03em; text-wrap: balance; }
.band__lede { margin: 0; max-width: 560px; font: 400 clamp(16px, 1.3vw, 18px)/1.6 var(--sans); color: rgba(233, 242, 238, .78); text-wrap: pretty; }

/* ── Two-column article with a sticky contents list ─────────────────────── */
.toc-grid { max-width: 1180px; margin: 0 auto; padding: 72px clamp(20px, 4vw, 32px) 120px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; align-items: start; }
.toc { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 10px; font: 500 14px var(--sans); }
.toc a { color: var(--ink-2) !important; text-decoration: none; }
.toc a:hover { color: var(--teal-deep) !important; }
.article { max-width: 720px; font: 400 16px/1.7 var(--sans); color: var(--ink-2); display: flex; flex-direction: column; gap: 12px; }
.article h2 { margin: 28px 0 0; scroll-margin-top: 96px; font: 600 24px var(--sans); letter-spacing: -.02em; color: var(--ink); }
.article h2:first-child { margin-top: 12px; }
.article p, .article ul { margin: 0; }
.article ul { padding-left: 1.2em; }
.article li { margin-bottom: 6px; }
.article code { font: .9em var(--mono); background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
@media (max-width: 900px) { .toc { display: none !important; } .toc-grid { grid-template-columns: minmax(0, 1fr); } }

/* Data tables: the board's scroll-wrapper on wide screens; stacked cards on phones. */
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--line); background: #fff; margin: 8px 0; }
.table { width: 100%; border-collapse: collapse; font: 400 14.5px/1.5 var(--sans); }
.table thead tr { text-align: left; font: 500 11px var(--mono); letter-spacing: .14em; color: var(--ink-4); text-transform: uppercase; }
.table th { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 500; }
.table td { padding: 12px 18px; border-bottom: 1px solid var(--paper-2); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table td:first-child { font-weight: 600; color: var(--ink); }
@media (max-width: 640px) {
  .table--stack, .table--stack thead, .table--stack tbody, .table--stack tr, .table--stack th, .table--stack td { display: block; }
  .table--stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table--stack tr { padding: 8px 16px; border-bottom: 1px solid var(--line); }
  .table--stack tr:last-child { border-bottom: 0; }
  .table--stack td { border: 0; padding: 6px 0; }
  .table--stack td::before { content: attr(data-label); display: block; color: var(--ink-4); font: 600 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; margin-bottom: 2px; }
}

/* ── FAQ ────────────────────────────────────────────────────────────────── */
.faq { display: flex; flex-direction: column; }
.faq details { border-top: 1px solid var(--line-2); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line-2); }
.faq summary { cursor: pointer; font: 600 16px var(--sans); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--gold); flex: none; }
.faq details[open] summary::after { content: '–'; }
.faq details p { margin: 10px 0 0; font: 400 15px/1.6 var(--sans); color: var(--ink-2); }
.faq--lg details { padding: 18px 0; }
.faq--lg summary { font-size: 17px; }
.faq--dark details { border-color: rgba(233, 242, 238, .12); }
.faq--dark summary::after { color: var(--gold-light); }
.faq--dark details p { color: rgba(233, 237, 231, .7); }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.field { height: 48px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-3); background: var(--paper); font: 400 15px var(--sans); color: var(--ink); outline: none; width: 100%; }
.field:focus { border-color: var(--teal); }
.field--lg { height: 52px; padding: 0 18px; border-radius: 14px; background: #fff; }
.field--dark { border-color: rgba(233, 242, 238, .2); background: rgba(233, 242, 238, .06); color: var(--mist-2); }
.field--dark:focus { border-color: var(--gold-light); }
.field--dark::placeholder { color: rgba(233, 237, 231, .45); }
textarea.field { height: auto; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.label { display: flex; flex-direction: column; gap: 6px; font: 500 13px var(--sans); color: var(--ink-2); }
.email-form { display: flex; gap: 10px; width: 100%; max-width: 480px; flex-wrap: wrap; justify-content: center; }
.email-form .field { flex: 1; min-width: 220px; width: auto; }
.notice { padding: 18px 24px; border-radius: 16px; font: 500 15px/1.5 var(--sans); }
.notice--ok-dark { background: rgba(124, 195, 179, .12); border: 1px solid rgba(124, 195, 179, .3); color: var(--teal-soft); }
.notice--ok-light { background: #E3F0EC; color: var(--teal); }
.notice--err { background: #F3E2DB; color: #7A3A28; }
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Bits ───────────────────────────────────────────────────────────────── */
.phone { aspect-ratio: 390 / 844; border-radius: 46px; background: #0B0F0E; padding: 10px; box-shadow: 0 50px 100px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .08); }
.phone img { width: 100%; height: 100%; border-radius: 37px; display: block; object-fit: cover; }
.phone--light { background: #1D2521; box-shadow: 0 40px 90px rgba(24, 30, 27, .28), 0 0 0 1px rgba(0, 0, 0, .2); }
.phone--sm { border-radius: 42px; padding: 9px; }
.phone--sm img { border-radius: 34px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 12px; font: 500 12.5px var(--sans); border: 1px solid rgba(233, 242, 238, .16); color: rgba(233, 237, 231, .7); }
.pill--live { background: rgba(124, 195, 179, .14); border-color: transparent; color: var(--teal-soft); font-weight: 600; }
.pill--live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--teal-soft); animation: pulse 2.4s ease-in-out infinite; }
.card { padding: 26px; border-radius: 22px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.card--dark { background: rgba(233, 242, 238, .05); border-color: rgba(233, 242, 238, .1); }
.card--sm { padding: 16px; border-radius: 16px; }
.mark-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.mark-list li { display: flex; gap: 12px; align-items: flex-start; }
.mark-list img { width: 16px; height: 16px; margin-top: 4px; flex: none; }
.tile-link { text-decoration: none !important; }
.spec { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0 24px; font: 400 15px/1.5 var(--sans); }
.spec dt, .spec dd { padding: 14px 0; border-top: 1px solid var(--line-2); margin: 0; }
.spec dt { color: var(--ink-3); }
.spec dt:last-of-type, .spec dd:last-of-type { border-bottom: 1px solid var(--line-2); }
.spec--dark dt, .spec--dark dd { border-color: rgba(233, 242, 238, .12); }
.spec--dark dt { color: rgba(233, 237, 231, .55); }
@media (max-width: 480px) { .spec { grid-template-columns: 1fr; } .spec dd { border-top: 0; padding-top: 0; } }
@media (max-width: 760px) { [data-hide-m] { display: none !important; } }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.footer { background: var(--teal-deep); color: var(--mist); font-family: var(--sans); padding: 72px 32px 40px; position: relative; z-index: 1; overflow: hidden; }
.footer__pattern { position: absolute; inset: 0; opacity: .07; background: url('assets/mark-white.svg') 0 0/88px 88px repeat; mask-image: linear-gradient(180deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); pointer-events: none; }
.footer__grid { position: relative; max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 40px 24px; }
.footer__brand { display: flex; flex-direction: column; gap: 16px; grid-column: span 2; }
.footer__col { display: flex; flex-direction: column; gap: 12px; font: 400 14px var(--sans); }
.footer__head { font: 500 11px var(--mono); letter-spacing: .16em; color: var(--gold-light); text-transform: uppercase; margin-bottom: 4px; }
.footer__col a { color: rgba(233, 242, 238, .8) !important; text-decoration: none; }
.footer__col a:hover { color: #fff !important; }
.store { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 11px; border: 1px solid rgba(233, 242, 238, .22); font: 500 12.5px var(--sans); color: rgba(233, 242, 238, .85) !important; text-decoration: none; }
a.store:hover { border-color: rgba(233, 242, 238, .5); color: #fff !important; }
.footer__legal { position: relative; max-width: 1180px; margin: 56px auto 0; padding-top: 22px; border-top: 1px solid rgba(233, 242, 238, .14); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 400 12.5px var(--sans); color: rgba(233, 242, 238, .55); }
@media (max-width: 1040px) { .footer__brand { grid-column: 1 / -1; } }

/* ── Motion ─────────────────────────────────────────────────────────────── */
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(70px); } to { opacity: 1; transform: none; } }
@keyframes para { from { transform: translateY(70px); } to { transform: translateY(-70px); } }
@keyframes paraSm { from { transform: translateY(40px); } to { transform: translateY(-40px); } }
@keyframes paraSlow { from { transform: translateY(30px); } to { transform: translateY(-30px); } }
@keyframes drift { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
@keyframes pulse { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes ring { 0%, 100% { opacity: .25; transform: scale(.96); } 50% { opacity: .7; transform: scale(1); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes wave { 0%, 100% { transform: scaleY(.4); } 50% { transform: scaleY(1); } }
@keyframes sunArc { from { offset-distance: 0%; } to { offset-distance: 100%; } }
@keyframes rotateIn { from { transform: rotate(-30deg); } to { transform: rotate(30deg); } }
/* Home: the sky moves through the day as you scroll. */
@keyframes skyBase { 0% { background-color: #07120F; } 28% { background-color: #0C3A33; } 52% { background-color: #17655A; } 74% { background-color: #2A2A20; } 100% { background-color: #07120F; } }
@keyframes glow { 0% { color: rgba(214, 184, 125, .12); } 28% { color: rgba(124, 195, 179, .22); } 52% { color: rgba(233, 242, 238, .30); } 74% { color: rgba(228, 140, 66, .58); } 100% { color: rgba(214, 184, 125, .16); } }
@keyframes stars { 0% { opacity: .9; } 30% { opacity: 0; } 66% { opacity: 0; } 86% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
