/* Miftahi website. Colours from the app (src/lib/theme.ts). */
@font-face { font-family: "Nunito"; font-weight: 400; font-display: swap; src: url("/assets/fonts/nunito-400.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 700; font-display: swap; src: url("/assets/fonts/nunito-700.woff2") format("woff2"); }
@font-face { font-family: "Nunito"; font-weight: 800; font-display: swap; src: url("/assets/fonts/nunito-800.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #FFFDF9; --surface: #FFFFFF; --raised: #F6F1EA; --text: #2A2420; --muted: #706860;
  --line: #E3DBD0; --edge: #D8CFC3; --divider: #EAE3DA;
  --accent: #24795D; --on-accent: #FFFFFF; --accent-tint: #E3F4EC; --accent-edge: #1B5B46;
  --gold-tint: #FFF5D6; --gold: #F2B632; --danger: #C3351B; --info-tint: #E7F0FC;
  --radius: 20px; --max: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151311; --surface: #201C19; --raised: #2A2521; --text: #F3EEE8; --muted: #A69C92;
    --line: #3E362F; --edge: #3E362F; --divider: #372F2A;
    --accent: #4FC397; --on-accent: #0F1A16; --accent-tint: #1F3A31; --accent-edge: #3A9A76;
    --gold-tint: #3B3218; --gold: #F5C451; --danger: #F06D55; --info-tint: #1E2D40;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.65 "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 1rem; top: -4rem; background: var(--accent); color: var(--on-accent); padding: 0.6rem 1rem; border-radius: 12px; font-weight: 700; z-index: 10; }
.skip:focus { top: 1rem; }

.wrap { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.wrap-wide { width: min(100% - 2.5rem, 60rem); margin-inline: auto; }

header.top { border-bottom: 2px solid var(--divider); }
header.top .wrap-wide { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 0.9rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
nav.top-links { display: flex; gap: 0.35rem 1.1rem; flex-wrap: wrap; font-weight: 700; font-size: 0.95rem; }
nav.top-links a { color: var(--muted); text-decoration: none; padding: 0.3rem 0; }
nav.top-links a:hover, nav.top-links a[aria-current="page"] { color: var(--text); }
nav.top-links a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--gold); }

main { padding-block: 2.5rem 4rem; }
h1 { font-size: clamp(2rem, 1.5rem + 2.4vw, 2.75rem); line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 0.5rem; }
h2 { font-size: 1.35rem; line-height: 1.3; font-weight: 800; margin: 2.25rem 0 0.6rem; }
h3 { font-size: 1.1rem; font-weight: 800; margin: 0 0 0.3rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.3rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--muted); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 38rem; }
.updated { color: var(--muted); font-size: 0.92rem; margin-bottom: 1.5rem; }

.card { background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); box-shadow: 0 4px 0 var(--edge); padding: 1.25rem 1.35rem; margin: 0 0 1.25rem; }
.card > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0.15rem; }
.kicker + h2, .kicker + h3 { margin-top: 0.15rem; }
.card.accent { background: var(--accent-tint); border-color: var(--accent); box-shadow: 0 4px 0 var(--accent-edge); }
.card.gold { background: var(--gold-tint); border-color: var(--gold); box-shadow: 0 4px 0 var(--gold); }
.card.info { background: var(--info-tint); }
.kicker { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.25rem; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3.1rem; padding: 0.7rem 1.4rem; border-radius: 16px; background: var(--accent); color: var(--on-accent); font-weight: 800; text-decoration: none; box-shadow: 0 4px 0 var(--accent-edge); transition: transform 0.08s, box-shadow 0.08s; }
.button:hover { text-decoration: none; filter: brightness(1.05); }
.button:active { transform: translateY(4px); box-shadow: 0 0 0 var(--accent-edge); }
.button.secondary { background: var(--surface); color: var(--text); border: 2px solid var(--line); box-shadow: 0 4px 0 var(--edge); }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps li { counter-increment: step; position: relative; padding-left: 2.6rem; min-height: 2rem; margin-bottom: 0.8rem; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 800; font-size: 0.95rem; display: grid; place-items: center; }
.path { font-weight: 700; }

.toc { columns: 2 16rem; column-gap: 2rem; padding-left: 1.2rem; font-size: 0.97rem; }
.toc li { break-inside: avoid; margin-bottom: 0.3rem; }
section.legal { border-top: 2px solid var(--divider); }
section.legal:first-of-type { border-top: 0; }
.back-top { font-size: 0.9rem; font-weight: 700; }

.hero { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: center; padding-block: 1rem 2rem; }
.hero img { width: min(200px, 50vw); justify-self: center; }
@media (min-width: 46rem) { .hero { grid-template-columns: 1.4fr 1fr; } .hero img { width: 220px; justify-self: end; } }
.soon { display: inline-flex; align-items: center; gap: 0.5rem; background: var(--gold-tint); border: 2px solid var(--gold); color: var(--text); font-weight: 800; font-size: 0.9rem; border-radius: 999px; padding: 0.35rem 0.9rem; margin-bottom: 1rem; }
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin-top: 1rem; }
.grid .card { margin: 0; }

.center { text-align: center; }
.mt-lg { margin-top: 2rem; }
.mx-auto { margin-inline: auto; }
.justify-center { justify-content: center; }
.center img { margin-inline: auto; }
.actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.25rem 0; }

footer.bottom { border-top: 2px solid var(--divider); color: var(--muted); font-size: 0.92rem; }
footer.bottom .wrap-wide { padding-block: 1.75rem 2.5rem; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; justify-content: space-between; }
footer.bottom nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; }
footer.bottom a { color: var(--muted); }

@media print {
  header.top nav, footer.bottom nav, .skip, .back-top, .toc-card { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .card { box-shadow: none; }
  a { color: #000; }
}
