﻿/* =============================================================================
   RecipeFlow — DESIGN SYSTEM
   Food-focused · Modern Minimal · Fully Responsive
   ============================================================================= */

/* ── Custom Properties ──────────────────────────────────────────────────────── */
:root {
  /* Brand palette — synced with app Color.kt (Material Design 3, green) */
  --c-brand:        #216A4D;   /* primaryLight */
  --c-brand-d:      #005137;   /* onPrimaryContainerLight */
  --c-brand-light:  #A9F2CC;   /* primaryContainerLight */
  --c-green:        #4D6357;   /* secondaryLight */
  --c-green-light:  #CFE9D9;   /* secondaryContainerLight */
  --c-teal:         #3D6473;   /* tertiaryLight */
  --c-teal-light:   #C1E9FB;   /* tertiaryContainerLight */
  /* Keep amber as warm food accent (complements green palette) */
  --c-amber:        #F4A261;
  --c-amber-light:  #FEF3E2;

  /* Surfaces — synced with app backgroundLight / surfaceContainers */
  --c-bg:           #F5FBF5;   /* backgroundLight */
  --c-bg-alt:       #EDF2EC;   /* inverseOnSurfaceLight */
  --c-surface:      #FFFFFF;
  --c-border:       #BFC9C1;   /* outlineVariantLight */
  --c-border-focus: #216A4D;   /* primaryLight */
  --c-footer-bg:    #171D19;   /* footer stays dark even when --c-text flips in dark mode */

  /* Text — synced with app onBackgroundLight / onSurfaceVariantLight */
  --c-text:         #171D19;   /* onBackgroundLight */
  --c-text-2:       #404943;   /* onSurfaceVariantLight */
  --c-text-3:       #707973;   /* outlineLight */

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semi:     600;
  --fw-bold:     700;
  --fw-xbold:    800;

  /* Spacing scale */
  --s1: 4px;   --s2: 8px;   --s3: 12px;  --s4: 16px;
  --s5: 20px;  --s6: 24px;  --s8: 32px;  --s10: 40px;
  --s12: 48px; --s16: 64px; --s20: 80px; --s24: 96px;

  /* Radius */
  --r-sm:   6px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   32px;
  --r-full: 9999px;

  /* Shadows — general */
  --sh-sm:    0 1px 2px rgba(23,29,25,.06);
  --sh-md:    0 4px 16px rgba(23,29,25,.08), 0 1px 3px rgba(23,29,25,.04);
  --sh-lg:    0 16px 40px rgba(23,29,25,.10), 0 4px 12px rgba(23,29,25,.05);
  --sh-xl:    0 32px 80px rgba(23,29,25,.12), 0 8px 24px rgba(23,29,25,.06);
  --sh-brand: 0 8px 32px rgba(33,106,77,.28);
  /* App-card floating shadows */
  --sh-card:       0 2px 4px rgba(23,29,25,.05), 0 8px 24px rgba(23,29,25,.10), 0 32px 64px rgba(23,29,25,.12);
  --sh-card-hover: 0 2px 4px rgba(23,29,25,.04), 0 16px 40px rgba(23,29,25,.16), 0 48px 96px rgba(23,29,25,.18);

  /* Animation */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:   cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast:   150ms;
  --t-base:   250ms;
  --t-slow:   400ms;

  /* Layout */
  --max-w:       1200px;
  --header-h:    64px;
  --header-gap:  var(--s2);            /* gap from viewport top/sides */
  --header-top:  calc(var(--header-h) + var(--header-gap)); /* total space below header */
  --cta-bar-h:   72px;                 /* mobile sticky CTA bar full height */
}

/* ── Dark Theme ──────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --c-brand:        #79DCAD;
    --c-brand-d:      #C2EDCF;
    --c-brand-light:  #004D30;
    --c-green:        #B3CCBA;
    --c-green-light:  #2B3E35;
    --c-teal:         #A0CFE0;
    --c-teal-light:   #163344;
    --c-amber:        #F4A261;
    --c-amber-light:  #3A2200;

    --c-bg:           #0F1511;
    --c-bg-alt:       #151B17;
    --c-surface:      #1B2220;
    --c-border:       #2B3630;
    --c-border-focus: #79DCAD;
    --c-footer-bg:    #0A0E0C;

    --c-text:         #E1E9E3;
    --c-text-2:       #A5B2AA;
    --c-text-3:       #66756B;

    --sh-sm:    0 1px 2px rgba(0,0,0,.30);
    --sh-md:    0 4px 16px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.25);
    --sh-lg:    0 16px 40px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.30);
    --sh-xl:    0 32px 80px rgba(0,0,0,.55), 0 8px 24px rgba(0,0,0,.35);
    --sh-brand: 0 8px 32px rgba(121,220,173,.20);
    --sh-card:       0 2px 4px rgba(0,0,0,.25), 0 8px 24px rgba(0,0,0,.45), 0 32px 64px rgba(0,0,0,.55);
    --sh-card-hover: 0 2px 4px rgba(0,0,0,.25), 0 16px 40px rgba(0,0,0,.55), 0 48px 96px rgba(0,0,0,.65);
  }

  /* Glassmorphism header */
  .site-header {
    background: rgba(0,0,0,.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: rgba(121,220,173,.24);
  }
  .site-header.scrolled {
    background: rgba(0,0,0,.98);
    border-color: var(--c-border);
  }

  /* Hero background glow — boosted for dark bg */
  .hero::before {
    background:
      radial-gradient(ellipse 80% 50% at 65% 0%, rgba(121,220,173,.10) 0%, transparent 65%),
      radial-gradient(ellipse 50% 40% at 10% 80%, rgba(160,207,224,.08) 0%, transparent 55%);
  }

  /* Buttons */
  .btn-secondary:hover { background: rgba(255,255,255,.06); }
  .btn-primary:hover   { box-shadow: 0 12px 40px rgba(121,220,173,.28); }

  /* CTA banner — keep it rich on dark background */
  .cta-banner { background: linear-gradient(135deg, #004D30 0%, #001A0F 100%); }

  /* App card — softer border + brand-tinted glow in dark */
  .app-card { border-color: rgba(255,255,255,.08); }
  .app-card-wrap::before {
    background: radial-gradient(ellipse at 50% 50%, rgba(121,220,173,.18) 0%, transparent 70%);
  }
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-top) + var(--s4));
}
body {
  font-family: var(--font);
  background: var(--c-bg);
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-width: 320px;
  overflow-x: clip;
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul, ol { list-style: none; }
h1,h2,h3,h4,h5,h6 { line-height: 1.2; }
summary { list-style: none; }
summary::-webkit-details-marker { display: none; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--s6); }
@media (min-width: 768px) { .container { padding: 0 var(--s8); } }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Skip to content link */
.skip-link {
  position: absolute; top: var(--s2); left: var(--s2); z-index: 9999;
  background: var(--c-brand); color: #fff; padding: 8px 16px;
  border-radius: var(--r-md); font-size: .875rem; font-weight: var(--fw-semi);
  text-decoration: none; transform: translateY(-120%);
  transition: transform var(--t-fast);
}
.skip-link:focus-visible { transform: translateY(0); outline: 3px solid var(--c-amber); outline-offset: 2px; }

/* Scroll-reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out);
}
.reveal.revealed { opacity: 1; transform: none; }
.reveal-d1 { transition-delay:  80ms; }
.reveal-d2 { transition-delay: 160ms; }
.reveal-d3 { transition-delay: 240ms; }
.reveal-d4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .app-card { opacity: 1; transform: none; transition: none; }
  .app-card:hover { transform: none; }
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  padding: 12px 24px;
  border-radius: var(--r-full);
  font-weight: var(--fw-semi);
  font-size: .9375rem;
  line-height: 1;
  transition: all var(--t-base) var(--ease-out);
  white-space: nowrap;
  text-decoration: none;
}
.btn-primary { background: var(--c-brand); color: #fff; box-shadow: var(--sh-brand); }
.btn-primary:hover { background: var(--c-brand-d); transform: translateY(-1px); box-shadow: 0 12px 40px rgba(33,106,77,.38); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }

.btn-secondary {
  background: transparent;
  color: var(--c-text);
  border: 1.5px solid var(--c-border);
}
.btn-secondary:hover { border-color: var(--c-text); background: rgba(23,29,25,.04); }
.btn-secondary:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }

.btn-lg { padding: 14px 32px; font-size: 1.0625rem; }

/* Google Play badge */
.gplay-btn {
  display: inline-block;
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base) var(--ease-out);
  text-decoration: none;
  border-radius: var(--r-md);
  line-height: 0;
}
.gplay-btn img { display: block; height: 54px; width: auto; }
.gplay-btn:hover { transform: translateY(-2px); box-shadow: var(--sh-lg); }
.gplay-btn:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }

/* ── Badges ─────────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 4px 12px; border-radius: var(--r-full);
  font-size: .75rem; font-weight: var(--fw-semi);
  letter-spacing: .05em; text-transform: uppercase;
}
.badge-brand   { background: var(--c-brand-light); color: var(--c-brand-d); }
.badge-green   { background: var(--c-green-light); color: var(--c-green); }
.badge-neutral { background: var(--c-bg-alt); color: var(--c-text-2); }

/* ── Sections ───────────────────────────────────────────────────────────────── */
.section     { padding: var(--s20) 0; }
.section-alt { padding: var(--s20) 0; background: var(--c-bg-alt); }
@media (max-width: 767px) {
  .section     { padding: var(--s12) 0; }
  .section-alt { padding: var(--s12) 0; }
}

.section__label {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: .8125rem; font-weight: var(--fw-semi);
  color: var(--c-brand); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: var(--s4);
}
.section__title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: var(--fw-xbold);
  color: var(--c-text);
  margin-bottom: var(--s4);
  letter-spacing: -.02em;
}
.section__subtitle {
  font-size: 1.125rem; color: var(--c-text-2); line-height: 1.7; max-width: 600px;
}
.section__header { text-align: center; margin-bottom: var(--s16); }
.section__header .section__subtitle { margin: 0 auto; }

/* ── Header ─────────────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: var(--header-gap);
  left: var(--header-gap);
  right: var(--header-gap);
  z-index: 100;
  height: var(--header-h);
  background: rgba(245,251,245,.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(191,201,193,.5);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  transition: background var(--t-base), box-shadow var(--t-base), border-color var(--t-base);
}
.site-header.scrolled {
  background: rgba(245,251,245,.97);
  border-color: var(--c-border);
  box-shadow: var(--sh-lg);
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background: rgba(0,0,0,.96);
    border-color: rgba(121,220,173,.24);
  }

  .site-header.scrolled {
    background: rgba(0,0,0,.98);
    border-color: var(--c-border);
  }
}

.site-header .container { height: 100%; }
.site-header__inner {
  display: flex; align-items: center; height: 100%; gap: var(--s6);
}
.site-header__logo {
  display: flex; align-items: center; gap: var(--s2);
  font-weight: var(--fw-xbold); font-size: 1.25rem; color: var(--c-text);
  flex-shrink: 0; text-decoration: none;
}
.site-header__logo-emoji { font-size: 1.5rem; line-height: 1; }
.site-header__logo-icon  { width: 28px; height: 28px; border-radius: var(--r-sm); flex-shrink: 0; }
.site-header__logo-name  { color: var(--c-brand); }

.site-header__nav { display: none; gap: var(--s6); margin-left: auto; }
.site-header__nav .nav-link {
  font-size: .9375rem; font-weight: var(--fw-medium); color: var(--c-text-2);
  transition: color var(--t-fast); text-decoration: none;
}
.site-header__nav .nav-link:hover { color: var(--c-text); }
.site-header__nav .nav-link:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 4px; border-radius: 4px; }
.site-header__nav .nav-link[aria-current="page"] { color: var(--c-brand); }

.site-header__right {
  display: flex; align-items: center; gap: var(--s4); margin-left: auto;
}
@media (min-width: 900px) {
  .site-header__nav { display: flex; margin-left: auto; }
  .site-header__right { margin-left: 0; }
  .burger { display: none !important; }
}

/* Burger button */
.burger {
  display: flex; flex-direction: column; gap: 5px;
  width: 28px; padding: 4px 0;
}
.burger span {
  display: block; height: 2px; background: var(--c-text);
  border-radius: 2px; transition: all var(--t-base) var(--ease-out);
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.burger:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 4px; border-radius: var(--r-sm); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: calc(var(--header-gap) + var(--header-h) + var(--s2));
  left: var(--header-gap);
  right: var(--header-gap);
  z-index: 99;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: var(--s6);
  display: flex; flex-direction: column; gap: var(--s3);
  transform: translateY(-120%); opacity: 0;
  transition: transform var(--t-base) var(--ease-out), opacity var(--t-base);
  pointer-events: none;
}
.mobile-menu.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.mobile-menu .nav-link {
  font-size: 1rem; font-weight: var(--fw-medium); color: var(--c-text-2);
  padding: var(--s3) 0; border-bottom: 1px solid var(--c-border); display: block;
}
.mobile-menu .nav-link:hover { color: var(--c-brand); }
.mobile-menu .btn { margin-top: var(--s3); align-self: flex-start; }
.mobile-menu .nav-link:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 4px; border-radius: 4px; }

/* ── Language Switcher ──────────────────────────────────────────────────────── */
.lang-sw { position: relative; }
.lang-sw__btn {
  display: flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: var(--r-sm); font-size: .8125rem; font-weight: var(--fw-medium);
  color: var(--c-text-2); border: 1px solid var(--c-border);
  transition: all var(--t-fast); cursor: pointer;
}
.lang-sw__btn:hover { background: var(--c-bg-alt); color: var(--c-text); }
.lang-sw__btn:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }
.lang-sw__chev { transition: transform var(--t-fast); }
.lang-sw.is-open .lang-sw__chev { transform: rotate(180deg); }
.lang-sw__drop {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: var(--s2);
  box-shadow: var(--sh-lg); min-width: 140px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px; z-index: 200;
}
.lang-sw__drop[hidden] { display: none; }
.lang-item {
  padding: 6px 10px; border-radius: var(--r-sm); font-size: .8125rem;
  font-weight: var(--fw-medium); color: var(--c-text-2); text-align: center;
  transition: all var(--t-fast); display: block; text-decoration: none;
}
.lang-item:hover { background: var(--c-bg-alt); color: var(--c-text); }
.lang-item:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.lang-item--active { color: var(--c-brand); font-weight: var(--fw-semi); background: var(--c-brand-light); }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
.hero {
  padding: calc(var(--header-top) + var(--s20)) 0 var(--s20);
  overflow: hidden; position: relative;
}
.hero::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(ellipse 80% 50% at 65% 0%, rgba(33,106,77,.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(61,100,115,.05) 0%, transparent 55%);
  pointer-events: none;
}
.hero__inner {
  display: grid; grid-template-columns: 1fr; gap: var(--s12);
  align-items: center; position: relative;
}
@media (min-width: 900px) {
  .hero__inner { grid-template-columns: 1fr 1fr; gap: var(--s16); }
}

.hero__badge {
  display: inline-flex; align-items: center; gap: var(--s2);
  background: var(--c-brand-light); color: var(--c-brand-d);
  padding: 6px 14px; border-radius: var(--r-full);
  font-size: .8125rem; font-weight: var(--fw-semi); margin-bottom: var(--s5);
}
.hero__badge-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--c-brand);
  animation: dot-pulse 2s ease-in-out infinite;
}
@keyframes dot-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.75); }
}

.hero__title {
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: var(--fw-xbold); line-height: 1.1;
  margin-bottom: var(--s5); letter-spacing: -.02em;
}
.hero__title-brand {
  background: linear-gradient(135deg, var(--c-brand) 0%, var(--c-amber) 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero__subtitle { font-size: 1.125rem; color: var(--c-text-2); line-height: 1.7; margin-bottom: var(--s8); max-width: 480px; }
.hero__actions { display: flex; gap: var(--s4); flex-wrap: wrap; align-items: center; margin-bottom: var(--s10); }
.hero__stats { display: grid; grid-template-columns: repeat(2, auto); gap: var(--s4) var(--s8); }
@media (min-width: 480px) { .hero__stats { grid-template-columns: repeat(4, auto); } }
.hero__stat-value { font-size: 1.625rem; font-weight: var(--fw-xbold); color: var(--c-text); line-height: 1; }
.hero__stat-label { font-size: .8125rem; color: var(--c-text-3); margin-top: 4px; }

/* Hero visual area */
.hero__visual { display: flex; justify-content: center; align-items: flex-start; }

/* ── App Card Stack (hero — 3-card perspective layout) ───────────────────────── */
.app-stack {
  position: relative; width: 320px; height: 520px;
}

/* Main card: centered + subtle 3-D tilt */
.app-stack .app-card-wrap:nth-child(1) {
  position: absolute; width: 224px; top: 0;
  left: 50%; z-index: 2;
  transform: translateX(-55%) perspective(900px) rotateY(-6deg) rotateX(2deg);
}
/* Left background card */
.app-stack .app-card-wrap:nth-child(2) {
  position: absolute; width: 192px; top: 32px; left: 0; z-index: 1;
  transform: rotate(-7deg); opacity: .62;
}
/* Right background card */
.app-stack .app-card-wrap:nth-child(3) {
  position: absolute; width: 186px; top: 50px; right: 0; z-index: 1;
  transform: rotate(6deg); opacity: .68;
}

@media (max-width: 479px) {
  .app-stack {
    width: min(300px, 88vw); height: auto; min-height: 380px;
  }
  .app-stack .app-card-wrap:nth-child(1) { width: min(224px, 70vw); }
  .app-stack .app-card-wrap:nth-child(2) { width: min(192px, 60vw); }
  .app-stack .app-card-wrap:nth-child(3) { width: min(186px, 58vw); }
}

/* ── App Card — floating screenshot component (replaces phone-frame) ──────────── */
.app-card-wrap {
  position: relative;
  display: inline-flex;
  vertical-align: top;
}

/* Gradient glow behind the card */
.app-card-wrap::before {
  content: '';
  position: absolute;
  inset: 28% 8% -18% 8%;
  background: radial-gradient(ellipse at 50% 50%, rgba(33,106,77,.38) 0%, transparent 70%);
  filter: blur(40px);
  z-index: 0;
  pointer-events: none;
  opacity: .80;
  transition: opacity var(--t-slow) var(--ease-out);
}
.app-card-wrap:hover::before { opacity: 1; }

/* Hero main card — glow always visible */
.app-stack .app-card-wrap:nth-child(1)::before { opacity: .85; }

/* Gallery items — glow only on hover */
.ss-item .app-card-wrap::before { opacity: 0; }
.ss-item .app-card-wrap:hover::before { opacity: .65; }

.app-card {
  position: relative;
  z-index: 1;
  border-radius: 32px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--sh-card);
  transition:
    transform var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
  will-change: transform;
}

.app-card img {
  width: 100%;
  height: auto;
  display: block;
}

.app-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--sh-card-hover);
}

/* Sizing for feature sections */
.feature-section__visual .app-card-wrap { width: 260px; max-width: 100%; }

/* ── Screenshot Gallery ──────────────────────────────────────────────────────── */
.ss-gallery {
  display: flex; gap: var(--s5); overflow-x: auto; padding: var(--s4) 0 var(--s6);
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: var(--c-border) transparent;
}
.ss-gallery::-webkit-scrollbar { height: 4px; }
.ss-gallery::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 2px; }

.ss-item { flex-shrink: 0; scroll-snap-align: start; text-align: center; }
.ss-item .app-card-wrap { width: 190px; }
.ss-item__caption { font-size: .8125rem; color: var(--c-text-3); margin-top: var(--s3); }

/* ── Feature Sections ───────────────────────────────────────────────────────── */
.feature-section { padding: var(--s16) 0; }
.feature-section:nth-of-type(even) { background: var(--c-bg-alt); }

.feature-section__inner {
  display: grid; grid-template-columns: 1fr; gap: var(--s10); align-items: center;
}
@media (min-width: 900px) {
  .feature-section__inner { grid-template-columns: 1fr 1fr; gap: var(--s16); }
  .feature-section__inner--reverse { direction: rtl; }
  .feature-section__inner--reverse > * { direction: ltr; }
}
.feature-section__body { margin-top: var(--s4); color: var(--c-text-2); line-height: 1.75; }
.feature-section__body p + p { margin-top: var(--s3); }
.feature-section__keywords { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s5); }
.feature-section__keywords::before {
  content: 'Key capabilities';
  display: block; width: 100%;
  font-size: .6875rem; font-weight: var(--fw-semi);
  color: var(--c-text-3); text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 2px;
}
.feature-section__cta { margin-top: var(--s6); }
.feature-section__visual { display: flex; justify-content: center; }

.kw-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; color: var(--c-brand-d);
  background: var(--c-brand-light); border: 1px solid rgba(33,106,77,.2);
  padding: 4px 10px 4px 8px; border-radius: var(--r-full);
  font-weight: var(--fw-medium);
  transition: background var(--t-fast), border-color var(--t-fast);
}
.kw-chip::before {
  content: '✓'; font-size: .625rem; font-weight: var(--fw-bold);
  color: var(--c-brand); flex-shrink: 0;
}

/* ── Feature Cards ──────────────────────────────────────────────────────────── */
.feature-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: var(--s5); }
.feature-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--s6);
  transition: transform var(--t-base) var(--ease-out), box-shadow var(--t-base), border-color var(--t-base);
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--sh-lg); border-color: rgba(33,106,77,.25); }
.feature-card__icon {
  width: 48px; height: 48px; border-radius: var(--r-md);
  background: var(--c-brand-light); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; margin-bottom: var(--s4);
}
.feature-card__icon--green { background: var(--c-green-light); }
.feature-card__title { font-size: 1rem; font-weight: var(--fw-semi); margin-bottom: var(--s2); }
.feature-card__desc { font-size: .9375rem; color: var(--c-text-2); line-height: 1.65; }

/* ── Stats Row ──────────────────────────────────────────────────────────────── */
.stats-row {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s4);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-xl); box-shadow: var(--sh-md); padding: var(--s6);
}
@media (min-width: 580px) { .stats-row { grid-template-columns: repeat(4, 1fr); } }
.stats-row__item { text-align: center; padding: var(--s4); }
.stats-row__value { font-size: 1.875rem; font-weight: var(--fw-xbold); color: var(--c-brand); line-height: 1; }
.stats-row__label { font-size: .8125rem; color: var(--c-text-3); margin-top: 6px; }
.stats-row__label a {
  color: var(--c-brand); text-decoration: none; font-weight: var(--fw-medium);
  transition: opacity var(--t-fast);
}
.stats-row__label a:hover { opacity: .75; }
.stats-row__label a:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; border-radius: 2px; }

/* ── Advantages ─────────────────────────────────────────────────────────────── */
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--s6); }
.adv-item { display: flex; gap: var(--s4); align-items: flex-start; }
.adv-item__icon {
  width: 44px; height: 44px; border-radius: var(--r-md);
  background: var(--c-brand-light); display: flex; align-items: center;
  justify-content: center; font-size: 1.25rem; flex-shrink: 0;
}
.adv-item__title { font-weight: var(--fw-semi); margin-bottom: 4px; }
.adv-item__desc  { font-size: .875rem; color: var(--c-text-2); line-height: 1.6; }

/* ── Reviews ────────────────────────────────────────────────────────────────── */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s5); }
.review-card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-lg); padding: var(--s6);
}
.review-card__stars { color: #F59E0B; font-size: 1rem; margin-bottom: var(--s3); letter-spacing: 2px; }
.review-card__text  { font-size: .9375rem; color: var(--c-text-2); line-height: 1.7; margin-bottom: var(--s4); font-style: italic; }
.review-card__author { display: flex; align-items: center; gap: var(--s3); }
.review-card__avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--c-brand-light), var(--c-brand));
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: var(--fw-bold); color: var(--c-brand-d); flex-shrink: 0;
}
.review-card__name { font-weight: var(--fw-semi); font-size: .875rem; }
.review-card__meta { font-size: .75rem; color: var(--c-text-3); }

/* ── CTA Banner ─────────────────────────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--c-brand) 0%, #003F2A 100%);
  border-radius: var(--r-xl); padding: var(--s12) var(--s10);
  text-align: center; color: #fff; position: relative; overflow: hidden;
}
.cta-banner::before {
  content: ''; position: absolute; top: -50%; right: -8%;
  width: 420px; height: 420px; background: rgba(255,255,255,.06); border-radius: 50%;
}
.cta-banner::after {
  content: ''; position: absolute; bottom: -40%; left: -5%;
  width: 320px; height: 320px; background: rgba(255,255,255,.05); border-radius: 50%;
}
.cta-banner__title {
  font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: var(--fw-xbold);
  margin-bottom: var(--s3); position: relative; z-index: 1;
}
.cta-banner__sub { font-size: 1rem; opacity: .9; margin-bottom: var(--s6); position: relative; z-index: 1; }
.cta-banner .gplay-btn { position: relative; z-index: 1; }

/* ── Tools Grid ─────────────────────────────────────────────────────────────── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--s4); }
.tool-card {
  display: flex; align-items: center; gap: var(--s3);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: var(--s4) var(--s5);
  transition: all var(--t-base) var(--ease-out); text-decoration: none;
}
.tool-card:hover { border-color: var(--c-brand); box-shadow: var(--sh-md); transform: translateY(-2px); }
.tool-card:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }
.tool-card__icon  { font-size: 1.375rem; flex-shrink: 0; line-height: 1; }
.tool-card__label { font-size: .875rem; font-weight: var(--fw-medium); color: var(--c-text); line-height: 1.3; }

/* ── FAQ ────────────────────────────────────────────────────────────────────── */
.faq-list { display: flex; flex-direction: column; gap: var(--s3); max-width: 780px; margin: 0 auto; }
.faq-item {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); overflow: hidden;
  transition: border-color var(--t-fast);
}
.faq-item[open] { border-color: var(--c-brand); }
.faq-item__q {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  padding: var(--s5) var(--s6); cursor: pointer;
  font-weight: var(--fw-semi); font-size: 1rem; color: var(--c-text);
  user-select: none;
}
.faq-item__q:hover { background: var(--c-bg); }
.faq-item__q:focus-visible { outline: 3px solid var(--c-brand); outline-offset: -3px; }
.faq-item__icon { flex-shrink: 0; color: var(--c-text-3); transition: transform var(--t-base) var(--ease-out); }
.faq-item[open] .faq-item__icon { transform: rotate(180deg); color: var(--c-brand); }
.faq-item__a {
  padding: 0 var(--s6) var(--s5); border-top: 1px solid var(--c-border);
  font-size: .9375rem; color: var(--c-text-2); line-height: 1.75;
}
.faq-item__a p + p { margin-top: var(--s3); }
.faq-item__a a { color: var(--c-brand); text-decoration: underline; }
.faq-item__a ul { list-style: disc; padding-left: 1.5em; margin-top: var(--s2); }
.faq-item__a li { margin-bottom: var(--s1); }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
.site-footer { background: var(--c-footer-bg); color: rgba(255,255,255,.7); padding: var(--s16) 0 var(--s8); }
.site-footer__inner {
  display: grid; grid-template-columns: 1fr; gap: var(--s10); margin-bottom: var(--s10);
}
@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: var(--s8); }
}
.site-footer__brand-logo {
  display: flex; align-items: center; gap: var(--s3);
  font-size: 1.25rem; font-weight: var(--fw-xbold); color: #fff; margin-bottom: var(--s4);
}
.site-footer__brand-desc { font-size: .875rem; line-height: 1.6; margin-bottom: var(--s5); }
.site-footer__col-title {
  font-size: .75rem; font-weight: var(--fw-semi);
  text-transform: uppercase; letter-spacing: .1em;
  color: rgba(255,255,255,.35); margin-bottom: var(--s4);
}
.site-footer__col-links { display: flex; flex-direction: column; gap: var(--s3); }
.site-footer__col-links a { font-size: .875rem; color: rgba(255,255,255,.6); transition: color var(--t-fast); text-decoration: none; }
.site-footer__col-links a:hover { color: #fff; }
.site-footer__col-links a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }
.site-footer__bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s4); flex-wrap: wrap; padding-top: var(--s8);
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .8125rem; color: rgba(255,255,255,.35);
}
.site-footer__bottom a { color: rgba(255,255,255,.5); text-decoration: none; }
.site-footer__bottom a:hover { color: #fff; }

/* ── Related Tools ──────────────────────────────────────────────────────────── */
.rtool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: var(--s4); }
.rtool-card {
  display: flex; align-items: center; gap: var(--s4);
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--r-md); padding: var(--s4) var(--s5);
  text-decoration: none; transition: all var(--t-base) var(--ease-out);
}
.rtool-card:hover { border-color: var(--c-brand); box-shadow: var(--sh-md); transform: translateX(4px); }
.rtool-card:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }
.rtool-card__icon  { font-size: 1.5rem; flex-shrink: 0; line-height: 1; }
.rtool-card__body  { flex: 1; min-width: 0; }
.rtool-card__title { font-weight: var(--fw-semi); font-size: .9rem; color: var(--c-text); margin-bottom: 2px; }
.rtool-card__desc  { font-size: .8125rem; color: var(--c-text-3); }
.rtool-card__arrow { margin-left: auto; color: var(--c-text-3); flex-shrink: 0; transition: color var(--t-fast); }
.rtool-card:hover .rtool-card__arrow { color: var(--c-brand); }

/* ── Reviews – footer link ──────────────────────────────────────────────────── */
.reviews-footer {
  text-align: center; margin-top: var(--s8);
}
.reviews-footer__link {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-size: .9375rem; color: var(--c-text-2); text-decoration: none;
  border: 1.5px solid var(--c-border); border-radius: var(--r-full);
  padding: 10px 20px; transition: all var(--t-base) var(--ease-out);
}
.reviews-footer__link:hover { border-color: var(--c-text); color: var(--c-text); background: rgba(23,29,25,.03); }
.reviews-footer__link:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 3px; }
.reviews-footer__stars { color: #F59E0B; letter-spacing: 1px; }

/* ── Mobile Sticky CTA ──────────────────────────────────────────────────────── */
.mobile-cta-bar {
  position: fixed;
  bottom: var(--header-gap);
  left: var(--header-gap);
  right: var(--header-gap);
  z-index: 98;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  padding: var(--s3) var(--s5);
  padding-bottom: calc(var(--s3) + env(safe-area-inset-bottom, 0px));
  transform: translateY(calc(100% + var(--header-gap) + 4px));
  transition: transform var(--t-base) var(--ease-out);
}
.mobile-cta-bar.is-visible { transform: translateY(0); }
.mobile-cta-bar__inner {
  display: flex; align-items: center; gap: var(--s4);
  max-width: var(--max-w); margin: 0 auto;
}
.mobile-cta-bar__text { flex: 1; min-width: 0; overflow: hidden; }
.mobile-cta-bar__title {
  display: block; font-weight: var(--fw-bold); font-size: .9375rem;
  color: var(--c-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mobile-cta-bar__sub {
  display: block; font-size: .75rem; color: var(--c-text-2); margin-top: 1px;
}
.mobile-cta-bar__btn {
  flex-shrink: 0; padding: 10px 20px; font-size: .875rem;
  min-height: 44px;
}
@media (min-width: 900px) { .mobile-cta-bar { display: none !important; } }

/* Body padding when mobile CTA bar is visible – prevent content overlap */
@media (max-width: 899px) {
  body.has-cta-bar {
    padding-bottom: calc(var(--cta-bar-h) + var(--header-gap) + var(--s2));
  }
}

/* Hide header download btn on mobile – sticky CTA covers it */
@media (max-width: 899px) {
  .site-header__right > .btn-primary { display: none; }
}

/* =============================================================================
   RTL SUPPORT  – Arabic (ar), Persian (fa), Hebrew (iw)
   Applied via  <html dir="rtl">  which build.js sets from LANGUAGE_CATALOG
   ============================================================================= */
[dir="rtl"] {
  /* Reverse horizontal flex layouts */
  .site-header__inner,
  .nav-links,
  .site-header__right      { flex-direction: row-reverse; }

  /* Hero */
  .hero__inner             { direction: rtl; }
  .hero__actions           { flex-direction: row-reverse; }
  .hero__stats             { flex-direction: row-reverse; }

  /* Feature sections */
  .feature-section__inner  { flex-direction: row-reverse; }
  .feature-section__inner--reverse { flex-direction: row; }

  /* Advantages / reviews / tools */
  .adv-item                { flex-direction: row-reverse; }
  .review-card             { text-align: right; }
  .review-card__author     { flex-direction: row-reverse; }

  /* Language switcher */
  .lang-sw__drop           { left: auto; right: 0; }

  /* Footer */
  .footer-grid             { direction: rtl; }
  .gplay-btn               { flex-direction: row-reverse; }

  /* Mobile CTA */
  .mobile-cta-bar__inner   { flex-direction: row-reverse; }

  /* General text alignment */
  .hero__title,
  .hero__subtitle,
  .section__title,
  .section__label,
  p, h1, h2, h3, h4, li    { text-align: right; }

  /* Arrow glyphs – reverse direction */
  .btn::after              { content: ' ←'; }

  /* Related tools card */
  .rtool-card              { flex-direction: row-reverse; }
  .rtool-card__arrow       { margin-left: 0; margin-right: auto;
                             transform: scaleX(-1); }

  /* Reviews footer link */
  .reviews-footer__link    { flex-direction: row-reverse; }
}
