/* ==========================================================================
   Foodccine Company Homepage — Light & Dark + Bilingual (EN / AR RTL)
   Brand Red derived directly from Logo Red.png: #BF1B2A
   ========================================================================== */

:root,
[data-theme="light"] {
  --brand-red: #bf1b2a;
  --brand-red-hover: #a11522;
  --brand-red-accent: #bf1b2a;
  --brand-red-soft: rgba(191, 27, 42, 0.09);
  --brand-red-border: rgba(191, 27, 42, 0.24);

  --bg-primary: #ffffff;
  --bg-secondary: #f6f7f9;
  --bg-card: #ffffff;
  --bg-card-alt: #f4f5f7;
  --bg-header: rgba(255, 255, 255, 0.86);

  --text-primary: #14161b;
  --text-secondary: #565d6a;
  --text-muted: #78808f;

  --border-subtle: #e5e7ed;
  --border-strong: #d3d7e0;

  --shadow-sm: 0 2px 8px rgba(18, 22, 33, 0.04);
  --shadow-md: 0 12px 32px rgba(18, 22, 33, 0.07);
  --shadow-lg: 0 22px 54px rgba(18, 22, 33, 0.11);

  --phone-bezel: #242830;
  --badge-bg: rgba(255, 255, 255, 0.94);
  color-scheme: light;
}

[data-theme="dark"] {
  --brand-red: #d42334;
  --brand-red-hover: #e52d3f;
  --brand-red-accent: #f04454;
  --brand-red-soft: rgba(240, 68, 84, 0.14);
  --brand-red-border: rgba(240, 68, 84, 0.34);

  --bg-primary: #0d0f13;
  --bg-secondary: #13161c;
  --bg-card: #181c24;
  --bg-card-alt: #1c202a;
  --bg-header: rgba(13, 15, 19, 0.86);

  --text-primary: #f4f6fa;
  --text-secondary: #a5adbd;
  --text-muted: #7d8698;

  --border-subtle: #242936;
  --border-strong: #32394a;

  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 14px 36px rgba(0, 0, 0, 0.42);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.56);

  --phone-bezel: #2a2f3a;
  --badge-bg: rgba(24, 28, 36, 0.94);
  color-scheme: dark;
}

/* Base Reset & Typography */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

h1,
h2,
h3,
h4 {
  font-family: "Plus Jakarta Sans", "Inter", sans-serif;
  margin: 0 0 0.65rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

/* Arabic RTL Typography Overrides */
html[lang="ar"] body {
  font-family: "Cairo", "Inter", sans-serif;
  line-height: 1.72;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4,
html[lang="ar"] .btn,
html[lang="ar"] .nav-link,
html[lang="ar"] .eyebrow,
html[lang="ar"] .card-tag,
html[lang="ar"] .step-number {
  font-family: "Cairo", sans-serif;
  letter-spacing: 0;
}

html[lang="ar"] .hero-title {
  line-height: 1.28;
}

html[lang="ar"] .section-heading h2 {
  line-height: 1.32;
}

p {
  margin: 0 0 1rem;
  color: var(--text-secondary);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.text-accent {
  color: var(--brand-red-accent);
}

/* Theme-Aware Logo Swapping */
.mark-dark,
.wordmark-dark {
  display: none;
}

[data-theme="dark"] .mark-light,
[data-theme="dark"] .wordmark-light {
  display: none;
}

[data-theme="dark"] .mark-dark,
[data-theme="dark"] .wordmark-dark {
  display: block;
}

/* ==========================================================================
   Header & Navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-container {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
}

.brand-mark {
  height: 34px;
  width: auto;
  object-fit: contain;
}

.brand-wordmark {
  height: 21px;
  width: auto;
  object-fit: contain;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--brand-red-accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Language Toggle Button */
.lang-toggle {
  height: 40px;
  padding: 0 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  font-family: "Cairo", "Inter", sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.15s ease;
}

.lang-toggle:hover {
  border-color: var(--brand-red-border);
  color: var(--brand-red-accent);
  transform: translateY(-1px);
}

/* Theme Toggle Button */
.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    transform 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}

.icon-sun {
  display: none;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.8rem 1.45rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.15;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background-color 0.18s ease, border-color 0.18s ease,
    color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 0.6rem 1.05rem;
  font-size: 0.88rem;
  border-radius: 10px;
}

.btn-primary {
  background-color: var(--brand-red);
  color: #ffffff;
  box-shadow: 0 6px 18px rgba(191, 27, 42, 0.25);
}

.btn-primary:hover {
  background-color: var(--brand-red-hover);
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
}

.btn-white {
  background-color: #ffffff;
  color: #bf1b2a;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.btn-white:hover {
  background-color: #f9f9fb;
}

.btn-outline-white {
  background-color: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.34);
}

.btn-outline-white:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Menu Button */
.menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background-color: var(--text-primary);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 4.5rem 0 5rem;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-grid > *,
.solution-layout > *,
.problem-grid > *,
.pillars-grid > * {
  min-width: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.95rem;
  border-radius: 999px;
  background-color: var(--brand-red-soft);
  border: 1px solid var(--brand-red-border);
  color: var(--brand-red-accent);
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 1.35rem;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--brand-red-accent);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.2rem, 4.3vw, 3.45rem);
  font-weight: 800;
  line-height: 1.13;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.08rem;
  max-width: 560px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.25rem;
}

/* Optional Impact Metrics (when enabled via STATS_CONFIG) */
.stats-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.65rem;
  margin-bottom: 1.65rem;
  border-top: 1px solid var(--border-subtle);
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--brand-red-accent);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.83rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-divider {
  width: 1px;
  height: 36px;
  background-color: var(--border-subtle);
}

/* Hero Social Channels Strip */
.hero-socials {
  padding-top: 1.6rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-socials-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
}

.social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.48rem 0.88rem;
  border-radius: 999px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.84rem;
  font-weight: 600;
  transition: border-color 0.18s ease, color 0.18s ease,
    background-color 0.18s ease, transform 0.15s ease;
}

.social-pill:hover {
  border-color: var(--brand-red-border);
  background-color: var(--brand-red-soft);
  color: var(--brand-red-accent);
  transform: translateY(-1px);
}

/* Hero Visual Card */
.hero-visual {
  position: relative;
}

.hero-image-card {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  max-width: 440px;
  margin-inline-start: auto;
}

.hero-photo {
  width: 100%;
  height: 500px;
  object-fit: cover;
  object-position: center;
}

.hero-floating-badge {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background-color: var(--badge-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
}

.badge-logo {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
}

.hero-floating-badge strong {
  display: block;
  font-size: 0.94rem;
  color: var(--text-primary);
  line-height: 1.25;
}

.hero-floating-badge span {
  font-size: 0.81rem;
  color: var(--text-secondary);
}

/* ==========================================================================
   Sections & Foodccine Vertical Bar Headings
   ========================================================================== */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 0.85rem;
}

.accent-bar {
  width: 6px;
  height: 34px;
  border-radius: 3px;
  background-color: var(--brand-red);
  flex-shrink: 0;
}

.section-heading h2 {
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 800;
  margin: 0;
}

.section-lead {
  font-size: 1.06rem;
  max-width: 640px;
  margin-bottom: 2.75rem;
}

/* ==========================================================================
   About / Problem Grid
   ========================================================================== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
  margin-top: 2.25rem;
}

.problem-highlight-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 2.15rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.problem-highlight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-accent-border {
  border-color: var(--brand-red-border);
}

.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  background-color: var(--bg-card-alt);
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.tag-red {
  background-color: var(--brand-red-soft);
  color: var(--brand-red-accent);
}

.problem-highlight-card h3 {
  font-size: 1.38rem;
  margin-bottom: 0.75rem;
}

.problem-highlight-card p {
  margin: 0;
}

/* ==========================================================================
   Solution Pipeline & Phone Showcase
   ========================================================================== */
.solution-layout {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 3rem;
}

.pipeline-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.6rem;
  border-radius: 18px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.step-card:hover {
  border-color: var(--brand-red-border);
  transform: translateY(-2px);
}

.step-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--brand-red-soft);
  color: var(--brand-red-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-number {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--brand-red-accent);
  margin-bottom: 0.25rem;
}

.step-body h3 {
  font-size: 1.16rem;
  margin-bottom: 0.4rem;
}

.step-body p {
  margin: 0;
  font-size: 0.95rem;
}

/* Mobile App Frame */
.app-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.15rem;
}

.phone-frame {
  width: 248px;
  border-radius: 38px;
  padding: 10px;
  background-color: var(--phone-bezel);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.phone-screen {
  width: 100%;
  height: auto;
  border-radius: 29px;
}

.store-links {
  display: flex;
  gap: 0.65rem;
}

.store-pill {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  transition: border-color 0.18s ease, color 0.18s ease;
}

.store-pill:hover {
  border-color: var(--brand-red-border);
  color: var(--brand-red-accent);
}

/* ==========================================================================
   Ecosystem / 4 Pillars Grid
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
}

.pillar-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.pillar-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-red-border);
  box-shadow: var(--shadow-md);
}

.pillar-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background-color: var(--brand-red-soft);
  color: var(--brand-red-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.15rem;
}

.pillar-card h3 {
  font-size: 1.14rem;
  margin-bottom: 0.55rem;
}

.pillar-card p {
  margin: 0;
  font-size: 0.92rem;
}

/* ==========================================================================
   Connect & Contact CTA Banner
   ========================================================================== */
.cta-banner {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #bf1b2a 0%, #991320 100%);
  padding: 3.75rem 2rem;
  text-align: center;
  color: #ffffff;
  box-shadow: 0 20px 48px rgba(191, 27, 42, 0.26);
}

.cta-watermark {
  position: absolute;
  right: -45px;
  bottom: -55px;
  width: 320px;
  height: auto;
  opacity: 0.08;
  pointer-events: none;
  user-select: none;
}

[dir="rtl"] .cta-watermark {
  right: auto;
  left: -45px;
}

.cta-content {
  position: relative;
  z-index: 1;
  max-width: 620px;
  margin: 0 auto;
}

.cta-logo {
  width: 112px;
  height: auto;
  margin: 0 auto 1.35rem;
}

.cta-content h2 {
  color: #ffffff;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  margin-bottom: 0.75rem;
}

.cta-content p {
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.04rem;
  margin-bottom: 1.85rem;
}

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.cta-social-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.65rem;
}

.cta-social-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.18s ease, transform 0.15s ease;
}

.cta-social-icon:hover {
  background-color: rgba(255, 255, 255, 0.26);
  transform: translateY(-2px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background-color: var(--bg-secondary);
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-tagline {
  margin: 0.65rem 0 0.45rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-email {
  display: inline-block;
  font-size: 0.91rem;
  font-weight: 600;
  color: var(--brand-red-accent);
  transition: opacity 0.18s ease;
}

.footer-email:hover {
  opacity: 0.82;
  text-decoration: underline;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.35rem;
  padding-top: 0.35rem;
}

.footer-links a {
  font-size: 0.91rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.18s ease;
}

.footer-links a:hover {
  color: var(--brand-red-accent);
}

.footer-bottom {
  padding-top: 1.4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 980px) {
  .hero-grid,
  .solution-layout {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .hero-image-card {
    margin: 0 auto;
    max-width: 480px;
  }

  .hero-photo {
    height: 420px;
  }

  .pillars-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
  }

  .nav-cta {
    display: none;
  }

  .main-nav {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    align-items: stretch;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
    box-shadow: var(--shadow-md);
    display: none;
  }

  .main-nav.is-open {
    display: flex;
  }

  .problem-grid,
  .pillars-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 3rem 0 3.75rem;
  }

  .section {
    padding: 3.75rem 0;
  }

  .stat-divider {
    display: none;
  }

  .stats-row {
    gap: 1.5rem 2.25rem;
  }
}
