/* CameraDiet marketing site.
   Tokens mirror the Flutter app (lib/common/styles/colors.dart) so the site
   and the product read as one brand.

   Colour rule, carried over from the app: light green is for SURFACES —
   backgrounds, cards, chips, calm sections. Orange is for ACTIONS and energy —
   primary buttons, calorie cues. The two families are never blended into a
   single fill. */

:root {
  --green:        #2D7D4F;
  --green-mid:    #A8CD60;
  --green-soft:   #DCEAB6;
  --orange:       #F97316;
  --orange-soft:  #FED7AA;

  --surface:      #FFFFFF;
  --surface-alt:  #F7F7F5;
  --surface-muted:#EEEEEC;

  --ink:          #1C2218;
  --ink-soft:     #4E5347;
  --ink-muted:    #8E897D;
  --hairline:     #E7E5E0;

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --shadow: 0 8px 30px rgba(28, 34, 24, .07);
  --shadow-lift: 0 14px 44px rgba(28, 34, 24, .12);
  --maxw: 1140px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Arabic gets a typeface that actually has the glyphs, and slightly more
   line-height because Arabic script needs the vertical room. */
[dir="rtl"] body {
  font-family: 'Cairo', 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  line-height: 1.8;
}

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

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.15rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }
[dir="rtl"] h1, [dir="rtl"] h2 { letter-spacing: 0; }

/* ── buttons ─────────────────────────────────────────────────────────────
   Primary is ORANGE because it is the action. Secondary is a quiet outline;
   it must never compete with the primary for attention. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 18px rgba(249, 115, 22, .28); }
.btn-primary:hover { background: #ea680c; box-shadow: 0 10px 26px rgba(249, 115, 22, .34); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hairline); }
.btn-ghost:hover { background: var(--surface-alt); border-color: var(--ink-muted); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #24663f; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

/* ── header ──────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 36px; width: auto; }
.nav { display: flex; gap: 26px; margin-inline-start: auto; }
.nav a { font-size: .93rem; color: var(--ink-soft); font-weight: 500; }
.nav a:hover { color: var(--green); }
.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-btn {
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--hairline);
  font-size: .85rem; font-weight: 600; color: var(--ink-soft); background: var(--surface);
}
.lang-btn:hover { border-color: var(--green-mid); color: var(--green); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--ink); cursor: pointer; }

/* ── hero — a GREEN surface, per the brand rule ──────────────────────── */
.hero {
  background: linear-gradient(160deg, var(--green-soft) 0%, #F2F8E4 45%, var(--surface) 100%);
  padding: 76px 0 84px;
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(45, 125, 79, .1); color: var(--green);
  padding: 7px 16px; border-radius: 999px; font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; margin-bottom: 18px;
}
.hero p.lead { font-size: 1.1rem; max-width: 33rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: .88rem; color: var(--ink-muted); }

.phone-frame {
  width: min(300px, 82%); margin-inline: auto;
  background: var(--ink); border-radius: 40px; padding: 12px;
  box-shadow: var(--shadow-lift);
}
.phone-screen {
  border-radius: 30px; overflow: hidden; background: var(--surface);
  aspect-ratio: 9 / 19; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(170deg, var(--green-soft), var(--surface));
  text-align: center; padding: 26px;
}
.phone-screen .ring {
  width: 128px; height: 128px; border-radius: 50%;
  border: 10px solid var(--green-mid); border-top-color: var(--orange);
  display: grid; place-items: center; margin: 0 auto 18px;
  font-weight: 800; font-size: 1.5rem; color: var(--ink);
}

/* ── sections ────────────────────────────────────────────────────────── */
section { padding: 84px 0; }
.section-alt { background: var(--surface-alt); }
.section-head { text-align: center; max-width: 46rem; margin: 0 auto 52px; }
.section-head p { font-size: 1.05rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px; }

.card {
  background: var(--surface); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: 30px 26px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
/* Icon tiles are a SURFACE element, so they stay in the green family. */
.card .icon {
  width: 50px; height: 50px; border-radius: var(--radius-sm);
  background: var(--green-soft); color: var(--green);
  display: grid; place-items: center; margin-bottom: 18px; font-size: 1.4rem;
}
.card h3 { margin-bottom: 8px; }
.card p { margin: 0; font-size: .95rem; }

/* ── how it works ────────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; counter-reset: step; }
.step { position: relative; padding-top: 12px; }
.step .num {
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem; margin-bottom: 16px;
}

/* ── plans ───────────────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.plan {
  background: var(--surface); border: 1.5px solid var(--hairline);
  border-radius: var(--radius-lg); padding: 34px 28px; display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--green-mid); box-shadow: var(--shadow); position: relative; }
.plan .tag {
  position: absolute; top: -13px; inset-inline-start: 28px;
  background: var(--green); color: #fff; font-size: .74rem; font-weight: 700;
  padding: 5px 14px; border-radius: 999px; letter-spacing: .03em;
}
.plan h3 { font-size: 1.3rem; text-transform: capitalize; }
.plan .price { font-size: 2.4rem; font-weight: 800; color: var(--ink); margin: 12px 0 2px; }
.plan .price small { font-size: 1rem; font-weight: 600; color: var(--ink-muted); }
.plan .was { color: var(--ink-muted); text-decoration: line-through; font-size: .95rem; }
.plan .duration { color: var(--ink-muted); font-size: .9rem; margin-bottom: 18px; }
.plan .btn { margin-top: auto; width: 100%; }
.plan.free .price { color: var(--green); }

/* ── contact ─────────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: .86rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.field input, .field textarea {
  width: 100%; padding: 13px 16px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--hairline); background: var(--surface);
  font: inherit; color: var(--ink); transition: border-color .15s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--green-mid); }
.field textarea { resize: vertical; min-height: 130px; }
.field.has-error input, .field.has-error textarea { border-color: #dc2626; }
.field .err { color: #dc2626; font-size: .8rem; margin-top: 5px; display: none; }
.field.has-error .err { display: block; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

.form-note { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; display: none; font-size: .92rem; }
.form-note.ok { display: block; background: var(--green-soft); color: #1e5c39; }
.form-note.bad { display: block; background: #fee2e2; color: #991b1b; }

.contact-side .item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; }
.contact-side .item .icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm); flex: 0 0 44px;
  background: var(--green-soft); color: var(--green); display: grid; place-items: center; font-size: 1.15rem;
}
.contact-side .item strong { display: block; font-size: .95rem; }
.contact-side .item span { color: var(--ink-soft); font-size: .92rem; word-break: break-word; }

/* ── download band ───────────────────────────────────────────────────── */
.download { background: var(--green); color: #fff; border-radius: var(--radius-lg); padding: 54px 44px; text-align: center; }
.download h2 { color: #fff; }
.download p { color: rgba(255, 255, 255, .9); max-width: 34rem; margin-inline: auto; }
.store-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.store-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: #fff; color: var(--ink); padding: 13px 24px; border-radius: 999px; font-weight: 600;
}
.store-btn:hover { background: var(--surface-alt); }
.store-soon { color: rgba(255,255,255,.85); font-size: .92rem; margin-top: 20px; }

/* ── newsletter ──────────────────────────────────────────────────────── */
.news-form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.news-form input {
  flex: 1 1 240px; padding: 14px 18px; border-radius: 999px;
  border: 1.5px solid var(--hairline); font: inherit; background: var(--surface);
}
.news-form input:focus { outline: none; border-color: var(--green-mid); }

/* ── footer ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--ink); color: #fff; padding: 56px 0 28px; }
.site-footer .brand { color: #fff; }
.site-footer p { color: rgba(255, 255, 255, .68); font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.site-footer h4 { font-size: .95rem; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 9px; }
.site-footer li a { color: rgba(255, 255, 255, .72); font-size: .92rem; }
.site-footer li a:hover { color: var(--green-mid); }
.socials { display: flex; gap: 10px; margin-top: 16px; }
.socials a {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .1);
  display: grid; place-items: center; color: #fff;
}
.socials a:hover { background: var(--green); }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .13); padding-top: 22px;
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: .88rem; color: rgba(255, 255, 255, .6);
}

/* ── responsive ──────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-grid, .grid-2, .footer-grid { grid-template-columns: 1fr; }
  .grid-3, .steps { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .nav {
    display: none; position: absolute; top: 72px; inset-inline: 0;
    background: var(--surface); flex-direction: column; gap: 0;
    padding: 12px 24px 20px; border-bottom: 1px solid var(--hairline);
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .nav-toggle { display: block; margin-inline-start: auto; }
  .header-actions .btn-primary { display: none; }
  section { padding: 60px 0; }
  .form-row { grid-template-columns: 1fr; }
  .download { padding: 40px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
