/* Celiac Association Lebanon: static homepage styles (EN + AR/RTL via logical properties). */
:root {
  --bg: #f6f8f5;
  --white: #ffffff;
  --ink: #14271f;
  --muted: #4a5d53;
  --green: #1c5940;
  --green-dark: #14382c;
  --deep: #13281f;
  --footer: #0e1f17;
  --coral: #a93522;
  --coral-on-dark: #f0b8a0;
  --coral-bg: #fdede7;
  --coral-line: #f5d5ca;
  --coral-pill: #fde4dc;
  --coral-pill-ink: #96301d;
  --mint: #e4efe7;
  --line: #e1e7e1;
  --wrap: 1120px;
  --font-head: "Bricolage Grotesque", "Figtree", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Figtree", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 24px;
}

:lang(ar) {
  --font-head: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
section[id] { scroll-margin-top: 84px; }

:focus-visible { outline: 3px solid var(--coral); outline-offset: 3px; border-radius: 6px; }
.band-dark :focus-visible, .test-panel :focus-visible, .site-footer :focus-visible { outline-color: #ffd0bd; }
.mq-row:focus-visible {
  -webkit-mask-image: none;
  mask-image: none;
  outline-offset: 5px;
  border-radius: 24px;
}

.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }

.skip {
  position: absolute;
  inset-inline-start: 12px;
  top: -64px;
  z-index: 100;
  background: var(--green-dark);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
}
.skip:focus { top: 12px; }

h1, h2, h3 { font-family: var(--font-head); color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(2.35rem, 5.2vw, 3.5rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.75rem); line-height: 1.12; font-weight: 800; letter-spacing: -0.015em; }
h3 { font-weight: 700; }
:lang(ar) h1, :lang(ar) h2, :lang(ar) h3 { letter-spacing: 0; line-height: 1.3; }
:lang(ar) h1 { font-weight: 700; line-height: 1.35; }
:lang(ar) h2 { font-weight: 700; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 14px;
}
:lang(ar) .eyebrow { letter-spacing: 0; font-size: 0.9rem; }
.eyebrow-light { color: var(--coral-on-dark); }

.lead { font-size: 1.12rem; line-height: 1.62; color: var(--muted); max-width: 34em; }
.body-lg { font-size: 1.08rem; line-height: 1.7; color: var(--muted); }
.body-lg + .body-lg { margin-top: 18px; }

/* Placeholders: clearly marked, to be replaced by the association's real details */
.ph { outline: 1px dashed currentColor; outline-offset: 3px; border-radius: 4px; }
p.ph { width: fit-content; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font: 700 0.95rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn-sm { min-height: 42px; padding: 0 22px; font-size: 0.9rem; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: #154734; }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--green-dark); }
.btn-light:hover { background: var(--mint); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn[aria-disabled="true"] { cursor: not-allowed; }
.btn-primary[aria-disabled="true"]:hover { background: var(--green); }
.btn-outline[aria-disabled="true"]:hover { background: transparent; color: var(--ink); }
.soon {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.2;
  padding: 3px 7px;
  margin-inline-start: -2px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
}
.btn-outline .soon { background: var(--coral-bg); color: var(--coral-pill-ink); }
:lang(ar) .soon { letter-spacing: 0; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.brand img { width: 54px; height: 54px; border-radius: 50%; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.brand-name { font: 700 1.02rem/1.2 var(--font-head); color: var(--ink); }
.brand-sub { font-size: 0.72rem; letter-spacing: 0.12em; color: #5b6e63; }
:lang(ar) .brand-sub { letter-spacing: 0; font-size: 0.82rem; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a:not(.btn) { text-decoration: none; font-size: 0.93rem; font-weight: 500; color: var(--ink); padding: 8px 0; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }
.lang-link { font-size: 0.9rem !important; }

.menu-btn {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font: 600 0.9rem/1 var(--font-body);
  cursor: pointer;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.menu-icon { position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; inset-inline-start: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { top: 0; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 899px) {
  .js .menu-btn { display: inline-flex; }
  .js .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 24px 22px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 30px rgba(20, 39, 31, 0.08);
  }
  .js .nav.is-open { display: flex; }
  .js .nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1rem; }
  .js .nav .btn { margin-top: 16px; }
  html:not(.js) .bar { flex-wrap: wrap; padding-block: 12px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 14px 20px; }
}

/* Hero */
.hero { background: var(--bg); padding: 52px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.16fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.hero-copy h1 { margin-top: 0; }
.hero-copy .lead { margin-top: 22px; }
.hero-photo {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-top: 22px;
  border-radius: 28px;
  border: 1px solid #cfe0d4;
  overflow: hidden;
  background: var(--mint);
}
.hero-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 52px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.pillar { padding: 30px 30px 32px; }
.pillar h2 { font-size: 1.4rem; line-height: 1.2; letter-spacing: -0.005em; }
.pillar p { margin-top: 12px; color: var(--muted); font-size: 0.97rem; line-height: 1.65; }

.statline {
  display: flex;
  justify-content: space-between;
  gap: 24px 32px;
  flex-wrap: wrap;
  margin-top: 44px;
  padding: 28px 0;
  border-block: 1px solid var(--line);
}
.statline li { display: flex; align-items: baseline; gap: 12px; }
.num { font: 800 2.45rem/1 var(--font-head); color: var(--green); letter-spacing: -0.01em; }
:lang(ar) .num { font-weight: 700; }
.num-ltr { direction: ltr; unicode-bidi: isolate; }
.stat-label { font-size: 0.95rem; color: var(--muted); }

/* Member card band */
.band-dark { background: var(--green-dark); color: #fff; padding: 92px 0 64px; }
.band-dark h2 { color: #fff; max-width: 15em; }
.card-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.lead-light { color: rgba(255, 255, 255, 0.86); margin-top: 24px; font-size: 1.08rem; max-width: 32em; }
.checks { margin-top: 28px; display: grid; gap: 18px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; }
.check {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #2c735a;
  color: #fff;
}
.checks strong { display: block; font-size: 0.97rem; line-height: 1.35; }
.check-text { display: block; font-size: 0.93rem; color: rgba(255, 255, 255, 0.8); line-height: 1.5; }

.card-visual { display: flex; justify-content: center; padding-top: 24px; }
.member-card {
  position: relative;
  width: min(100%, 380px);
  aspect-ratio: 1.58;
  padding: 24px;
  background: #fff;
  color: var(--ink);
  border-radius: 24px;
  box-shadow: 0 28px 50px rgba(0, 0, 0, 0.3);
  transform: rotate(3deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
:lang(ar) .member-card { transform: rotate(-3deg); }
.mc-top { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.95rem; }
.mc-seal { width: 34px; height: 34px; border-radius: 50%; }
.mc-bottom { display: flex; flex-direction: column; gap: 2px; max-width: 58%; }
.mc-label { font-size: 0.68rem; letter-spacing: 0.1em; color: #6a7c71; }
:lang(ar) .mc-label { letter-spacing: 0; font-size: 0.78rem; }
.mc-number { font: 800 1.3rem/1.2 var(--font-head); letter-spacing: 0.02em; unicode-bidi: isolate; }
.mc-valid { font-size: 0.72rem; color: #6a7c71; }
.mc-qr {
  position: absolute;
  inset-inline-end: 20px;
  top: 20px;
  width: 36%;
  aspect-ratio: 0.82;
  padding: 12px 10px;
  border: 1.5px solid var(--green-dark);
  border-radius: 16px;
  color: var(--green-dark);
  display: grid;
  place-items: center;
}
.mc-qr svg { width: 100%; height: auto; }

/* Partner marquee */
.works { margin-top: 56px; }
.works-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.works h3 { color: #fff; font-size: 1.75rem; line-height: 1.2; }
.works-tools { display: flex; align-items: center; gap: 16px; }
.works-note { font-size: 0.82rem; color: rgba(255, 255, 255, 0.85); }
.mq-toggle {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  color: #fff;
  font: 600 0.82rem/1 var(--font-body);
  cursor: pointer;
}
.mq-toggle:hover { background: rgba(255, 255, 255, 0.14); }
.mq { margin-top: 22px; display: grid; gap: 16px; }
.mq-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}
.mq-row:empty { display: none; }
.mq-track { display: flex; width: max-content; animation: mq-slide var(--mq-duration, 40s) linear infinite; }
[dir="rtl"] .mq-track { --mq-shift: 50%; }
.mq-row-b .mq-track { animation-direction: reverse; }
@keyframes mq-slide { to { transform: translateX(var(--mq-shift, -50%)); } }
.mq-row:hover .mq-track,
.mq-row:focus-within .mq-track,
.mq-row:focus .mq-track,
.works.is-paused .mq-track { animation-play-state: paused; }

.mq.is-static .mq-row { overflow-x: auto; scrollbar-width: thin; }
.mq.is-static .mq-track { animation: none; transform: none; }

.mq-card {
  flex: none;
  width: 296px;
  margin-inline-end: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  min-height: 92px;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.mq-logo {
  flex: none;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: var(--mint);
  color: var(--green);
  font: 800 1.15rem/1 var(--font-head);
  overflow: hidden;
}
.mq-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.mq-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; line-height: 1.3; }
.mq-name {
  font-weight: 700;
  font-size: 0.95rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.mq-sub {
  font-size: 0.8rem;
  color: #566a5e;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}
.mq-pill {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--coral-pill);
  color: var(--coral-pill-ink);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}
.mq-row-b .mq-card { background: #1d5b42; color: #fff; border-color: rgba(255, 255, 255, 0.08); }
.mq-row-b .mq-logo { background: var(--green-dark); color: #fff; }
.mq-row-b .mq-sub { color: rgba(255, 255, 255, 0.78); }
.mq-row-b .mq-pill { background: #fff; color: var(--green-dark); }

.partner-cta { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; font-size: 0.95rem; color: rgba(255, 255, 255, 0.9); }
.partner-cta a { font-weight: 700; color: #fff; text-underline-offset: 5px; text-decoration-thickness: 2px; }

/* About celiac */
.celiac { padding: 84px 0 72px; }
.celiac-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.celiac h2 { max-width: 10em; margin-bottom: 26px; }
.panel { background: #f8f9f6; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 34px 38px; }
.panel h3 { font-size: 1.22rem; margin-bottom: 22px; }
.steps { display: grid; gap: 22px; }
.steps li { display: flex; gap: 16px; align-items: flex-start; }
.step-no {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font: 700 0.95rem/1 var(--font-body);
}
.steps strong { display: block; font-size: 0.97rem; }
.step-text { display: block; font-size: 0.93rem; color: var(--muted); line-height: 1.55; }

/* Facts */
.facts { padding: 8px 0 72px; }
.facts-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.facts-grid li { border-top: 4px solid var(--green); padding-top: 20px; }
.fact-num { display: block; font: 800 2.4rem/1.1 var(--font-head); color: var(--green); letter-spacing: -0.01em; }
:lang(ar) .fact-num { font-weight: 700; font-size: 2.1rem; }
.fact-label { display: block; margin-top: 10px; font-size: 0.93rem; line-height: 1.5; color: var(--muted); }

/* Signs */
.signs { padding: 12px 0 72px; }
.signs h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.signs-lead { margin-top: 14px; max-width: 40em; color: var(--muted); }
.signs-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 20px; margin-top: 30px; }
.signs-card { background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 30px 30px 32px; }
.signs-card h3 { font-size: 1.15rem; margin-bottom: 18px; }
.signs-card-coral { background: var(--coral-bg); border-color: var(--coral-line); }
.signs-card-coral h3 { color: #98301e; }
.dots li { position: relative; padding-inline-start: 20px; margin-bottom: 11px; font-size: 0.95rem; line-height: 1.5; color: #2f4238; break-inside: avoid; }
.dots li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.dots.two-col { columns: 2; column-gap: 30px; }
.dots.two-col li:nth-child(5) { break-before: column; }

/* Test */
.test { padding: 8px 0 72px; }
.test-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 44px;
  align-items: center;
  background: var(--deep);
  color: #fff;
  border-radius: 28px;
  padding: 48px 48px;
}
.test-panel h2 { color: #fff; font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
.test-text { margin-top: 20px; color: rgba(255, 255, 255, 0.86); font-size: 1rem; line-height: 1.65; }
.test-steps { display: grid; gap: 14px; }
.test-steps li { background: #1c3a2e; border-radius: 14px; padding: 16px 20px; }
.test-steps strong { display: block; font-size: 0.97rem; }
.test-steps span { display: block; font-size: 0.93rem; color: rgba(255, 255, 255, 0.85); line-height: 1.5; }

/* Myths */
.myths { padding: 8px 0 72px; }
.myths h2 { font-size: clamp(1.6rem, 3vw, 2rem); margin-bottom: 26px; }
.myths-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.myth { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.myth h3 { font-family: var(--font-body); background: var(--coral-bg); color: #98301e; font-size: 1rem; line-height: 1.4; padding: 18px 22px; }
.myth p { padding: 18px 22px 26px; color: var(--muted); font-size: 0.95rem; line-height: 1.65; }

/* Guides */
.guides { padding: 8px 0 80px; }
.guides-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  background: var(--mint);
  border-radius: 28px;
  padding: 42px 46px;
}
.guides-copy { max-width: 36em; flex: 1 1 340px; }
.guides h2 { font-size: clamp(1.6rem, 3vw, 2rem); }
.guides-copy p { margin-top: 12px; color: var(--muted); }
.guides .btn-row { margin-top: 0; }

/* Footer */
.site-footer { background: var(--footer); color: #d3ded7; padding: 56px 0 44px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 48px; }
.site-footer h2 { color: #fff; font-size: 1.3rem; font-weight: 700; letter-spacing: 0; }
.site-footer h3 { color: #fff; font: 700 0.93rem/1.4 var(--font-body); margin-bottom: 8px; }
.footer-about p { margin-top: 10px; font-size: 0.95rem; max-width: 24em; }
.contact-list li { font-size: 0.93rem; margin-bottom: 12px; }
.contact-list a { color: #fff; text-underline-offset: 4px; text-decoration-thickness: 1px; overflow-wrap: anywhere; }
.contact-list a:hover { text-decoration-thickness: 2px; }
.footer-legal { grid-column: 1 / -1; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.disclaimer { font-size: 0.82rem; line-height: 1.55; color: #c3d0c8; max-width: 52em; }
.copyright { margin-top: 12px; font-size: 0.78rem; color: #aebcb4; }

/* Tablet and phone */
@media (max-width: 960px) {
  .hero-grid, .card-grid, .celiac-grid, .test-panel { grid-template-columns: 1fr; gap: 36px; }
  .hero-photo { margin-top: 0; }
  .pillars, .myths-grid { grid-template-columns: 1fr; }
  .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; }
  .signs-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px 32px; }
  .footer-legal { margin-top: 8px; }
  .card-visual { padding-top: 8px; justify-content: flex-start; }
  .statline { gap: 22px; }
}
@media (max-width: 600px) {
  .wrap { width: min(var(--wrap), 100% - 40px); }
  .hero { padding: 40px 0 48px; }
  .pillars { margin-top: 40px; }
  .statline { flex-direction: column; margin-top: 40px; }
  .band-dark { padding: 56px 0 48px; }
  .celiac { padding: 56px 0 48px; }
  .facts, .signs, .test, .myths { padding-bottom: 52px; }
  .dots.two-col { columns: 1; }
  .dots.two-col li:nth-child(5) { break-before: auto; }
  .test-panel { padding: 34px 24px; border-radius: 24px; }
  .guides-panel { padding: 32px 24px; border-radius: 24px; }
  .btn-row .btn { flex: 1 1 100%; }
  .guides .btn-row { width: 100%; }
  .num { font-size: 2.1rem; }
  .brand-name { font-size: 0.95rem; }
  .mq-card { width: 272px; }
  .member-card { margin-inline: auto; }
  .card-visual { justify-content: center; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mq-track { animation: none !important; }
  .mq-toggle { display: none; }
}
