@import url("fonts.css");

/* ==========================================================================
   Mashreq Feed
   Light green theme.

   The concept still comes from the name: مشرق / Mashreq is the place where the
   sun rises, and the logo mark is that sunrise drawn as concentric arcs. Here
   it is morning light rather than dawn dark - a pale green paper base, the
   brand's own leaf green, and deep forest green blocks used sparingly so the
   page has somewhere to land.

   Contrast note: the brand green #60b448 is a FILL colour, not a text colour.
   On a light background it fails WCAG AA for body text, so text and small UI
   use --green-ink instead. Verified by tools/check_contrast.py.

   All directional spacing uses logical properties, so Arabic and Kurdish get
   correct RTL layout without a separate stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------- tokens -- */
:root {
  /* Brand, sampled from the logo artwork */
  --green:      #60b448;   /* fills, bars, decorative only */
  --green-mid:  #4a9636;
  --green-ink:  #2d6a20;   /* text-safe green on paper */
  --lime:       #a8cc3c;

  /* Deep greens for the feature bands and footer */
  --forest:     #12301a;
  --forest-2:   #1b4325;
  --forest-3:   #275732;

  /* Dawn amber, from the bag print. Darkened for legibility on paper. */
  --dawn:       #e39b3c;   /* on dark only */
  --dawn-ink:   #94570a;   /* text-safe on paper */

  /* Paper - the light base, faintly green */
  --paper:    #f7faf3;
  --paper-2:  #edf3e4;
  --paper-3:  #dee9d1;
  --paper-4:  #c9d9b9;
  --line-input: #7b9a63;  /* form borders - WCAG 1.4.11 needs 3:1 */

  --ink:        #16251a;
  --ink-soft:   rgba(22, 37, 26, .74);
  --ink-faint:  rgba(22, 37, 26, .5);

  --on-dark:       #f2f7ec;
  --on-dark-soft:  rgba(242, 247, 236, .74);
  --on-dark-faint: rgba(242, 247, 236, .45);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --font-arabic: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;

  --shell: 1280px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --band: clamp(4.5rem, 9vw, 9rem);
  --radius: 4px;

  --nav-h: 66px;

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* Fraunces has no Arabic coverage. Mixing a Latin serif with an Arabic sans
   looks like an accident rather than a pairing, so both switch to Vazirmatn. */
html[lang="ar"], html[lang="ku"] {
  --font-display: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
  --font-body: "Vazirmatn", "Segoe UI", Tahoma, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, .96rem + .2vw, 1.075rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, picture, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -.018em;
  margin: 0;
  color: var(--forest);
  font-variation-settings: "SOFT" 28, "WONK" 1, "opsz" 96;
}
html[lang="ar"] h1, html[lang="ku"] h1,
html[lang="ar"] h2, html[lang="ku"] h2,
html[lang="ar"] h3, html[lang="ku"] h3,
html[lang="ar"] h4, html[lang="ku"] h4 {
  font-variation-settings: normal;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: 0;
}
html[lang="ar"] body, html[lang="ku"] body { line-height: 1.85; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--lime); color: var(--forest); }

:focus-visible {
  outline: 2px solid var(--green-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 200;
  background: var(--forest);
  color: var(--on-dark);
  padding: .8rem 1.4rem;
  font-weight: 600;
}
.skip:focus { inset-inline-start: 0; }

/* -------------------------------------------------------------- layout -- */
.shell {
  width: min(100% - var(--gutter) * 2, var(--shell));
  margin-inline: auto;
}
.shell-narrow { width: min(100% - var(--gutter) * 2, 760px); margin-inline: auto; }

.band { padding-block: var(--band); position: relative; }
.band-paper     { background: var(--paper); }
.band-paper-alt { background: var(--paper-2); }

/* Deep green feature band. Used sparingly - it is the page's punctuation. */
.band-green {
  background: var(--forest);
  color: var(--on-dark);
}
.band-green h1, .band-green h2, .band-green h3, .band-green h4 { color: var(--on-dark); }
.band-green::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/grain.png");
  background-size: 128px;
  opacity: .5;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.band > .shell, .band > .shell-narrow { position: relative; z-index: 1; }

/* A hairline between two same-tone bands, so sections still read as separate */
.band-paper + .band-paper { border-block-start: 1px solid var(--paper-3); }

/* ------------------------------------------------------------ eyebrow --- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-body);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-ink);
  margin: 0 0 1.4rem;
}
html[lang="ar"] .eyebrow, html[lang="ku"] .eyebrow {
  font-family: var(--font-arabic);
  letter-spacing: 0;
  text-transform: none;
  font-size: .88rem;
}
.eyebrow::before {
  content: "";
  inline-size: 2.2rem;
  block-size: 2px;
  background: var(--green-mid);
  flex: none;
}
.band-green .eyebrow { color: var(--lime); }
.band-green .eyebrow::before { background: var(--lime); }

/* ---------------------------------------------------------- sun motif --- */
/* Concentric arcs lifted from the logo, redrawn in CSS as a section marker. */
.sun {
  --sun-size: 120px;
  inline-size: var(--sun-size);
  block-size: calc(var(--sun-size) / 2);
  position: relative;
  overflow: hidden;
  flex: none;
}
.sun::before, .sun::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 2px solid var(--green-mid);
  inset-block-start: 0;
  inset-inline-start: 50%;
  translate: -50% 0;
  aspect-ratio: 1;
}
.sun::before { block-size: calc(var(--sun-size) * .55); opacity: 1; }
.sun::after  { block-size: var(--sun-size); opacity: .45; }
.band-green .sun::before, .band-green .sun::after { border-color: var(--lime); }

/* --------------------------------------------------------------- type --- */
.display-1 { font-size: clamp(2.3rem, 1.5rem + 2.9vw, 4.3rem); }
.display-2 { font-size: clamp(1.9rem, 1.35rem + 2.1vw, 3.1rem); }
.display-3 { font-size: clamp(1.4rem, 1.15rem + 1.05vw, 2rem); }

.lead {
  font-size: clamp(1.08rem, 1rem + .5vw, 1.35rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 46ch;
}
.band-green .lead { color: var(--on-dark-soft); }
html[lang="ar"] .lead, html[lang="ku"] .lead { line-height: 1.85; }

.prose { max-width: 62ch; }
.prose p + p { margin-top: 1.1em; }

/* ------------------------------------------------------------ buttons --- */
.btn {
  --btn-bg: var(--green-ink);
  --btn-fg: #ffffff;
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .95rem 1.7rem;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .01em;
  border: 1px solid var(--btn-bg);
  border-radius: var(--radius);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: translate .25s var(--ease), box-shadow .25s var(--ease),
              background .25s var(--ease);
}
.btn:hover {
  translate: 0 -2px;
  background: var(--forest-2);
  border-color: var(--forest-2);
  box-shadow: 0 10px 24px rgba(18, 48, 26, .22);
}
.btn:active { translate: 0; }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--forest);
  border-color: var(--paper-4);
}
.btn-ghost:hover {
  background: var(--paper-2);
  border-color: var(--green-ink);
  color: var(--forest);
  box-shadow: none;
}

.band-green .btn { --btn-bg: var(--lime); --btn-fg: var(--forest); }
.band-green .btn:hover { background: #b9db4f; border-color: #b9db4f; }
.band-green .btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--on-dark);
  border-color: rgba(242, 247, 236, .35);
}
.band-green .btn-ghost:hover { background: rgba(242, 247, 236, .1); border-color: var(--lime); color: var(--on-dark); }

.btn-wa { --btn-bg: #0e7a3c; --btn-fg: #ffffff; }
.btn-wa:hover { background: #0a6b34; border-color: #0a6b34; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2.2rem; }

/* --------------------------------------------------------------- nav ----- */
/* Solid from the top rather than transparent-over-hero. On a light theme a
   transparent header sitting on photography is a legibility gamble on every
   page; this is not. */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  background: rgba(247, 250, 243, .9);
  backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--paper-3);
  transition: box-shadow .3s var(--ease), background .3s var(--ease);
}
.nav.is-stuck {
  background: rgba(247, 250, 243, .97);
  box-shadow: 0 2px 18px rgba(18, 48, 26, .09);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: .9rem;
  min-block-size: var(--nav-h);
}
.nav-logo { flex: none; }
.nav-logo img { block-size: 34px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: .2rem;
  margin-inline-start: auto;
  list-style: none;
  padding: 0;
  margin-block: 0;
}
.nav-links a {
  display: block;
  padding: .5rem .85rem;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--radius);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--forest); background: var(--paper-2); }
.nav-links a[aria-current="page"] { color: var(--green-ink); font-weight: 600; }

.lang {
  display: flex;
  gap: 1px;
  margin-inline-start: 1rem;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
  flex: none;
}
.lang a {
  padding: .42rem .7rem;
  font-size: .8rem;
  font-weight: 600;
  background: var(--paper);
  color: var(--ink-soft);
  transition: background .2s, color .2s;
  min-inline-size: 2.4rem;
  text-align: center;
}
.lang a:hover { background: var(--paper-2); color: var(--forest); }
.lang a.is-on { background: var(--green-ink); color: #fff; }

.nav-toggle {
  display: none;
  margin-inline-start: auto;
  background: none;
  border: 1px solid var(--paper-4);
  border-radius: var(--radius);
  padding: .5rem .7rem;
  cursor: pointer;
  color: var(--forest);
}
.nav-toggle span {
  display: block;
  inline-size: 20px;
  block-size: 2px;
  background: currentColor;
  margin-block: 4px;
  transition: translate .25s var(--ease), rotate .25s var(--ease), opacity .2s;
}
.nav.is-open .nav-toggle span:nth-child(1) { translate: 0 6px; rotate: 45deg; }
.nav.is-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav-toggle span:nth-child(3) { translate: 0 -6px; rotate: -45deg; }

@media (max-width: 940px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset-block-start: var(--nav-h);
    inset-inline: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    padding: 1rem var(--gutter) 2rem;
    border-block-end: 1px solid var(--paper-3);
    box-shadow: 0 14px 26px rgba(18, 48, 26, .1);
    translate: 0 -12px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .28s var(--ease), translate .28s var(--ease), visibility .28s;
  }
  .nav.is-open .nav-links { opacity: 1; translate: 0; visibility: visible; }
  .nav-links a { padding: .85rem .25rem; font-size: 1.05rem; }
  .lang { margin-inline-start: .25rem; margin-block-start: 1rem; align-self: flex-start; }
}

/* --------------------------------------------------------------- hero --- */
.hero {
  position: relative;
  min-block-size: min(92svh, 820px);
  display: flex;
  align-items: flex-end;
  padding-block: calc(var(--nav-h) + 5rem) 4.5rem;
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-2);
}
.hero .pic { position: absolute; inset: 0; z-index: -2; }
.hero .pic img { inline-size: 100%; block-size: 100%; object-fit: cover; }

@media (prefers-reduced-motion: no-preference) {
  .hero .pic img { animation: drift 26s var(--ease) forwards; }
}
@keyframes drift {
  from { scale: 1.09; }
  to   { scale: 1; }
}

/* A pale scrim rather than a dark one: the photograph stays bright, and the
   text sits on near-paper so the hero belongs to the light theme. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    /* short fade into the band below, so the photo does not end on a hard line */
    linear-gradient(to top,
      var(--paper) 0%,
      rgba(247, 250, 243, .88) 8%,
      rgba(247, 250, 243, .18) 26%,
      rgba(247, 250, 243, 0) 46%),
    /* the scrim that actually carries the text - heavy on the text side only,
       clearing quickly so the aerial is still a photograph and not a haze */
    linear-gradient(to right,
      rgba(247, 250, 243, .97) 0%,
      rgba(247, 250, 243, .93) 32%,
      rgba(247, 250, 243, .55) 50%,
      rgba(247, 250, 243, .08) 68%,
      rgba(247, 250, 243, 0) 100%);
}
[dir="rtl"] .hero::before {
  background:
    linear-gradient(to top,
      var(--paper) 0%,
      rgba(247, 250, 243, .88) 8%,
      rgba(247, 250, 243, .18) 26%,
      rgba(247, 250, 243, 0) 46%),
    linear-gradient(to left,
      rgba(247, 250, 243, .97) 0%,
      rgba(247, 250, 243, .93) 32%,
      rgba(247, 250, 243, .55) 50%,
      rgba(247, 250, 243, .08) 68%,
      rgba(247, 250, 243, 0) 100%);
}

.hero-body { max-width: 40rem; }
.hero h1 { max-width: 15ch; margin-block: .35em .45em; }
.hero .lead { max-width: 42ch; color: var(--ink-soft); }

.hero-scroll {
  position: absolute;
  inset-block-end: 1.6rem;
  inset-inline-end: var(--gutter);
  display: flex;
  align-items: center;
  gap: .7rem;
}
.hero-scroll::after {
  content: "";
  inline-size: 2px;
  block-size: 46px;
  background: linear-gradient(var(--green), transparent);
}
@media (max-width: 720px) { .hero-scroll { display: none; } }

/* ------------------------------------------------------------- ticker --- */
.ticker {
  background: var(--forest);
  color: var(--on-dark);
  overflow: hidden;
  padding-block: 1.15rem;
}
.ticker-track {
  display: flex;
  gap: 3rem;
  inline-size: max-content;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; flex-wrap: wrap; inline-size: 100%; justify-content: center; }
}
@keyframes slide {
  from { translate: 0 0; }
  to   { translate: -50% 0; }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 3rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: .02em;
  color: var(--on-dark-soft);
  white-space: nowrap;
}
html[lang="ar"] .ticker-item, html[lang="ku"] .ticker-item { font-family: var(--font-arabic); }
.ticker-item::after {
  content: "";
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--lime);
  flex: none;
}

/* ------------------------------------------------------------- images --- */
.pic {
  display: block;
  background: var(--img-color, var(--paper-3));
  overflow: hidden;
  border-radius: var(--radius);
}
.pic img { inline-size: 100%; block-size: auto; }
.pic-fill { block-size: 100%; }
.pic-fill img { block-size: 100%; object-fit: cover; }
.pic-ratio { aspect-ratio: var(--img-ratio, 3 / 2); }
.pic-ratio img { block-size: 100%; object-fit: cover; }
.hero .pic, .pagehead .pic { border-radius: 0; }

/* --------------------------------------------------------- split grid --- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5.5rem);
  align-items: start;
}
.split-tight { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
@media (max-width: 900px) {
  .split, .split-tight { grid-template-columns: 1fr; gap: 2.5rem; }
}
.split-sticky { position: sticky; top: calc(var(--nav-h) + 2rem); }
@media (max-width: 900px) { .split-sticky { position: static; } }

/* --------------------------------------------------------- name band --- */
.namecard {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.6rem;
}
.namecard h2 { max-width: 18ch; }
.namecard .lead { max-width: 54ch; }

/* ------------------------------------------------------------ product --- */
/* auto-fill, not auto-fit: on the products page a group may hold only one or
   two rations, and auto-fit would stretch them across the whole row. */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 1.25rem;
}
.product-grid-lg { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 1.5rem; }
@media (max-width: 560px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}
/* The products page cards each carry a description paragraph. Two columns on a
   phone leaves roughly 24 characters a line, so they go single-column earlier
   than the compact home-page grid does. Declared after the rule above because
   .product-grid-lg also carries .product-grid. */
@media (max-width: 620px) {
  .product-grid-lg { grid-template-columns: 1fr; }
}
@media (max-width: 400px) {
  .product-grid { grid-template-columns: 1fr; }
}

.product {
  --accent: var(--green);
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
  transition: translate .35s var(--ease), border-color .35s var(--ease),
              box-shadow .35s var(--ease);
}
.product::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  block-size: 3px;
  background: var(--accent);
  z-index: 2;
}
.product:hover {
  translate: 0 -5px;
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 14px 30px rgba(18, 48, 26, .12);
}
.band-green .product { background: var(--forest-2); border-color: rgba(242, 247, 236, .14); }

.product-shot {
  position: relative;
  padding: 2.2rem 1.6rem 1.2rem;
  background:
    radial-gradient(80% 70% at 50% 0%, color-mix(in srgb, var(--accent) 15%, transparent), transparent 70%),
    var(--paper-2);
  display: flex;
  justify-content: center;
}
.band-green .product-shot {
  background:
    radial-gradient(80% 70% at 50% 0%, color-mix(in srgb, var(--accent) 26%, transparent), transparent 70%),
    var(--forest-3);
}
.product-shot .pic { background: none; }
.product-shot img {
  block-size: clamp(150px, 15vw, 200px);
  inline-size: auto;
  margin-inline: auto;
  filter: drop-shadow(0 12px 20px rgba(18, 48, 26, .2));
  transition: scale .4s var(--ease-out);
}
.product:hover .product-shot img { scale: 1.045; }

.product-body { padding: 1.35rem 1.5rem 1.6rem; display: flex; flex-direction: column; flex: 1; }
.product-stage {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  filter: brightness(.72);
  margin-block-end: .5rem;
}
.band-green .product-stage { filter: brightness(1.5); }
html[lang="ar"] .product-stage, html[lang="ku"] .product-stage {
  letter-spacing: 0; text-transform: none; font-size: .84rem;
}
.product-name { font-size: 1.22rem; margin-block-end: .55rem; }
.product-desc { font-size: .93rem; color: var(--ink-soft); margin-block-end: 1.1rem; }
.band-green .product-desc { color: var(--on-dark-soft); }

.product-specs {
  margin-block-start: auto;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--paper-3);
}
.band-green .product-specs { border-block-start-color: rgba(242, 247, 236, .16); }
.chip {
  font-size: .74rem;
  font-weight: 600;
  padding: .28rem .6rem;
  border-radius: 100px;
  background: var(--paper-2);
  color: var(--ink-soft);
}
.band-green .chip { background: rgba(242, 247, 236, .12); color: var(--on-dark-soft); }

/* --------------------------------------------------------------- stats -- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem 1.5rem;
  margin-block-start: 3rem;
}
.stat-n {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 1.8rem + 2.6vw, 4rem);
  line-height: .9;
  color: var(--green-ink);
  font-variation-settings: "SOFT" 40, "WONK" 1, "opsz" 144;
  margin-block-end: .5rem;
}
.band-green .stat-n { color: var(--lime); }
html[lang="ar"] .stat-n, html[lang="ku"] .stat-n { font-variation-settings: normal; }
.stat-l { font-size: .88rem; color: var(--ink-soft); max-width: 22ch; }
.band-green .stat-l { color: var(--on-dark-soft); }

/* --------------------------------------------------------------- steps -- */
.steps { counter-reset: step; display: grid; gap: 1px; background: var(--paper-3); }
.band-green .steps { background: rgba(242, 247, 236, .16); }
.step {
  counter-increment: step;
  background: var(--paper);
  padding: 2rem clamp(1.25rem, 3vw, 2.5rem);
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem;
  align-items: start;
  transition: background .3s var(--ease);
}
.band-paper-alt .step { background: var(--paper-2); }
.band-green .step { background: var(--forest); }
.step:hover { background: var(--paper-2); }
.band-paper-alt .step:hover { background: var(--paper-3); }
.band-green .step:hover { background: var(--forest-2); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: var(--green-ink);
  line-height: 1;
  font-variation-settings: "opsz" 144;
}
.band-green .step::before { color: var(--lime); }
html[lang="ar"] .step::before, html[lang="ku"] .step::before {
  font-family: var(--font-arabic); font-variation-settings: normal;
}
.step h3 { font-size: 1.15rem; margin-block-end: .45rem; }
.step p { font-size: .95rem; color: var(--ink-soft); margin: 0; }
.band-green .step p { color: var(--on-dark-soft); }
@media (max-width: 620px) {
  .step { grid-template-columns: 1fr; gap: .5rem; }
}

/* ------------------------------------------------------------- values --- */
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 2.5rem 2rem; }
.value h3 { font-size: 1.2rem; margin-block-end: .6rem; }
.value p { font-size: .95rem; color: var(--ink-soft); }
.band-green .value p { color: var(--on-dark-soft); }
.value::before {
  content: "";
  display: block;
  inline-size: 2.4rem;
  block-size: 3px;
  background: var(--green-mid);
  margin-block-end: 1.1rem;
}
.band-green .value::before { background: var(--lime); }

/* ------------------------------------------------------------ gallery --- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
}
.gallery-item.is-wide { grid-column: span 2; }
@media (max-width: 700px) { .gallery-item.is-wide { grid-column: span 1; } }
.gallery-item .pic { block-size: 100%; border-radius: 0; }
.gallery-item img {
  block-size: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: scale .55s var(--ease-out);
}
.gallery-item:hover img { scale: 1.05; }
/* Caption sits on the photograph, so it keeps a dark scrim regardless of theme */
.gallery-cap {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  padding: 2.5rem 1.1rem .95rem;
  font-size: .86rem;
  color: #fff;
  background: linear-gradient(to top, rgba(10, 26, 15, .92), transparent);
  translate: 0 6px;
  opacity: 0;
  transition: opacity .3s var(--ease), translate .3s var(--ease);
}
.gallery-item:hover .gallery-cap,
.gallery-item:focus-within .gallery-cap { opacity: 1; translate: 0; }

/* Lightbox stays dark - a full-bleed photo viewer should not glow at you */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(10, 20, 13, .96);
  display: grid;
  place-items: center;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s var(--ease), visibility .3s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-block-size: 86svh; max-inline-size: 100%; width: auto; border-radius: var(--radius); }
.lightbox-cap { color: var(--on-dark-soft); font-size: .9rem; margin-block-start: 1rem; text-align: center; }
.lightbox-close {
  position: absolute;
  inset-block-start: clamp(1rem, 3vw, 2rem);
  inset-inline-end: clamp(1rem, 3vw, 2rem);
  background: none;
  border: 1px solid rgba(242, 247, 236, .35);
  border-radius: 50%;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  color: var(--on-dark);
}
.lightbox-close:hover { border-color: var(--lime); color: var(--lime); }

/* --------------------------------------------------------------- cards -- */
.cardlist { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }
.card {
  padding: 1.75rem;
  background: #fff;
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  transition: border-color .3s var(--ease), translate .3s var(--ease),
              box-shadow .3s var(--ease);
}
.card:hover {
  border-color: var(--green);
  translate: 0 -3px;
  box-shadow: 0 12px 26px rgba(18, 48, 26, .1);
}
.band-green .card { background: var(--forest-2); border-color: rgba(242, 247, 236, .14); }
.card h3 { font-size: 1.1rem; margin-block-end: .4rem; }
.card p { font-size: .93rem; color: var(--ink-soft); margin: 0; }
.band-green .card p { color: var(--on-dark-soft); }
.card a.big { font-size: 1.15rem; font-weight: 600; color: var(--green-ink); word-break: break-word; }
.band-green .card a.big { color: var(--lime); }

/* --------------------------------------------------------------- forms -- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }
.band-green .field label { color: var(--on-dark-soft); }
.field .req { color: var(--dawn-ink); }
.band-green .field .req { color: var(--dawn); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: .97rem;
  padding: .82rem .95rem;
  background: #fff;
  border: 1px solid var(--line-input);
  border-radius: var(--radius);
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  inline-size: 100%;
}
.band-green .field input, .band-green .field select, .band-green .field textarea {
  background: var(--forest-2); border-color: rgba(242, 247, 236, .22); color: var(--on-dark);
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--green-ink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(96, 180, 72, .2);
}
.field textarea { resize: vertical; min-block-size: 7rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.field.is-bad input, .field.is-bad select, .field.is-bad textarea { border-color: #b8331a; }
.field-err { font-size: .82rem; color: #b8331a; display: none; }
.field.is-bad .field-err { display: block; }

.form-note {
  padding: .95rem 1.15rem;
  border-radius: var(--radius);
  font-size: .92rem;
  display: none;
}
.form-note.is-on { display: block; }
.form-note.ok  { background: #e4f2dc; border: 1px solid var(--green); color: #1e4d14; }
.form-note.bad { background: #fbe6e1; border: 1px solid #b8331a; color: #7d2211; }

/* -------------------------------------------------------------- footer -- */
.footer {
  background: var(--forest);
  color: var(--on-dark);
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/grain.png");
  background-size: 128px;
  opacity: .4;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.footer .shell { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(auto-fit, minmax(150px, 1fr));
  gap: 2.5rem;
}
.footer-logo img { block-size: 40px; inline-size: auto; margin-block-end: 1.2rem; }
.footer p { font-size: .92rem; color: var(--on-dark-soft); max-width: 34ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--on-dark-faint);
  margin-block-end: 1.1rem;
}
html[lang="ar"] .footer h4, html[lang="ku"] .footer h4 {
  letter-spacing: 0; text-transform: none; font-size: .9rem; font-family: var(--font-arabic);
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.footer ul a, .footer address a {
  font-size: .92rem;
  color: var(--on-dark-soft);
  transition: color .2s var(--ease);
}
.footer ul a:hover, .footer address a:hover { color: var(--lime); }
.footer address { font-style: normal; display: grid; gap: .55rem; }
.footer-base {
  margin-block-start: 3.5rem;
  padding-block-start: 1.6rem;
  border-block-start: 1px solid rgba(242, 247, 236, .16);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  font-size: .84rem;
  color: var(--on-dark-faint);
}

/* --------------------------------------------------------- page header -- */
.pagehead {
  position: relative;
  padding-block: calc(var(--nav-h) + 5rem) clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
  background: var(--paper-2);
}
.pagehead .pic { position: absolute; inset: 0; z-index: -2; }
.pagehead .pic img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.pagehead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(to top,
      var(--paper) 0%, rgba(247, 250, 243, .9) 14%, rgba(247, 250, 243, .3) 44%, rgba(247, 250, 243, .05)),
    linear-gradient(to right,
      rgba(247, 250, 243, .96) 0%, rgba(247, 250, 243, .88) 34%,
      rgba(247, 250, 243, .45) 54%, rgba(247, 250, 243, .05) 76%, rgba(247, 250, 243, 0) 100%);
}
[dir="rtl"] .pagehead::before {
  background:
    linear-gradient(to top,
      var(--paper) 0%, rgba(247, 250, 243, .9) 14%, rgba(247, 250, 243, .3) 44%, rgba(247, 250, 243, .05)),
    linear-gradient(to left,
      rgba(247, 250, 243, .96) 0%, rgba(247, 250, 243, .88) 34%,
      rgba(247, 250, 243, .45) 54%, rgba(247, 250, 243, .05) 76%, rgba(247, 250, 243, 0) 100%);
}
.pagehead h1 { max-width: 16ch; margin-block-end: .5em; }

/* ------------------------------------------------------------ cta band -- */
.cta {
  background: linear-gradient(118deg, var(--forest) 8%, var(--forest-2) 62%, var(--green-mid) 160%);
  color: var(--on-dark);
  position: relative;
  overflow: hidden;
}
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/grain.png");
  background-size: 128px;
  opacity: .4;
  mix-blend-mode: overlay;
}
.cta .shell { position: relative; z-index: 1; }
.cta h2 { max-width: 20ch; color: var(--on-dark); }
.cta p { color: var(--on-dark-soft); max-width: 46ch; }
.cta .btn { --btn-bg: var(--lime); --btn-fg: var(--forest); }
.cta .btn:hover { background: #b9db4f; border-color: #b9db4f; }
.cta .btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--on-dark);
  border-color: rgba(242, 247, 236, .35);
}
.cta .btn-ghost:hover { background: rgba(242, 247, 236, .1); border-color: var(--lime); color: var(--on-dark); }

/* --------------------------------------------------------------- misc --- */
.notice {
  padding: 1.25rem 1.5rem;
  border-inline-start: 4px solid var(--dawn);
  background: #fdf3e3;
  border-radius: var(--radius);
  font-size: .95rem;
  color: var(--ink);
}
.notice h3 { color: var(--forest); }
.band-green .notice { background: rgba(242, 247, 236, .08); color: var(--on-dark); }
.band-green .notice h3 { color: var(--on-dark); }

.empty {
  text-align: center;
  padding-block: clamp(3rem, 8vw, 6rem);
  border: 1px dashed var(--paper-4);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.empty h2 { margin-block-end: .6rem; }
.empty p { color: var(--ink-soft); max-width: 44ch; margin-inline: auto; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }

.mapframe {
  inline-size: 100%;
  block-size: clamp(280px, 42vw, 460px);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
}

/* ------------------------------------------------------------- reveal --- */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; translate: 0 22px; }
  .reveal.is-in {
    opacity: 1;
    translate: 0;
    transition: opacity .7s var(--ease-out), translate .7s var(--ease-out);
    transition-delay: var(--delay, 0ms);
  }
}

/* ==========================================================================
   Mobile and touch
   Measured, not guessed: every rule below fixes something found by auditing
   the built pages at 320/360/390/414 px. Layout itself needed nothing - there
   is no horizontal overflow at any of those widths - but interaction did.
   ========================================================================== */

/* iOS Safari zooms the whole page when a focused field is under 16px. The
   desktop size (.97rem = 15.5px) trips it on every input on the site. */
@media (max-width: 640px) {
  .field input,
  .field select,
  .field textarea { font-size: 16px; }
}

/* Touch targets. Apple HIG and WCAG 2.5.8 both want ~44px; these were the
   only controls measuring under it. */
@media (max-width: 940px) {
  .nav-toggle { padding: .68rem .7rem; }              /* 44x40 -> 44x48 */
  .lang a {
    min-inline-size: 3rem;                            /* 38 wide -> 48 */
    padding: .6rem .8rem;
  }
}
@media (max-width: 640px) {
  .footer ul { gap: .2rem; }
  .footer ul a,
  .footer address a {
    display: inline-block;
    padding-block: .72rem;                            /* 19px tall -> 44 */
  }
  /* The logo is a 34px image; give the link a full-height hit area. */
  .nav-logo { display: flex; align-items: center; min-block-size: 44px; }

  /* The phone, WhatsApp, email and map links on the contact page are the
     primary actions there - they were 19-24px tall, the smallest targets on
     the site and the ones most likely to be tapped one-handed. */
  .card a.big {
    display: inline-flex;
    align-items: center;
    min-block-size: 44px;
    padding-block: .35rem;
  }
  .footer-grid { grid-template-columns: 1fr; gap: 2.2rem; }
}

/* Gallery captions were hover-only, so on a phone they never appeared at all
   and the photographs lost their descriptions entirely. */
@media (hover: none), (max-width: 700px) {
  .gallery-cap { opacity: 1; translate: 0; }
}

/* The hero and page headers scrim the photograph from the text side, which on
   a narrow screen is the wrong axis - the headline spans the full width and
   its tail sits over bare photo. Switch to a bottom-weighted scrim, matching
   the bottom-aligned text. */
@media (max-width: 760px) {
  .hero::before,
  [dir="rtl"] .hero::before {
    background: linear-gradient(to top,
      var(--paper) 0%,
      rgba(247, 250, 243, .97) 34%,
      rgba(247, 250, 243, .86) 56%,
      rgba(247, 250, 243, .55) 78%,
      rgba(247, 250, 243, .38) 100%);
  }
  .pagehead::before,
  [dir="rtl"] .pagehead::before {
    background: linear-gradient(to top,
      var(--paper) 0%,
      rgba(247, 250, 243, .96) 42%,
      rgba(247, 250, 243, .78) 72%,
      rgba(247, 250, 243, .45) 100%);
  }

  /* 36.8px over a 350px column gives about nine characters a line. */
  .hero h1 { font-size: clamp(1.85rem, 7.4vw, 2.6rem); max-width: 100%; }
  .hero {
    min-block-size: min(88svh, 700px);
    padding-block: calc(var(--nav-h) + 2.5rem) 3rem;
  }
  .pagehead { padding-block: calc(var(--nav-h) + 3rem) 2.5rem; }
  .hero .lead, .pagehead .lead { max-width: 100%; }
}

/* Safari needs the prefix, and without it the sticky header is transparent
   over scrolling content on iPhone. */
.nav { -webkit-backdrop-filter: blur(14px); }

/* Grey flash on tap looks like a rendering fault on a light theme. */
@media (hover: none) {
  a, button { -webkit-tap-highlight-color: rgba(45, 106, 32, .15); }
}

/* Version stamp in the footer. Deliberately quiet - it is there so anyone can
   confirm what is actually deployed, not as a design element. Tabular figures
   stop the digits shifting between releases. */
.footer-version {
  font-family: var(--font-body);
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .04em;
  color: var(--on-dark-faint);
  white-space: nowrap;
}

/* ------------------------------------------------------ update toast ---- */
/* Shown only when version.json reports a build newer than the one this page
   was served from. Logical properties keep it on the correct side in RTL. */
.toast {
  position: fixed;
  inset-block-end: clamp(1rem, 3vw, 2rem);
  inset-inline-start: clamp(1rem, 3vw, 2rem);
  z-index: 250;
  display: flex;
  align-items: center;
  gap: .9rem;
  max-inline-size: min(30rem, calc(100vw - 2rem));
  padding: .85rem .9rem .85rem 1.25rem;
  background: var(--forest);
  color: var(--on-dark);
  border: 1px solid var(--forest-3);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(9, 24, 13, .32);
  opacity: 0;
  translate: 0 12px;
  transition: opacity .3s var(--ease-out), translate .3s var(--ease-out);
}
.toast.is-on { opacity: 1; translate: 0; }
@media (prefers-reduced-motion: reduce) {
  .toast { transition: none; translate: 0; }
}

.toast-msg { font-size: .93rem; line-height: 1.45; }

.toast-action {
  flex: none;
  padding: .5rem 1rem;
  background: var(--lime);
  color: var(--forest);
  border: 1px solid var(--lime);
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  min-block-size: 40px;
  transition: background .2s var(--ease);
}
.toast-action:hover { background: #b9db4f; }

.toast-close {
  flex: none;
  inline-size: 2rem;
  block-size: 2rem;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--on-dark-faint);
  cursor: pointer;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.toast-close:hover { color: var(--on-dark); background: rgba(242, 247, 236, .12); }

@media (max-width: 560px) {
  .toast {
    inset-inline: 1rem;
    max-inline-size: none;
    flex-wrap: wrap;
  }
  .toast-msg { flex: 1 1 100%; }
  .toast-action { flex: 1 1 auto; min-block-size: 44px; }
  .toast-close { min-inline-size: 44px; min-block-size: 44px; }
}
