/* ============================================================
   أنا وصحتي / Sehti and Me — Marketing Website Styles
   Custom styles on top of Tailwind CSS
   Brand: Medical Green #10B981 · White · Light Gray
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --brand: #3F8464;
  --brand-600: #256B4D;
  --brand-700: #1B5540;
  --brand-800: #154434;
  --brand-50: #DEEDE3;
  --amber: #F59E0B;
  --red: #EF4444;
  --ink: #1C2B24;
  --cream: #F6F1E5;
  --cream-soft: #FBF8F1;
  --surface: #FFFFFF;
  --surface-alt: #FBF8F1;
  --ring: rgba(27, 85, 64, .45);
}

html { scroll-behavior: smooth; }
/* Respect users who prefer reduced motion (WCAG 2.1) */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  font-family: 'Almarai', 'Inter', system-ui, -apple-system, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { font-family: 'Inter', 'Almarai', system-ui, sans-serif; }

/* Display typeface for headings, buttons & key UI — professional geometric Arabic */
h1, h2, h3, h4, .btn, .nav-link, .section-eyebrow, .badge-popular,
.stat-value, .step-num, .faq-q, .chip {
  font-family: 'Alexandria', 'Almarai', 'Inter', system-ui, sans-serif;
}
h1, h2 { letter-spacing: -0.01em; }

/* Marker-style highlight under the hero tagline */
.hero-hl {
  background: linear-gradient(to top, rgba(63, 132, 100, .22) 26%, transparent 26%);
  padding-inline: .08em;
  border-radius: .1em;
}
.dark .hero-hl { background: linear-gradient(to top, rgba(63, 132, 100, .35) 26%, transparent 26%); }

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 100;
  background: var(--brand-600);
  color: #fff;
  padding: .6rem 1.2rem;
  border-radius: .75rem;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: .5rem;
}

/* ---------- Header ---------- */
.site-header {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(246, 241, 229, .85);
  border-bottom: 1px solid rgba(27, 85, 64, .08);
  transition: box-shadow .3s ease, background .3s ease;
}
.dark .site-header {
  background: rgba(10, 15, 13, .82);
  border-bottom-color: rgba(255, 255, 255, .07);
}
.site-header.scrolled { box-shadow: 0 6px 24px -12px rgba(21, 68, 52, .2); }

.nav-link {
  position: relative;
  padding-block: .35rem;
  transition: color .2s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  transform: scaleX(0);
  transition: transform .25s ease;
}
.nav-link:hover::after, .nav-link:focus-visible::after, .nav-link.active::after { transform: scaleX(1); }

/* ---------- Buttons & micro-interactions ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-weight: 700;
  border-radius: 1rem;
  padding: .85rem 1.6rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  will-change: transform;
}
.btn:active { transform: scale(.97); }
.btn-primary {
  background: var(--brand-700);
  color: #fff;
  box-shadow: 0 12px 26px -12px rgba(21, 68, 52, .65);
}
.btn-primary:hover { background: var(--brand-800); transform: translateY(-2px); box-shadow: 0 18px 32px -12px rgba(21, 68, 52, .7); }
.btn-secondary {
  background: transparent;
  color: var(--brand-700);
  border: 2px solid rgba(27, 85, 64, .35);
}
.btn-secondary:hover { background: var(--brand-50); border-color: var(--brand); transform: translateY(-2px); }
.dark .btn-secondary { color: #9AC4AA; border-color: rgba(154, 196, 170, .35); }
.dark .btn-secondary:hover { background: rgba(63, 132, 100, .14); }

/* ---------- Hero ---------- */
.hero-bg {
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(27, 85, 64, .10), transparent 60%),
    radial-gradient(40rem 30rem at 0% 110%, rgba(224, 212, 184, .35), transparent 60%);
}
.dark .hero-bg {
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgba(63, 132, 100, .10), transparent 60%),
    radial-gradient(40rem 30rem at 0% 110%, rgba(63, 132, 100, .05), transparent 60%);
}
/* Watercolor skyline artwork at the bottom of the hero (brand illustration) */
.hero-skyline {
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: clamp(180px, 26vw, 340px);
  background: url('assets/skyline-art.jpg') bottom center / cover no-repeat;
  pointer-events: none;
  /* soft fade into the cream background at the top of the artwork */
  -webkit-mask-image: linear-gradient(to top, #000 62%, transparent 100%);
  mask-image: linear-gradient(to top, #000 62%, transparent 100%);
}
.dark .hero-skyline { opacity: .16; }

/* Phone mockup frame */
.phone {
  width: min(320px, 78vw);
  aspect-ratio: 412 / 915;
  border-radius: 2.6rem;
  padding: .55rem;
  background: linear-gradient(160deg, #1E3B31, #0E2018);
  box-shadow:
    0 30px 60px -20px rgba(14, 32, 24, .5),
    0 0 0 1px rgba(255, 255, 255, .08) inset;
  position: relative;
}
.dark .phone { background: linear-gradient(160deg, #2A4A3C, #08130E); }
.phone::before { /* speaker notch */
  content: "";
  position: absolute;
  top: 1.05rem;
  left: 50%;
  transform: translateX(-50%);
  width: 34%;
  height: .55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .85);
  z-index: 2;
}
.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 2.05rem;
  display: block;
}
.phone-float { animation: floaty 6s ease-in-out infinite; }
@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(-.6deg); }
}

/* Floating decision chips around the hero phone */
.chip {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .8rem;
  font-weight: 700;
  padding: .5rem .85rem;
  border-radius: 999px;
  background: var(--surface);
  box-shadow: 0 12px 30px -12px rgba(21, 68, 52, .3);
  border: 1px solid rgba(27, 85, 64, .1);
  animation: chipfloat 5s ease-in-out infinite;
}
.dark .chip { background: #132018; border-color: rgba(255, 255, 255, .08); color: #E7F6EE; }
.chip .dot { width: .6rem; height: .6rem; border-radius: 999px; flex: none; }
.chip-green .dot { background: var(--brand); box-shadow: 0 0 0 4px rgba(63, 132, 100, .2); }
.chip-amber .dot { background: var(--amber); box-shadow: 0 0 0 4px rgba(245, 158, 11, .18); }
.chip-red .dot { background: var(--red); box-shadow: 0 0 0 4px rgba(239, 68, 68, .18); }
@keyframes chipfloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid rgba(27, 85, 64, .12);
  border-radius: 1.4rem;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 48px -20px rgba(21, 68, 52, .2);
  border-color: rgba(27, 85, 64, .35);
}
.dark .card { background: #101915; border-color: rgba(255, 255, 255, .07); }
.dark .card:hover { box-shadow: 0 24px 48px -20px rgba(0, 0, 0, .55); border-color: rgba(63, 132, 100, .45); }

.feature-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--brand-50);
  color: var(--brand-700);
  transition: transform .25s ease, background .25s ease;
}
.card:hover .feature-icon { transform: scale(1.08) rotate(-4deg); background: var(--brand-700); color: #fff; }
.dark .feature-icon { background: rgba(63, 132, 100, .16); color: #9AC4AA; }

/* ---------- How it works ---------- */
.step-line {
  position: absolute;
  top: 2.1rem;
  inset-inline: 12%;
  height: 3px;
  background: linear-gradient(90deg, rgba(27,85,64,.12), rgba(27,85,64,.45), rgba(27,85,64,.12));
  border-radius: 3px;
}
.step-num {
  width: 4.2rem;
  height: 4.2rem;
  display: grid;
  place-items: center;
  margin-inline: auto;
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-700);
  background: var(--surface);
  border: 3px solid rgba(27, 85, 64, .4);
  box-shadow: 0 10px 24px -12px rgba(21, 68, 52, .45);
  position: relative;
  z-index: 1;
  transition: transform .25s ease, background .25s, color .25s;
}
.step:hover .step-num { transform: scale(1.1); background: var(--brand-700); color: #fff; }
.dark .step-num { background: #101915; color: #9AC4AA; }

/* ---------- Screenshots gallery ---------- */
.gallery {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  padding: 1.5rem .5rem 2rem;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: var(--brand) transparent;
}
.gallery > figure { scroll-snap-align: center; flex: none; }
.shot {
  width: 218px;
  border-radius: 1.6rem;
  border: 6px solid #14251E;
  box-shadow: 0 20px 40px -18px rgba(14, 32, 24, .45);
  transition: transform .3s ease;
}
.dark .shot { border-color: #2A4A3C; }
figure:hover .shot { transform: translateY(-8px) scale(1.02); }

/* ---------- Pricing ---------- */
.plan-popular {
  border-width: 2px;
  border-color: var(--brand-700);
  box-shadow: 0 24px 60px -24px rgba(21, 68, 52, .4);
  position: relative;
}
.badge-popular {
  position: absolute;
  top: -0.95rem;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
  color: #fff;
  font-size: .8rem;
  font-weight: 800;
  padding: .35rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 8px 20px -8px rgba(21, 68, 52, .6);
}
.plan-check { color: var(--brand-600); flex: none; margin-top: .2rem; }
.dark .plan-check { color: #9AC4AA; }

/* ---------- FAQ accordion ---------- */
.faq-item { overflow: hidden; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: start;
  font-weight: 700;
  padding: 1.15rem 1.4rem;
  cursor: pointer;
}
.faq-q .faq-icon { transition: transform .3s ease; flex: none; color: var(--brand-600); }
.faq-item.open .faq-q .faq-icon { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.faq-a > div { padding: 0 1.4rem 1.25rem; }

/* ---------- Forms ---------- */
.field {
  width: 100%;
  border-radius: .9rem;
  border: 1.5px solid rgba(27, 85, 64, .18);
  background: var(--surface);
  padding: .8rem 1rem;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field:focus { border-color: var(--brand-700); box-shadow: 0 0 0 4px rgba(27, 85, 64, .14); outline: none; }
.field.invalid { border-color: var(--red); }
.field.invalid:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .12); }
.dark .field { background: #0D1512; border-color: rgba(255, 255, 255, .12); color: #EAF3ED; }
.field-error { color: var(--red); font-size: .8rem; margin-top: .35rem; min-height: 1.1rem; }

/* ---------- Cookie banner & toast ---------- */
.cookie-banner {
  position: fixed;
  bottom: 1rem;
  inset-inline: 1rem;
  z-index: 90;
  max-width: 34rem;
  margin-inline: auto;
  border-radius: 1.25rem;
  background: var(--surface);
  border: 1px solid rgba(27, 85, 64, .14);
  box-shadow: 0 24px 60px -20px rgba(21, 68, 52, .35);
  padding: 1.15rem 1.3rem;
  transform: translateY(150%);
  transition: transform .45s cubic-bezier(.2, .9, .3, 1.1);
}
.cookie-banner.show { transform: translateY(0); }
.dark .cookie-banner { background: #101915; border-color: rgba(255, 255, 255, .1); }

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translate(-50%, 150%);
  z-index: 95;
  background: var(--ink);
  color: #fff;
  padding: .85rem 1.4rem;
  border-radius: 1rem;
  box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .5);
  transition: transform .4s cubic-bezier(.2, .9, .3, 1.1);
  max-width: min(92vw, 30rem);
  text-align: center;
}
.toast.show { transform: translate(-50%, 0); }
.dark .toast { background: var(--brand-700); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: .1s; }
.reveal-delay-2 { transition-delay: .2s; }
.reveal-delay-3 { transition-delay: .3s; }

/* ---------- Stats counters ---------- */
.stat-value {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 800;
  color: var(--brand-600);
  line-height: 1.1;
}
.dark .stat-value { color: #9AC4AA; }

/* ---------- Theme & language toggles ---------- */
.icon-btn {
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: .9rem;
  border: 1px solid rgba(27, 85, 64, .18);
  transition: background .2s ease, transform .2s ease, border-color .2s;
}
.icon-btn:hover { background: var(--brand-50); border-color: rgba(27, 85, 64, .4); transform: translateY(-1px); }
.dark .icon-btn { border-color: rgba(255, 255, 255, .14); color: #EAF3ED; }
.dark .icon-btn:hover { background: rgba(63, 132, 100, .14); }

/* Show/hide sun & moon inside theme toggle */
.icon-sun { display: none; }
.dark .icon-sun { display: block; }
.dark .icon-moon { display: none; }

/* ---------- Decision legend (traffic light) ---------- */
.legend-row {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .9rem 1.1rem;
  border-radius: 1rem;
  border: 1px solid rgba(27, 85, 64, .12);
  background: var(--surface);
  transition: transform .2s ease;
}
.legend-row:hover { transform: translateX(-4px); }
html[dir="ltr"] .legend-row:hover { transform: translateX(4px); }
.dark .legend-row { background: #101915; border-color: rgba(255, 255, 255, .07); }

/* ---------- Footer ---------- */
.social-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: .9rem;
  background: rgba(255, 255, 255, .07);
  color: #CBD5E1;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.social-btn:hover { background: var(--brand-500, #3F8464); color: #fff; transform: translateY(-3px); }

/* ---------- Utility ---------- */
.section-eyebrow {
  display: inline-block;
  font-weight: 700;
  font-size: .85rem;
  color: var(--brand-700);
  background: var(--brand-50);
  border: 1px solid rgba(27, 85, 64, .22);
  padding: .3rem 1rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}
.dark .section-eyebrow { color: #9AC4AA; background: rgba(63, 132, 100, .12); }

/* Riyal symbol sizing */
.price-currency { font-size: .55em; font-weight: 700; }

/* Official Saudi Riyal symbol (2025) — CSS mask so it inherits the price text color in both themes/languages */
.riyal {
  display: inline-block;
  width: .6em;
  height: .67em;
  background-color: currentColor;
  -webkit-mask: url("assets/riyal.svg") no-repeat center / contain;
  mask: url("assets/riyal.svg") no-repeat center / contain;
  vertical-align: -.045em;
  margin-inline-start: .14em;
}
/* smaller inline variant for helper lines (tag/period) */
.riyal-sm { width: .52em; height: .58em; vertical-align: -.03em; margin-inline-start: .1em; }

/* Mirror directional icons in RTL */
html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

/* ============================================================
   Live decision demo (ported & restyled from the marketing build)
   ============================================================ */
.demo-wrap { display: grid; grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
@media (min-width: 900px) { .demo-wrap { grid-template-columns: .82fr 1.18fr; } }

.demo-meals { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.demo-meal {
  cursor: pointer; text-align: center; padding: 1rem .4rem; border-radius: 1.1rem;
  border: 1.5px solid rgba(27, 85, 64, .16); background: var(--surface);
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.demo-meal:hover { transform: translateY(-3px); }
.demo-meal.active { border-color: var(--brand-700); background: var(--brand-50); box-shadow: 0 10px 24px -14px rgba(21, 68, 52, .5); }
.dark .demo-meal { background: #101915; border-color: rgba(255, 255, 255, .08); }
.dark .demo-meal.active { background: rgba(63, 132, 100, .16); border-color: #3F8464; }
.demo-meal .emoji { font-size: 1.75rem; line-height: 1; }
.demo-meal b { display: block; margin-top: .4rem; font-size: .92rem; color: var(--ink); }
.dark .demo-meal b { color: #EAF3ED; }
.demo-meal small { display: block; margin-top: .15rem; color: #6b7e75; font-size: .78rem; }
.dark .demo-meal small { color: #9fb3aa; }

.demo-panel { position: relative; border-radius: 1.4rem; padding: 1.5rem; background: var(--surface); border: 1px solid rgba(27, 85, 64, .12); min-height: 20rem; }
.dark .demo-panel { background: #101915; border-color: rgba(255, 255, 255, .07); }
.demo-selected { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; min-height: 16rem; gap: .5rem; }
.demo-selected .big { font-size: 2.6rem; }
.demo-selected b { font-size: 1.25rem; color: var(--ink); }
.dark .demo-selected b { color: #EAF3ED; }
.demo-selected p { color: #6b7e75; font-size: .9rem; }

.demo-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 16rem; gap: 1rem; color: var(--brand-700); }
.dark .demo-loading { color: #9AC4AA; }
.demo-spin { width: 3rem; height: 3rem; border: 3px solid rgba(63, 132, 100, .25); border-top-color: var(--brand-700); border-radius: 999px; animation: demospin 1s linear infinite; }
.dark .demo-spin { border-top-color: #9AC4AA; }
@keyframes demospin { to { transform: rotate(360deg); } }

.demo-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.demo-result-head h4 { font-size: 1.4rem; font-weight: 800; color: var(--ink); }
.dark .demo-result-head h4 { color: #fff; }
.verdict-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .45rem .85rem; border-radius: 999px; font-weight: 800; font-size: .85rem; white-space: nowrap; }
.verdict-badge.suitable { color: #0b513b; background: #d8efdf; }
.verdict-badge.caution { color: #77560e; background: #f6e8bf; }
.verdict-badge.notRecommended { color: #8a2724; background: #f6d8d5; }
.dark .verdict-badge.suitable { color: #b8f0cf; background: rgba(63,132,100,.22); }
.dark .verdict-badge.caution { color: #f4d58a; background: rgba(245,158,11,.16); }
.dark .verdict-badge.notRecommended { color: #f6b4af; background: rgba(239,68,68,.18); }

.macro-grid { margin-top: 1.1rem; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid rgba(27,85,64,.12); border-radius: 1rem; overflow: hidden; }
.dark .macro-grid { border-color: rgba(255,255,255,.08); }
.macro-grid > div { padding: .85rem .3rem; text-align: center; border-inline-end: 1px solid rgba(27,85,64,.1); }
.dark .macro-grid > div { border-color: rgba(255,255,255,.06); }
.macro-grid > div:last-child { border-inline-end: 0; }
.macro-grid strong { display: block; font-size: 1.15rem; font-weight: 800; color: var(--brand-700); }
.dark .macro-grid strong { color: #9AC4AA; }
.macro-grid span { font-size: .72rem; color: #6b7e75; }

.demo-note-card { margin-top: .8rem; display: flex; gap: .7rem; padding: .9rem 1rem; border-radius: 1rem; }
.demo-note-card .ic { flex: none; font-size: 1.15rem; }
.demo-note-card b { display: block; font-size: .9rem; color: var(--ink); }
.dark .demo-note-card b { color: #EAF3ED; }
.demo-note-card p { font-size: .85rem; color: #556b62; line-height: 1.6; }
.dark .demo-note-card p { color: #a9bfb5; }
.demo-reason { background: #f4f1e7; }
.demo-alt { background: #e6f1ea; }
.dark .demo-reason { background: rgba(255,255,255,.04); }
.dark .demo-alt { background: rgba(63,132,100,.12); }

.demo-again { margin: 1rem auto 0; display: block; background: none; border: 0; cursor: pointer; font-weight: 800; font-size: .85rem; color: var(--brand-700); border-bottom: 1.5px solid var(--brand); padding-bottom: 2px; }
.dark .demo-again { color: #9AC4AA; }
.demo-live { display: inline-flex; align-items: center; gap: .4rem; font-size: .72rem; font-weight: 800; letter-spacing: .06em; color: var(--brand-700); }
.dark .demo-live { color: #9AC4AA; }
.demo-live .dot { width: .5rem; height: .5rem; border-radius: 999px; background: var(--brand); box-shadow: 0 0 0 4px rgba(63,132,100,.18); }


/* ── Fix (2026-07-21): Tailwind's text-6xl/7xl utilities reset line-height to ~1.0, which cramps
   large Arabic display text — the tashkeel/diacritics of صوّر·افهم·قرّر overlap between lines.
   Restore comfortable line-height for the hero heading and keep the wordmark lines from touching
   at any zoom/width. styles.css loads AFTER tailwind.css so these win. ────────────────────────── */
.hero-bg h1 { line-height: 1.32 !important; }
.hero-bg h1 .hero-hl { line-height: inherit; }
/* brand wordmark: name over sub-name, never overlapping (Arabic ي descender clears the English line) */
header a[aria-label] .flex.flex-col { line-height: 1.3; }
header a[aria-label] [data-i18n="brand"] { line-height: 1.5; display: block; }
header a[aria-label] [data-i18n="brandSub"] { margin-top: 3px; line-height: 1.2; display: block; }
