/* HANOTI landing — plain CSS, mobile-first, RTL-safe (logical properties).
   Shape rule: cards 16px, buttons pill, chips pill. One accent: emerald. */

:root {
  --bg: #F4F7F5;
  --surface: #FFFFFF;
  --surface-alt: #EBF1EE;
  --text: #0F1B16;
  --text-2: #51605A;
  --text-3: #8A968F;
  --primary: #00875A;
  --primary-strong: #006C48;
  --primary-soft: #E3F5EE;
  --on-primary: #FFFFFF;
  --border: #E3E9E6;
  --danger: #DC2626;
  --shadow: 0 12px 32px rgba(15, 27, 22, 0.08);
  --radius-card: 16px;
  --nav-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1311;
    --surface: #171E1B;
    --surface-alt: #212B27;
    --text: #ECF1EE;
    --text-2: #B4C0BA;
    --text-3: #7C8A83;
    --primary: #34D399;
    --primary-strong: #6EE7B7;
    --primary-soft: #10362A;
    --on-primary: #06231A;
    --border: #212B27;
    --danger: #F87171;
    --shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  font-family: "Tajawal", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 13px 26px;
  font: 700 1rem/1 "Tajawal", sans-serif;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-strong); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 9px 18px; font-size: 0.9rem; }

/* ---------- Nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--nav-h) + env(safe-area-inset-top));
  padding-top: env(safe-area-inset-top);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; }
.brand-name { font-weight: 900; font-size: 1.25rem; letter-spacing: 0.04em; }

.nav-links { display: none; align-items: center; gap: 26px; }
.nav-links > a:not(.btn) { font-weight: 500; color: var(--text-2); }
.nav-links > a:not(.btn):hover { color: var(--primary); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--surface);
}
.lang-btn {
  border: 0;
  background: transparent;
  color: var(--text-2);
  font: 700 0.8rem/1 "Tajawal", sans-serif;
  padding: 8px 12px;
  cursor: pointer;
}
.lang-btn.is-active { background: var(--primary); color: var(--on-primary); }

.nav-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
}

/* Mobile dropdown menu */
.site-nav.is-open .nav-links {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  position: absolute;
  inset-inline: 0;
  top: calc(var(--nav-h) + env(safe-area-inset-top));
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 20px 22px;
  gap: 16px;
  box-shadow: var(--shadow);
}
.site-nav.is-open .nav-links .btn { width: 100%; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-toggle { display: none; }
  .site-nav.is-open .nav-links {
    position: static; flex-direction: row; background: transparent;
    border: 0; padding: 0; box-shadow: none; align-items: center;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 85% 0%, color-mix(in srgb, var(--primary) 14%, transparent), transparent 70%),
    radial-gradient(45% 45% at 0% 100%, color-mix(in srgb, var(--primary) 8%, transparent), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
  padding-block: 56px 72px;
}
.eyebrow {
  margin: 0 0 14px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2rem, 5.4vw, 3.4rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18ch;
}
.hero-sub {
  margin: 0 0 30px;
  color: var(--text-2);
  font-size: 1.08rem;
  max-width: 46ch;
}
.hero-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.play-badge img { height: 62px; width: auto; }

.hero-visual { display: flex; justify-content: center; }

/* Phone mockup */
.phone {
  position: relative;
  width: min(290px, 78vw);
  aspect-ratio: 9 / 19;
  background: #101815;
  border-radius: 42px;
  padding: 10px;
  box-shadow: var(--shadow), 0 0 0 2px color-mix(in srgb, var(--primary) 35%, transparent);
  transform: rotate(-3deg);
}
[dir="rtl"] .phone { transform: rotate(3deg); }
.phone-notch {
  position: absolute;
  top: 16px; left: 50%;
  translate: -50% 0;
  width: 96px; height: 20px;
  background: #101815;
  border-radius: 999px;
  z-index: 2;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 33px;
  overflow: hidden;
  background: var(--surface);
}
.screen-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(70% 50% at 50% 0%, var(--primary-soft), transparent 75%),
    var(--surface);
}
.screen-fallback img { width: 84px; height: 84px; border-radius: 22px; }
.screen-shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    padding-block: 72px 88px;
    min-height: calc(100dvh - var(--nav-h));
  }
}

/* ---------- Sections ---------- */
section { padding-block: 72px; }
@media (min-width: 960px) { section { padding-block: 96px; } }

.section-head { max-width: 62ch; margin: 0 auto 44px; text-align: center; }
.section-head h2 {
  margin: 0 0 12px;
  font-size: clamp(1.6rem, 3.6vw, 2.3rem);
  font-weight: 900;
  line-height: 1.25;
}
.section-head p { margin: 0; color: var(--text-2); }

/* ---------- Features bento ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 16px;
}
.cell {
  grid-column: span 6;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 26px;
}
.cell h3 { margin: 0 0 8px; font-size: 1.12rem; font-weight: 800; }
.cell p { margin: 0; color: var(--text-2); font-size: 0.98rem; }
.cell-icon {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 46px; height: 46px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.cell-tint { background: var(--primary-soft); border-color: transparent; }
.cell-tint .cell-icon { background: var(--surface); }
.cell-dark {
  background: linear-gradient(140deg, #0B756A, #006C48);
  border-color: transparent;
  color: #ECF1EE;
}
.cell-dark p { color: #B4C0BA; }
.cell-dark .cell-icon { background: rgba(255, 255, 255, 0.14); color: #6EE7B7; }

.cell-wide {
  display: flex;
  flex-direction: column;
  gap: 18px;
  justify-content: space-between;
}
.lang-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text-2);
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .cell { grid-column: span 3; }
  .cell-wide { grid-column: span 6; flex-direction: row; align-items: center; }
}
@media (min-width: 960px) {
  .cell-lg { grid-column: span 3; }
  .cell:not(.cell-lg):not(.cell-wide) { grid-column: span 2; }
  .cell-wide { grid-column: span 6; }
}

/* ---------- Pricing ---------- */
.pricing { background: var(--surface-alt); }
.price-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 34px;
  max-width: 880px;
  margin-inline: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 38px 30px;
  box-shadow: var(--shadow);
}
.price-side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.trial-badge {
  align-self: flex-start;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 6px 16px;
}
.price-line { margin: 0; display: flex; align-items: baseline; gap: 10px; }
.price-num { font-size: clamp(2.6rem, 7vw, 3.6rem); font-weight: 900; line-height: 1; }
.price-per { color: var(--text-2); font-weight: 700; font-size: 1.1rem; }
.price-note { margin: 0; color: var(--text-3); font-size: 0.9rem; }

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  align-content: center;
  border-inline-start: 0;
}
.price-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.price-list i { color: var(--primary); font-size: 1.2rem; }

@media (min-width: 640px) {
  .price-card { grid-template-columns: 1fr 1fr; padding: 46px 42px; }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding-block: 44px 0;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 26px;
  justify-content: space-between;
  align-items: flex-start;
}
.footer-brand p { margin: 14px 0 0; color: var(--text-2); max-width: 34ch; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-2); font-weight: 500; }
.footer-links a:hover { color: var(--primary); }
.footer-base {
  border-top: 1px solid var(--border);
  margin-top: 34px;
  padding-block: 18px;
  color: var(--text-3);
  font-size: 0.88rem;
}
.footer-base p { margin: 0; }

@media (min-width: 640px) {
  .footer-inner { flex-direction: row; align-items: center; }
}

/* ---------- Reveal (JS-gated, reduced-motion-safe) ---------- */
@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  html.js .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Subscribe dialog ---------- */
.sub-dialog {
  width: min(92vw, 460px);
  max-height: min(88vh, 88dvh);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}
.sub-dialog::backdrop {
  background: color-mix(in srgb, var(--text) 45%, transparent);
  backdrop-filter: blur(3px);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; }
.dialog-head h3 { margin: 0; font-size: 1.3rem; font-weight: 900; }
.dialog-x {
  border: 0; background: transparent; color: var(--text-2);
  font-size: 1.3rem; cursor: pointer; width: 36px; height: 36px;
  border-radius: 999px; display: inline-flex; align-items: center; justify-content: center;
}
.dialog-x:hover { background: var(--surface-alt); color: var(--text); }
.dialog-sub { margin: 6px 0 18px; color: var(--text-2); font-size: 0.95rem; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 700; font-size: 0.9rem; margin-bottom: 6px; }
.field input,
.field textarea {
  width: 100%;
  font: 500 1rem/1.5 "Tajawal", sans-serif;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent);
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field-error { margin: 6px 0 0; color: var(--danger); font-size: 0.85rem; font-weight: 700; }

.btn-block { width: 100%; margin-top: 6px; }

.dialog-fast {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.fast-label { display: block; color: var(--text-2); font-size: 0.9rem; margin-bottom: 10px; }
.fast-btns { display: flex; gap: 10px; }
.fast-btns .btn { flex: 1; }
.btn-wa { background: #1FA855; color: #fff; }
.btn-wa:hover { background: #178C45; }
.btn-call { background: var(--surface-alt); color: var(--text); border: 1px solid var(--border); }
.btn-call:hover { border-color: var(--primary); color: var(--primary); }

.dialog-success {
  text-align: center;
  padding: 26px 10px 12px;
}
.dialog-success i { font-size: 3rem; color: var(--primary); }
.dialog-success p { margin: 12px 0 0; font-weight: 700; }

/* ---------- Small phones (<= 639px) ---------- */
@media (max-width: 639px) {
  .brand-name { font-size: 1.08rem; }
  .lang-btn { padding: 7px 9px; font-size: 0.74rem; }
  .nav-toggle { width: 44px; height: 44px; }

  .hero-grid { padding-block: 32px 52px; gap: 40px; }
  .hero-title { max-width: none; }
  .hero-sub { font-size: 1rem; margin-bottom: 24px; }
  .play-badge img { height: 56px; }
  .hero-cta .btn { padding: 12px 22px; }

  section { padding-block: 56px; }
  .section-head { margin-bottom: 30px; }
  .cell { padding: 22px 20px; }
  .price-card { padding: 30px 22px; gap: 26px; }
  .price-side { gap: 14px; }

  .sub-dialog { padding: 18px 16px; width: 94vw; }
  .field input,
  .field textarea { font-size: 16px; } /* prevent iOS zoom-on-focus */
  .fast-btns .btn { padding-inline: 10px; }

  .footer-inner { gap: 20px; }
}

/* ---------- Very small (<= 380px) ---------- */
@media (max-width: 380px) {
  .brand-name { display: none; }
  .lang-btn { padding: 6px 7px; font-size: 0.7rem; }
  .phone { width: 240px; }
}
