/* Ameen site. Tokens mirror the app (lib/colors.dart): containers, text,
   income/expense colours, 15-18px radii, soft shadows, Inter type. */
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --brand: #0F5C4D;
  --brand-soft: #d6ebe5;
  --on-brand: #ffffff;
  --bg: #ffffff;
  --canvas: #F7F7F7;
  --container: #F3F3F3;
  --container-heavy: #EBEBEB;
  --text: #000000;
  --text-light: #6b6b6b; /* app uses #888, darkened for WCAG AA on the web */
  --income: #59A849;
  --expense: #CA5A5A;
  --shadow: 0 0 20px rgba(90, 90, 90, 0.18);
  --radius: 18px;
  --radius-sm: 15px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --brand: #6fc2ad;
    --brand-soft: #173b33;
    --on-brand: #06231d;
    --bg: #000000;
    --canvas: #161616;
    --container: #242424;
    --container-heavy: #444444;
    --text: #ffffff;
    --text-light: #9a9a9a;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.ms { font-family: "Material Symbols Rounded"; font-variation-settings: "FILL" 1, "wght" 500; font-weight: normal; font-style: normal; line-height: 1; letter-spacing: normal; display: inline-block; white-space: nowrap; direction: ltr; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; }

/* Header */
header.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(12px); }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 21px; text-decoration: none; }
.logo img { width: 34px; height: 34px; border-radius: 9px; }
nav.links { display: flex; gap: 22px; align-items: center; font-size: 15px; }
nav.links a { text-decoration: none; color: var(--text-light); }
nav.links a:hover { color: var(--text); }
@media (max-width: 640px) { nav.links a.hide-sm { display: none; } }

/* Buttons, same pill shape as app buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 15px; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.secondary { background: var(--container); color: var(--text); }
.btn .ms { font-size: 22px; }

/* Hero */
.hero { padding: 64px 0 40px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 62px); line-height: 1.05; margin: 0 0 18px; letter-spacing: -0.02em; }
.hero h1 .accent { color: var(--brand); }
.hero p.lead { font-size: 19px; color: var(--text-light); margin: 0 0 28px; max-width: 30em; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .note { font-size: 13px; color: var(--text-light); margin-top: 14px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; padding-top: 36px; } }

/* App surface: a live recreation of the app's home page */
.device { background: var(--bg); border-radius: 32px; box-shadow: var(--shadow); border: 1px solid var(--container-heavy); padding: 22px 16px 18px; max-width: 400px; width: 100%; justify-self: center; }
.device h3.page { font-size: 30px; margin: 4px 6px 14px; }
.cards { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.cards::-webkit-scrollbar { display: none; }
.wallet { flex: 0 0 auto; min-width: 128px; background: var(--container); border-radius: 15px; padding: 12px 16px; position: relative; border: 2px solid transparent; cursor: pointer; transition: border-color .3s; }
.wallet.selected { border-color: color-mix(in srgb, var(--wc) 70%, transparent); }
.wallet .name { font-weight: 700; font-size: 15px; padding-right: 18px; }
.wallet .amt { font-weight: 700; font-size: 16px; }
.wallet .cnt { font-size: 12px; color: var(--text-light); }
.wallet .ico { position: absolute; top: 9px; right: 9px; color: var(--wc); font-size: 20px; }
.box { background: var(--container); border-radius: 15px; padding: 16px; text-align: center; }
.box .label { font-weight: 700; font-size: 16px; }
.box .val { font-weight: 700; font-size: 20px; line-height: 1.3; }
.box .sub { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.income { color: var(--income); }
.expense { color: var(--expense); }

/* Settings-style switch, like SettingsContainerSwitch */
.setting { display: flex; align-items: center; gap: 12px; padding: 12px 6px; margin-top: 10px; }
.setting .ms { font-size: 24px; color: var(--brand); }
.setting .t { flex: 1; }
.setting .t b { display: block; font-size: 15px; }
.setting .t span { font-size: 12px; color: var(--text-light); }
.switch { width: 50px; height: 30px; border-radius: 99px; background: var(--container-heavy); position: relative; cursor: pointer; border: 0; padding: 0; transition: background .25s; flex: 0 0 auto; }
.switch::after { content: ""; position: absolute; top: 4px; left: 4px; width: 22px; height: 22px; border-radius: 50%; background: var(--text-light); transition: transform .25s, background .25s; }
.switch[aria-checked="true"] { background: var(--brand); }
.switch[aria-checked="true"]::after { transform: translateX(20px); background: var(--on-brand); }

/* Sections */
section.block { padding: 72px 0; }
section.block.alt { background: var(--canvas); }
.eyebrow { color: var(--brand); font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; margin: 8px 0 14px; letter-spacing: -0.015em; }
p.sec { color: var(--text-light); font-size: 17px; max-width: 34em; margin: 0 0 30px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split.flip > :first-child { order: 2; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split.flip > :first-child { order: 0; } }
.panel { background: var(--bg); border-radius: 22px; box-shadow: var(--shadow); border: 1px solid var(--container-heavy); padding: 18px; }

/* Accounts page with groups */
.group-h { display: flex; justify-content: space-between; align-items: flex-start; padding: 12px 8px 6px; }
.group-h b { color: var(--brand); font-size: 15px; }
.group-h small { display: block; color: var(--text-light); font-size: 12px; }
.group-h .tot { text-align: right; font-weight: 700; font-size: 15px; }
.acct { display: flex; align-items: center; gap: 12px; background: var(--container); border-radius: 18px; padding: 12px 16px; margin: 6px 0; border-left: 5px solid var(--wc); }
.acct .ms { color: var(--wc); font-size: 24px; }
.acct .n { flex: 1; font-weight: 700; }
.acct .a { font-weight: 700; }
.total-h { display: flex; justify-content: space-between; padding: 4px 8px 6px; font-weight: 700; font-size: 18px; }
.total-h .tot { text-align: right; }

/* Icon picker */
.picker-search { display: flex; align-items: center; gap: 10px; background: var(--container); border-radius: 15px; padding: 0 14px; }
.picker-search input { flex: 1; border: 0; background: transparent; padding: 13px 0; font: inherit; color: var(--text); outline: none; }
.chips { display: flex; gap: 8px; margin: 12px 0 6px; }
.chip { padding: 6px 14px; border-radius: 10px; border: 1px solid var(--container-heavy); font-size: 14px; background: transparent; color: var(--text); font-family: inherit; }
.chip.on { background: var(--container-heavy); border-color: transparent; }
.grid-icons { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; max-height: 250px; overflow-y: auto; padding: 4px; }
.grid-icons button { aspect-ratio: 1; border-radius: 50%; border: 2px solid transparent; background: color-mix(in srgb, var(--brand-soft) 70%, transparent); color: var(--brand); cursor: pointer; display: grid; place-items: center; }
.grid-icons button .ms { font-size: 24px; }
.grid-icons button.on { border-color: var(--brand); }
.picked { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
.picked .tile { width: 56px; height: 56px; border-radius: 15px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.picked .tile .ms { font-size: 30px; }
.picked b { font-size: 22px; }

/* Feature list */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 860px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--container); border-radius: 18px; padding: 20px; }
.feature .ms { font-size: 30px; color: var(--brand); }
.feature h3 { margin: 10px 0 6px; font-size: 18px; }
.feature p { margin: 0; color: var(--text-light); font-size: 15px; }

/* Dirham strip */
.dirham { font-size: clamp(56px, 10vw, 110px); font-weight: 700; color: var(--brand); line-height: 1; }

/* CTA + footer */
.cta { text-align: center; }
.cta img { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); }
footer { padding: 40px 0 56px; color: var(--text-light); font-size: 14px; }
footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { text-decoration: none; }
footer a:hover { color: var(--text); }

/* Legal / FAQ pages */
.doc { max-width: 760px; padding: 40px 20px 20px; margin: 0 auto; }
.doc h1 { font-size: 40px; margin: 0 0 6px; }
.doc .updated { color: var(--text-light); margin-bottom: 30px; }
.doc h2 { font-size: 22px; margin: 34px 0 8px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 82%, var(--text-light)); }
details.q { background: var(--container); border-radius: 15px; padding: 4px 18px; margin: 10px 0; }
details.q summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
details.q summary::after { content: "expand_more"; font-family: "Material Symbols Rounded"; font-size: 24px; color: var(--text-light); transition: transform .2s; }
details.q[open] summary::after { transform: rotate(180deg); }
details.q p { margin: 0 0 14px; }
