/* Jamalek landing — base: self-hosted fonts, brand tokens, layout, header, buttons,
   store badges, section scaffolding, reveal-on-scroll and footer. */

@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url(/assets/fonts/tajawal-400-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 400; font-display: swap; src: url(/assets/fonts/tajawal-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url(/assets/fonts/tajawal-500-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 500; font-display: swap; src: url(/assets/fonts/tajawal-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url(/assets/fonts/tajawal-700-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 700; font-display: swap; src: url(/assets/fonts/tajawal-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url(/assets/fonts/tajawal-800-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Tajawal"; font-weight: 800; font-display: swap; src: url(/assets/fonts/tajawal-800-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "El Messiri"; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/el-messiri-arabic.woff2) format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "El Messiri"; font-weight: 400 700; font-display: swap; src: url(/assets/fonts/el-messiri-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* Brand tokens (from app/lib/theme/app_colors.dart) + severity palette. */
:root {
  --cream: #FBF6F4; --cream-2: #F5EAE6; --blush: #E8C5C5; --blush-2: #F3DCDC;
  --rose: #B76E79; --rose-deep: #A8636F; --mauve: #8E5A66; --plum: #6E3F4B; --plum-ink: #2B1A20;
  --ink: #3A2A2E; --muted: #7A6165; --gold: #C9A24B; --gold-soft: #EBDDB5; --white: #fff;
  --sev-a: #4F8A62; --sev-b: #A8636F; --sev-c: #9A6B1F; --sev-d: #B3261E;
  --grad-rose: linear-gradient(135deg, #D69AA3 0%, #B76E79 45%, #8E5A66 100%);
  --grad-hero: linear-gradient(135deg, #A8636F 0%, #8E5A66 55%, #6E3F4B 100%);
  --shadow-sm: 0 2px 10px rgba(110, 63, 75, .08);
  --shadow-md: 0 14px 40px -12px rgba(110, 63, 75, .28);
  --shadow-lg: 0 40px 80px -30px rgba(110, 63, 75, .45);
  --radius: 22px; --radius-lg: 32px;
  --font-body: "Tajawal", "SF Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --font-display: "El Messiri", "Tajawal", serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --header-h: 72px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink); font-family: var(--font-body);
  font-size: 17px; line-height: 1.75; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.3; margin: 0; font-weight: 700; }
p { margin: 0; }
b, strong { font-weight: 700; }
:focus-visible { outline: 3px solid var(--rose); outline-offset: 3px; border-radius: 10px; }
::selection { background: var(--blush); color: var(--plum-ink); }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.icon .fill, symbol .fill { fill: currentColor; stroke: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* Ambient background: three slow blurred blobs + film grain. */
.aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.aurora i { position: absolute; border-radius: 50%; filter: blur(80px); opacity: .55; will-change: transform; animation: drift 26s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { width: 46vmax; height: 46vmax; background: #F2D3D6; top: -14vmax; inset-inline-end: -12vmax; }
.aurora i:nth-child(2) { width: 34vmax; height: 34vmax; background: #F3E5C9; bottom: -10vmax; inset-inline-start: -10vmax; animation-duration: 32s; }
.aurora i:nth-child(3) { width: 26vmax; height: 26vmax; background: #EBC8D2; top: 40%; inset-inline-start: 30%; opacity: .35; animation-duration: 38s; }
.aurora::after {
  content: ""; position: absolute; inset: 0; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift { to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); } }

.scroll-progress { position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 60; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--rose), var(--plum)); transform-origin: right; transform: scaleX(var(--progress, 0)); }

/* Header: transparent over the hero, frosted glass after scrolling. */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h); transition: background .4s, box-shadow .4s, transform .45s var(--ease-out); }
.site-header.is-scrolled { background: rgba(251, 246, 244, .78); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); box-shadow: 0 1px 0 rgba(183, 110, 121, .15); }
.site-header.is-hidden { transform: translateY(-100%); }
.site-header:focus-within { transform: none; }
.header-row { height: 100%; display: flex; align-items: center; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.45rem; font-weight: 700; color: var(--plum); }
.brand img { width: 44px; height: 44px; border-radius: 14px; background: #fff; padding: 3px; box-shadow: var(--shadow-sm); }
.main-nav { display: flex; gap: 4px; margin-inline-start: auto; }
.main-nav a { padding: 8px 12px; border-radius: 999px; font-weight: 500; color: var(--muted); font-size: .95rem; transition: color .25s, background .25s; }
.main-nav a:hover, .main-nav a.is-current { color: var(--plum); background: rgba(232, 197, 197, .45); }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; border-radius: 12px; color: var(--plum); font-size: 1.3rem; }

/* Buttons + store badges. */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-weight: 700; padding: 14px 26px; border: 0; transition: transform .3s var(--ease-out), box-shadow .3s; }
.btn-sm { padding: 10px 18px; font-size: .92rem; }
.btn-primary { background: var(--grad-rose); color: #fff; box-shadow: 0 10px 24px -10px rgba(142, 90, 102, .8); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(142, 90, 102, .9); }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-row.center { justify-content: center; }
.store-badge {
  position: relative; display: inline-flex; align-items: center; gap: 10px; min-width: 180px;
  padding: 10px 18px; border-radius: 16px; background: var(--plum-ink); color: #fff;
  box-shadow: 0 12px 26px -14px rgba(43, 26, 32, .9); transition: transform .35s var(--ease-out), box-shadow .35s;
}
.store-badge .icon { width: 28px; height: 28px; }
.store-badge span { display: flex; flex-direction: column; line-height: 1.2; }
.store-badge small { font-size: .72rem; opacity: .8; }
.store-badge b { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 1.12rem; letter-spacing: .2px; white-space: nowrap; }
.store-badge:hover { transform: translateY(-3px); box-shadow: 0 18px 34px -14px rgba(43, 26, 32, .95); }
.store-badge.light { background: #fff; color: var(--plum-ink); }

/* Section scaffolding. */
.section { position: relative; padding: clamp(72px, 10vw, 128px) 0; }
.section-soft { background: linear-gradient(180deg, rgba(245, 234, 230, 0) 0%, rgba(245, 234, 230, .85) 18%, rgba(245, 234, 230, .85) 82%, rgba(245, 234, 230, 0) 100%); }
.section-plum { background: radial-gradient(120% 90% at 85% 0%, #5A3440 0%, var(--plum-ink) 60%); color: #F6E9EA; }
.section-head { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.section-head.start { text-align: start; margin-inline: 0; }
.section-head h2 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); color: var(--plum-ink); }
.section-plum .section-head h2 { color: #fff; }
.section-head .lede { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }
.section-plum .lede { color: #DCC5C9; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(232, 197, 197, .5); color: var(--mauve); font-weight: 700; font-size: .88rem; }
.section-plum .eyebrow { background: rgba(255, 255, 255, .08); color: var(--gold-soft); }
.grad { background: var(--grad-rose); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-light { background: linear-gradient(120deg, #F3C9CF, var(--gold-soft)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fine { margin-top: 14px; font-size: .86rem; color: var(--muted); }
.note { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 32px; text-align: center; color: var(--muted); font-size: .95rem; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: .88rem; font-weight: 500; }
.pill-soft { margin-top: 22px; background: #fff; color: var(--mauve); box-shadow: var(--shadow-sm); }

/* Severity dots (same palette as the app's grade pills). */
.sev { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sev-a { background: var(--sev-a); } .sev-b { background: var(--sev-b); } .sev-c { background: var(--sev-c); } .sev-d { background: var(--sev-d); }

/* Pointer spotlight: JS sets --mx/--my on hover. */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; opacity: 0; transition: opacity .35s; background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(214, 154, 163, .28), transparent 70%); }
.spot:hover::before { opacity: 1; }

/* Reveal on scroll: only hidden once JS is running (html.js). */
/* Uses an animation on opacity/translate/scale so each element keeps its own hover transitions. */
.js [data-reveal]:not(.is-in) { opacity: 0; }
.js [data-reveal].is-in { animation: revealIn .9s var(--ease-out) backwards; animation-delay: calc(var(--d, 0) * 110ms); }
@keyframes revealIn { from { opacity: 0; translate: 0 28px; scale: .98; filter: blur(6px); } }

/* Footer. */
.site-footer { padding: 48px 0 32px; border-top: 1px solid rgba(183, 110, 121, .18); background: rgba(255, 255, 255, .45); }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer nav a { color: var(--mauve); font-weight: 500; }
.site-footer nav a:hover { color: var(--plum-ink); }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-bottom: 32px; }
.footer-cols nav { display: flex; flex-direction: column; flex-wrap: nowrap; gap: 8px; }
.footer-title { margin: 0 0 4px; font-family: var(--font-display); font-size: 1.1rem; color: var(--plum-ink); }
.disclaimer { margin-top: 22px; color: var(--muted); font-size: .88rem; }
.copy { margin-top: 6px; color: var(--muted); font-size: .82rem; }

/* FAQ: native <details>, height animated by JS when available. */
.faq-wrap { max-width: 860px; }
.faq { display: grid; gap: 12px; }
.faq details { border-radius: 20px; background: #fff; border: 1px solid var(--blush-2); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .3s; }
.faq details[open] { box-shadow: var(--shadow-md); }
.faq summary { position: relative; list-style: none; cursor: pointer; padding: 20px 24px; padding-inline-end: 60px; font-weight: 700; font-size: 1.05rem; color: var(--plum-ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; top: 50%; inset-inline-end: 22px; width: 26px; height: 26px; margin-top: -13px; border-radius: 50%; background: var(--cream-2) no-repeat center / 12px; background-image: linear-gradient(var(--rose), var(--rose)), linear-gradient(var(--rose), var(--rose)); background-size: 12px 2px, 2px 12px; transition: transform .4s var(--ease-out), background-color .3s; }
.faq details[open] summary::after { transform: rotate(135deg); background-color: var(--blush-2); }
.faq details p { padding: 0 24px 22px; color: var(--muted); }
.faq details a { color: var(--rose-deep); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 1080px) {
  .main-nav { position: fixed; inset: var(--header-h) 16px auto; flex-direction: column; gap: 2px; padding: 12px; border-radius: 22px; background: rgba(251, 246, 244, .97); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: .35s var(--ease-out); }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .main-nav a { padding: 12px 16px; font-size: 1.05rem; }
  .menu-toggle { display: inline-flex; }
  .header-cta { margin-inline-start: auto; }
}
@media (max-width: 900px) { .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .faq summary { padding: 18px; padding-inline-end: 54px; font-size: 1rem; }
  .faq details p { padding: 0 18px 18px; }
}
@media (max-width: 480px) {
  body { font-size: 16px; }
  .footer-cols { grid-template-columns: 1fr; }
  .header-cta { display: none; }
  .menu-toggle { margin-inline-start: auto; }
  .store-badge { min-width: 0; flex: 1 1 140px; padding: 10px 12px; gap: 8px; }
  .store-badge b { font-size: 1rem; }
  .store-badge .icon { width: 24px; height: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js [data-reveal]:not(.is-in) { opacity: 1; }
}
