/* Agri AI website — design system and components.
   Colours mirror the app theme (lib/src/core/theme/agri_theme.dart). */
:root {
  --forest: #175c43;
  --forest-deep: #0d3b2b;
  --forest-night: #082619;
  --leaf: #2e8b57;
  --leaf-ink: #1e6e45; /* leaf green dark enough for small text on light backgrounds */
  --lime: #8ccf6a;
  --mint: #d7efd9;
  --mist: #f4f8f3;
  --paper: #fbfaf6;
  --sand: #efe7d6;
  --ink: #13241c;
  --ink-soft: #3d5247;
  --muted: #62756b;
  --sun: #e9a527;
  --clay: #c2603c;
  --line: rgba(19, 36, 28, .12);
  --glass: rgba(255, 255, 255, .1);
  --radius: 22px;
  --radius-lg: 34px;
  --shadow: 0 24px 60px -24px rgba(8, 38, 25, .35);
  --shadow-soft: 0 10px 30px -14px rgba(8, 38, 25, .25);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1180px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Plus Jakarta Sans", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
html[lang="ar"] body { font-family: var(--font-ar); }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.icon { width: 1.25em; height: 1.25em; flex: none; }
[dir="rtl"] .flip { transform: scaleX(-1); }

/* ---------- typography ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--leaf-ink);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: .9rem; }
.eyebrow::before { content: ""; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0; }
html[lang="ar"] :is(h1, h2, h3) { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(2rem, 4.2vw, 3.2rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 750; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); }
.section { padding: clamp(72px, 10vw, 140px) 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head h2 { margin: 14px 0 16px; }
.grad-text {
  background: linear-gradient(100deg, var(--lime), #d9f2a8 45%, var(--sun));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- buttons ---------- */
.btn {
  --bg: var(--forest); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0;
  background: var(--bg); color: var(--fg); font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .3s;
  box-shadow: 0 10px 24px -12px rgba(23, 92, 67, .7);
  position: relative; overflow: hidden; isolation: isolate;
}
.btn::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .35), transparent 60%);
  opacity: 0; transition: opacity .3s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 18px 34px -14px rgba(23, 92, 67, .8); }
.btn:hover::after { opacity: 1; }
.btn-sun { --bg: var(--sun); --fg: var(--forest-night); box-shadow: 0 12px 30px -12px rgba(233, 165, 39, .8); }
.btn-ghost { --bg: transparent; --fg: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }
.btn-light { --bg: #fff; --fg: var(--forest); }
.btn .icon { width: 20px; height: 20px; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  transition: background .4s var(--ease), box-shadow .4s, color .4s, transform .4s var(--ease);
  color: #fff;
}
.site-header.scrolled, .site-header.solid {
  background: rgba(251, 250, 246, .82); color: var(--ink);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.hide { transform: translateY(-100%); }
.nav { display: flex; align-items: center; gap: 18px; height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; text-decoration: none; white-space: nowrap; flex: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; }
.nav-links { display: flex; gap: 4px; margin-inline-start: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a {
  display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .93rem; white-space: nowrap;
  opacity: .85; transition: opacity .2s, background .2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; background: rgba(127, 170, 140, .18); }
.nav-tools { display: flex; align-items: center; gap: 10px; flex: none; }
.nav .btn { white-space: nowrap; }
.lang {
  display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(127, 170, 140, .18);
}
.lang button {
  border: 0; background: none; cursor: pointer; padding: 6px 11px; border-radius: 999px; font-weight: 700; font-size: .82rem;
}
.lang button[aria-pressed="true"] { background: #fff; color: var(--forest); box-shadow: var(--shadow-soft); }
.nav .btn { min-height: 44px; padding: 0 18px; font-size: .95rem; }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.menu-toggle .icon { width: 28px; height: 28px; }

@media (max-width: 1180px) {
  .nav-links {
    position: fixed; inset: 76px 12px auto; flex-direction: column; gap: 2px; padding: 12px;
    background: #fff; color: var(--ink); border-radius: 22px; box-shadow: var(--shadow);
    transform-origin: top; transform: scaleY(.9) translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .35s var(--ease), opacity .25s;
  }
  .nav-links a { padding: 14px 16px; font-size: 1.05rem; }
  .menu-open .nav-links { transform: none; opacity: 1; pointer-events: auto; }
  .menu-toggle { display: inline-flex; }
  .nav-tools { margin-inline-start: auto; }
  .nav .btn-download { display: none; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: 100svh; color: #fff; overflow: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(140, 207, 106, .35), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(46, 139, 87, .45), transparent 60%),
    linear-gradient(180deg, var(--forest-night) 0%, var(--forest-deep) 55%, var(--forest) 100%);
  display: flex; align-items: center; padding: 120px 0 0;
}
.hero canvas.pollen { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-grid {
  position: relative; z-index: 2; display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center;
  padding-bottom: clamp(140px, 18vw, 230px);
}
.hero h1 { margin: 18px 0 22px; }
.hero .lead { color: rgba(255, 255, 255, .78); max-width: 560px; }
.hero .eyebrow { color: var(--lime); }
.rotator { display: inline-grid; vertical-align: bottom; }
.rotator > span {
  grid-area: 1 / 1; opacity: 0; transform: translateY(.45em); filter: blur(6px);
  transition: opacity .6s var(--ease), transform .6s var(--ease), filter .6s;
}
.rotator > span.on { opacity: 1; transform: none; filter: none; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 34px; padding: 0; list-style: none; color: rgba(255, 255, 255, .8); font-size: .95rem; }
.hero-trust li { display: inline-flex; align-items: center; gap: 8px; }
.hero-trust .icon { color: var(--lime); }
.landscape { position: absolute; inset: auto 0 -1px; z-index: 1; pointer-events: none; }
.landscape svg { width: 100%; height: auto; }
.landscape .layer { transition: transform .2s linear; will-change: transform; }

/* phone mockup */
.phone-stage { position: relative; display: grid; place-items: center; perspective: 1400px; }
.phone {
  --w: min(300px, 70vw);
  position: relative; width: var(--w); aspect-ratio: 1080 / 2340; border-radius: calc(var(--w) * .15);
  padding: calc(var(--w) * .035); background: linear-gradient(145deg, #2a3a33, #0b1511 60%, #26352e);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .12) inset, 0 50px 90px -30px rgba(0, 0, 0, .7), 0 30px 50px -40px rgba(140, 207, 106, .5);
  transform-style: preserve-3d; transition: transform .6s var(--ease);
}
.phone::before { /* camera */
  content: ""; position: absolute; top: calc(var(--w) * .055); left: 50%; width: calc(var(--w) * .035); aspect-ratio: 1;
  border-radius: 50%; background: #05100b; transform: translateX(-50%); z-index: 3; box-shadow: 0 0 0 2px #1b2a23;
}
.phone .screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--w) * .12); overflow: hidden; background: var(--mist); }
.phone .screen img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top;
  opacity: 0; transform: scale(1.03); transition: opacity .7s var(--ease), transform 1.2s var(--ease);
}
.phone .screen img.on { opacity: 1; transform: none; }
.phone .glare {
  position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 2;
  background: linear-gradient(115deg, rgba(255, 255, 255, .16), transparent 35%);
}
.chip {
  position: absolute; z-index: 4; display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: rgba(255, 255, 255, .92); color: var(--ink); box-shadow: var(--shadow); font-size: .86rem; line-height: 1.25; max-width: 230px;
  animation: float 6s ease-in-out infinite; backdrop-filter: blur(10px);
}
.chip b { display: block; font-size: .92rem; }
.chip small { color: var(--muted); }
.chip .dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; color: #fff; }
.chip .dot .icon { width: 20px; height: 20px; }
.chip.c1 { top: 12%; inset-inline-start: -8%; }
.chip.c2 { top: 46%; inset-inline-end: -12%; animation-delay: -2s; }
.chip.c3 { bottom: 12%; inset-inline-start: -4%; animation-delay: -4s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
.dots { display: flex; gap: 8px; justify-content: center; margin-top: 22px; }
.dots button { width: 8px; height: 8px; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .35); cursor: pointer; transition: width .4s var(--ease), background .3s; padding: 0; }
.dots button[aria-current="true"] { width: 26px; background: var(--lime); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-cta, .hero-trust { justify-content: center; }
  .chip.c1 { inset-inline-start: -2%; } .chip.c2 { inset-inline-end: -4%; } .chip.c3 { inset-inline-start: 0; }
}
@media (max-width: 480px) { .chip { font-size: .78rem; max-width: 180px; padding: 8px 10px; } .chip .dot { width: 30px; height: 30px; } }

/* ---------- ribbon ---------- */
.ribbon { background: var(--forest); color: #fff; overflow: hidden; padding: 18px 0; position: relative; z-index: 2; }
.ribbon-track { display: flex; gap: 48px; width: max-content; animation: marquee 38s linear infinite; }
.ribbon-track span { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.05rem; white-space: nowrap; opacity: .9; }
.ribbon-track .icon { color: var(--lime); }
@keyframes marquee { to { transform: translateX(-50%); } }
[dir="rtl"] .ribbon-track { animation-name: marquee-rtl; }
@keyframes marquee-rtl { to { transform: translateX(50%); } }

/* ---------- story (sticky phone) ---------- */
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.story-phone { position: sticky; top: 110px; display: grid; place-items: center; }
.story-phone .phone { --w: min(320px, 72vw); background: linear-gradient(145deg, #34453d, #111c17 60%, #2c3c34); }
.story-steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.story-step {
  min-height: 70vh; display: flex; flex-direction: column; justify-content: center; padding: 20px 0;
  color: var(--muted); transition: color .5s var(--ease), transform .5s var(--ease); transform: translateX(-10px);
}
[dir="rtl"] .story-step { transform: translateX(10px); }
.story-step.on { color: var(--ink); transform: none; }
.story-step:not(.on) .num { filter: grayscale(1); opacity: .6; }
.story-step .num {
  counter-increment: step; display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
  background: var(--mint); color: var(--forest); margin-bottom: 18px;
}
.story-step .num .icon { width: 26px; height: 26px; }
.story-step h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin-bottom: 14px; }
.story-step p { max-width: 470px; }
.story-step.on p { color: var(--ink-soft); }
.story-step ul { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.story-step li { display: flex; gap: 10px; align-items: flex-start; }
.story-step li .icon { color: var(--leaf); margin-top: 3px; }
.story-step:not(.on) li .icon { color: var(--muted); }
.story-rail { position: absolute; inset-inline-start: -28px; top: 0; bottom: 0; width: 3px; border-radius: 3px; background: var(--line); }
.story-rail i { display: block; width: 100%; height: var(--p, 0%); background: linear-gradient(var(--lime), var(--leaf)); border-radius: inherit; }
.story-steps-wrap { position: relative; }
@media (max-width: 900px) {
  .story { grid-template-columns: 1fr; }
  .story-phone { top: 84px; z-index: 1; }
  .story-phone .phone { --w: min(210px, 52vw); }
  .story-step { min-height: auto; padding: 36px 20px; margin: 0 -4px 18px; border-radius: 24px; background: rgba(251, 250, 246, .94); backdrop-filter: blur(10px); position: relative; z-index: 2; opacity: 1; transform: none; box-shadow: var(--shadow-soft); }
  .story-rail { display: none; }
}

/* ---------- scanner demo ---------- */
.demo { background: linear-gradient(180deg, var(--mist), var(--paper)); }
.demo-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 36px; align-items: center; }
.demo-card {
  position: relative; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow); padding: 22px; overflow: hidden;
}
.leaf-stage { position: relative; border-radius: 24px; overflow: hidden; background: radial-gradient(circle at 50% 40%, #e9f5e1, #cfe6c5); aspect-ratio: 4 / 3.2; }
.leaf-stage svg { width: 100%; height: 100%; }
.scanline {
  position: absolute; inset-inline: 0; top: 0; height: 90px; opacity: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(140, 207, 106, .55) 85%, #eaffd2 100%);
  border-bottom: 2px solid #eaffd2; filter: drop-shadow(0 0 12px rgba(140, 207, 106, .9));
}
.scanning .scanline { animation: scan 1.6s var(--ease) 2; opacity: 1; }
@keyframes scan { from { transform: translateY(-90px); } to { transform: translateY(calc(100cqh + 10px)); } }
.leaf-stage { container-type: size; }
.hit { opacity: 0; transform-origin: center; transform-box: fill-box; transition: opacity .4s, transform .5s var(--ease); transform: scale(.6); }
.found .hit { opacity: 1; transform: none; }
.found .hit:nth-of-type(2) { transition-delay: .15s; } .found .hit:nth-of-type(3) { transition-delay: .3s; }
.demo-result { display: grid; gap: 14px; }
.meter { display: flex; align-items: center; gap: 18px; }
.ring { --v: 0; width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--leaf) calc(var(--v) * 1%), var(--mint) 0); position: relative; }
.ring::before { content: ""; position: absolute; inset: 9px; border-radius: 50%; background: #fff; }
.ring b { position: relative; font-size: 1.5rem; font-weight: 800; color: var(--forest); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; background: #efe6f7; color: #6a4b98; }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.result-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 16px; background: var(--mist);
  opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.found .result-list li { opacity: 1; transform: none; }
.found .result-list li:nth-child(2) { transition-delay: .12s; } .found .result-list li:nth-child(3) { transition-delay: .24s; }
.result-list .n { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--leaf); color: #fff; display: grid; place-items: center; font-size: .8rem; font-weight: 800; }
.disclaimer { font-size: .86rem; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.demo-card:not(.found) .meter > div:last-child { visibility: hidden; } /* revealed by the analysis */
.demo-out { transition: opacity .5s, filter .5s; }
@media (max-width: 900px) { .demo-grid { grid-template-columns: 1fr; } }

/* ---------- weather ---------- */
.weather { background: var(--forest-night); color: #fff; overflow: hidden; }
.weather .lead { color: rgba(255, 255, 255, .75); }
.weather .eyebrow { color: var(--lime); }
.weather-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: center; }
.forecast {
  border-radius: var(--radius-lg); padding: 26px; background: linear-gradient(160deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1);
}
.forecast svg { width: 100%; height: auto; overflow: visible; }
.forecast .curve { stroke-dasharray: 1400; stroke-dashoffset: 1400; transition: stroke-dashoffset 2.2s var(--ease); }
.in .forecast .curve { stroke-dashoffset: 0; }
.forecast .bar { transform-box: fill-box; transform-origin: bottom; transform: scaleY(0); transition: transform 1s var(--ease); }
.in .forecast .bar { transform: none; }
.days { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: .82rem; color: rgba(255, 255, 255, .7); margin-top: 8px; }
.windows { display: grid; gap: 10px; margin-top: 22px; }
.window { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: center; font-size: .9rem; }
.window .track { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; }
.window .track i { height: 14px; border-radius: 4px; background: rgba(255, 255, 255, .12); transform: scaleY(.3); transition: transform .5s var(--ease), background .5s; }
.in .window .track i { transform: none; }
.window .track i.ok { background: var(--lime); }
.window .track i.mid { background: var(--sun); }
.window .track i.no { background: rgba(194, 96, 60, .75); }
.alerts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.alert { display: inline-flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); font-size: .9rem; }
.alert b { color: var(--sun); }
@media (max-width: 900px) { .weather-grid { grid-template-columns: 1fr; } .window { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- bento features ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.tile {
  position: relative; grid-column: span 2; border-radius: var(--radius); padding: 28px; background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-soft);
  overflow: hidden; transition: transform .5s var(--ease), box-shadow .5s var(--ease);
  --rx: 0deg; --ry: 0deg; transform: perspective(900px) rotateX(var(--rx)) rotateY(var(--ry));
}
.tile:hover { box-shadow: 0 1px 0 var(--line), var(--shadow); }
.tile.wide { grid-column: span 3; }
.tile.dark { background: linear-gradient(150deg, var(--forest), var(--forest-deep)); color: #fff; }
.tile.dark p { color: rgba(255, 255, 255, .78); }
.tile.sun { background: linear-gradient(150deg, #fff4dc, #fbe3ad); }
.tile .ic { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; background: var(--mint); color: var(--forest); margin-bottom: 18px; }
.tile.dark .ic { background: rgba(255, 255, 255, .12); color: var(--lime); }
.tile .ic .icon { width: 26px; height: 26px; }
.tile h3 { margin-bottom: 8px; }
.tile p { margin: 0; color: var(--ink-soft); }
.tile::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(140, 207, 106, .18), transparent 60%);
}
.tile:hover::after { opacity: 1; }
.langs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.langs span { padding: 6px 12px; border-radius: 999px; background: rgba(255, 255, 255, .12); font-weight: 600; font-size: .9rem; }
.wave { display: flex; align-items: center; gap: 4px; height: 44px; margin-top: 18px; }
.wave i { width: 5px; border-radius: 5px; background: var(--leaf); height: 20%; animation: wave 1.2s ease-in-out infinite; }
@keyframes wave { 0%, 100% { height: 18%; } 50% { height: 100%; } }
@media (max-width: 980px) { .bento { grid-template-columns: 1fr 1fr; } .tile, .tile.wide { grid-column: span 1; } }
@media (max-width: 620px) { .bento { grid-template-columns: 1fr; } }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 980px; margin-inline: auto; }
.plan { border-radius: var(--radius-lg); padding: 34px; background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-soft); position: relative; }
.plan.featured { background: linear-gradient(160deg, var(--forest), var(--forest-night)); color: #fff; box-shadow: var(--shadow); }
.plan .tag { position: absolute; top: 22px; inset-inline-end: 22px; padding: 6px 12px; border-radius: 999px; background: var(--sun); color: var(--forest-night); font-weight: 800; font-size: .78rem; }
.plan h3 { font-size: 1.7rem; }
.plan > p { color: var(--ink-soft); margin: 8px 0 22px; }
.plan.featured > p { color: rgba(255, 255, 255, .75); }
.plan ul { list-style: none; margin: 0 0 28px; padding: 0; display: grid; gap: 12px; }
.plan li { display: flex; gap: 12px; align-items: flex-start; }
.plan li .icon { color: var(--leaf); margin-top: 2px; }
.plan.featured li .icon { color: var(--lime); }
.plan li.off { color: var(--muted); }
.plan li.off .icon { color: var(--muted); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* ---------- testimonials ---------- */
.quotes { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.quotes-track { display: flex; gap: 20px; width: max-content; animation: marquee 60s linear infinite; padding: 10px 0 30px; }
.quotes:hover .quotes-track { animation-play-state: paused; }
[dir="rtl"] .quotes-track { animation-name: marquee-rtl; }
.quote { width: 360px; border-radius: var(--radius); padding: 26px; background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-soft); }
.quote p { margin: 0 0 18px; font-size: 1.02rem; }
.quote footer { display: flex; align-items: center; gap: 12px; font-size: .9rem; color: var(--muted); }
.quote .av { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--leaf), var(--forest)); }
.quote b { color: var(--ink); display: block; }
.stars { color: var(--sun); letter-spacing: 2px; font-size: .95rem; margin-bottom: 10px; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.stat { border-radius: var(--radius); padding: 26px; background: var(--mist); min-width: 0; }
.stat b { display: block; font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 800; color: var(--forest); line-height: 1.1; overflow-wrap: anywhere; }
.stat span { color: var(--ink-soft); }
@media (max-width: 860px) { .stats { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .stat { padding: 20px 16px; } }

/* ---------- faq ---------- */
.faq { max-width: 820px; margin-inline: auto; display: grid; gap: 12px; }
.faq details { border-radius: 20px; background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-soft); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 22px 24px; font-weight: 700; display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: transform .35s var(--ease); color: var(--leaf); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .answer { padding: 0 24px 22px; color: var(--ink-soft); }

/* ---------- final cta ---------- */
.cta-band {
  position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: clamp(40px, 7vw, 80px); color: #fff;
  background: radial-gradient(700px 400px at 90% 10%, rgba(140, 207, 106, .4), transparent 60%), linear-gradient(135deg, var(--forest), var(--forest-night));
  display: grid; grid-template-columns: 1.2fr .8fr; gap: 30px; align-items: center;
}
.cta-band p { color: rgba(255, 255, 255, .78); }
.cta-band .phone { --w: 230px; margin-inline: auto; transform: rotate(-6deg) translateY(40px); }
.cta-rings { position: absolute; inset: 0; pointer-events: none; }
@media (max-width: 820px) { .cta-band { grid-template-columns: 1fr; text-align: center; } .cta-band .hero-cta { justify-content: center; } .cta-band .phone { display: none; } }

/* ---------- page hero (inner pages) ---------- */
.page-hero {
  color: #fff; padding: 150px 0 90px; position: relative; overflow: hidden;
  background: radial-gradient(900px 400px at 85% 0%, rgba(140, 207, 106, .35), transparent 60%), linear-gradient(180deg, var(--forest-night), var(--forest));
}
.page-hero .lead { color: rgba(255, 255, 255, .78); max-width: 680px; }
.page-hero .eyebrow { color: var(--lime); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin: 16px 0 18px; }
.page-hero .contours { position: absolute; inset: 0; opacity: .18; pointer-events: none; }

/* ---------- generic cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.card { border-radius: var(--radius); padding: 28px; background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-soft); }
.card .ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--mint); color: var(--forest); margin-bottom: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; color: var(--ink-soft); }
.card ul { margin: 14px 0 0; padding-inline-start: 18px; color: var(--ink-soft); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; color: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(46, 139, 87, .15); }
.form-status { min-height: 1.5em; font-weight: 600; }
.form-status.ok { color: var(--leaf); } .form-status.err { color: var(--clay); }
.hp { position: absolute; inset-inline-start: -9999px; }
@media (max-width: 640px) { .form .row { grid-template-columns: 1fr; } }

/* ---------- legal pages ---------- */
.legal { max-width: 860px; margin: -50px auto 0; position: relative; z-index: 2; background: #fff; border-radius: var(--radius-lg); padding: clamp(24px, 5vw, 56px); box-shadow: var(--shadow); }
.legal h2 { font-size: 1.4rem; margin: 34px 0 10px; }
.legal h3 { font-size: 1.1rem; margin: 22px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal a { color: var(--leaf); }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.legal th, .legal td { text-align: start; vertical-align: top; border-bottom: 1px solid var(--line); padding: 10px 8px; }
.legal th { background: var(--mist); }
.legal .summary { background: var(--mist); border-radius: 16px; padding: 18px 20px; }
.legal .table-wrap { overflow-x: auto; }
@media (max-width: 640px) {
  .legal table, .legal tbody, .legal tr, .legal td { display: block; }
  .legal tr:first-child { display: none; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .legal td { border: 0; padding: 2px 0; }
  .legal td:first-child { font-weight: 700; color: var(--ink); }
}

/* ---------- footer ---------- */
.site-footer { background: var(--forest-night); color: rgba(255, 255, 255, .72); padding: 80px 0 34px; margin-top: 40px; }
.foot { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 34px; }
.site-footer h4 { color: #fff; margin: 0 0 14px; font-size: 1rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .brand { color: #fff; }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 50px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .1); font-size: .9rem; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot { grid-template-columns: 1fr; } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- scroll progress ---------- */
.progress { position: fixed; inset: 0 0 auto; height: 3px; z-index: 60; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--lime), var(--sun)); }
[dir="rtl"] .progress { transform-origin: 100% 50%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- about globe ---------- */
.ping { transform-box: fill-box; transform-origin: center; animation: ping 2.4s var(--ease) infinite; }
@keyframes ping { 0% { opacity: 1; transform: scale(.8); } 70% { opacity: .2; transform: scale(2.4); } 100% { opacity: 1; transform: scale(.8); } }
.spin { transform-origin: 210px 210px; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotateY(360deg); } }

/* ---------- language blocks on legal pages ---------- */
[data-lang-block] { display: none; }
html[lang="en"] [data-lang-block="en"], html[lang="fr"] [data-lang-block="fr"], html[lang="ar"] [data-lang-block="ar"] { display: block; }
/* Legal texts without an Arabic version fall back to French. */
html[lang="ar"] [data-lang-block="fr"].ar-fallback { display: block; }
.fallback-note { display: none; }
html[lang="ar"] .fallback-note { display: block; background: #fff4dc; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; }

/* ---------- account deletion page ---------- */
.del .del-card h2 { font-size: 1.3rem; margin: 0 0 12px; }
.del .del-card ul { padding-inline-start: 20px; margin: 0; color: var(--ink-soft); }
.del .del-card li { margin-bottom: 6px; }
.del label { display: block; font-weight: 700; margin: 16px 0 6px; }
.del input[type=email], .del input[type=text], .del select, .del textarea {
  width: 100%; font: inherit; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; color: inherit;
}
.del input:focus, .del select:focus, .del textarea:focus { outline: none; border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(46, 139, 87, .15); }
.del textarea { min-height: 100px; resize: vertical; }
.del fieldset { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px 18px; margin: 18px 0 0; }
.del legend { font-weight: 700; padding: 0 6px; }
.del .choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 8px 0; }
.del .choice input { margin-top: 6px; accent-color: var(--leaf); }
.del .parts { padding-inline-start: 28px; }
.del .parts[aria-disabled="true"] { opacity: .45; }
.del .hint { color: var(--muted); font-size: .92rem; margin-top: 4px; }
.del .warn { background: #fff4dc; border-radius: 14px; padding: 12px 16px; margin-top: 16px; }
.del .error { color: var(--clay); font-weight: 700; margin-top: 12px; min-height: 1.4em; }
.del .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.del .btn.secondary { --bg: #fff; --fg: var(--forest); box-shadow: inset 0 0 0 1.5px var(--leaf); }
.del .result pre { white-space: pre-wrap; word-break: break-word; background: var(--mist); border-radius: 14px; padding: 14px; font-size: .9rem; }

/* On phones every story step is a readable card, not a dimmed "upcoming" step. */
@media (max-width: 900px) {
  .story-step, .story-step:not(.on) { color: var(--ink); }
  .story-step p { color: var(--ink-soft); }
  .story-step:not(.on) .num { filter: none; opacity: 1; }
  .story-step:not(.on) li .icon { color: var(--leaf); }
}

/* ---------- news (blog) ---------- */
.news-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.news-cats a { padding: 9px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .92rem;
  background: rgba(255, 255, 255, .1); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); transition: background .25s; }
.news-cats a:hover { background: rgba(255, 255, 255, .2); }
.news-cats a[aria-current="page"] { background: var(--sun); color: var(--forest-night); box-shadow: none; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.news-card { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 24px; border-radius: var(--radius);
  background: #fff; box-shadow: 0 1px 0 var(--line), var(--shadow-soft); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.news-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 var(--line), var(--shadow); }
.news-card h3 { font-size: 1.08rem; line-height: 1.35; flex: 1; }
.news-card h3 a { text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* whole card is the link */
.news-card.featured { grid-column: span 2; background: linear-gradient(150deg, var(--forest), var(--forest-deep)); color: #fff; }
.news-card.featured h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.news-card.featured .news-meta, .news-card.featured .news-read { color: var(--lime); }
.news-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: .84rem; color: var(--muted); }
.news-source { font-weight: 700; color: var(--leaf-ink); }
.news-card.featured .news-source { color: #fff; }
.news-read { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .9rem; color: var(--leaf-ink); }
.news-empty { max-width: 560px; margin-inline: auto; text-align: center; }
.news-empty .ic { margin-inline: auto; }
@media (max-width: 980px) { .news-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .news-grid { grid-template-columns: 1fr; } .news-card.featured { grid-column: auto; } }

/* ---------- about: real-geography globe ---------- */
.globe { margin: 0; position: relative; }
.globe canvas { display: block; width: 100%; aspect-ratio: 1; cursor: grab; touch-action: pan-y; opacity: 0; transition: opacity 1s var(--ease); }
.globe canvas:active { cursor: grabbing; }
.globe.ready canvas { opacity: 1; }
.globe figcaption { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; font-size: .9rem; color: var(--ink-soft); margin-top: 6px; }
.globe figcaption span { display: inline-flex; align-items: center; gap: 8px; }
.globe figcaption small { flex-basis: 100%; text-align: center; color: var(--muted); }
.globe .dot { width: 10px; height: 10px; border-radius: 50%; background: #fff4dc; box-shadow: 0 0 0 2px rgba(233,165,39,.6); }
.globe .dot.hq { background: var(--sun); }
.globe.failed { display: none; }
