/* Berrad — landing page styles
   Look: "Zellige green" (off-white, deep green, terracotta) + the paper ticket in the hero.
   Mobile first. Logical properties everywhere so the Darija (RTL) version mirrors itself. */

:root {
  --bg: #F5F2EA;
  --sand: #EBE6D9;
  --line: #D9D3C3;
  --white: #FFFFFF;
  --green: #0F4C3A;
  --terra: #B8492A;
  --terra-dark: #9C3B20;
  --ink: #1E2A25;
  --muted: #4F5B55;
  --on-green: #E4E9E2;
  --hl: #FFD21F;
  --display: 'El Messiri', Georgia, 'Times New Roman', serif;
  --body: 'Outfit', 'Segoe UI', Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, Menlo, Consolas, monospace;
  --wrap: 1120px;
  --gutter: 20px;
  --zellige: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cg fill='none' stroke='%23F5F2EA' stroke-opacity='.16' stroke-width='1.6'%3E%3Cpath d='M20 20h40v40H20zM40 11.7 68.3 40 40 68.3 11.7 40zM0 40h11.7M68.3 40H80M40 0v11.7M40 68.3V80'/%3E%3Cpath d='M32 32h16v16H32z' transform='rotate(45 40 40)'/%3E%3C/g%3E%3C/svg%3E");
}

html[lang="ar"] {
  --body: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
  --mono: 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}

html[lang="ar"] body { line-height: 1.8; }

h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }
a { color: var(--green); }
a:hover { color: var(--terra); }
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--terra);
  outline-offset: 3px;
}
[id] { scroll-margin-top: 84px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.icon { width: 1.2em; height: 1.2em; flex: none; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* ---------- Type ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--terra);
}
html[lang="ar"] .eyebrow { letter-spacing: 0; font-size: 15px; }

.h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(28px, 4.2vw, 48px);
  line-height: 1.12;
  color: var(--green);
  text-wrap: balance;
}
html[lang="ar"] .h2 { line-height: 1.4; }

.lead { font-size: clamp(17px, 2vw, 19px); color: var(--muted); max-width: 640px; }

.section { padding-block: clamp(56px, 9vw, 96px); }
.section-head { display: grid; gap: 10px; align-content: start; margin-bottom: clamp(28px, 4vw, 40px); max-width: 720px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: 4px;
  font: inherit;
  font-weight: 700;
  font-size: 17px;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--primary { background: var(--terra); color: var(--white); }
.btn--primary:hover { background: var(--terra-dark); color: var(--white); }
.btn--light { background: var(--bg); color: var(--green); }
.btn--light:hover { background: var(--white); color: var(--green); }
.btn--green { background: var(--green); color: var(--white); }
.btn--green:hover { background: #0B3A2C; color: var(--white); }
.btn--outline { border-color: var(--green); color: var(--green); background: transparent; }
.btn--outline:hover { background: var(--green); color: var(--white); }
.btn--outline-light { border-color: var(--white); color: var(--white); background: transparent; }
.btn--outline-light:hover { background: var(--white); color: var(--terra-dark); }
.btn--small { min-height: 44px; padding: 10px 16px; font-size: 15px; }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.header__in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; }
.logo svg { width: 34px; height: 34px; flex: none; }
.logo__name { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--green); line-height: 1; }

.nav { display: none; }
.nav a {
  display: block;
  padding: 12px 4px;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink);
}
.nav a:hover { color: var(--terra); }

.header__actions { display: flex; align-items: center; gap: 8px; }
.lang {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--green);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}
.lang:hover { border-color: var(--green); }
.burger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 4px;
  background: var(--white); color: var(--green); cursor: pointer;
}
.header__cta { display: none; }

.nav.is-open {
  display: block;
  position: absolute;
  inset-inline: 0;
  top: 100%;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 8px var(--gutter) 16px;
}
.nav.is-open a { padding: 14px 4px; border-bottom: 1px solid var(--line); font-size: 18px; }

@media (min-width: 880px) {
  .nav, .nav.is-open {
    display: flex; position: static; gap: 28px;
    padding: 0; border: 0; background: none;
  }
  .nav.is-open a { border: 0; font-size: inherit; padding: 12px 4px; }
  .burger { display: none; }
  .header__cta { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--green);
  background-image: var(--zellige);
  color: var(--bg);
  border-bottom: 8px solid var(--terra);
}
.hero__in {
  display: grid;
  gap: 40px;
  padding-block: clamp(44px, 8vw, 84px) clamp(52px, 8vw, 88px);
  align-items: center;
}
.hero__text { display: grid; gap: 20px; justify-items: start; min-width: 0; }
.hero .eyebrow { color: #F2C9B8; }
.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 6.4vw, 68px);
  line-height: 1.07;
  text-wrap: balance;
}
html[lang="ar"] .hero h1 { line-height: 1.35; font-size: clamp(32px, 5.6vw, 60px); }
.hero__sub { font-size: clamp(17px, 2.1vw, 20px); color: var(--on-green); max-width: 540px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; width: 100%; }
.hero__note { font-size: 15px; color: var(--on-green); }

@media (max-width: 520px) {
  .hero__cta .btn { flex: 1 1 100%; }
}
@media (min-width: 920px) {
  .hero__in { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: 56px; }
}

/* ---------- Ticket (the paper receipt) ---------- */
.ticket {
  width: 100%;
  max-width: 350px;
  margin-inline: auto;
  transform: rotate(1.5deg);
  filter: drop-shadow(0 20px 26px rgba(0, 0, 0, 0.32));
  color: #121212;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.5;
}
html[dir="rtl"] .ticket { transform: rotate(-1.5deg); font-size: 15px; line-height: 1.6; }
.ticket__paper { background: var(--white); padding: 24px 22px 20px; display: grid; gap: 13px; }
.ticket__head { text-align: center; display: grid; gap: 2px; }
.ticket__brand { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; }
.ticket__rule { border-top: 2px dashed #121212; }
.ticket__lines { display: grid; gap: 10px; }
.ticket__row { display: flex; justify-content: space-between; gap: 12px; }
.ticket__row strong { font-weight: 700; }
.ticket__total { font-size: 15px; }
html[dir="rtl"] .ticket__total { font-size: 17px; }
.ticket__hl { background: var(--hl); padding: 0 6px; }
.ticket__barcode {
  height: 40px;
  background: repeating-linear-gradient(90deg, #121212 0 3px, transparent 3px 5px, #121212 5px 6px, transparent 6px 10px, #121212 10px 14px, transparent 14px 16px);
}
.ticket__phone { text-align: center; letter-spacing: 0.08em; font-family: 'Space Mono', ui-monospace, monospace; font-size: 13px; }
.ticket__edge {
  height: 12px;
  background: linear-gradient(135deg, var(--white) 50%, transparent 50%), linear-gradient(225deg, var(--white) 50%, transparent 50%);
  background-size: 12px 12px;
}

/* ---------- Pains ---------- */
.pains { background: var(--sand); border-bottom: 1px solid var(--line); }
.pains__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 20px; }
.pain {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px;
  display: grid;
  gap: 10px;
  align-content: start;
}
.pain__tag { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--terra); text-transform: uppercase; }
html[lang="ar"] .pain__tag { letter-spacing: 0; font-size: 14px; }
.pain p { font-size: 19px; font-weight: 600; line-height: 1.3; color: var(--green); }
html[lang="ar"] .pain p { line-height: 1.6; }

/* ---------- Services ---------- */
.services__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr)); gap: 20px; }
.service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: clamp(20px, 3vw, 28px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 18px;
  align-items: start;
}
.service__num { width: 44px; height: 44px; }
.service h3 { font-family: var(--display); font-weight: 700; font-size: 24px; line-height: 1.2; color: var(--green); align-self: center; }
.service__body { display: grid; gap: 14px; grid-column: 1 / -1; }
@media (min-width: 640px) { .service__body { grid-column: 2; } }
.service__body > p { color: var(--muted); }
.ticks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 8px 18px; font-size: 15px; }
.ticks li { position: relative; padding-inline-start: 22px; }
.ticks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 0.5em;
  width: 9px; height: 9px;
  background: var(--terra);
  transform: rotate(45deg);
}
html[lang="ar"] .ticks li::before { top: 0.7em; }

/* ---------- Example cards ---------- */
.examples { background: var(--sand); border-block: 1px solid var(--line); }
.ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.ex-card {
  display: flex; flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s ease, transform .15s ease;
}
.ex-card:hover { border-color: var(--green); color: var(--ink); transform: translateY(-2px); }
.ex-card__visual {
  background: var(--c1, var(--green));
  color: var(--c3, var(--bg));
  padding: 22px;
  min-height: 150px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.ex-card__visual { position: relative; overflow: hidden; min-height: 200px; }
.ex-card__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ex-card__visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 25%, var(--c1, var(--green)) 92%); }
.ex-card__mark, .ex-card__name { position: relative; z-index: 1; }
.ex-card__mark {
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--c2, var(--terra)); color: var(--c4, #fff);
  font-weight: 700; font-size: 18px; letter-spacing: -0.02em;
  direction: ltr;
}
.ex-card__name { font-family: var(--display); font-weight: 700; font-size: 26px; line-height: 1.1; direction: ltr; text-align: start; }
.ex-card__body { padding: 18px 22px 22px; display: grid; gap: 8px; flex: 1; align-content: start; }
.ex-card__kind { font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terra); }
html[lang="ar"] .ex-card__kind { letter-spacing: 0; font-size: 14px; }
.ex-card__body p { color: var(--muted); font-size: 15px; }
.ex-card__go { margin-top: 6px; font-weight: 700; color: var(--green); display: inline-flex; align-items: center; gap: 6px; }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
.ex-more { margin-top: 28px; display: flex; justify-content: center; }

.demo-tag {
  display: inline-block;
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  padding: 3px 8px; border: 1px solid currentColor; border-radius: 3px;
}

/* ---------- Steps ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 28px; counter-reset: step; }
.step { display: grid; gap: 8px; align-content: start; border-top: 2px solid var(--green); padding-top: 18px; }
.step__n { font-family: var(--display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--terra); }
.step h3 { font-family: var(--display); font-weight: 700; font-size: 24px; color: var(--green); }
.step p { color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 32px; }
@media (min-width: 900px) { .faq { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; } }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
  min-height: 56px;
  font-weight: 600; font-size: 18px; color: var(--green);
  cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  flex: none;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 50%;
  font-size: 20px; line-height: 1; color: var(--terra);
  background: var(--white);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: 20px; color: var(--muted); max-width: 600px; }

/* ---------- Contact ---------- */
.contact { background: var(--terra); color: var(--white); }
.contact__in { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .contact__in { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 56px; } }
.contact h2 { font-family: var(--display); font-weight: 700; font-size: clamp(34px, 5.4vw, 62px); line-height: 1.08; }
html[lang="ar"] .contact h2 { line-height: 1.4; }
.contact__text { display: grid; gap: 12px; }
.contact__text p { font-size: clamp(17px, 2vw, 19px); }
.contact__links { display: grid; gap: 12px; min-width: 0; }
.contact__links .btn { overflow-wrap: anywhere; text-align: center; }

/* ---------- Footer ---------- */
.footer { padding-block: 28px; font-size: 14px; color: var(--muted); }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; }
.footer__in { align-items: center; }

/* ---------- Mobile contact bar ---------- */
.mbar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
  background: var(--bg);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 18px rgba(30, 42, 37, 0.10);
}
.mbar .btn { min-height: 48px; padding: 10px 12px; font-size: 16px; }
body.has-mbar { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
@media (min-width: 880px) {
  .mbar { display: none; }
  body.has-mbar { padding-bottom: 0; }
}

/* ---------- Examples page ---------- */
.page-hero { background-color: var(--green); background-image: var(--zellige); color: var(--bg); border-bottom: 8px solid var(--terra); }
.page-hero__in { padding-block: clamp(40px, 7vw, 72px); display: grid; gap: 14px; }
.page-hero h1 { font-family: var(--display); font-weight: 700; font-size: clamp(32px, 5.6vw, 58px); line-height: 1.1; text-wrap: balance; max-width: 820px; }
html[lang="ar"] .page-hero h1 { line-height: 1.4; }
.page-hero p { color: var(--on-green); font-size: clamp(17px, 2vw, 19px); max-width: 640px; }
.page-hero .eyebrow { color: #F2C9B8; }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; font-weight: 600; text-decoration: none; }

.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  display: grid; overflow: hidden;
}
@media (min-width: 860px) { .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.feature__text { padding: clamp(22px, 4vw, 36px); display: grid; gap: 14px; align-content: center; justify-items: start; }
.feature__text h3 { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3vw, 32px); color: var(--green); line-height: 1.2; }
.feature__text p { color: var(--muted); }
.feature__visual { background: var(--green); background-image: var(--zellige); padding: clamp(18px, 3vw, 28px); display: flex; align-items: center; justify-content: center; }

.feature__shot { display: block; width: 100%; max-width: 520px; height: auto; border-radius: 6px; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28); }
.mini-pos {
  width: 100%; max-width: 380px; background: var(--white); border-radius: 6px; overflow: hidden;
  font-size: 13px; color: var(--ink); direction: ltr; text-align: left;
}
.mini-pos__bar { background: #121212; color: #fff; padding: 8px 12px; display: flex; justify-content: space-between; font-family: 'Space Mono', monospace; font-size: 11px; }
.mini-pos__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 12px; }
.mini-pos__grid span { border: 1px solid var(--line); border-radius: 4px; padding: 8px 6px; display: grid; gap: 6px; font-weight: 600; line-height: 1.2; }
.mini-pos__grid span small { font-family: 'Space Mono', monospace; font-weight: 400; color: var(--muted); }
.mini-pos__grid span.is-on { background: var(--green); color: #fff; border-color: var(--green); }
.mini-pos__grid span.is-on small { color: #E4E9E2; }
.mini-pos__total { margin: 0 12px 12px; padding: 10px 12px; background: var(--terra); color: #fff; border-radius: 4px; display: flex; justify-content: space-between; font-weight: 700; }

.pack-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: 20px; }
.pack { background: var(--white); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; display: flex; flex-direction: column; }
.pack__photo { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.pack__brand {
  background: var(--c1); color: var(--c3);
  padding: 24px; display: grid; gap: 16px;
  direction: ltr; text-align: left;
}
.pack__id { display: flex; align-items: center; gap: 14px; }
.pack__mark {
  width: 60px; height: 60px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--c2); color: var(--c4);
  font-weight: 700; font-size: 20px;
}
.pack__name { font-family: var(--display); font-weight: 700; font-size: 28px; line-height: 1.1; }
.pack__type { font-size: 14px; opacity: 0.9; }
.pack__menu { display: grid; gap: 6px; font-size: 15px; }
.pack__menu div { display: flex; align-items: baseline; gap: 8px; }
.pack__menu i { flex: 1; border-bottom: 2px dotted currentColor; opacity: 0.45; }
.pack__body { padding: 20px 24px 24px; display: grid; gap: 16px; flex: 1; align-content: start; }
.pack__body > p { color: var(--muted); }
.swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.swatches span.sw { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); }
.pack__list { display: grid; gap: 6px; font-size: 15px; }
.pack__list li { position: relative; padding-inline-start: 22px; }
.pack__list li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.5em; width: 9px; height: 9px; background: var(--terra); transform: rotate(45deg); }
html[lang="ar"] .pack__list li::before { top: 0.7em; }
.pack__actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.group-title { font-family: var(--display); font-weight: 700; font-size: clamp(26px, 3.4vw, 38px); color: var(--green); margin-bottom: 20px; }
.stack { display: grid; gap: clamp(44px, 7vw, 72px); }

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