/* Public website for ataavolunteers.ae: plain CSS, no scripts. The logo's deep green on
   warm paper, large type, and photo frames with leaf-shaped corners. */

/* ------------------------------------------------------------------ font */
/* IBM Plex Sans Arabic (SIL Open Font License, see fonts/OFL.txt), served from the site itself. */
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/plex-arabic-arabic-400.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/plex-arabic-arabic-600.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/plex-arabic-arabic-700.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url(/fonts/plex-arabic-latin-400.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url(/fonts/plex-arabic-latin-600.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: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-display: swap;
  font-weight: 700;
  src: url(/fonts/plex-arabic-latin-700.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;
}

/* ------------------------------------------------------------------ colours */
/* Light only. The logo's deep green (#2d481f) on warm paper, with one small warm accent. */
:root {
  --green-950: #132110;
  --green-900: #1c2f14;
  --green-800: #2d481f; /* the logo */
  --green-700: #3d5f2b;
  --green-600: #4d7637;
  --green-500: #608d49;
  --green-300: #a8c592;
  --green-200: #cddfbf;
  --green-100: #e7eddc;
  --lime: #c3e3a2; /* highlights on dark green */
  --sun: #ecb857; /* the one warm accent, in small touches only */
  --bg: #f7f4ec; /* warm paper */
  --bg-2: #ecefe1; /* sage band */
  --surface: #fffdf8;
  --fg: #18220f;
  --muted: #586450;
  --line: #dcd8c9;
  --primary: var(--green-800);
  --primary-hover: var(--green-900);
  --primary-fg: #ffffff;
  --shadow: 0 1px 2px rgb(24 34 15 / 0.06), 0 14px 36px rgb(45 72 31 / 0.1);
  --r: 20px; /* cards and photos */
  --r-leaf: 72px; /* the big corner of a leaf-shaped frame (larger on wider screens) */
  --ic-accent: #e2a63d; /* the gold part of our two-colour icons */
  --gutter: 16px; /* the page's side margin */
  /* The header: a row with the logo, and on small screens a second row with the section links. */
  --header-row: 64px;
  --header-nav: 46px;
  --header-h: calc(var(--header-row) + var(--header-nav) + 1px);
  color-scheme: light;
}

@media (min-width: 640px) {
  :root {
    --r-leaf: 96px;
    --gutter: 24px;
  }
}

/* From this width the section links fit beside the logo, in one row. */
@media (min-width: 1180px) {
  :root {
    --header-row: 72px;
    --header-nav: 0px;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Section titles don't hide under the sticky header when jumped to. */
  scroll-padding-top: 64px;
}

@media (min-width: 1180px) {
  html {
    scroll-padding-top: 88px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  min-height: calc(100vh / var(--zoom));
  background: var(--bg);
  color: var(--fg);
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.8;
  overflow-x: hidden;
}

::selection {
  background: var(--green-200);
  color: var(--green-950);
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--primary);
}

a:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--green-500);
  outline-offset: 3px;
  border-radius: 8px;
}

.on-dark a:focus-visible,
.site-footer a:focus-visible {
  outline-color: #ffffff;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
}

/* The gold part of our own two-colour icons. */
.ic-a {
  fill: var(--ic-accent);
}

.ic-a-line {
  stroke: var(--ic-accent);
}

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

/* Big screens (a 1440p monitor, or 4K with Windows scaling): first a wider page,
   then the whole site scaled up in steps, so it fills about the same share of the
   screen as on a 1920 px desktop instead of leaving wide empty sides.
   Zoom also enlarges "100vh", so full-height boxes divide by --zoom. */
html {
  --zoom: 1;
  zoom: var(--zoom);
}

@media (min-width: 1440px) {
  .wrap {
    max-width: 1200px;
  }
}

@media (min-width: 2240px) {
  html {
    --zoom: 1.2;
  }
}

@media (min-width: 2560px) {
  html {
    --zoom: 1.35;
  }
}

@media (min-width: 3000px) {
  html {
    --zoom: 1.6;
  }
}

@media (min-width: 3400px) {
  html {
    --zoom: 1.8;
  }
}

@media (min-width: 3840px) {
  html {
    --zoom: 2;
  }
}

.skip {
  position: absolute;
  inset-inline-start: 16px;
  top: -100px;
  z-index: 20;
  padding: 8px 16px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--primary-fg);
  font-weight: 600;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 10px 26px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.btn .icon {
  width: 1.1em;
  height: 1.1em;
  transition: transform 0.2s;
}

.btn:hover .icon {
  transform: translateY(3px);
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.btn-secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--fg);
}

.btn-secondary:hover {
  border-color: var(--primary);
}

/* On the dark green parts of the page the buttons turn light. */
.on-dark .btn-primary {
  background: var(--bg);
  color: var(--green-900);
}

.on-dark .btn-primary:hover {
  background: #ffffff;
}

.on-dark .btn-secondary {
  border-color: rgb(255 255 255 / 0.4);
  background: transparent;
  color: #ffffff;
}

.on-dark .btn-secondary:hover {
  border-color: #ffffff;
  background: rgb(255 255 255 / 0.08);
}

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgb(247 244 236 / 0.9);
  color: var(--fg);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  backdrop-filter: saturate(1.4) blur(12px);
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: var(--header-row);
  flex: 0 1 auto;
  color: inherit;
  text-decoration: none;
}

/* The logo is dark green on white, so it sits on a white tile. */
.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgb(24 34 15 / 0.1);
}

.brand-mark img {
  width: auto;
  height: 36px;
}

.brand-name {
  font-weight: 700;
  font-size: 1.05rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: auto;
  flex: none;
}

.lang {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 16px;
  border: 1.5px solid rgb(120 130 110 / 0.45);
  border: 1.5px solid color-mix(in srgb, currentColor 30%, transparent);
  border-radius: 999px;
  color: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  transition: border-color 0.2s;
}

.lang:hover {
  border-color: currentColor;
}

/* The section links. On phones and tablets they are a second row that scrolls sideways,
   and it stays at the top of the screen while the logo row scrolls away. */
.sections {
  order: 3;
  display: flex;
  align-items: center;
  gap: 2px;
  flex: none;
  width: calc(100% + 2 * var(--gutter));
  height: var(--header-nav);
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: calc(var(--gutter) - 10px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 18px, #000 calc(100% - 18px), transparent);
}

.sections::-webkit-scrollbar {
  display: none;
}

.sections a {
  flex: none;
  padding: 5px 10px;
  border-radius: 999px;
  color: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  white-space: nowrap;
  text-decoration: none;
  opacity: 0.84;
  transition: opacity 0.2s, background-color 0.2s;
}

.sections a:hover {
  background: rgb(120 130 110 / 0.16);
  background: color-mix(in srgb, currentColor 10%, transparent);
  opacity: 1;
}

@media (max-width: 1179.98px) {
  .site-header-over {
    top: calc(-1 * var(--header-row));
  }

  /* On the home page the large logo is right underneath, so the header shows the
     team's name only. */
  .site-header-over .brand-mark {
    display: none;
  }
}

@media (min-width: 1180px) {
  .header-row {
    flex-wrap: nowrap;
  }

  .sections {
    order: 0;
    width: auto;
    height: auto;
    margin-inline: auto 0;
    padding-inline: 0;
    overflow: visible;
    -webkit-mask-image: none;
    mask-image: none;
  }

  .sections a {
    padding: 8px 12px;
    font-size: 0.95rem;
  }

  .sections + .header-actions {
    margin-inline-start: 8px;
  }
}

/* On the home page the header starts clear, with white text over the dark green top of
   the page, and turns into the paper-coloured bar as the page scrolls. No script: the
   change is tied to the scroll position. Browsers that can't do that show the bar from
   the start. */
@supports (animation-timeline: scroll()) {
  .site-header-over {
    animation: header-solid linear both;
    animation-timeline: scroll(root);
    animation-range: 40px 130px;
  }

  .site-header-over ~ main .hero {
    margin-top: calc(-1 * var(--header-h));
    padding-top: calc(var(--header-h) + var(--hero-pad));
  }

  /* On wide screens the header stays on screen, so its small logo comes in as the large
     one scrolls away, and the team's name moves over to make room for it. */
  @media (min-width: 1180px) {
    .site-header-over .brand-mark {
      animation: mark-in linear both;
      animation-timeline: scroll(root);
      animation-range: 230px 400px;
    }

    .site-header-over .brand-name {
      animation: name-in linear both;
      animation-timeline: scroll(root);
      animation-range: 230px 400px;
    }
  }
}

/* Which way the name moves: to the right in Arabic, to the left in English. */
:root {
  --toward-start: -1;
}

:root[dir='rtl'] {
  --toward-start: 1;
}

@keyframes mark-in {
  from {
    opacity: 0;
    scale: 0.6;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes name-in {
  from {
    translate: calc(var(--toward-start) * 54px) 0;
  }

  to {
    translate: 0 0;
  }
}

@keyframes header-solid {
  from {
    border-bottom-color: transparent;
    background-color: rgb(247 244 236 / 0);
    color: #ffffff;
    -webkit-backdrop-filter: saturate(1) blur(0px);
    backdrop-filter: saturate(1) blur(0px);
  }

  to {
    border-bottom-color: var(--line);
    background-color: rgb(247 244 236 / 0.9);
    color: var(--fg);
    -webkit-backdrop-filter: saturate(1.4) blur(12px);
    backdrop-filter: saturate(1.4) blur(12px);
  }
}

/* ------------------------------------------------------------------ photos */
/* Every photo sits in a "shot" frame, which sets its shape; the photo fills the frame.
   Two opposite corners of the bigger frames are rounded much more than the others,
   like the two leaves on the logo. */
.shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--r);
  background: var(--green-100);
}

.shot > img,
.ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.shot > img {
  object-fit: cover;
}

/* Which part of a photo to keep when its frame crops it. */
.shot > img.at-top {
  object-position: 50% 18%;
}

.shot > img.at-low {
  object-position: 50% 80%;
}

.shot > img.at-left-top {
  object-position: 20% 20%;
}

.shot > img.at-right-top {
  object-position: 75% 30%;
}

/* Until a real photo is added, the frame shows a small drawing of the coast and says
   which photo goes there. */
.ph {
  --ph-sky-1: #dfe9d2;
  --ph-sky-2: #f4efdf;
  --ph-sun: #f0c56a;
  --ph-far: #bcd0a8;
  --ph-near: #93b27c;
  --ph-wave: #e6eedb;
  display: grid;
  place-items: center;
  padding: 14px;
  background: linear-gradient(180deg, var(--ph-sky-1), var(--ph-sky-2));
}

.on-dark .ph {
  --ph-sky-1: #3a5a2c;
  --ph-sky-2: #2c4520;
  --ph-sun: #ecb857;
  --ph-far: #24391a;
  --ph-near: #1a2c12;
  --ph-wave: rgb(255 255 255 / 0.2);
}

.ph-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ph-sun {
  fill: var(--ph-sun);
}

.ph-far {
  fill: var(--ph-far);
}

.ph-near {
  fill: var(--ph-near);
}

.ph-wave {
  fill: none;
  stroke: var(--ph-wave);
  stroke-width: 4;
  stroke-linecap: round;
}

.ph-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
  padding: 7px 14px;
  border-radius: 14px;
  background: rgb(255 253 248 / 0.92);
  box-shadow: 0 6px 18px rgb(19 33 16 / 0.18);
  color: var(--green-900);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.ph-label b {
  font-size: 0.92rem;
}

/* ------------------------------------------------------------------ hero */
.hero {
  --hero-pad: 28px;
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding-top: var(--hero-pad);
  background:
    radial-gradient(64% 44% at 50% 20%, rgb(96 141 73 / 0.6), transparent 72%),
    radial-gradient(60% 70% at 100% 100%, rgb(19 33 16 / 0.85), transparent 70%),
    linear-gradient(160deg, var(--green-800) 0%, var(--green-900) 62%, var(--green-950) 100%);
  color: #ffffff;
}

/* Phones and tablets: the logo, then the words, then the photos, all centred. */
.hero-grid {
  display: grid;
  justify-items: center;
  text-align: center;
}

/* The logo, large, on a white leaf: the first thing on the page. (The logo is dark green
   on white, so it needs the white behind it.) */
.hero-logo {
  --logo-h: clamp(190px, calc(30vh / var(--zoom)), 236px);
  position: relative;
  z-index: 1;
  display: flex;
  padding: 26px 40px;
  border-radius: 26px;
  border-start-start-radius: 88px;
  border-end-end-radius: 88px;
  background: #ffffff;
  box-shadow:
    0 0 0 8px rgb(255 255 255 / 0.08),
    0 26px 64px rgb(0 0 0 / 0.36);
}

.hero-logo img {
  width: auto;
  height: var(--logo-h);
}

.hero-text {
  margin-top: 32px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  padding: 5px 16px;
  padding-inline-start: 12px;
  border: 1px solid rgb(255 255 255 / 0.22);
  border-radius: 999px;
  color: var(--green-200);
  font-weight: 600;
  font-size: 0.9rem;
}

.eyebrow .icon {
  width: 1.35em;
  height: 1em;
  color: var(--sun);
}

.hero h1 {
  font-size: clamp(2.6rem, 10.5vw, 4.75rem);
  line-height: 1.25;
}

.hero h1:lang(en) {
  font-size: clamp(2.2rem, 8.4vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
}

.h1-line {
  display: block;
}

.hl {
  color: var(--lime);
}

.lead {
  max-width: 34em;
  margin-top: 20px;
  margin-inline: auto;
  color: rgb(255 255 255 / 0.84);
  font-size: clamp(1.08rem, 1.5vw, 1.2rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

/* Three photos: a big one, and two smaller ones stacked beside it and set a little lower. */
.hero-shots {
  position: relative;
  display: grid;
  grid-template-columns: 0.7fr 1fr;
  gap: 14px;
  align-items: start;
  width: 100%;
  max-width: 540px;
  margin-top: 48px;
}

/* A large soft leaf behind the photos. */
.hero-shots::before {
  content: '';
  position: absolute;
  inset: -9% -12% -4%;
  z-index: -1;
  border-radius: 52% 10% 52% 10%;
  background: rgb(255 255 255 / 0.05);
}

.shot-a {
  grid-column: 2;
  grid-row: 1 / span 2;
  aspect-ratio: 4 / 5;
  border-start-end-radius: var(--r-leaf);
  border-end-start-radius: var(--r-leaf);
  box-shadow: 0 24px 60px rgb(0 0 0 / 0.28);
}

.shot-b {
  grid-column: 1;
  grid-row: 1;
  aspect-ratio: 1;
  margin-top: 22%;
  border-start-start-radius: 64px;
  border-end-end-radius: 64px;
}

.shot-c {
  grid-column: 1;
  grid-row: 2;
  aspect-ratio: 4 / 3;
}

/* The towns we serve, north to south, along the bottom of the hero. */
.towns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 0;
  margin-top: 44px;
  margin-bottom: 0;
  padding-block: 18px;
  border-top: 1px solid rgb(255 255 255 / 0.14);
  color: var(--green-200);
  font-size: 0.92rem;
  list-style: none;
}

.towns li {
  display: flex;
  align-items: center;
}

.towns li:not(:last-child)::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-inline: 12px;
  border-radius: 50%;
  background: var(--sun);
}

@media (min-width: 640px) {
  .hero-logo {
    --logo-h: clamp(220px, calc(32vh / var(--zoom)), 280px);
    padding: 32px 50px;
    border-start-start-radius: 104px;
    border-end-end-radius: 104px;
  }
}

/* Wider screens: the logo stands in the middle with the photos on both sides of it, and
   the words sit underneath. "--stage" is the height of that row: it follows the height of
   the window, so the headline is still on the first screen of a small laptop. */
@media (min-width: 900px) {
  .hero {
    --hero-pad: 28px;
  }

  .hero-grid {
    --stage: clamp(290px, calc(42vh / var(--zoom)), 400px);
    grid-template-columns:
      minmax(0, calc(var(--stage) * 0.74))
      auto
      minmax(0, calc(var(--stage) * 0.74));
    grid-template-areas:
      'b logo a'
      'c logo a'
      'text text text';
    justify-content: center;
    column-gap: clamp(18px, 2.6vw, 34px);
    row-gap: 14px;
  }

  .hero-logo {
    --logo-h: calc(var(--stage) * 0.8);
    grid-area: logo;
    align-self: center;
    padding: calc(var(--stage) * 0.1) calc(var(--stage) * 0.15);
    border-start-start-radius: calc(var(--stage) * 0.3);
    border-end-end-radius: calc(var(--stage) * 0.3);
    box-shadow:
      0 0 0 10px rgb(255 255 255 / 0.08),
      0 32px 80px rgb(0 0 0 / 0.4);
  }

  .hero-text {
    grid-area: text;
    margin-top: 26px;
  }

  .eyebrow {
    margin-bottom: 12px;
  }

  .lead {
    max-width: 40em;
    margin-top: 14px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  /* The three photos take their own places in the row beside the logo. */
  .hero-shots {
    display: contents;
  }

  .hero-shots::before {
    content: none;
  }

  .shot-a {
    grid-area: a;
    align-self: center;
    width: 100%;
  }

  .shot-b {
    grid-area: b;
    align-self: end;
    justify-self: end;
    width: 60%;
    margin-top: 0;
  }

  .shot-c {
    grid-area: c;
    align-self: start;
    justify-self: end;
    width: 94%;
  }

  .hero h1 {
    font-size: clamp(3rem, 5.9vw, 4.75rem);
  }

  .hero h1:lang(en) {
    font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  }

  /* The Arabic headline is short enough for one line here. */
  .hero h1:lang(ar) .h1-line {
    display: inline;
  }

  .towns {
    margin-top: 44px;
    padding-block: 20px;
    font-size: 0.98rem;
  }

  .towns li:not(:last-child)::after {
    margin-inline: 18px;
  }
}

/* ------------------------------------------------------------------ sections */
.section {
  padding-block: clamp(64px, 9vw, 112px);
}

.band-sage {
  background: var(--bg-2);
}

.band-dark {
  background: var(--green-900);
  color: #ffffff;
}

.section h2 {
  font-size: clamp(1.9rem, 4.6vw, 3rem);
  line-height: 1.25;
}

.section h2:lang(en) {
  letter-spacing: -0.015em;
}

/* Two small leaves above each section title, like the ones on the logo. */
.h2-mark {
  display: block;
  width: 36px;
  height: 27px;
  margin-bottom: 12px;
  color: var(--green-500);
}

.on-dark .h2-mark {
  color: var(--lime);
}

.intro {
  margin-top: 14px;
  max-width: 40em;
  color: var(--muted);
  font-size: 1.1rem;
}

.on-dark .intro {
  color: var(--green-200);
}

/* ------------------------------------------------------------------ about */
.about {
  display: grid;
  gap: 40px;
  align-items: center;
}

.statement {
  margin-top: 22px;
  color: var(--green-800);
  font-weight: 600;
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  line-height: 1.55;
  text-wrap: balance;
}

.about-body {
  margin-top: 16px;
  max-width: 34em;
  color: var(--muted);
  font-size: 1.08rem;
}

.shot-about {
  aspect-ratio: 4 / 3;
  border-start-start-radius: var(--r-leaf);
  border-end-end-radius: var(--r-leaf);
  box-shadow: 14px 14px 0 var(--green-100);
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 72px;
  }
}

/* Vision and mission: two panels, one dark and one light. Their outer corners are the
   rounded ones, so side by side the pair makes one leaf. */
.pillars {
  display: grid;
  gap: 20px;
  margin-top: clamp(48px, 7vw, 80px);
}

/* The padding is larger on the side of the big round corner, so nothing sits in the curve. */
.pillar {
  padding: clamp(28px, 4vw, 40px);
  border-radius: 28px;
}

.pillar-vision {
  padding-block-start: clamp(38px, 5vw, 44px);
  border-start-start-radius: var(--r-leaf);
  background: linear-gradient(150deg, var(--green-700), var(--green-900));
  color: #ffffff;
  --ic-accent: var(--sun);
}

.pillar-mission {
  padding-block-end: clamp(38px, 5vw, 44px);
  border-end-end-radius: var(--r-leaf);
  background: var(--green-100);
  color: var(--green-900);
}

.pillar h3 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-size: 1.25rem;
}

.pillar-icon {
  display: flex;
  flex: none;
}

.pillar-icon .icon {
  width: 44px;
  height: 44px;
}

.pillar p {
  font-size: clamp(1.1rem, 1.8vw, 1.3rem);
  line-height: 1.75;
}

@media (min-width: 800px) {
  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ------------------------------------------------------------------ goals */
.goals {
  display: grid;
  gap: 36px 32px;
  margin: 44px 0 0;
  padding: 0;
  list-style: none;
}

.goal {
  padding-top: 22px;
  border-top: 2px solid var(--green-800);
}

/* Large numerals drawn as an outline. */
.goal-num {
  display: block;
  margin-bottom: 14px;
  color: var(--green-600);
  font-weight: 700;
  font-size: 3.5rem;
  line-height: 1;
}

@supports (-webkit-text-stroke: 1px black) {
  .goal-num {
    color: transparent;
    -webkit-text-stroke: 1.5px var(--green-600);
  }
}

@media (min-width: 700px) {
  .goals {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .goals {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ------------------------------------------------------------------ what we do */
.work {
  display: grid;
  gap: 32px;
  margin-top: 40px;
}

.shot-work {
  aspect-ratio: 4 / 3;
  border-start-end-radius: var(--r-leaf);
  border-end-start-radius: var(--r-leaf);
}

.offers {
  display: grid;
  align-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.offer {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: start;
  padding-block: 26px;
  border-top: 1px solid var(--line);
}

.offer:last-child {
  border-bottom: 1px solid var(--line);
}

.offer-icon {
  display: flex;
  margin-top: 2px;
  color: var(--green-800);
}

.offer-icon .icon {
  width: 50px;
  height: 50px;
}

.offer h3 {
  font-size: 1.3rem;
}

.offer p {
  margin-top: 4px;
  color: var(--muted);
}

@media (min-width: 900px) {
  .work {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 64px;
  }

  /* Beside the list, the photo is as tall as the list. */
  .shot-work {
    aspect-ratio: auto;
    min-height: 440px;
  }
}

/* ------------------------------------------------------------------ gallery */
/* Phones: a row of photos to swipe through. Wider screens: a mosaic. */
.gallery {
  display: flex;
  gap: 12px;
  margin-top: 36px;
  margin-inline: calc(-1 * var(--gutter));
  padding-inline: var(--gutter);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}

.gallery::-webkit-scrollbar {
  display: none;
}

.gallery .shot {
  flex: 0 0 76%;
  aspect-ratio: 4 / 5;
  scroll-snap-align: start;
}

.gallery .shot > img {
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery .shot:hover > img {
  transform: scale(1.05);
}

@media (min-width: 760px) {
  .gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: clamp(170px, 19vw, 250px);
    gap: 14px;
    margin-inline: 0;
    padding-inline: 0;
    overflow: visible;
  }

  .gallery .shot {
    aspect-ratio: auto;
  }

  .g-big {
    grid-column: span 2;
    grid-row: span 2;
    border-start-start-radius: var(--r-leaf);
  }

  .g-tall {
    grid-row: span 2;
  }

  .g-wide {
    grid-column: span 2;
  }

  .g-last {
    border-end-end-radius: var(--r-leaf);
  }
}

/* ------------------------------------------------------------------ where we work */
/* Phones: the title, the towns, then the map. Tablets: the title and towns beside the
   map. Wide screens: the title, the towns and the map side by side. */
.area {
  display: grid;
  gap: 28px 40px;
  align-items: center;
}

/* The towns from north to south, as stops on a line. */
.route {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 900px) {
  .area {
    grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
    grid-template-areas:
      'text map'
      'route map';
    column-gap: 64px;
  }

  .area-text {
    grid-area: text;
    align-self: end;
  }

  .route {
    grid-area: route;
    align-self: start;
  }

  .area-map {
    grid-area: map;
  }
}

@media (min-width: 1180px) {
  .area {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 440px);
    grid-template-areas: 'text route map';
    column-gap: 72px;
  }

  .area-text,
  .route {
    align-self: center;
  }
}

.route li {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding-inline-start: 40px;
  font-weight: 600;
  font-size: 1.2rem;
}

.route li::before {
  content: '';
  position: absolute;
  inset-block: 0;
  inset-inline-start: 8px;
  width: 2px;
  background: var(--green-200);
}

.route li:first-child::before {
  inset-block-start: 50%;
}

.route li:last-child::before {
  inset-block-end: 50%;
}

.route li::after {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: 2px;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border-radius: 50%;
  background: var(--green-800);
  box-shadow: 0 0 0 4px var(--bg);
  transition: transform 0.2s, background-color 0.2s;
}

.route li:hover::after {
  background: var(--green-500);
  transform: scale(1.3);
}

@media (min-width: 1180px) {
  .route li {
    min-height: 60px;
    font-size: 1.3rem;
  }
}

.area-map {
  width: 100%;
  max-width: 460px;
  margin: 0;
  justify-self: center;
}

/* The East Coast map: the team's base map recoloured in the site's greens, with the
   stretch of coast we cover and the towns we serve drawn on top. */
.map {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--r-leaf) 28px 28px;
  background: #c9e1e6;
  box-shadow: var(--shadow);
}

/* The base map was made with Mapbox, which asks for this credit next to the map. */
.map-credit {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.map-credit a {
  color: inherit;
}

/* The sea's name: large and light, close to the water's own colour. */
.map-sea-label {
  fill: #8bb6c0;
  font-size: 46px;
  font-weight: 400;
}

/* In English, spaced capitals like a classic map. */
.map-sea-label:lang(en) {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.32em;
  text-transform: uppercase;
}

.map-dot {
  fill: var(--green-800);
  stroke: #ffffff;
  stroke-width: 4;
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 0.2s, fill 0.2s;
}

.map-pulse {
  fill: none;
  stroke: var(--green-700);
  stroke-width: 3.5;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
}

.map-label {
  fill: var(--fg);
  font-size: 34px;
  font-weight: 700;
  paint-order: stroke;
  stroke: #ffffff;
  stroke-width: 8px;
  stroke-linejoin: round;
}

.map-north circle {
  fill: #ffffff;
  stroke: var(--line);
  stroke-width: 2;
}

.map-north path {
  fill: var(--green-800);
}

.map-north text {
  fill: var(--green-800);
  font-size: 20px;
  font-weight: 700;
}

.map-scale text {
  fill: #3f6a74;
  font-size: 22px;
  font-weight: 700;
}

.map-scale path {
  fill: none;
  stroke: #3f6a74;
  stroke-width: 3;
}

/* Pointing at a town in the list lights up its dot on the map. The two Dibbas share
   one dot; Qidfa has none. */
.area:has(.route li:nth-child(1):hover) .map-city:nth-of-type(1) .map-dot,
.area:has(.route li:nth-child(2):hover) .map-city:nth-of-type(1) .map-dot,
.area:has(.route li:nth-child(3):hover) .map-city:nth-of-type(2) .map-dot,
.area:has(.route li:nth-child(5):hover) .map-city:nth-of-type(3) .map-dot,
.area:has(.route li:nth-child(6):hover) .map-city:nth-of-type(4) .map-dot,
.area:has(.route li:nth-child(7):hover) .map-city:nth-of-type(5) .map-dot {
  fill: var(--sun);
  transform: scale(1.7);
}

/* ------------------------------------------------------------------ partners */
/* The logos of organisations we've worked with, in their own colours, on a white panel.
   Each logo's width and height in the page give it about the same area, so wide and
   square logos look equally heavy. */
.partners-panel {
  margin-top: 36px;
  padding: clamp(40px, 5vw, 52px) clamp(24px, 4vw, 48px);
  border-radius: 32px;
  border-start-end-radius: var(--r-leaf);
  border-end-start-radius: var(--r-leaf);
  background: #ffffff;
  box-shadow: var(--shadow);
}

.partners {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 26px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner img {
  display: block;
  max-width: 100%;
  height: auto;
}

@media (min-width: 800px) {
  .partners {
    gap: 32px 52px;
  }

  .partner img {
    zoom: 1.2;
  }
}

/* Under the logos: they belong to their owners, and showing them isn't an endorsement. */
.partners-note {
  margin: 24px auto 0;
  color: var(--muted);
  font-size: 0.58rem;
  line-height: 1.5;
  text-align: center;
}

/* ------------------------------------------------------------------ contact */
.contact {
  background:
    radial-gradient(60% 80% at 100% 0%, rgb(96 141 73 / 0.35), transparent 70%),
    linear-gradient(180deg, var(--green-800), var(--green-900));
  color: #ffffff;
}

.contact-grid {
  display: grid;
  gap: 36px;
  align-items: center;
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Cards in the same row are the same height. */
.contact-list > li {
  display: flex;
}

.contact-link {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 14px;
  min-width: 0;
  min-height: 78px;
  padding: 14px 18px;
  border: 1px solid rgb(255 255 255 / 0.16);
  border-radius: 20px;
  background: rgb(255 255 255 / 0.06);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.contact-link:hover {
  border-color: rgb(255 255 255 / 0.45);
  background: rgb(255 255 255 / 0.12);
}

/* Each contact shows its real logo, in its app-icon colours. */
.contact-logo {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 12px;
  color: #ffffff;
}

.contact-logo .icon {
  width: 24px;
  height: 24px;
}

.contact-logo-mail {
  background: #ffffff;
  color: var(--green-800);
}

.contact-logo-whatsapp {
  background: #25d366;
}

.contact-logo-instagram {
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.contact-logo-tiktok {
  background: #000000;
  box-shadow: 0 0 0 1px rgb(255 255 255 / 0.22);
}

/* The name, with the address or number under it (always left-to-right). */
.contact-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  line-height: 1.45;
}

.contact-value {
  color: var(--green-200);
  font-weight: 400;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

/* A small arrow at the end of each card. */
.contact-go {
  width: 18px;
  height: 18px;
  margin-inline-start: auto;
  opacity: 0.55;
  transition: opacity 0.2s, translate 0.2s;
}

[dir='rtl'] .contact-go {
  transform: scaleX(-1);
}

.contact-link:hover .contact-go {
  opacity: 1;
  translate: 2px -2px;
}

[dir='rtl'] .contact-link:hover .contact-go {
  translate: -2px -2px;
}

@media (min-width: 600px) {
  .contact-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .contact-grid {
    grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
    gap: 64px;
  }
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  padding-block: 26px;
  background: var(--green-950);
  color: var(--green-200);
  font-size: 0.95rem;
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}

.footer-row nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}

.footer-row a {
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
}

.footer-row a:hover {
  text-decoration: underline;
}

/* ------------------------------------------------------------------ privacy page */
.legal h1 {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
}

.legal p {
  max-width: 46em;
}

.legal-updated {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal .wrap > p:not(.legal-updated) {
  margin-top: 12px;
}

.section.legal h2 {
  margin: 36px 0 0;
  font-size: 1.3rem;
}

/* ------------------------------------------------------------------ motion */
/* Only for people who haven't asked their device for less motion. */
@media (prefers-reduced-motion: no-preference) {
  /* When the page opens the logo comes in first, then the words rise into place, then
     the photos one by one. */
  .hero-logo {
    animation: pop 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .hero-text > * {
    animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) 0.18s both;
  }

  .hero-text > :nth-child(2) {
    animation-delay: 0.26s;
  }

  .hero-text > :nth-child(3) {
    animation-delay: 0.34s;
  }

  .hero-text > :nth-child(4) {
    animation-delay: 0.42s;
  }

  .hero-shots > * {
    animation: pop 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.36s both;
  }

  .hero-shots > .shot-b {
    animation-delay: 0.48s;
  }

  .hero-shots > .shot-c {
    animation-delay: 0.6s;
  }

  /* As the page scrolls, the three photos also drift a little, each at its own speed. */
  @supports (animation-timeline: view()) {
    .hero-shots > .shot {
      animation: pop-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.36s both, drift linear both;
      animation-timeline: auto, view();
      animation-range: normal, cover 0% cover 100%;
    }

    .hero-shots > .shot-a {
      --drift: -22px;
    }

    .hero-shots > .shot-b {
      --drift: 14px;
      animation-delay: 0.48s, 0s;
    }

    .hero-shots > .shot-c {
      --drift: 26px;
      animation-delay: 0.6s, 0s;
    }
  }

  /* The towns on the map pulse gently, one after another. */
  .map-pulse {
    animation: map-pulse 2.8s ease-out infinite;
  }

  .map-city:nth-of-type(2) .map-pulse {
    animation-delay: 0.45s;
  }

  .map-city:nth-of-type(3) .map-pulse {
    animation-delay: 0.9s;
  }

  .map-city:nth-of-type(4) .map-pulse {
    animation-delay: 1.35s;
  }

  .map-city:nth-of-type(5) .map-pulse {
    animation-delay: 1.8s;
  }

  /* Further down, each title, photo and card rises into place as it scrolls into view,
     with no script. Browsers that can't tie animations to scrolling show everything
     straight away. */
  @supports (animation-timeline: view()) {
    .section h2,
    .intro,
    .statement,
    .about-body,
    .shot-about,
    .pillar,
    .goal,
    .shot-work,
    .offer,
    .gallery,
    .route li,
    .area-map,
    .partners-panel,
    .contact-list > li {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 220px;
    }

    .shot-about,
    .shot-work,
    .area-map {
      animation-name: pop;
    }
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes map-pulse {
  from {
    opacity: 0.7;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(2.8);
  }
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.9);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* The same, written so it can run together with "drift" on one photo. */
@keyframes pop-in {
  from {
    opacity: 0;
    scale: 0.9;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

@keyframes drift {
  from {
    translate: 0 calc(-1 * var(--drift));
  }

  to {
    translate: 0 var(--drift);
  }
}

/* ------------------------------------------------------------------ 404 */
.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh / var(--zoom));
  padding: 32px 16px;
  text-align: center;
}

.notfound .brand-mark {
  width: 84px;
  height: 84px;
  margin: 0 auto 22px;
  border-radius: 12px 34px;
  box-shadow: var(--shadow);
}

.notfound .brand-mark img {
  height: 66px;
}

.notfound h1 {
  font-size: clamp(1.7rem, 6vw, 2.4rem);
}

.notfound p {
  margin-top: 8px;
  color: var(--muted);
}

.notfound .hero-actions {
  justify-content: center;
}

.notfound hr {
  width: 64px;
  margin: 28px auto;
  border: 0;
  border-top: 1px solid var(--line);
}
