/* zaater.ch — temporary landing page.
   Brand colours: green #024120, red #A70202 (with black and white: the pan-Arab colours). */

/* ---- Fonts (self-hosted, SIL Open Font License) ------------------------------ */

@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/readex-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/readex-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url(fonts/readex-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(fonts/fraunces-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 500 700; font-display: swap;
  src: url(fonts/fraunces-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Naskh Arabic"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url(fonts/notonaskharabic-arabic.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}

/* thmanyah sans — licensed to Zaater (see ../../brand/README.md). Used exactly as supplied:
   not converted, not subsetted, not renamed. The web server blocks requests from other sites,
   and the font is never offered as a download. */
@font-face {
  font-family: "thmanyah sans"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/thmanyah/thmanyahsans-Regular.woff2) format("woff2");
}
@font-face {
  font-family: "thmanyah sans"; font-style: normal; font-weight: 500; font-display: swap;
  src: url(fonts/thmanyah/thmanyahsans-Medium.woff2) format("woff2");
}
@font-face {
  font-family: "thmanyah sans"; font-style: normal; font-weight: 700; font-display: swap;
  src: url(fonts/thmanyah/thmanyahsans-Bold.woff2) format("woff2");
}

/* ---- Colours ---------------------------------------------------------------- */

:root {
  --brand-green: #024120;
  --brand-red: #a70202;
  --black: #1c1b17;
  --white: #ffffff;

  --bg: #f4eee3;
  --surface: #fbf8f2;
  --ink: #1c1b17;       /* strongest text: form input, social buttons */
  --text: #675f53;      /* body text of all paragraphs */
  --muted: #675f53;     /* small print, footer, labels */
  --line: #e3d8c5;
  --green-ink: #024120;
  --red-ink: #a70202;
  --accent-green: #024120;
  --accent-red: #a70202;
  --cta-bg: #024120;          /* filled buttons: brand green in light mode, gold in dark mode
                                 (red buttons made the page read as the Italian flag) */
  --cta-hover: #035a2c;
  --cta-text: #ffffff;
  --acronym: #8a6a1e;         /* the ZAATER letters: gold, deep enough to read on cream */
  --hero-bg:
    radial-gradient(90% 80% at 12% 0%, rgb(255 252 245 / 90%), transparent 60%),
    linear-gradient(165deg, #f8f2e8 0%, #efe5d4 100%);
  --heading: #024120;
  --fullname: #024120;
  --leaf-opacity: 0.13;
  --shadow: 0 1px 2px rgb(60 45 20 / 5%), 0 12px 32px rgb(60 45 20 / 7%);

  --font-body: "thmanyah sans", system-ui, -apple-system, "Segoe UI", Roboto, "Geeza Pro", "Noto Sans Arabic", sans-serif;
  --font-display: "thmanyah sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 20px;

  color-scheme: light;
}

/* Dark mode is the default for every visitor; the header button switches to light mode
   (html[data-theme="light"], remembered in the browser).
   Dark mode keeps to the pan-Arab colours: near-black page, white text, true green and red.
   (Lightened brand green turns teal, so the text green is shifted slightly towards yellow.) */
:root:not([data-theme="light"]) {
  --bg: #0f0f0e;
  --surface: #181816;
  --ink: #f1ede5;
  --text: #a9a498;
  --muted: #8c877c;
  --line: #2c2b28;
  --green-ink: #5cb85c;
  --red-ink: #ef4444;
  --accent-green: #2e7d32;
  --accent-red: #c62828;
  --cta-bg: #c9a14a;          /* gold; dark text, because white on gold is too faint */
  --cta-hover: #d8b463;
  --cta-text: #1c1b17;
  --acronym: #c9a14a;         /* gold, same as the buttons in dark mode */
  --hero-bg:
    radial-gradient(90% 80% at 12% 0%, rgb(20 90 45 / 30%), transparent 60%),
    linear-gradient(165deg, #05301a 0%, #021a0d 100%);
  --heading: #f1ede5;
  --fullname: #f1ede5;
  --leaf-opacity: 0.45;
  --shadow: none;
  color-scheme: dark;
}

/* ---- Language switching ----------------------------------------------------- */

html[data-lang="en"] .t:not(:lang(en)),
html[data-lang="ar"] .t:not(:lang(ar)),
html[data-lang="ar"] .echo {
  display: none !important;
}

/* ---- Base ------------------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
html[data-lang="ar"] body { font-size: 1.125rem; line-height: 1.85; }

a { color: var(--green-ink); text-underline-offset: 0.18em; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--green-ink);
  outline-offset: 2px;
}

h1, h2 {
  margin: 0;
  color: var(--heading);
  font-family: var(--font-display);
  font-weight: 700;
  text-wrap: balance;
}
html[data-lang="ar"] h1, html[data-lang="ar"] h2 { font-weight: 700; }

svg { display: block; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

/* Pan-Arab colours, as a full-width band and as small swatches. */
.band { display: flex; height: 5px; direction: ltr; }
.band span { flex: 1; }
.band span:nth-child(1), .swatches span:nth-child(1) { background: var(--brand-red); }
.band span:nth-child(2), .swatches span:nth-child(2) { background: var(--black); }
.band span:nth-child(3), .swatches span:nth-child(3) { background: var(--brand-green); }
.band span:nth-child(4), .swatches span:nth-child(4) { background: var(--white); }
.band span:nth-child(4) { box-shadow: inset 0 -1px 0 var(--line); }  /* white against the cream page */

.swatches { display: flex; gap: 6px; direction: ltr; }
.swatches span {
  width: 28px; height: 5px; border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgb(128 128 128 / 30%);
}

/* ---- Header ----------------------------------------------------------------- */

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-block: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
}
.brand-logo {
  width: 48px; height: 48px;
  padding: 3px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px var(--line), 0 2px 6px rgb(60 45 20 / 8%);
  object-fit: contain;
}
.brand-name {
  color: var(--heading);
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
}
html[data-lang="ar"] .brand-name { font-size: 1.5rem; font-weight: 700; line-height: 1.3; }

.lang-switch {
  display: inline-flex;
  padding: 4px;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.lang-switch a {
  min-width: 3rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s, color 0.15s;
}
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--cta-bg); color: var(--cta-text); }

.header-controls { display: flex; align-items: center; gap: 0.5rem; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}
.theme-toggle:hover { color: var(--ink); }
.theme-toggle svg {
  width: 20px; height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---- Hero ------------------------------------------------------------------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  gap: 2rem 3rem;
  align-items: center;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 8px);
  background: var(--hero-bg);
}
@media (min-width: 880px) {
  .hero.has-logo { grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); }
}

/* Soft leaf shadow, like sunlight through a branch onto a wall. */
.hero-shadow {
  --flip: 1;
  position: absolute;
  z-index: -1;
  top: -12%;
  inset-inline-end: -10%;
  width: min(75%, 640px);
  aspect-ratio: 1;
  background: url(leaves.svg) no-repeat center / contain;
  filter: blur(5px);
  opacity: var(--leaf-opacity);
  transform-origin: 100% 0;
  animation: sway 10s ease-in-out infinite alternate;
  pointer-events: none;
}
html[dir="rtl"] .hero-shadow { --flip: -1; }
@keyframes sway {
  from { transform: scaleX(var(--flip)) rotate(0deg); }
  to   { transform: scaleX(var(--flip)) rotate(2.5deg); }
}
@media (max-width: 640px) {
  .hero-shadow { width: 95%; top: -18%; inset-inline-end: -30%; }
}

.hero-greeting {
  margin: 0;
  color: var(--green-ink);
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 700;
  line-height: 1.5;
  text-align: left;
}

.hero h1 {
  max-width: 18ch;
  color: var(--ink);
  font-size: clamp(2.1rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
:root:not([data-theme="light"]) .hero h1 { color: var(--heading); }
html[data-lang="ar"] .hero h1 {
  max-width: 14ch;
  color: var(--heading);
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.55;
  letter-spacing: 0;
}

/* Full name; the letters that spell ZAATER are highlighted.
   Dark mode: white with red letters. Light mode: brand green #024120 with brand red #A70202. */
.fullname {
  max-width: 34ch;
  margin: 1rem 0 0;
  color: var(--fullname);
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.4rem);
  font-weight: 500;
  line-height: 1.35;
}
.fullname b { color: var(--acronym); font-weight: 700; }
html[dir="rtl"] .fullname { margin-inline-start: auto; text-align: right; }

/* "Who are we?" inside the welcome card (English on both language versions). */
.hero-about {
  max-width: 56ch;
  margin-top: 1.75rem;
  color: var(--text);
  font-size: clamp(1rem, 1.6vw, 1.1rem);
  line-height: 1.65;
}
.hero .hero-about h2 {
  margin-bottom: 0.5rem;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
}
html[data-lang="ar"] .hero .hero-about h2 { font-weight: 700; line-height: 1.6; }
html[data-lang="ar"] .hero-about { font-size: 1.1rem; line-height: 1.95; }
.hero-about p { margin: 0 0 0.75rem; }
.hero-about p:last-child { margin-bottom: 0; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
@media (max-width: 480px) {
  .hero-actions .btn { flex: 1 1 100%; }
}

/* The logo sits directly on the cream "wall"; in dark mode it gets a cream tile. */
.hero-logo { margin: 0; }
.hero-logo img { display: block; width: 100%; height: auto; }
:root:not([data-theme="light"]) .hero-logo {
  padding: clamp(1rem, 2.5vw, 1.5rem);
  border-radius: var(--radius);
  background: #f4eee3;
}
@media (max-width: 879px) {
  .hero-logo { order: -1; width: min(210px, 58%); justify-self: center; }
}

/* ---- Buttons ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.65rem 1.4rem;
  border: 1px solid transparent;
  border-radius: 12px;
  font: inherit;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--cta-bg); color: var(--cta-text); }
.btn-primary:hover { background: var(--cta-hover); }
.btn-primary[disabled] { opacity: 0.65; cursor: progress; }
.btn-soon:active { transform: none; }
.btn-soon {
  margin-top: 1.25rem;
  border: 1px dashed var(--line);
  background: var(--bg);
  color: var(--muted);
  cursor: default;
}

/* ---- About (English on both language versions) ---------------------------- */

.about {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  font-size: 1.0625rem;
  line-height: 1.65;
}
html[data-lang="ar"] .about { font-size: 1.1rem; line-height: 1.95; }
html[data-lang="ar"] .about .about-row h2 { font-weight: 700; line-height: 1.5; }
.about-row {
  display: grid;
  gap: 0.75rem 3rem;
  padding-block: clamp(1.75rem, 4vw, 2.75rem);
  border-top: 1px solid var(--line);
}
.about-row:last-child { border-bottom: 1px solid var(--line); }
@media (min-width: 780px) {
  .about-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
}
.about .about-row h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  line-height: 1.2;
}
.about-text { max-width: 62ch; }
.about-text p { margin: 0 0 1rem; }
.about-text p:last-child { margin-bottom: 0; }
/* "Zaater in numbers" (hidden until numbers.csv says show,yes) */
[hidden] { display: none !important; }
.numbers-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1rem;
  max-width: 30rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.numbers-list li {
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.numbers-value {
  display: block;
  color: var(--acronym);
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  font-weight: 700;
  line-height: 1;
}
.numbers-label {
  display: block;
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
html[data-lang="ar"] .numbers-label { font-size: 0.95rem; letter-spacing: 0; }
.about-text .closing {
  color: var(--green-ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
}
.about + .cards { margin-top: clamp(2.5rem, 6vw, 4rem); }

/* ---- Cards ------------------------------------------------------------------ */

.cards {
  display: grid;
  gap: 1.25rem;
  margin-top: 1.25rem;
}
@media (min-width: 780px) {
  .cards { grid-template-columns: 1.3fr 1fr; }
}

.card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: var(--accent);
}
.card-newsletter { --accent: var(--accent-green); --accent-ink: var(--green-ink); }
.card-donate { --accent: var(--accent-red); --accent-ink: var(--red-ink); }

.card-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.9rem;
}
.card-head h2 { font-size: 1.6rem; line-height: 1.25; }
html[data-lang="ar"] .card-head h2 { line-height: 1.6; }
.card-head .echo {
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
}
.card-head .echo { margin-inline-start: auto; }
.card > p { margin: 0; }

.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--accent-ink) 12%, transparent);
  color: var(--accent-ink);
}
.card-icon svg, .social-link svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.social-link svg .fill { fill: currentColor; stroke: none; }

/* ---- Signup form ------------------------------------------------------------ */

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.4rem;
}
.signup input[type="email"] {
  flex: 1 1 15rem;
  min-width: 0;
  min-height: 3rem;
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
html[dir="rtl"] .signup input[type="email"] { text-align: right; }
.signup input[type="email"]::placeholder { color: var(--muted); opacity: 0.8; }
.signup input[type="email"]:focus-visible { outline-offset: 0; border-color: var(--green-ink); }
.signup .btn { flex: 0 0 auto; }
@media (max-width: 480px) {
  .signup .btn { flex: 1 1 100%; }
}

.form-status {
  flex-basis: 100%;
  min-height: 1.6em;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 500;
}
.form-status[data-state="ok"] { color: var(--green-ink); }
.form-status[data-state="error"] { color: var(--red-ink); }
.form-status[data-state="pending"] { color: var(--muted); }

.card > .fineprint {
  margin: 0.25rem 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}
html[data-lang="ar"] .card > .fineprint { font-size: 0.9rem; line-height: 1.8; }
.fineprint a { color: inherit; }

/* ---- Social links (inside "How to join?") ---------------------------------- */

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.55rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s, transform 0.15s;
}
.social-link:hover { background: var(--cta-hover); transform: translateY(-1px); }

/* ---- Footer ----------------------------------------------------------------- */

.site-footer .swatches { margin-bottom: 0.5rem; }
.site-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: clamp(3rem, 8vw, 5rem);
  padding-block: 1.75rem 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer p { margin: 0; }
.site-footer .dev-note { margin-top: 0.5rem; font-size: 0.85rem; }
.site-footer a { color: inherit; }

/* ---- Motion ----------------------------------------------------------------- */

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