/* ==========================================================================
   شركة الجميع العقارية — RTL-first. Layout inspired by the Tatee architecture
   template; brand colours: cream #F2ECDE + deep green #28382D (from the old
   Wix site and the logo). All tokens live in :root.
   ========================================================================== */

/* The owner asked for the brand palette everywhere, so the site keeps it even
   when the visitor's device is in dark mode (dark-green sections give contrast). */
:root {
  color-scheme: light;

  /* Type */
  --font: "IBM Plex Sans Arabic", system-ui, "Segoe UI", Tahoma, "Geeza Pro", sans-serif;
  --step--1: clamp(.875rem, .85rem + .1vw, .9375rem);
  --step-0: clamp(1rem, .95rem + .25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.1rem + .6vw, 1.5rem);
  --step-2: clamp(1.625rem, 1.25rem + 1.4vw, 2.5rem);
  --step-3: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem);

  /* Space (4px base) */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem; --space-4: 1rem;
  --space-6: 1.5rem; --space-8: 2rem; --space-12: 3rem; --space-16: 4rem;
  --space-24: 6rem;
  --section: clamp(4rem, 2.5rem + 6vw, 7.5rem);

  /* Shape & motion */
  --radius-sm: .375rem; --radius: .75rem; --radius-pill: 999px;
  --shadow-1: 0 1px 2px rgb(31 44 35 / .06), 0 1px 3px rgb(31 44 35 / .08);
  --shadow-2: 0 14px 36px rgb(31 44 35 / .16);
  --fast: 150ms; --slow: 250ms; --ease: cubic-bezier(.2, .7, .2, 1);

  /* Colour — light */
  --cream: #F2ECDE;
  --green: #28382D;
  --bg: var(--cream);
  --surface: #FAF7F0;
  --surface-2: #EBE3D1;
  --fg: #1F2A22;
  --muted: #565C52;
  --border: #DCD2BD;
  --line: rgb(40 56 45 / .08);
  --brand: var(--green);
  --brand-hover: #1E2B22;
  --on-brand: var(--cream);
  --accent: #8A5A2B;
  --deep: #28382D;          /* projects section */
  --deeper: #1E2B22;        /* footer / overlays */
  --on-deep: #F2ECDE;
  --on-deep-muted: rgb(242 236 222 / .78);
  --card: #FAF7F0;
  --focus: #8A5A2B;

  --container: 1240px;
  --header-h: 76px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + var(--space-4)); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 var(--step-0)/1.85 var(--font);
  background: var(--bg);
  color: var(--fg);
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img { max-inline-size: 100%; block-size: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.35; margin: 0; text-wrap: balance; font-weight: 700; }
p { margin: 0 0 var(--space-4); text-wrap: pretty; }
p:last-child { margin-block-end: 0; }
ul[role="list"], .site-nav ul, .footer__nav ul { list-style: none; margin: 0; padding: 0; }
svg.icon { inline-size: 1.15em; block-size: 1.15em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }
bdi { unicode-bidi: isolate; }

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

.visually-hidden {
  position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; inset-inline-start: var(--space-4); inset-block-start: -100px; z-index: 100;
  background: var(--brand); color: var(--on-brand); padding: var(--space-2) var(--space-4); border-radius: var(--radius-sm);
}
.skip-link:focus { inset-block-start: var(--space-4); }

.container { inline-size: min(100% - 2 * var(--space-6), var(--container)); margin-inline: auto; }
@media (max-width: 599px) { .container { inline-size: calc(100% - 2 * var(--space-4)); } }

/* Tatee's signature: thin vertical guide lines behind the page */
.grid-lines {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  inline-size: min(100% - 2 * var(--space-6), var(--container)); margin-inline: auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
  border-inline: 1px solid var(--line);
}
.grid-lines span { border-inline-end: 1px solid var(--line); }
.grid-lines span:last-child { border-inline-end: 0; }
@media (max-width: 599px) { .grid-lines { inline-size: calc(100% - 2 * var(--space-4)); } .grid-lines span { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-block-size: 48px; padding: var(--space-3) var(--space-6);
  font: 500 var(--step-0)/1.2 var(--font); text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--sm { min-block-size: 44px; padding: var(--space-2) var(--space-4); font-size: var(--step--1); }
.btn--primary { background: var(--brand); color: var(--on-brand); }
.btn--primary:hover { background: var(--brand-hover); }
.btn--outline { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 45%, transparent); background: transparent; }
.btn--outline:hover { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.btn--light { background: #F2ECDE; color: #28382D; }
.btn--light:hover { background: #fff; }
.btn--ghost-light { color: #F2ECDE; border-color: rgb(242 236 222 / .6); }
.btn--ghost-light:hover { background: rgb(242 236 222 / .12); border-color: #F2ECDE; }

.overline {
  display: inline-flex; align-items: center; gap: var(--space-3);
  margin-block-end: var(--space-3);
  font-size: var(--step--1); font-weight: 500; color: var(--accent);
}
.overline::before { content: ""; inline-size: 32px; block-size: 1px; background: currentColor; }
.overline--light { color: #E7C9A4; }

.title { font-size: var(--step-2); margin-block-end: var(--space-6); }

.section { padding-block: var(--section); }
.section-head { margin-block-end: var(--space-12); }
.section-head .title { margin-block-end: 0; }
.section-head--split { display: grid; gap: var(--space-4); align-items: end; }
.section-head__lead { color: var(--muted); max-inline-size: 48ch; }
@media (min-width: 900px) { .section-head--split { grid-template-columns: 1fr 1fr; } .section-head__lead { justify-self: end; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: 44px;
  color: var(--brand); font-weight: 500; text-decoration: none;
}
.link-arrow:hover { text-decoration: underline; text-underline-offset: 6px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; inset-block-start: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-block-end: 1px solid transparent;
  transition: border-color var(--slow) var(--ease), box-shadow var(--slow) var(--ease);
}
.site-header.is-scrolled { border-color: var(--border); box-shadow: var(--shadow-1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-6); min-block-size: var(--header-h); }
.brand { display: inline-flex; align-items: center; min-block-size: 44px; }
.brand img { block-size: 44px; inline-size: auto; }

.site-nav { display: flex; align-items: center; gap: var(--space-8); }
.site-nav ul { display: flex; gap: var(--space-2); }
.site-nav ul a {
  display: inline-flex; align-items: center; min-block-size: 44px; padding-inline: var(--space-3);
  font-weight: 500; text-decoration: none; color: var(--fg); position: relative;
}
.site-nav ul a::after {
  content: ""; position: absolute; inset-inline: var(--space-3); inset-block-end: 8px; block-size: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: right; transition: transform var(--slow) var(--ease);
}
.site-nav ul a:hover::after, .site-nav ul a[aria-current="true"]::after { transform: scaleX(1); }

.nav-toggle {
  display: none; inline-size: 48px; block-size: 48px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: transparent; color: var(--fg); cursor: pointer; place-items: center;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; inline-size: 20px; block-size: 2px; background: currentColor; border-radius: 2px;
  transition: transform var(--slow) var(--ease), opacity var(--fast);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; inset-inline-start: 0; }
.nav-toggle__bars::before { inset-block-start: -6px; }
.nav-toggle__bars::after { inset-block-start: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 899px) {
  :root { --header-h: 64px; }
  .brand img { block-size: 38px; }
  .nav-toggle { display: grid; }
  .site-nav {
    position: absolute; inset-inline: 0; inset-block-start: 100%;
    flex-direction: column; align-items: stretch; gap: var(--space-4);
    padding: var(--space-4) var(--space-4) var(--space-6);
    background: var(--bg); border-block-end: 1px solid var(--border); box-shadow: var(--shadow-2);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { min-block-size: 52px; padding-inline: var(--space-2); border-block-end: 1px solid var(--border); inline-size: 100%; }
  .site-nav ul a::after { display: none; }
  .site-nav .btn { min-block-size: 52px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; display: grid; align-content: end; gap: var(--space-12);
  min-block-size: min(calc(100svh - var(--header-h)), 880px);
  padding-block: var(--space-24) var(--space-8);
  color: #F2ECDE; overflow: hidden; background: var(--deeper);
}
.hero__img { position: absolute; inset: 0; z-index: -2; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 55%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgb(24 34 27 / .92), rgb(24 34 27 / .35) 50%, rgb(24 34 27 / .15)),
    linear-gradient(to left, rgb(24 34 27 / .72), rgb(24 34 27 / .2) 60%, transparent 85%);
}
.hero h1 { font-size: var(--step-3); max-inline-size: 13ch; margin-block-end: var(--space-4); }
.hero__lead { font-size: var(--step-1); line-height: 1.7; max-inline-size: 44ch; color: rgb(242 236 222 / .9); margin-block-end: var(--space-8); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin: 0;
  border-block-start: 1px solid rgb(242 236 222 / .25);
}
.stats > div { padding: var(--space-4) var(--space-4) var(--space-2); }
.stats > div + div { border-inline-start: 1px solid rgb(242 236 222 / .18); }
.stats dt { font-size: var(--step--1); color: rgb(242 236 222 / .75); }
.stats dd { margin: 0; font-size: var(--step-1); font-weight: 700; line-height: 1.5; }
.stats dd small { font-size: .6em; font-weight: 500; margin-inline-start: 2px; }
@media (max-width: 599px) {
  .hero { padding-block: var(--space-16) var(--space-6); gap: var(--space-8); }
  .hero__img { object-position: 45% 50%; }
  .hero__actions .btn { flex: 1 1 100%; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats > div:nth-child(odd) { border-inline-start: 0; }
  .stats > div:nth-child(n+3) { border-block-start: 1px solid rgb(242 236 222 / .18); }
  .stats > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- About ---------- */
.about__grid { display: grid; gap: var(--space-12); align-items: center; }
@media (min-width: 960px) { .about__grid { grid-template-columns: 1fr 1fr; gap: var(--space-16); } }
.about__text p { color: var(--muted); max-inline-size: 60ch; }
.about__media { position: relative; margin: 0; }
.about__media img { inline-size: 100%; aspect-ratio: 4 / 3.4; object-fit: cover; border-radius: var(--radius-sm); }
.about__badge {
  position: absolute; inset-block-end: calc(-1 * var(--space-8)); inset-inline-start: calc(-1 * var(--space-6));
  display: grid; gap: var(--space-1); max-inline-size: 15rem;
  padding: var(--space-6); background: var(--green); color: #F2ECDE; border-radius: var(--radius-sm);
  box-shadow: var(--shadow-2); font-size: var(--step--1); line-height: 1.6;
}
.about__badge-year { font-size: var(--step-2); font-weight: 700; line-height: 1.2; }
.about__badge-year small { font-size: .55em; font-weight: 500; margin-inline-start: 2px; }
@media (max-width: 959px) { .about__badge { inset-inline-start: var(--space-4); } }

/* ---------- Projects ---------- */
.projects { background: var(--deep); color: var(--on-deep); }
.projects .section-head__lead { color: var(--on-deep-muted); }
.projects__grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.projects__empty { color: var(--on-deep-muted); }
.projects__empty a { color: #F2ECDE; }

.pcard {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--card); color: var(--fg); border-radius: var(--radius); box-shadow: var(--shadow-2);
}
.pcard__media {
  position: relative; display: block; inline-size: 100%; padding: 0; border: 0; cursor: zoom-in;
  aspect-ratio: 1000 / 733; overflow: hidden; background: var(--surface-2);
}
.pcard__media img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.pcard__media:hover img { transform: scale(1.04); }
.pcard__badge, .pcard__count {
  position: absolute; inset-block-start: var(--space-3); display: inline-flex; align-items: center; gap: var(--space-1);
  padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill);
  font: 500 var(--step--1)/1.6 var(--font);
}
.pcard__badge { inset-inline-start: var(--space-3); background: #28382D; color: #F2ECDE; }
.pcard__badge.is-last { background: #8A5A2B; }
.pcard__badge.is-soldout { background: rgb(31 42 34 / .82); color: rgb(242 236 222 / .85); }
.pcard__count { inset-inline-end: var(--space-3); background: rgb(242 236 222 / .92); color: #28382D; }

.pcard__body { display: flex; flex-direction: column; gap: var(--space-3); flex: 1; padding: var(--space-6); }
.pcard__type { margin: 0; font-size: var(--step--1); font-weight: 500; color: var(--accent); }
.pcard__title { font-size: var(--step-2); line-height: 1.2; }
.pcard__loc { display: flex; align-items: center; gap: var(--space-2); margin: 0; color: var(--muted); font-size: var(--step--1); }
.pcard__specs {
  display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: var(--space-3);
  margin: var(--space-2) 0; padding-block: var(--space-4); border-block: 1px solid var(--border);
}
.pcard__specs dt { font-size: .8125rem; color: var(--muted); }
.pcard__specs dd { margin: 0; font-weight: 700; line-height: 1.5; font-size: var(--step--1); }
.pcard__features { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.pcard__features li {
  padding: 2px var(--space-3); border-radius: var(--radius-pill); font-size: .8125rem; line-height: 1.9;
  background: color-mix(in srgb, var(--brand) 8%, transparent); color: var(--fg);
}
.pcard__actions { display: flex; gap: var(--space-3); margin-block-start: auto; padding-block-start: var(--space-3); }
.pcard__actions .btn--primary { flex: 1; }
@media (max-width: 380px) { .pcard__specs { grid-template-columns: 1fr 1fr; } }

/* ---------- Guarantees ---------- */
.guarantees { background: var(--surface-2); }
.guarantees__grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.guarantee {
  display: grid; gap: var(--space-2); align-content: start;
  padding: var(--space-8) var(--space-6); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.guarantee__icon { inline-size: 40px; block-size: 40px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-block-end: var(--space-2); }
.guarantee__label { margin: 0; color: var(--muted); font-size: var(--step--1); }
.guarantee__value { margin: 0; font-size: var(--step-1); font-weight: 700; line-height: 1.4; color: var(--fg); }
.guarantee__value small { display: block; font-size: .65em; font-weight: 500; color: var(--muted); }
.guarantees__note { margin-block-start: var(--space-6); color: var(--muted); font-size: var(--step--1); }
@media (max-width: 599px) {
  .guarantees__grid { grid-template-columns: 1fr 1fr; gap: var(--space-3); }
  .guarantee { padding: var(--space-6) var(--space-4); }
  .guarantee__icon { inline-size: 32px; block-size: 32px; }
  .guarantee:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- Booking band ---------- */
.booking { position: relative; isolation: isolate; overflow: hidden; padding-block: var(--section); color: #F2ECDE; background: var(--deeper); }
.booking__img { position: absolute; inset: 0; z-index: -2; inline-size: 100%; block-size: 100%; object-fit: cover; object-position: 50% 60%; }
.booking::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgb(30 43 34 / .8); }
.booking__inner { display: grid; gap: var(--space-6); justify-items: start; }
.booking blockquote { margin: 0; }
.booking blockquote p { font-size: var(--step-2); font-weight: 700; line-height: 1.5; max-inline-size: 22ch; }
.booking__title { font-size: var(--step-1); font-weight: 500; color: rgb(242 236 222 / .85); max-inline-size: 40ch; }

/* ---------- Contact ---------- */
.contact__grid { display: grid; gap: var(--space-12); align-items: start; }
@media (min-width: 960px) { .contact__grid { grid-template-columns: 5fr 6fr; gap: var(--space-16); } }
.contact__lead { color: var(--muted); max-inline-size: 48ch; }
.contact__cards { display: grid; gap: var(--space-4); }
.contact-card {
  display: flex; gap: var(--space-6); align-items: flex-start;
  padding: var(--space-6) var(--space-8); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
}
.contact-card--accent { border-inline-start: 3px solid var(--accent); }
.contact-card__icon { inline-size: 28px; block-size: 28px; flex: none; fill: none; stroke: var(--brand); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; margin-block-start: 4px; }
.contact-card h3 { font-size: var(--step--1); font-weight: 500; color: var(--muted); margin-block-end: var(--space-1); }
.contact-card__value { display: block; font-size: var(--step-1); font-weight: 700; color: var(--fg); text-decoration: none; line-height: 1.5; margin: 0; }
a.contact-card__value { min-block-size: 44px; display: inline-flex; align-items: center; }
a.contact-card__value:hover { color: var(--accent); }

/* ---------- Social accounts ---------- */
.social__label { margin: var(--space-8) 0 var(--space-3); font-size: var(--step--1); font-weight: 500; color: var(--muted); }
.social { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.social__link {
  display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: 44px; padding-inline: var(--space-4);
  border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--surface);
  color: var(--fg); font-size: var(--step--1); font-weight: 500; text-decoration: none;
  transition: background-color var(--fast) var(--ease), color var(--fast) var(--ease), border-color var(--fast) var(--ease);
}
@media (hover: hover) {
  .social__link:hover { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
}
.social__icon { inline-size: 20px; block-size: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.social--icons { margin-block-start: var(--space-6); }
@media (max-width: 599px) {
  .social:not(.social--icons) { display: grid; grid-template-columns: 1fr 1fr; }
  .social:not(.social--icons) .social__link { inline-size: 100%; justify-content: center; }
}
.social--icons .social__link {
  inline-size: 44px; padding: 0; justify-content: center;
  background: transparent; border-color: rgb(242 236 222 / .3); color: #F2ECDE;
}
@media (hover: hover) {
  .social--icons .social__link:hover { background: #F2ECDE; border-color: #F2ECDE; color: #28382D; text-decoration: none; }
}

/* ---------- Footer ---------- */
/* Mobile: brand + icons centred on top, then quick links | contact side by side */
.site-footer { background: var(--deeper); color: rgb(242 236 222 / .78); padding-block: var(--space-12) var(--space-4); font-size: var(--step--1); }
.footer__grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-8) var(--space-6); }
.footer__brand {
  grid-column: 1 / -1; display: grid; justify-items: center; text-align: center;
  padding-block-end: var(--space-8); border-block-end: 1px solid rgb(242 236 222 / .12);
}
.footer__brand img { block-size: 48px; inline-size: auto; margin-block-end: var(--space-3); }
.footer__brand p { max-inline-size: 36ch; margin: 0; }
.site-footer .social--icons { justify-content: center; margin-block-start: var(--space-6); }
.site-footer h2 { font-size: var(--step-0); color: #F2ECDE; margin-block-end: var(--space-2); }
.site-footer a { text-decoration: none; }
.footer__nav li a { display: inline-flex; align-items: center; min-block-size: 40px; }
.footer__contact p { margin: 0; }
.footer__contact a { display: inline-flex; align-items: center; min-block-size: 44px; font-size: var(--step-0); font-weight: 700; color: #F2ECDE; }
.footer__bottom {
  display: flex; flex-direction: column; align-items: center; gap: 0; text-align: center;
  margin-block-start: var(--space-8); padding-block-start: var(--space-4); border-block-start: 1px solid rgb(242 236 222 / .12);
}
.footer__bottom p { margin: 0; }
.to-top { display: inline-flex; align-items: center; gap: var(--space-2); min-block-size: 44px; }

@media (min-width: 760px) {
  .site-footer { padding-block: var(--space-16) var(--space-6); }
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; gap: var(--space-12); }
  .footer__brand { grid-column: auto; justify-items: start; text-align: start; padding-block-end: 0; border-block-end: 0; }
  .footer__brand img { block-size: 52px; margin-block-end: var(--space-4); }
  .site-footer .social--icons { justify-content: flex-start; }
  .site-footer h2 { margin-block-end: var(--space-4); }
  .footer__bottom { flex-direction: row; justify-content: space-between; gap: var(--space-4); text-align: start; margin-block-start: var(--space-12); padding-block-start: var(--space-6); }
}

/* Hover effects only on devices that really hover — on phones a tap left them stuck */
@media (hover: hover) {
  .site-footer a:hover { color: #F2ECDE; text-decoration: underline; text-underline-offset: 5px; }
  .site-footer .social__link:hover { text-decoration: none; }
}

/* ---------- Gallery ---------- */
.gallery {
  inline-size: min(96vw, 1280px); max-inline-size: none; max-block-size: 94vh; padding: 0;
  border: 0; border-radius: var(--radius); background: #141C16; color: #F2ECDE; overflow: hidden;
}
.gallery::backdrop { background: rgb(10 15 12 / .88); }
.gallery__bar { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4); border-block-end: 1px solid rgb(242 236 222 / .1); }
.gallery__title { margin: 0; font-weight: 700; }
.gallery__count { margin-block: 0; margin-inline: 0 auto; color: rgb(242 236 222 / .7); font-size: var(--step--1); }
.gallery__close {
  inline-size: 44px; block-size: 44px; border: 1px solid rgb(242 236 222 / .35); border-radius: var(--radius-pill);
  background: transparent; color: #F2ECDE; font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.gallery__stage { position: relative; display: grid; place-items: center; background: #0F1611; }
.gallery__stage img { inline-size: 100%; max-block-size: calc(94vh - 70px); object-fit: contain; }
.gallery__nav {
  position: absolute; inset-block-start: 50%; translate: 0 -50%;
  display: grid; place-items: center; inline-size: 48px; block-size: 48px;
  border: 0; border-radius: var(--radius-pill); background: rgb(242 236 222 / .9); color: #28382D; cursor: pointer;
}
.gallery__nav--prev { inset-inline-start: var(--space-3); }
.gallery__nav--next { inset-inline-end: var(--space-3); }
.gallery__nav:hover { background: #fff; }
.gallery__nav[hidden] { display: none; }

/* ---------- Reveal on scroll (only when JS runs and motion is allowed) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
}
