/* ============================================================
   Tamreeni Landing — main stylesheet
   RTL-ready: logical properties only (inline-start/end).
   Maps 1:1 to future WP template-parts (one block per section).
   ============================================================ */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

h1, h2, h3, p { margin: 0; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 72px; }

/* Section headers */
.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
:lang(ar) .eyebrow { letter-spacing: 0.04em; }

.h1 {
  font-size: clamp(38px, 4.5vw, 58px);
  line-height: 1.07;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.h2 {
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.12;
  font-weight: 800;
  letter-spacing: -0.02em;
}
:lang(ar) .h1 { line-height: 1.18; letter-spacing: 0; }
:lang(ar) .h2 { line-height: 1.25; letter-spacing: 0; }

.lead { font-size: 18px; line-height: 1.6; color: var(--text-2); }

.section-head { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; margin-block-end: 48px; }
.section-head--start { align-items: flex-start; text-align: start; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--r-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  padding: 13px 24px;
  transition: background-color .18s ease, color .18s ease, transform .18s ease;
}
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #23283a; color: #fff; }
.btn--ghost { background: var(--card); color: var(--ink); border: 2px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); color: var(--ink); }

/* Split pill: violet pill + white circle chevron (Figma "Get Started" style) */
.btn--split {
  background: var(--accent);
  color: #fff;
  padding: 8px 8px 8px 26px;
  padding-inline: 26px 8px;
  gap: 16px;
}
.btn--split:hover { background: var(--accent-hover); color: #fff; }
.btn--split .btn__circle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  color: var(--accent); /* icons drawn with currentColor pick up the accent */
}
.btn--split .btn__circle svg { stroke: var(--accent); }
[dir="rtl"] .btn__circle svg { transform: scaleX(-1); }

/* Store badges */
.store-badges { display: flex; flex-wrap: wrap; gap: 14px; }
.badge-store {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--ink); color: #fff;
  border-radius: var(--r-tile);
  padding: 10px 20px;
  min-height: 56px;
}
.badge-store:hover { color: #fff; opacity: .9; }
.badge-store__text { display: flex; flex-direction: column; line-height: 1.2; }
.badge-store__pre { font-size: 10px; font-weight: 600; opacity: .75; letter-spacing: .04em; }
.badge-store__name { font-size: 17px; font-weight: 700; }
.badge-store--light { background: #fff; color: var(--ink); }
.badge-store--light:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; padding-block: 16px; }
.site-header .container { max-width: var(--container); } /* header pill edges line up with the content edges */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--card);
  border-radius: var(--r-pill);
  padding: 10px 12px;
  padding-inline-start: 20px;
  box-shadow: var(--shadow-card);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand__tile {
  width: 38px; height: 38px; flex: none;
  background: var(--ink); border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}
.nav__links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 15px; font-weight: 600; color: #4B4B54; }
.nav__links a:hover { color: var(--accent); }
.nav__end { display: flex; align-items: center; gap: 14px; }
.lang-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; }
.lang-switch__sep { color: #C9C9D1; }
.lang-switch a { color: var(--text-3); }
.lang-switch a:hover, .lang-switch .is-active { color: var(--ink); }
.nav__burger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.label-short { display: none; }

/* Mobile nav panel */
.nav-panel { display: none; }
.nav-panel.is-open {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--card);
  border-radius: var(--r-card-sm);
  box-shadow: var(--shadow-card);
  margin-block-start: 8px;
  padding: 12px;
}
.nav-panel a { padding: 12px 16px; border-radius: 12px; font-weight: 700; }
.nav-panel a:hover { background: var(--bg); }

/* ---------- Hero ---------- */
.hero { padding-block: 48px 24px; overflow: clip; }
.hero__grid { display: grid; grid-template-columns: 1fr 480px; gap: 60px; align-items: center; }
.hero__grid > *, .scanner__grid > * { min-width: 0; } /* never let the phone mockup widen the page on very narrow screens */
.hero__copy { display: flex; flex-direction: column; gap: 24px; }
.pill-note {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  background: var(--mint); color: var(--mint-ink);
  font-size: 13px; font-weight: 700;
  padding: 8px 14px; border-radius: var(--r-pill);
}
.pill-note__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero__lead { max-width: 480px; }
.hero__cta { display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.proof { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-size: 15px; color: var(--text-2); }
.proof strong { color: var(--ink); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.proof__dot { width: 4px; height: 4px; border-radius: 50%; background: #C9C9D1; }

/* Phone visual */
.hero__visual { position: relative; min-height: 640px; }
.hero__blob {
  position: absolute; inset-block-start: 36px; inset-inline-start: 50%;
  transform: translateX(-50%) rotate(12deg);
  width: 400px; height: 480px;
  background: var(--mint); border-radius: 96px;
}
[dir="rtl"] .hero__blob { transform: translateX(50%) rotate(-12deg); }
.hero__glyph { position: absolute; inset-block-start: 70px; inset-inline-end: 0; opacity: .5; }

.phone {
  /* iPhone 15/16 proportions: 393 x 852 pt screen, thin bezel, Dynamic Island */
  position: relative; margin-inline: auto;
  width: min(290px, 100%); background: #16181F;
  border-radius: 50px; padding: 9px;
  box-shadow: inset 0 0 0 1.5px #3A3D48, 0 32px 64px rgba(23,23,28,.22);
  direction: ltr; /* app UI stays LTR on both language versions */
}
.phone::before, .phone::after { content: ""; position: absolute; width: 3px; background: #16181F; }
.phone::before { left: -3px; top: 128px; height: 46px; border-radius: 2px 0 0 2px; box-shadow: 0 58px 0 #16181F, 0 -44px 0 -12px #16181F; }
.phone::after { right: -3px; top: 168px; height: 74px; border-radius: 0 2px 2px 0; }
.phone__screen { position: relative; aspect-ratio: 393 / 852; background: var(--bg); border-radius: 41px; padding: 50px 14px 0; display: flex; flex-direction: column; gap: 12px; overflow: hidden; font-family: 'Urbanist', system-ui, sans-serif; }
.phone__status { position: absolute; inset: 0 0 auto; height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 2px 22px 0 28px; color: var(--ink); }
.phone__time { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.phone__island { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 84px; height: 24px; border-radius: 20px; background: #000; }
.phone__sys { display: flex; align-items: center; gap: 4px; }
.phone__sys svg { flex: none; }
.phone__home { position: absolute; bottom: 7px; left: 50%; transform: translateX(-50%); width: 96px; height: 4px; border-radius: 3px; background: var(--ink); }
.phone * { line-height: 1.3; }

/* ---------- App screens (hero Home, AI scanner): images from the Figma app design ---------- */
.phone__screen--shot { padding: 0; background: #F4F4F4; }
.phone__shot { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }

/* AI scanner: animated scan sweep over the Figma 3.18 "Analyzing" screen.
   Geometry from the frame (390x844): box x 16.5-373, bottom 761.5, 3px white line, bottom radius 31. */
.phone--scan .phone__screen--shot { container-type: inline-size; }
.scan-sweep { position: absolute; left: 4.14%; right: 4.27%; top: 59.3%; bottom: 9.78%; background: rgba(245, 244, 232, .32); border-top: max(2px, .77cqw) solid #fff; border-radius: 0 0 7.95cqw 7.95cqw; animation: scan-sweep 2.6s ease-in-out infinite alternate; }
@keyframes scan-sweep { from { top: 34.4%; } to { top: 73.5%; } }
@media (prefers-reduced-motion: reduce) { .scan-sweep { animation: none; } }


/* Scanner section: phone + floating result card */
.scanner__visual { display: flex; justify-content: center; }
@media (min-width: 1081px) { .scanner__visual { justify-content: flex-start; } } /* phone sits on the content edge, like the text and cards */
.phone--scan { margin-inline: 0; }
.scanner__visual .scan-result { inset-block-end: 96px; inset-inline-end: -20px; }
.macro { font-size: 10px; font-weight: 700; padding: 4px 9px; border-radius: var(--r-pill); }
.macro--carbs { background: var(--mint); color: var(--mint-ink); }
.macro--protein { background: var(--chip-cyan); color: var(--cyan-ink); }
.macro--fat { background: var(--chip-amber); color: var(--amber-ink); }

/* ---------- Stats strip ---------- */
.stats { padding-block: 48px 24px; }
.stats__card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  display: grid; grid-template-columns: repeat(4, 1fr);
  padding-block: 32px;
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding-inline: 12px; }
.stat + .stat { border-inline-start: 1px solid #EFEFF4; }
.stat__num { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.stat__num--icon { display: inline-flex; align-items: center; justify-content: center; height: 1.5em; color: var(--ink); }
.stat__num--icon svg { width: 34px; height: 36px; }
.stat__cap { font-size: 14px; font-weight: 600; color: var(--text-2); }

/* ---------- Scanner ---------- */
.scanner__grid { display: grid; grid-template-columns: 460px 1fr; gap: 80px; align-items: center; }
.scanner__visual { position: relative; }
.scanner__status {
  position: absolute; inset-block-start: 20px; inset-inline-start: 50%; transform: translateX(-50%);
  background: rgba(255,255,255,.14); color: #fff;
  font-size: 11px; font-weight: 700; letter-spacing: .04em;
  padding: 6px 14px; border-radius: var(--r-pill);
}
.scan-result {
  position: absolute; inset-block-end: -48px; inset-inline-end: -16px;
  width: min(300px, 92%);
  background: var(--card); border-radius: var(--r-card-sm);
  box-shadow: var(--shadow-float);
  padding: 16px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
/* The card is a link to the store (phones) or to the download section (desktop) */
a.scan-result { color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
a.scan-result:hover { color: inherit; transform: translateY(-3px); box-shadow: 0 28px 56px rgba(23,23,28,.2); }
a.scan-result:hover .scan-result__btn { background: var(--accent-hover); }
a.scan-result:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.scan-result__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.scan-result__name { font-size: 15px; font-weight: 800; }
.scan-result__kcal { background: var(--mint); color: var(--mint-ink); font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.scan-result__macros { display: flex; gap: 8px; }
.scan-result__macros .macro { flex: 1; text-align: center; font-size: 10.5px; padding: 6px 6px; white-space: nowrap; }
.scan-result__btn { background: var(--accent); color: #fff; font-size: 13px; font-weight: 700; text-align: center; padding: 10px; border-radius: var(--r-pill); }
.scanner__copy { display: flex; flex-direction: column; gap: 20px; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.checklist li { display: flex; align-items: flex-start; gap: 12px; font-size: 16px; font-weight: 600; color: #34343C; }
.checklist .check { width: 26px; height: 26px; flex: none; border-radius: 50%; background: var(--mint); display: grid; place-items: center; }

/* ---------- How it works ---------- */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.cards-3--2 { grid-template-columns: repeat(2, minmax(0, 384px)); justify-content: center; }
.cards-3--1 { grid-template-columns: minmax(0, 520px); justify-content: center; }
.step-card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 32px;
  display: flex; flex-direction: column; gap: 16px;
}
.step-card__num {
  width: 44px; height: 44px; border-radius: var(--r-tile);
  display: grid; place-items: center;
  font-size: 18px; font-weight: 800;
}
.step-card__num--mint { background: var(--mint); color: var(--mint-ink); }
.step-card__num--violet { background: var(--accent-light); color: var(--accent); }
.step-card__num--amber { background: var(--chip-amber); color: var(--amber-ink); }
.step-card h3 { font-size: 21px; font-weight: 800; }
.step-card p { font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* ---------- Features ---------- */
.features__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-block-end: 48px; }
.features__head .h2 { max-width: 560px; }
.features__sub { font-size: 16px; line-height: 1.6; color: var(--text-2); max-width: 380px; }
.feature-card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.feature-card__icon { width: 44px; height: 44px; border-radius: var(--r-tile); display: grid; place-items: center; }
.icon-bg--violet { background: var(--accent-light); }
.icon-bg--mint { background: var(--mint); }
.icon-bg--amber { background: var(--chip-amber); }
.icon-bg--cyan { background: var(--chip-cyan); }
.feature-card h3 { font-size: 19px; font-weight: 800; }
.feature-card p { font-size: 15px; line-height: 1.6; color: var(--text-2); }

/* ---------- Reviews ---------- */
.review-card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 28px;
  display: flex; flex-direction: column; gap: 18px;
}
.stars { display: flex; gap: 3px; }
.review-card blockquote { margin: 0; font-size: 16px; line-height: 1.6; color: #34343C; font-weight: 500; }
.review-card figcaption { display: flex; align-items: center; gap: 12px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font-size: 15px; font-weight: 800; }
.review-card .name { font-size: 15px; font-weight: 700; }
.review-card .meta { font-size: 13px; color: var(--text-3); font-weight: 600; }
/* Equal-height review cards (tallest review sets the height), name pinned to the bottom */
.cards-3:has(> .review-card) { grid-auto-rows: 1fr; }
.review-card figcaption { margin-block-start: auto; }
/* A review links to its source in the store: the source line is the link, stretched over the card */
.review-card:has(.review-card__link) { position: relative; transition: transform .2s ease, box-shadow .2s ease; }
.review-card:has(.review-card__link):hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(23,23,28,.12); }
.review-card__link::before { content: ""; position: absolute; inset: 0; border-radius: var(--r-card); }
.review-card__link::after { content: " \2197"; }
.review-card:hover .review-card__link { color: var(--accent); }
.review-card__link:focus-visible { outline: none; }
.review-card__link:focus-visible::before { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Pricing ---------- */
.pricing__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: stretch; }
.price-card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  display: flex; flex-direction: column; gap: 14px;
  position: relative;
}
.price-card__plan { font-size: 15px; font-weight: 700; color: var(--text-2); }
.price-card__price { display: flex; align-items: baseline; gap: 4px; }
.price-card__num { font-size: 36px; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }
.price-card__per { font-size: 14px; color: var(--text-3); font-weight: 600; white-space: nowrap; }
.price-card__cur { font-size: 18px; font-weight: 800; white-space: nowrap; }
.price-card__note { font-size: 13px; color: var(--text-3); font-weight: 600; }
.save-chip { align-self: flex-start; background: var(--mint); color: var(--mint-ink); font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: var(--r-pill); }
.price-card .btn { margin-block-start: auto; width: 100%; font-size: 14px; white-space: nowrap; }
.price-card .btn--split { padding-inline: 16px 6px; gap: 8px; }
.price-card--featured { background: var(--ink); box-shadow: var(--shadow-dark); }
.price-card--featured .price-card__plan { color: #B9B9C2; }
.price-card--featured .price-card__num, .price-card--featured .price-card__cur { color: #fff; }
.price-card--featured .price-card__per, .price-card--featured .price-card__note { color: #B9B9C2; }
.price-card--featured .save-chip { background: var(--mint-glyph); }
.best-badge {
  position: absolute; inset-block-start: -14px; inset-inline-start: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em;
  padding: 6px 14px; border-radius: var(--r-pill); white-space: nowrap;
}
[dir="rtl"] .best-badge { transform: translateX(50%); }
.pricing__foot { text-align: center; font-size: 14px; color: var(--text-3); font-weight: 600; margin-block-start: 32px; }

/* ---------- Blog teaser ---------- */
.blog-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; margin-block-end: 40px; }
.blog-head__text { display: flex; flex-direction: column; gap: 14px; }
.link-more { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: var(--accent); white-space: nowrap; }
[dir="rtl"] .link-more svg { transform: scaleX(-1); }
.post-card {
  background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex; flex-direction: column;
}
.post-card:hover { color: inherit; }
.post-card:hover h3 { color: var(--accent); }
.post-card__media { height: 180px; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--text-3); }
.post-card__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.cat-chip { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: var(--r-pill); }
.cat-chip--mint { background: var(--mint); color: var(--mint-ink); }
.cat-chip--amber { background: var(--chip-amber); color: var(--amber-ink); }
.cat-chip--violet { background: var(--accent-light); color: var(--accent); }
.post-card h3 { font-size: 19px; font-weight: 800; line-height: 1.25; transition: color .18s ease; }
.post-card__meta { font-size: 14px; color: var(--text-3); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq__grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; align-items: start; }
.faq__list { display: flex; flex-direction: column; gap: 14px; }
.faq-item {
  background: var(--card); border-radius: var(--r-card-sm);
  box-shadow: var(--shadow-card);
  padding: 8px 28px;
}
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  list-style: none; cursor: pointer;
  font-size: 18px; font-weight: 800;
  padding-block: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary svg { flex: none; transition: transform .2s ease; }
.faq-item[open] summary svg { transform: rotate(180deg); }
.faq-item p { font-size: 15px; line-height: 1.6; color: var(--text-2); padding-block-end: 20px; }

/* ---------- Final CTA ---------- */
.cta { padding-block: 72px 40px; }
.cta__card {
  position: relative; overflow: hidden;
  background: var(--ink); border-radius: 32px;
  padding: 64px 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 60px;
  color: #fff;
}
.cta__glyph { position: absolute; inset-block-start: -60px; inset-inline-end: -60px; opacity: .14; pointer-events: none; }
.cta__copy { display: flex; flex-direction: column; gap: 20px; max-width: 560px; }
.cta__title { font-size: clamp(28px, 3vw, 40px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.12; }
:lang(ar) .cta__title { line-height: 1.3; letter-spacing: 0; }
.cta__sub { font-size: 17px; line-height: 1.6; color: #B9B9C2; }
.qr-card {
  flex: none; position: relative; z-index: 1;
  background: #fff; color: var(--ink);
  border-radius: var(--r-card);
  padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.qr-card__box { width: 140px; height: 140px; background: var(--bg); border-radius: var(--r-tile); display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--text-3); text-align: center; }
.qr-card__img { width: 140px; height: 140px; object-fit: contain; border-radius: var(--r-tile); background: #fff; }
.qr-card__cap { font-size: 13px; font-weight: 700; color: var(--text-2); }
/* The QR card is a link: a click does what a scan does */
a.qr-card { transition: transform .2s ease; }
a.qr-card:hover { color: var(--ink); transform: translateY(-3px); }
a.qr-card:hover .qr-card__cap { color: var(--accent); }
a.qr-card:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* ---------- Footer ---------- */
.site-footer { padding-block: 24px 56px; }
.footer__grid { display: flex; justify-content: space-between; gap: 60px; }
.footer__brand { display: flex; flex-direction: column; gap: 14px; max-width: 300px; }
.footer__tagline { font-size: 14px; line-height: 1.6; color: var(--text-3); font-weight: 500; }
.footer__cols { display: flex; gap: 80px; }
.footer__col { display: flex; flex-direction: column; gap: 12px; font-size: 14px; }
.footer__col h3 { font-size: 14px; font-weight: 800; margin: 0; }
.footer__col a, .footer__col span { color: var(--text-3); font-weight: 600; }
.footer__bottom {
  border-block-start: 1px solid var(--line);
  margin-block-start: 32px; padding-block-start: 24px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 13px; color: var(--text-3); font-weight: 600;
}

/* ---------- Hero on desktop: sized from the window height ----------
   The whole first screen (headline, buttons, phone) stays visible without scrolling on any
   desktop window from about 560px tall. --ph is the phone height: the window minus the 101px
   sticky header and the section paddings. Every phone detail is a fraction of its width (--pw). */
@media (min-width: 1081px) {
  .hero {
    --u: 1vh;
    --ph: clamp(400px, calc(var(--u) * 93 - 101px), 640px);
    --pw: calc(var(--ph) * .4772);
    padding-block: clamp(12px, calc(var(--u) * 3), 40px) clamp(12px, calc(var(--u) * 2.4), 24px);
    overflow: visible; overflow-x: clip; /* the phone shadow may fall past the section edge; sideways the blob is still clipped */
  }
  @supports (height: 1svh) { .hero { --u: 1svh; } }
  .hero__copy { gap: clamp(12px, calc(var(--u) * 3), 24px); }
  .hero .h1 { font-size: clamp(32px, min(4.5vw, calc(var(--u) * 7.4)), 58px); }
  .hero__lead { font-size: clamp(15px, calc(var(--u) * 2.3), 18px); }
  .hero__cta { gap: clamp(10px, calc(var(--u) * 2.2), 18px); }
  .hero__visual { min-height: var(--ph); display: grid; place-items: center; }
  .hero__blob { inset-block-start: calc(var(--ph) * .06); width: calc(var(--ph) * .659); height: calc(var(--ph) * .79); border-radius: calc(var(--ph) * .158); }
  .hero__glyph { inset-block-start: calc(var(--ph) * .115); width: calc(var(--ph) * .23); height: calc(var(--ph) * .23); }
  .hero .phone { width: var(--pw); border-radius: calc(var(--pw) * .1724); padding: calc(var(--pw) * .031); }
  .hero .phone__screen { border-radius: calc(var(--pw) * .1414); }
  .hero .phone__island { top: calc(var(--pw) * .0345); width: calc(var(--pw) * .29); height: calc(var(--pw) * .0828); }
  .hero .phone::before { top: calc(var(--pw) * .441); height: calc(var(--pw) * .159); box-shadow: 0 calc(var(--pw) * .2) 0 #16181F, 0 calc(var(--pw) * -.152) 0 calc(var(--pw) * -.041) #16181F; }
  .hero .phone::after { top: calc(var(--pw) * .579); height: calc(var(--pw) * .255); }
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__links, .nav__end .lang-switch { display: none; }
  .nav__burger { display: inline-flex; }
  .hero__grid { grid-template-columns: 1fr; gap: 24px; }
  .hero__visual { min-height: 650px; }
  .scanner__grid { grid-template-columns: 1fr; gap: 72px; }
  .scan-result { inset-inline-end: 0; }
  .features__head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-3:has(> .review-card) { grid-auto-rows: auto; }
  .pricing__grid { grid-template-columns: repeat(2, 1fr); }
  .faq__grid { grid-template-columns: 1fr; gap: 24px; }
  .cta__card { flex-direction: column; align-items: flex-start; padding: 44px 32px; }
  .footer__grid { flex-direction: column; gap: 32px; }
  .footer__cols { flex-wrap: wrap; gap: 40px; }
}

@media (max-width: 640px) {
  .section { padding-block: 48px; }
  .nav { gap: 10px; padding-inline-start: 14px; }
  .nav__end { gap: 6px; }
  .nav__end .btn--dark { white-space: nowrap; padding: 10px 16px; font-size: 13px; }
  .label-long { display: none; }
  .label-short { display: inline; }
  .stats__card { grid-template-columns: repeat(2, 1fr); gap: 24px 0; }
  .stat:nth-child(3) { border-inline-start: 0; }
  .pricing__grid { grid-template-columns: 1fr; }
  .best-badge { inset-inline-start: 24px; transform: none; }
  [dir="rtl"] .best-badge { transform: none; }
  .hero { padding-block-start: 24px; }
  .hero__cta .btn, .hero__cta .store-badges { width: 100%; }
  .hero__cta .btn { justify-content: space-between; }
  .store-badges { flex-direction: column; }
  .badge-store { justify-content: center; }
  /* Hero: both store buttons side by side, so they stay on the first screen of small phones */
  .hero .store-badges { flex-direction: row; flex-wrap: nowrap; gap: 10px; }
  .hero .badge-store { flex: 1 1 0; min-width: 0; padding-inline: 10px; gap: 8px; }
  .hero .badge-store__name { font-size: 15px; white-space: nowrap; }
  .hero .badge-store__pre { white-space: nowrap; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
  .scanner__visual { flex-direction: column; align-items: center; }
  .scanner__visual .scan-result { position: relative; inset: auto; margin-block-start: -36px; margin-inline: auto; width: min(300px, 92%); }
}

/* ---------- Reduced motion ---------- */
/* Very narrow phones (Galaxy Fold folded, 280-359px): nothing may push the page wider than the screen */
@media (max-width: 359px) {
  :root { --gutter: 16px; }
  .nav__end .btn--dark { display: none; }
  .price-card { padding: 24px 18px; }
  .price-card__num { font-size: 30px; }
  .price-card .btn { white-space: normal; }
  .link-more { white-space: normal; }
  .scan-result__macros { flex-wrap: wrap; }
  .hero .store-badges { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

/* Language switcher inside the mobile nav panel */
.lang-switch--panel { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 15px; }
.nav-panel .lang-switch--panel a { padding: 0; }
