/* ==========================================================================
   آيا صوفيا للعقارات — Aya Sofia Real Estate
   Bilingual (AR-RTL default / EN-LTR). One stylesheet, logical properties
   throughout so direction flips without a second file.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand greens sampled from the logo */
  --green-900: #16340B;
  --green-800: #1E4410;
  --green-700: #2E6417;   /* logo dark green */
  --green-600: #3D7F1F;
  --green-500: #007A3F;   /* logo vivid green */
  --green-400: #12A05A;
  --green-300: #4FBE83;

  --ink:       #0D120B;
  --ink-2:     #131A10;
  --ink-3:     #1C2618;

  --bone:      #FBFAF6;
  --bone-2:    #F3F1E9;
  --bone-3:    #E9E6DA;
  --line:      #E2DFD3;
  --line-dark: #ffffff1f;

  --text:      #11170F;
  --muted:     #565C51;
  --muted-dk:  #A3AC9C;

  --brass:     #A8823F;

  --font-display: "Noto Kufi Arabic", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body:    "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --radius: 4px;
  --radius-lg: 10px;

  --ease: cubic-bezier(.22, .61, .36, 1);

  /* z-index scale */
  --z-nav: 30;
  --z-bar: 40;
  --z-modal: 50;
}

:lang(en) {
  --font-display: "IBM Plex Sans", "IBM Plex Sans Arabic", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bone);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.28;
  margin: 0;
  letter-spacing: -0.005em;
}
:lang(en) h1, :lang(en) h2, :lang(en) h3 { letter-spacing: -0.025em; }

p { margin: 0; }
a { color: inherit; text-decoration: none; }

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }

/* Visible focus for keyboard users everywhere */
:focus-visible {
  outline: 2px solid var(--green-400);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Layout helpers ---------- */
.wrap { width: min(var(--wrap), 100%); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.section--tight { padding-block: clamp(3.5rem, 6vw, 5.5rem); }

.section-label {
  display: flex; align-items: center; gap: .75rem;
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--green-500);
  margin-bottom: 1.25rem;
}
.section-label::before {
  content: ""; inline-size: 28px; block-size: 1px;
  background: var(--green-500); flex: none;
}
.on-dark .section-label { color: var(--green-300); }
.on-dark .section-label::before { background: var(--green-300); }

.h-display { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.22; }
.h-section { font-size: clamp(1.75rem, 3.6vw, 2.75rem); }
.lede {
  font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.85;
}
.on-dark { background: var(--ink); color: var(--bone); }
.on-dark .lede { color: var(--muted-dk); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .625rem;
  min-block-size: 52px;
  padding-inline: 1.75rem;
  font-family: var(--font-body);
  font-size: 1rem; font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .2s var(--ease), color .2s var(--ease),
              border-color .2s var(--ease);
  cursor: pointer;
  text-align: center;
}
.btn svg { inline-size: 20px; block-size: 20px; flex: none; }

.btn--primary { background: var(--green-700); color: #fff; }
.btn--primary:hover { background: var(--green-600); }

.btn--wa { background: var(--green-500); color: #fff; }
.btn--wa:hover { background: var(--green-400); }

.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { background: var(--bone-2); border-color: var(--bone-3); }

/* The hero is dark but not .on-dark (it has its own background treatment),
   so it needs the inverted ghost button too — without this the secondary
   call button renders dark-on-dark and disappears. */
.on-dark .btn--ghost,
.hero .btn--ghost { border-color: #ffffff33; color: var(--bone); background: transparent; }
.on-dark .btn--ghost:hover,
.hero .btn--ghost:hover { background: #ffffff14; border-color: #ffffff55; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: var(--z-nav);
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-block-end: 1px solid var(--line-dark);
}
.site-header__inner {
  display: flex; align-items: center; gap: 1.5rem;
  min-block-size: 74px;
}
.brand { display: flex; align-items: center; gap: .75rem; flex: none; min-block-size: 44px; }
.brand img { block-size: 34px; inline-size: auto; }
.brand__name {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.0625rem; color: #fff; line-height: 1.2;
  white-space: nowrap;
}
.brand__name small {
  display: block; font-family: var(--font-body);
  font-size: .625rem; font-weight: 400; letter-spacing: .1em;
  color: var(--green-300); text-transform: uppercase;
}

.nav { display: flex; gap: .25rem; margin-inline-start: auto; }
.nav a {
  padding: .5rem .75rem; border-radius: var(--radius);
  font-size: .9375rem; font-weight: 500; color: #D6DCD2;
  white-space: nowrap; /* Arabic items like "سير العمل" wrapped to two lines at ~1100px */
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.nav a:hover { color: #fff; background: #ffffff14; }

.header-actions { display: flex; align-items: center; gap: .625rem; flex: none; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: .375rem;
  min-block-size: 44px; padding-inline: .875rem;
  border: 1px solid #ffffff2e; border-radius: var(--radius);
  color: #D6DCD2; font-size: .875rem; font-weight: 600;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.lang-toggle:hover { background: #ffffff14; color: #fff; border-color: #ffffff55; }
.lang-toggle svg { inline-size: 16px; block-size: 16px; }

.header-cta { display: none; }
@media (min-width: 900px) { .header-cta { display: inline-flex; min-block-size: 44px; padding-inline: 1.125rem; font-size: .9375rem; } }

/* Mobile nav */
.nav-toggle { display: none; }
@media (max-width: 899px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    inline-size: 44px; block-size: 44px; margin-inline-start: auto;
    border: 1px solid #ffffff2e; border-radius: var(--radius); color: #fff;
  }
  .nav-toggle svg { inline-size: 22px; block-size: 22px; }
  .nav {
    position: fixed; inset-block-start: 74px; inset-inline: 0;
    background: var(--ink-2); border-block-end: 1px solid var(--line-dark);
    flex-direction: column; gap: 0; padding: .75rem var(--gutter) 1.25rem;
    margin-inline-start: 0;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s var(--ease), transform .22s var(--ease);
    max-block-size: calc(100dvh - 74px); overflow-y: auto;
  }
  .nav[data-open="true"] { transform: none; opacity: 1; pointer-events: auto; }
  .nav a { padding: .875rem .5rem; font-size: 1.0625rem; border-block-end: 1px solid #ffffff12; border-radius: 0; }
  .nav a:last-child { border-block-end: 0; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--bone);
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(3rem, 6vw, 5rem);
}
.hero::before {
  content: "";
  position: absolute; inset-block-start: -30%; inset-inline-end: -10%;
  inline-size: 60vw; block-size: 60vw; max-inline-size: 700px; max-block-size: 700px;
  background: radial-gradient(circle, rgba(0,122,63,.16) 0%, transparent 68%);
  pointer-events: none;
}
.hero__grid {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: center;
  position: relative;
}
@media (min-width: 940px) {
  .hero__grid { grid-template-columns: 1.1fr .9fr; }
}

.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .4375rem .875rem;
  border: 1px solid #ffffff29; border-radius: 100px;
  font-size: .8125rem; font-weight: 500; color: #CBD3C6;
  margin-bottom: 1.5rem;
}
.hero__eyebrow svg { inline-size: 15px; block-size: 15px; color: var(--green-300); flex: none; }

.hero h1 {
  font-size: clamp(2.25rem, 6vw, 4.25rem);
  line-height: 1.18;
  color: #fff;
  margin-bottom: 1.25rem;
}
.hero h1 em { font-style: normal; color: var(--green-300); }

.hero__sub {
  font-size: clamp(1.0625rem, 1.7vw, 1.25rem);
  color: #B9C2B2; line-height: 1.85; max-width: 54ch;
  margin-bottom: 2rem;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; }

.hero__media { position: relative; }
.hero__media img {
  inline-size: 100%; border-radius: var(--radius-lg);
  /* Source render is a tall portrait; capping the height keeps the hero
     from stretching to ~900px and leaving the copy stranded in dead space. */
  block-size: clamp(420px, 58vw, 620px);
  object-fit: cover; object-position: 50% 35%;
}
@media (max-width: 939px) {
  /* A landscape crop of a tall tower reads badly — 4:5 keeps the building
     and the entrance in frame on a phone. */
  .hero__media img { block-size: auto; aspect-ratio: 4 / 5; object-position: 50% 42%; }
}
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  border: 1px solid #ffffff1f; border-radius: var(--radius-lg);
  pointer-events: none;
}
/* Sits top-start: at the bottom it landed over the family in the render. */
.hero__badge {
  position: absolute; inset-block-start: 1.25rem; inset-inline-start: 1.25rem;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid #ffffff26; border-radius: var(--radius);
  padding: .75rem 1rem;
  font-size: .8125rem; font-weight: 500; color: #E4E9E0;
  display: flex; align-items: center; gap: .5rem;
}
.hero__badge .dot {
  inline-size: 8px; block-size: 8px; border-radius: 50%;
  background: var(--green-300); flex: none;
  box-shadow: 0 0 0 4px rgba(79,190,131,.2);
}

/* ---------- Facts strip ---------- */
.facts { background: var(--ink-2); border-block: 1px solid var(--line-dark); }
.facts__grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--line-dark);
}
@media (min-width: 780px) { .facts__grid { grid-template-columns: repeat(4, 1fr); } }
.fact {
  background: var(--ink-2);
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.75rem);
  text-align: center;
}
.fact__value {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.375rem, 2.6vw, 1.875rem);
  color: #fff; line-height: 1.3; margin-bottom: .25rem;
}
.fact__value span { color: var(--green-300); font-size: .7em; }
.fact__label { font-size: .8125rem; color: var(--muted-dk); line-height: 1.6; }

/* ---------- Split feature ---------- */
.split { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
@media (min-width: 940px) {
  .split { grid-template-columns: 1fr 1fr; }
  /* Copy-heavy splits (e.g. the value-prop grid) need the wider share, or
     the nested cards squeeze to ~180px and the text goes ragged. */
  .split--wide-copy { grid-template-columns: 1.25fr .75fr; }
  .split--media-start > .split__media { order: -1; }
}
.split--wide-copy .card { padding: 1.5rem 1.5rem 1.75rem; gap: .75rem; }
.split--wide-copy .card h3 { font-size: 1.125rem; }
.split__media img { inline-size: 100%; border-radius: var(--radius-lg); }
.split__media { position: relative; }

/* ---------- Unit cards ---------- */
.cards { display: grid; gap: 1.5rem; }
@media (min-width: 760px) { .cards--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 760px) { .cards--3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .cards--4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.card--link { cursor: pointer; }
.card--link:hover { border-color: var(--green-500); box-shadow: 0 8px 30px rgba(13,18,11,.07); }

.card__icon {
  inline-size: 44px; block-size: 44px; border-radius: var(--radius);
  background: var(--bone-2); color: var(--green-700);
  display: grid; place-items: center; flex: none;
}
.card__icon svg { inline-size: 22px; block-size: 22px; }
.card h3 { font-size: 1.25rem; }
.card p { color: var(--muted); font-size: .9375rem; line-height: 1.8; }

.card__specs { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.card__specs li {
  display: flex; align-items: flex-start; gap: .625rem;
  font-size: .9375rem; color: var(--muted); line-height: 1.7;
}
.card__specs svg { inline-size: 18px; block-size: 18px; color: var(--green-500); flex: none; margin-block-start: .3rem; }

.on-dark .card { background: var(--ink-3); border-color: var(--line-dark); }
.on-dark .card h3 { color: #fff; }
.on-dark .card p, .on-dark .card__specs li { color: var(--muted-dk); }
.on-dark .card__icon { background: #ffffff12; color: var(--green-300); }
.on-dark .card--link:hover { border-color: var(--green-400); box-shadow: none; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.timeline li {
  display: grid; grid-template-columns: auto 1fr; gap: 1.25rem;
  padding-block: 1.375rem;
  border-block-end: 1px solid var(--line);
}
.timeline li:last-child { border-block-end: 0; }
.timeline__dot {
  inline-size: 34px; block-size: 34px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
  background: var(--bone-2); color: var(--muted);
  font-size: .8125rem; font-weight: 600; font-family: var(--font-body);
  border: 1px solid var(--line);
}
.timeline li[data-state="done"] .timeline__dot { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.timeline li[data-state="active"] .timeline__dot {
  background: var(--green-500); color: #fff; border-color: var(--green-500);
  box-shadow: 0 0 0 5px rgba(0,122,63,.14);
}
.timeline h3 { font-size: 1.0625rem; margin-bottom: .25rem; }
.timeline p { font-size: .9375rem; color: var(--muted); }
/* Arabic doesn't take uppercase or letter-spacing well — this stays a
   plain pill rather than a spaced-out label. */
.timeline__tag {
  display: inline-block; margin-inline-start: .5rem;
  padding: .1875rem .625rem; border-radius: 100px;
  background: rgba(0,122,63,.12);
  font-family: var(--font-body); font-size: .75rem; font-weight: 600;
  color: var(--green-500); vertical-align: middle; line-height: 1.5;
}

/* ---------- Location ---------- */
.map-frame {
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line); background: var(--bone-2);
  aspect-ratio: 16 / 11;
}
.map-frame iframe { inline-size: 100%; block-size: 100%; border: 0; }
@media (min-width: 940px) { .map-frame { aspect-ratio: 4 / 3; } }

.addr { display: grid; gap: 1.25rem; margin-block: 1.75rem; }
.addr__row { display: flex; gap: .875rem; align-items: flex-start; }
.addr__row svg { inline-size: 20px; block-size: 20px; color: var(--green-500); flex: none; margin-block-start: .35rem; }
.addr__row strong { display: block; font-weight: 600; font-size: 1rem; }
.addr__row span { font-size: .9375rem; color: var(--muted); }

/* ---------- FAQ ---------- */
.faq { border-block-start: 1px solid var(--line); }
.faq details { border-block-end: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1.375rem;
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.125rem);
  cursor: pointer; list-style: none;
  min-block-size: 44px;
  transition: color .2s var(--ease);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--green-700); }
.faq summary svg {
  inline-size: 20px; block-size: 20px; flex: none; color: var(--green-500);
  transition: transform .25s var(--ease);
}
.faq details[open] summary svg { transform: rotate(45deg); }
.faq details p { padding-block-end: 1.5rem; color: var(--muted); max-width: 72ch; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 940px) { .contact-grid { grid-template-columns: 1fr 1fr; } }

.form { display: grid; gap: 1.125rem; }
.field { display: grid; gap: .4375rem; }
.field label { font-size: .875rem; font-weight: 600; }
.field input, .field textarea, .field select {
  inline-size: 100%;
  min-block-size: 52px;
  padding: .875rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
  font-size: 1rem; /* 16px — prevents iOS zoom-on-focus */
}
.field textarea { min-block-size: 120px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 3px rgba(0,122,63,.13);
}
.field input:user-invalid, .field textarea:user-invalid { border-color: #B4342B; }
.field__error { font-size: .8125rem; color: #B4342B; display: none; }
.field[data-invalid="true"] .field__error { display: block; }
.field[data-invalid="true"] input,
.field[data-invalid="true"] textarea { border-color: #B4342B; }

.form__note { font-size: .8125rem; color: var(--muted); line-height: 1.7; }

.contact-aside { display: grid; gap: 1rem; align-content: start; }
.contact-tile {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.25rem 1.375rem;
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: #fff;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
  min-block-size: 44px;
}
.contact-tile:hover { border-color: var(--green-500); background: var(--bone); }
.contact-tile__icon {
  inline-size: 44px; block-size: 44px; border-radius: var(--radius);
  background: var(--bone-2); color: var(--green-700);
  display: grid; place-items: center; flex: none;
}
.contact-tile__icon svg { inline-size: 22px; block-size: 22px; }
.contact-tile strong { display: block; font-size: 1rem; font-weight: 600; }
.contact-tile span { font-size: .875rem; color: var(--muted); }
.contact-tile__num { direction: ltr; unicode-bidi: embed; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: var(--bone); padding-block: clamp(3rem, 6vw, 4.5rem) 0; }
.footer__grid { display: grid; gap: 2.5rem; padding-block-end: 3rem; }
@media (min-width: 780px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer img.footer-logo { block-size: 52px; inline-size: auto; margin-bottom: 1.25rem; }
.site-footer p { color: var(--muted-dk); font-size: .9375rem; max-width: 42ch; }
.footer__col h4 {
  font-size: .75rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--green-300); margin-bottom: 1.125rem; font-family: var(--font-body); font-weight: 600;
}
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.footer__col a { color: #C4CCBE; font-size: .9375rem; transition: color .2s var(--ease); }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  border-block-start: 1px solid var(--line-dark);
  padding-block: 1.5rem;
  display: flex; flex-wrap: wrap; gap: .75rem 1.5rem;
  align-items: center; justify-content: space-between;
  font-size: .8125rem; color: #7E8878;
}
.footer__bottom a:hover { color: #fff; }

/* ---------- Sticky mobile CTA bar ---------- */
.cta-bar {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: var(--z-bar);
  display: grid; grid-template-columns: 1fr 1fr;
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-block-start: 1px solid var(--line-dark);
  padding-block-end: env(safe-area-inset-bottom);
  transform: translateY(110%);
  transition: transform .3s var(--ease);
}
.cta-bar[data-visible="true"] { transform: none; }
.cta-bar a {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-block-size: 58px; font-size: .9375rem; font-weight: 600; color: #fff;
}
.cta-bar a + a { border-inline-start: 1px solid var(--line-dark); }
.cta-bar a.is-wa { background: var(--green-500); }
.cta-bar svg { inline-size: 19px; block-size: 19px; }
@media (min-width: 900px) { .cta-bar { display: none; } }
@media (max-width: 899px) { body { padding-block-end: 58px; } }

/* ---------- Scroll reveal ----------
   Gated on the `js` class that the inline head script adds. Without that
   gate a JS failure would leave every revealed section at opacity 0 — i.e.
   a blank page. No JS, no hiding. */
.js .reveal { opacity: 0; transform: translateY(18px); }
.js .reveal[data-shown="true"] {
  opacity: 1; transform: none;
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .reveal[data-shown="true"] { opacity: 1; transform: none; transition: none; }
  .cta-bar { transition: none; }
}

/* ---------- Utilities ---------- */
.sr-only {
  position: absolute; inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
/* Keeps Latin digits reading left-to-right inside RTL copy. `isolate` on an
   inline box avoids the stray word-gaps that inline-block introduced. */
.num { direction: ltr; unicode-bidi: isolate; }
.stack-sm > * + * { margin-block-start: 1rem; }
.stack-md > * + * { margin-block-start: 1.75rem; }
.mt-lg { margin-block-start: clamp(2.5rem, 5vw, 3.5rem); }

/* ---------- Site progress gallery ----------
   Real documentation of the build, in date order. Source frames are mixed
   orientation (portrait phone video + landscape stills), so every tile is
   normalised to one ratio and object-fit does the rest. */
.gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.shot { margin: 0; display: flex; flex-direction: column; }
.shot__frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bone-3);
  aspect-ratio: 4 / 3;
}
.shot__frame img {
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}
.shot__date {
  position: absolute; inset-block-start: .75rem; inset-inline-start: .75rem;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #fff; font-size: .75rem; font-weight: 600;
  padding: .3125rem .625rem; border-radius: 100px;
  letter-spacing: .01em;
}
.shot figcaption {
  margin-block-start: .875rem;
  font-size: .9375rem; line-height: 1.7; color: var(--muted);
}
.shot figcaption strong { display: block; color: var(--text); font-weight: 600; margin-block-end: .125rem; }

.on-dark .shot figcaption { color: var(--muted-dk); }
.on-dark .shot figcaption strong { color: #fff; }
.on-dark .shot__frame { background: var(--ink-3); }

/* Caption note under the gallery — e.g. "documented by the developer" */
.gallery-note {
  margin-block-start: 1.75rem;
  font-size: .8125rem; color: var(--muted);
  display: flex; align-items: center; gap: .5rem;
}
.gallery-note svg { inline-size: 16px; block-size: 16px; color: var(--green-500); flex: none; }

/* Date stamp for a documentary photo — makes explicit which STAGE a photo
   records, so a past-stage image can never read as a claim about today. */
.media-date {
  position: absolute; inset-block-end: 1rem; inset-inline-start: 1rem;
  background: color-mix(in srgb, var(--ink) 84%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1px solid #ffffff26;
  color: #fff; font-size: .8125rem; font-weight: 500;
  padding: .4375rem .8125rem; border-radius: 100px;
  display: inline-flex; align-items: center; gap: .5rem;
}
.media-date svg { inline-size: 14px; block-size: 14px; color: var(--green-300); flex: none; }
