/* ==========================================================================
   Grainoor — one-page site
   Design tokens derived from the Grainoor emblem (wheat, sun, leaf, teal wordmark)
   ========================================================================== */

:root {
  --cream:        #FBF8EC;
  --cream-soft:   #F3EEDC;
  --cream-line:   #E7DFC7;
  --teal:         #1F6B63;
  --teal-deep:    #164A45;
  --teal-tint:    #E4EFEC;
  --gold:         #E3A73F;
  --gold-deep:    #C9862A;
  --terracotta:   #DC7C31;
  --sage:         #5C9B6B;
  --ink:          #2A2620;
  --ink-soft:     #5B5548;
  --white:        #FFFFFF;
  --whatsapp:     #22A857;
  --shadow-sm:    0 2px 10px rgba(42,38,32,0.08);
  --shadow-md:    0 10px 30px rgba(42,38,32,0.12);
  --shadow-lg:    0 20px 50px rgba(22,74,69,0.18);
  --radius-sm:    10px;
  --radius-md:    18px;
  --radius-lg:    28px;
  --maxw:         1180px;
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }

html {
  scroll-behavior: smooth;
}

body {
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------- Language wrappers ---------- */
.lang-wrap { display: none; }
.lang-wrap.is-active { display: block; }

[dir="rtl"] { text-align: right; }

/* Font families: English vs Arabic */
.lang-wrap[lang="en"] {
  font-family: "Work Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}
.lang-wrap[lang="en"] .display {
  font-family: "Fraunces", Georgia, serif;
}
.lang-wrap[lang="ar"] {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
}
.lang-wrap[lang="ar"] .display {
  font-family: "Aref Ruqaa", "Cairo", serif;
}

/* ---------- Utility ---------- */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin-bottom: 14px;
}
[dir="rtl"] .eyebrow {
  letter-spacing: 0;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--terracotta);
  display: inline-block;
}
h2.section-title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 600;
  color: var(--teal-deep);
  margin-bottom: 18px;
}
.section-lede {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink-soft);
  max-width: 700px;
}
.section {
  padding: 96px 0;
  position: relative;
}
.section.alt { background: var(--cream-soft); }
.section.dark {
  position: relative;
  background: linear-gradient(135deg, var(--teal-deep), var(--teal));
  color: var(--cream);
}
.section.dark .section-title { color: var(--cream); }
.section.dark .bg-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}
.section.dark .bg-photo img {
  width: 100%; height: 100%; object-fit: cover;
}
.section.dark .bg-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(22,74,69,0.93), rgba(31,107,99,0.88));
}
.section.dark > .wrap { position: relative; z-index: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 30px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--gold);
  color: var(--teal-deep);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { background: var(--gold-deep); }
.btn-outline {
  border-color: rgba(255,255,255,0.7);
  color: var(--white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }
.btn-whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-whatsapp:hover { background: #1c8f49; }
.btn-teal {
  border-color: var(--teal);
  color: var(--teal);
  background: transparent;
}
.btn-teal:hover { background: var(--teal); color: var(--white); }
.btn-sm { padding: 10px 20px; font-size: 13.5px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Wheat divider — signature element */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 auto;
  width: 100%;
  max-width: 260px;
  opacity: 0.9;
}
.divider .line { flex: 1; height: 1px; background: var(--cream-line); }
.divider svg { width: 26px; height: 26px; color: var(--gold-deep); flex: none; }
.section.dark .divider .line { background: rgba(255,255,255,0.25); }

/* ==========================================================================
   NAV
   ========================================================================== */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251,248,236,0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cream-line);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand img.emblem { width: 42px; height: 42px; border-radius: 50%; }
.brand img.wordmark { height: 26px; }
.brand img.nav-logo-ar { height: 40px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
}
.nav-links a { position: relative; padding: 6px 0; }
.nav-links a:hover { color: var(--teal); }
.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}
.lang-btn {
  border: 1.5px solid var(--teal);
  color: var(--teal);
  background: transparent;
  border-radius: 100px;
  padding: 7px 16px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.lang-btn:hover { background: var(--teal); color: var(--white); }
.burger {
  display: none;
  background: none;
  border: none;
  padding: 6px;
}
.burger svg { width: 26px; height: 26px; color: var(--teal-deep); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 86vh;
  display: flex;
  align-items: flex-end;
  background: #20221c;
}
.hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22,32,26,0.15) 0%, rgba(16,26,22,0.55) 55%, rgba(12,20,17,0.88) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--cream);
  padding: 70px 28px 64px;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
}
.hero-content .eyebrow { color: var(--gold); }
.hero-content .eyebrow::before { background: var(--gold); }
.hero-title {
  font-size: clamp(34px, 5.6vw, 64px);
  font-weight: 600;
  line-height: 1.08;
  max-width: 820px;
  margin-bottom: 20px;
  text-shadow: 0 2px 24px rgba(0,0,0,0.25);
}
.hero-sub {
  font-size: 18px;
  line-height: 1.7;
  max-width: 560px;
  color: #EFE9D6;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   STORY
   ========================================================================== */
.story-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}
[dir="rtl"] .story-grid { direction: rtl; }
.story-photo {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/3.1;
}
.story-photo img { width: 100%; height: 100%; object-fit: cover; }
.trust-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 34px;
}
.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: var(--white);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-sm);
  padding: 16px;
}
.trust-item svg {
  width: 22px; height: 22px; flex: none; color: var(--sage); margin-top: 2px;
}
.trust-item span { font-size: 14.5px; font-weight: 500; color: var(--ink); line-height: 1.5; }

/* ==========================================================================
   EDUCATIONAL (Talbina / Protein) SECTIONS
   ========================================================================== */
.edu-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: start;
}
[dir="rtl"] .edu-grid { direction: rtl; }

.video-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 56px;
  align-items: center;
}
[dir="rtl"] .video-grid { direction: rtl; }
.video-frame {
  max-width: 300px;
  margin: 0 auto;
  width: 100%;
  aspect-ratio: 478/850;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #14201c;
}
.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.edu-text > * + * { margin-top: 18px; }
.edu-text p { font-size: 16.5px; line-height: 1.8; color: var(--ink-soft); }

blockquote.heritage {
  margin: 26px 0 0;
  padding: 20px 24px;
  background: var(--teal-tint);
  border-inline-start: 4px solid var(--terracotta);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-family: "Fraunces", serif;
  font-style: italic;
  font-size: 17px;
  color: var(--teal-deep);
  line-height: 1.6;
}
[dir="rtl"] blockquote.heritage {
  font-family: "Aref Ruqaa", serif;
  font-style: normal;
  border-inline-start: 4px solid var(--terracotta);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
blockquote.heritage cite {
  display: block;
  margin-top: 10px;
  font-family: inherit;
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--terracotta);
}

.ingredient-panel {
  background: var(--white);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-md);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.ingredient-panel h3 {
  font-family: "Fraunces", serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--teal-deep);
  margin-bottom: 18px;
}
.panel-photo {
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 18px;
  aspect-ratio: 16/9;
}
.panel-photo img { width: 100%; height: 100%; object-fit: cover; }
[dir="rtl"] .ingredient-panel h3 { font-family: "Aref Ruqaa", serif; }
.ingredient-chips {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--cream-soft);
  border-radius: 100px;
  padding: 9px 14px 9px 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}
[dir="rtl"] .chip { padding: 9px 8px 9px 14px; }
.chip .dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--gold);
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  overflow: hidden;
}
.chip .dot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.allergy-box {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: #FDF3DC;
  border: 1px solid #EFD79C;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #7A5A17;
}
.allergy-box svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }

.medical-note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink-soft);
  opacity: 0.85;
  line-height: 1.6;
}

/* ==========================================================================
   VARIETIES
   ========================================================================== */
.varieties-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.varieties-head .section-lede { margin: 0 auto; }
.variety-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.variety-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--cream-line);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease, box-shadow .2s ease;
}
.variety-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.variety-photo {
  aspect-ratio: 1/1;
  overflow: hidden;
  background: var(--cream-soft);
}
.variety-photo img { width: 100%; height: 100%; object-fit: cover; }
.variety-body { padding: 20px 20px 22px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.variety-body h3 {
  font-family: "Fraunces", serif;
  font-size: 19px;
  font-weight: 600;
  color: var(--teal-deep);
}
[dir="rtl"] .variety-body h3 { font-family: "Aref Ruqaa", serif; }
.variety-body p { font-size: 13.8px; line-height: 1.6; color: var(--ink-soft); flex: 1; }
.size-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.size-pills span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-tint);
  border-radius: 100px;
  padding: 4px 10px;
}
.variety-card .btn { margin-top: 4px; width: 100%; }

/* ==========================================================================
   HOW TO ENJOY
   ========================================================================== */
.enjoy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.enjoy-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.enjoy-subhead {
  font-family: "Fraunces", serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--teal-deep);
  text-align: center;
  margin: 44px 0 18px;
}
[dir="rtl"] .enjoy-subhead { font-family: "Aref Ruqaa", serif; font-size: 19px; }
.varieties-head + .enjoy-subhead { margin-top: 0; }
.enjoy-card {
  background: var(--white);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-md);
  padding: 26px;
}
.enjoy-card .num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--teal-tint);
  color: var(--teal-deep);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.enjoy-card .num svg { width: 20px; height: 20px; }
.enjoy-card h3 {
  font-family: "Fraunces", serif;
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--teal-deep);
}
[dir="rtl"] .enjoy-card h3 { font-family: "Aref Ruqaa", serif; }
.enjoy-card p { font-size: 14.5px; line-height: 1.7; color: var(--ink-soft); }
.storage-note {
  margin-top: 22px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-soft);
  background: var(--cream-soft);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

/* ==========================================================================
   SOCIAL
   ========================================================================== */
.social-section { text-align: center; }
.social-section .section-title, .social-section .section-lede { color: var(--cream); }
.social-section .section-lede { margin: 0 auto 34px; color: #DCEAE6; }
.social-row { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.social-btn {
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.4);
  display: flex; align-items: center; justify-content: center;
  transition: background .18s ease, transform .18s ease;
}
.social-btn:hover { background: rgba(255,255,255,0.15); transform: translateY(-3px); }
.social-btn svg { width: 22px; height: 22px; color: var(--cream); }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-card {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-lg);
  padding: 52px 40px;
  box-shadow: var(--shadow-md);
}
.contact-card .section-title { font-size: 30px; }
.contact-phone {
  font-family: "Fraunces", serif;
  font-size: 26px;
  font-weight: 600;
  color: var(--teal-deep);
  margin: 18px 0 26px;
  letter-spacing: 0.02em;
}
[dir="rtl"] .contact-phone { font-family: "Aref Ruqaa", serif; }
.contact-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background: var(--teal-deep);
  color: #CFE3DF;
  padding: 56px 0 30px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand img.emblem { width: 46px; height: 46px; border-radius: 50%; }
.footer-brand img.wordmark { height: 24px; }
.footer-brand-logo {
  background: var(--cream);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  display: inline-flex;
}
.footer-brand-logo .logo-lockup { height: 40px; width: auto; display: block; }
.footer-tagline { font-size: 13.5px; color: #9FC3BC; margin-top: 6px; }
.footer-links { display: flex; gap: 24px; font-size: 14px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 22px;
  font-size: 13px;
  color: #8FB6AF;
}
.footer-bottom .social-row { justify-content: flex-start; }
.footer-bottom .social-btn { width: 38px; height: 38px; border-color: rgba(255,255,255,0.25); }
.footer-bottom .social-btn svg { width: 17px; height: 17px; }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .story-grid, .edu-grid, .video-grid { grid-template-columns: 1fr; gap: 36px; }
  [dir="rtl"] .story-grid, [dir="rtl"] .edu-grid, [dir="rtl"] .video-grid { direction: rtl; }
  .story-photo { order: -1; }
  .video-frame { max-width: 260px; }
  .enjoy-grid { grid-template-columns: 1fr; }
  .enjoy-grid-4 { grid-template-columns: 1fr 1fr; }
  .trust-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .variety-grid { grid-template-columns: repeat(2, 1fr); }
  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 18px 28px 24px;
    border-bottom: 1px solid var(--cream-line);
    gap: 16px;
  }
  .section { padding: 66px 0; }
  .hero { min-height: 92vh; }
  .hero-content { padding: 48px 20px 44px; }
  .ingredient-chips { grid-template-columns: 1fr 1fr; }
  .contact-card { padding: 38px 22px; }
  .footer-top { flex-direction: column; }
}

@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .hero-ctas, .contact-ctas { flex-direction: column; align-items: stretch; }
  .variety-grid { grid-template-columns: 1fr 1fr; }
  .ingredient-chips { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .nav-inner { padding: 10px 16px; gap: 6px; }
  .brand span { font-size: 17px !important; }
  .brand .emblem { width: 32px; height: 32px; }
  .brand .nav-logo-ar { height: 32px; }
  .nav-right { gap: 6px; }
  .lang-btn { padding: 6px 10px; font-size: 11.5px; }
  .nav .btn-whatsapp.btn-sm {
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
  }
  .nav .btn-whatsapp.btn-sm .btn-label { display: none; }
  .nav .btn-whatsapp.btn-sm svg { margin: 0; }
}

@media (max-width: 420px) {
  .variety-grid { grid-template-columns: 1fr; }
}

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

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2.5px solid var(--terracotta);
  outline-offset: 2px;
}
