/* ── TrackEat landing · design tokens from the app ────────────────────────── */
:root {
  --green: #34C759;
  --green-dark: #248A3D;
  --green-soft: #E9F9EE;
  --blue: #007AFF;
  --orange: #FF9500;
  --red: #FF3B30;
  --purple: #5856D6;
  --label: #1C1C1E;
  --secondary: #6E6E73;
  --tertiary: #C7C7CC;
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --line: #ECECF0;
  --radius: 20px;
  --shadow: 0 10px 40px rgba(20, 30, 40, 0.08);
  --shadow-lg: 0 24px 70px rgba(20, 30, 40, 0.16);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Segoe UI", Roboto, "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--label);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
[dir="rtl"] { direction: rtl; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0);
}

/* ── Header ────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 56px);
  background: rgba(247, 248, 250, 0.8);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 19px; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; background: var(--green-soft);
  display: grid; place-items: center;
}
.header-actions { display: flex; align-items: center; gap: 14px; }
.lang-switch select {
  font-family: var(--font); font-size: 14px; color: var(--label);
  background: var(--surface); border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 30px 8px 14px; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238E8E93' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
[dir="rtl"] .lang-switch select { padding: 8px 14px 8px 30px; background-position: left 12px center; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  font-family: var(--font); font-weight: 600; border: none; transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-store {
  background: var(--label); color: #fff; border-radius: 14px;
  padding: 11px 20px; font-size: 16px;
}
.btn-store--sm { padding: 9px 16px; font-size: 14px; border-radius: 12px; }
.btn-store--light { background: #fff; color: var(--label); box-shadow: var(--shadow); }
.btn-store-text { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
[dir="rtl"] .btn-store-text { text-align: right; }
.btn-store-text small { font-size: 10px; font-weight: 500; opacity: .85; }
.btn-store-text strong { font-size: 17px; font-weight: 600; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  text-align: center; max-width: 760px; margin: 0 auto;
  padding: clamp(48px, 8vw, 104px) clamp(16px, 5vw, 56px) clamp(36px, 5vw, 64px);
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px); line-height: 1.04; letter-spacing: -0.025em;
  font-weight: 700; max-width: 16ch; margin: 0 auto;
}
.hero-sub {
  font-size: clamp(17px, 2.2vw, 21px); color: var(--secondary);
  margin: 22px auto 32px; max-width: 46ch;
}
.hero-cta { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.hero-note { font-size: 13px; color: var(--secondary); }

/* ── Feature sections (screenshot + info, alternating) ─────────────────── */
.fsec-band--alt { background: var(--surface); }
.fsec {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 80px);
  align-items: center; max-width: 1080px; margin: 0 auto;
  padding: clamp(44px, 6vw, 88px) clamp(16px, 5vw, 56px);
}
.fsec-phone { display: flex; justify-content: center; }
.fsec.reverse .fsec-phone { order: 2; }
.fsec-copy h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; letter-spacing: -0.02em; }
.fsec-copy > p { color: var(--secondary); font-size: clamp(16px, 1.9vw, 19px); margin-top: 14px; }
.fsec-copy .check-list { margin-top: 24px; }
@media (max-width: 860px) {
  .fsec { grid-template-columns: 1fr; text-align: center; gap: 28px; }
  .fsec.reverse .fsec-phone { order: 0; }
  .fsec-phone { order: -1; }
  .fsec-copy .check-list { max-width: 360px; margin-inline: auto; text-align: start; }
}

/* ── FAQ (accordion) ───────────────────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; padding: clamp(48px, 6vw, 88px) clamp(16px, 5vw, 56px); }
.faq .section-title { margin-bottom: 32px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 2px 20px; box-shadow: var(--shadow);
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 17px 0;
  font-size: 17px; font-weight: 600; color: var(--label);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 24px; font-weight: 400; line-height: 1;
  color: var(--secondary); flex-shrink: 0;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { color: var(--secondary); font-size: 15.5px; line-height: 1.55; margin: 0; padding: 0 0 18px; }

/* ══════════════════════════════════════════════════════════════════════════
   RICH THEME — gradients, glows, accents, motion (layered over the base)
   ══════════════════════════════════════════════════════════════════════════ */

/* Soft brand-tinted backdrop behind the whole page. */
body {
  background:
    radial-gradient(900px 520px at 100% -6%, rgba(52, 199, 89, 0.10), transparent 60%),
    radial-gradient(820px 520px at -12% 6%, rgba(0, 122, 255, 0.06), transparent 55%),
    var(--bg);
  background-attachment: fixed;
}

/* ── Hero: gradient stage + soft colour blobs + eyebrow badge ───────────── */
.hero { position: relative; overflow: hidden; }
.hero::before,
.hero::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(72px); z-index: 0; pointer-events: none;
}
.hero::before {
  width: 460px; height: 460px; background: rgba(52, 199, 89, 0.30);
  top: -150px; left: 50%; transform: translateX(-62%);
}
.hero::after {
  width: 380px; height: 380px; background: rgba(0, 122, 255, 0.16);
  top: -70px; right: 6%;
}
.hero > * { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 auto 22px;
  padding: 7px 16px; border-radius: 999px;
  background: rgba(52, 199, 89, 0.10); border: 1px solid rgba(52, 199, 89, 0.22);
  color: var(--green-dark); font-weight: 600; font-size: 13px; letter-spacing: 0.2px;
}
.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.18);
}

/* ── Glow halo behind every phone mockup ───────────────────────────────── */
.device-frame { position: relative; }
.device-frame::before {
  content: ""; position: absolute; inset: -10% -14%;
  background: radial-gradient(closest-side, rgba(52, 199, 89, 0.22), transparent 72%);
  filter: blur(26px); z-index: -1;
}

/* ── Feature sections: gradient wash + gradient kicker bar ──────────────── */
.fsec-band--alt { background: linear-gradient(180deg, #ffffff 0%, #f1faf3 100%); }
.fsec-copy h2 { position: relative; }
.fsec-copy h2::before {
  content: ""; display: block; width: 46px; height: 4px; border-radius: 2px;
  margin-bottom: 18px;
  background: linear-gradient(90deg, var(--green), #6FE39A);
}
@media (max-width: 860px) {
  .fsec-copy h2::before { margin-left: auto; margin-right: auto; }
}
.check-list li::before {
  background: linear-gradient(135deg, var(--green), #2AA84C);
  color: #fff; box-shadow: 0 2px 6px rgba(52, 199, 89, 0.35);
}

/* ── Buttons: depth ────────────────────────────────────────────────────── */
.btn-store { background: linear-gradient(180deg, #1c1c1e, #000); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16); }
.btn-store--light { background: #fff; }

/* ── FAQ: hover lift + open accent ─────────────────────────────────────── */
.faq-item { transition: box-shadow .16s ease, border-color .16s ease, transform .16s ease; }
.faq-item:hover { box-shadow: 0 10px 30px rgba(20, 30, 40, 0.10); }
.faq-item[open] { border-color: rgba(52, 199, 89, 0.35); }

/* ── Final CTA: gradient + light sweep ─────────────────────────────────── */
.cta-final {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #34C759 0%, #1FA24A 100%);
}
.cta-final::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(620px 320px at 82% -25%, rgba(255, 255, 255, 0.28), transparent 60%);
}
.cta-final > * { position: relative; z-index: 1; }

/* ── Footer ────────────────────────────────────────────────────────────── */
.site-footer { background: linear-gradient(180deg, #1c1c1e, #101012); }

/* ── Scroll-reveal (progressive enhancement; only when JS is on) ────────── */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Phone mockup ──────────────────────────────────────────────────────── */
.phone {
  position: relative; width: 300px; aspect-ratio: 300 / 620;
  background: #0c0c0e; border-radius: 46px; padding: 11px;
  box-shadow: var(--shadow-lg);
}
.phone--sm { width: 264px; }
.phone-notch {
  position: absolute; top: 13px; left: 50%; transform: translateX(-50%);
  width: 92px; height: 21px; background: #0c0c0e; border-radius: 999px; z-index: 3;
}
.phone-screen {
  width: 100%; height: 100%; border-radius: 36px; overflow: hidden;
  background: var(--bg);
}
/* The app content is rendered at ~0.84 scale so it reads like a real phone
   screenshot (smaller UI, more of the screen visible). Anchored top-left and
   widened by 1/scale so it still fills the screen edge-to-edge. */
.app {
  transform: scale(0.84); transform-origin: top left; width: 119.05%;
  padding: 0 14px 14px; display: flex; flex-direction: column; gap: 10px; text-align: start;
}
/* In RTL the wider-than-screen content flows from the right edge, so anchor
   the scale there too — otherwise the left edge gets clipped. */
[dir="rtl"] .app { transform-origin: top right; }
/* Faux status bar — fills the top so there's no empty strip above the content. */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 7px 14px 3px; color: var(--label);
  font-size: 12.5px; font-weight: 600; letter-spacing: .2px;
}
.statusbar .sb-icons { display: flex; align-items: center; gap: 5px; }
.statusbar .sb-icons svg { height: 11px; width: auto; fill: var(--label); }

/* App header */
.app-header { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px 4px; }
.app-greeting { font-size: 11px; color: var(--secondary); }
.app-name-row { font-size: 19px; font-weight: 600; }
.app-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: var(--green);
  color: #fff; font-weight: 600; display: grid; place-items: center; font-size: 14px;
}

/* Cards */
.app-card { background: var(--surface); border-radius: 16px; padding: 12px; }
.ring-card { display: flex; align-items: center; gap: 12px; }
.ring { position: relative; width: 96px; height: 96px; flex-shrink: 0; }
.ring svg { width: 100%; height: 100%; }
.ring-inner {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-value { font-size: 24px; font-weight: 600; line-height: 1; }
.ring-sub { font-size: 10px; color: var(--secondary); margin-top: 2px; }
.macros { flex: 1; display: flex; flex-direction: column; gap: 9px; min-width: 0; }
.macro { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: baseline; }
.macro-label { font-size: 12px; font-weight: 500; }
.macro-val { font-size: 11px; color: var(--secondary); }
.macro-bar { grid-column: 1 / -1; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.macro-bar i { display: block; height: 100%; border-radius: 4px; }

.goal-row, .meal-card { display: flex; align-items: center; gap: 10px; }
.goal-icon, .meal-icon {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-size: 16px; flex-shrink: 0;
}
.goal-icon { background: var(--green-soft); color: var(--green-dark); }
.meal-icon { background: #F1ECFB; }
.goal-body, .meal-body { flex: 1; min-width: 0; }
.goal-title, .meal-title { font-size: 14px; font-weight: 600; }
.goal-sub, .meal-sub { font-size: 11px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-chev { color: var(--tertiary); font-size: 20px; }
.meal-cal { font-size: 13px; font-weight: 600; color: var(--secondary); }

/* Onboard-style screen (goal) */
.app-onboard-head { padding: 8px 6px 6px; }
.app-onboard-head h4 { font-size: 20px; font-weight: 700; }
.app-onboard-head p { font-size: 12px; color: var(--secondary); margin-top: 2px; }
.opt-card {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1.5px solid transparent; border-radius: 14px; padding: 12px;
}
.opt-card--selected { border-color: var(--green); }
.opt-ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; flex-shrink: 0; }
.opt-body { flex: 1; }
.opt-title { font-size: 14px; font-weight: 600; }
.opt-sub { font-size: 11px; color: var(--secondary); }
.opt-radio { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--tertiary); display: grid; place-items: center; flex-shrink: 0; }
.opt-radio--on { background: var(--green); border-color: var(--green); color: #fff; font-size: 13px; }

/* ── Sections shared ───────────────────────────────────────────────────── */
section { padding: clamp(48px, 7vw, 92px) clamp(16px, 5vw, 56px); }
.section-title {
  font-size: clamp(26px, 3.6vw, 40px); font-weight: 700; letter-spacing: -0.02em;
  text-align: center; max-width: 18ch; margin: 0 auto;
}
.section-lead {
  text-align: center; color: var(--secondary); font-size: clamp(16px, 2vw, 19px);
  max-width: 52ch; margin: 16px auto 0;
}

/* Features */
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px; max-width: 1100px; margin: 48px auto 0;
}
.feature {
  background: var(--surface); border-radius: var(--radius); padding: 26px;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.feature-ic { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; }
.feature h3 { font-size: 18px; font-weight: 650; margin-bottom: 7px; }
.feature p { font-size: 14.5px; color: var(--secondary); }

/* How it works */
.how { background: var(--surface); }
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px; max-width: 1000px; margin: 48px auto 0;
}
.step { text-align: center; }
.step-num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--green); color: #fff;
  font-weight: 700; font-size: 20px; display: grid; place-items: center; margin: 0 auto 16px;
}
.step h3 { font-size: 18px; margin-bottom: 7px; }
.step p { font-size: 14.5px; color: var(--secondary); max-width: 32ch; margin: 0 auto; }

/* Showcase */
.showcase {
  display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(28px, 5vw, 72px);
  align-items: center; max-width: 1100px; margin: 0 auto;
}
.showcase .phone { justify-self: center; }
.showcase-copy .section-title, .showcase-copy .section-lead { text-align: start; margin-inline: 0; max-width: none; }
.check-list { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.check-list li { position: relative; padding-inline-start: 32px; font-size: 16px; }
.check-list li::before {
  content: "✓"; position: absolute; inset-inline-start: 0; top: -1px;
  width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft);
  color: var(--green-dark); font-size: 13px; font-weight: 700; display: grid; place-items: center;
}

/* Gallery — more app screens */
.gallery { text-align: center; background: var(--surface); }
.gallery-row {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start;
  gap: clamp(28px, 5vw, 56px); margin-top: 48px;
}
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 6px 2px; }
.tile {
  background: var(--surface); border-radius: 14px; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  font-size: 13px; font-weight: 600;
}
.tile-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; }
.chart-card { padding: 12px 14px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.chart-label { font-size: 11px; font-weight: 600; letter-spacing: .3px; color: var(--secondary); }
.chart-now { font-size: 15px; font-weight: 700; }
.chart { width: 100%; height: 78px; display: block; }
.wrow { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; font-size: 13px; }
.wrow span { color: var(--secondary); }

/* Final CTA */
.cta-final {
  text-align: center; background: linear-gradient(135deg, var(--green), #2AA84C);
  color: #fff; border-radius: 0; display: flex; flex-direction: column; align-items: center; gap: 26px;
}
.cta-final h2 { font-size: clamp(26px, 4vw, 42px); font-weight: 700; letter-spacing: -0.02em; max-width: 18ch; }

/* Footer */
.site-footer {
  text-align: center; padding: 44px 16px; background: var(--label); color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; }
.footer-brand .brand-mark { background: rgba(255,255,255,.1); }
.footer-note { color: rgba(255,255,255,.7); font-size: 14px; }
.footer-copy { color: rgba(255,255,255,.45); font-size: 13px; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-inline: auto; }
  .hero-cta { align-items: center; }
  .hero-phone { order: -1; }
  .showcase { grid-template-columns: 1fr; }
  .showcase-copy { text-align: center; }
  .showcase-copy .section-title, .showcase-copy .section-lead { text-align: center; margin-inline: auto; }
  .check-list { max-width: 360px; margin-inline: auto; text-align: start; }
  .brand-name { display: none; }
}
