/* =========================================================
   PinMorocco — Saha El Feddan, Tetouan
   Shared stylesheet
   ========================================================= */

:root {
  --cream: #f7f0e2;
  --cream-2: #f1e6d2;
  --cream-3: #eadcc2;
  --ink: #272019;
  --ink-soft: #6b5c4d;
  --gold: #c8a24a;
  --gold-2: #e6ce8c;
  --line: rgba(39, 32, 25, 0.14);
  --line-light: rgba(247, 240, 226, 0.2);
  --accent: #0e5a46;
  --accent-deep: #083b2e;
  --accent-soft: rgba(14, 90, 70, 0.08);
  --shadow: 0 30px 70px -35px rgba(39, 32, 25, 0.45);
  --font-ar-display: "Amiri", "Times New Roman", serif;
  --font-ar-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Jost", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.lang-ar {
  font-family: var(--font-ar-body);
}

body.lang-fr {
  --accent: #a9482b;
  --accent-deep: #7a2f1a;
  --accent-soft: rgba(169, 72, 43, 0.08);
}

body.lang-es {
  --accent: #244c8e;
  --accent-deep: #17356a;
  --accent-soft: rgba(36, 76, 142, 0.08);
}

body.lang-en {
  --accent: #8c5a18;
  --accent-deep: #643e0d;
  --accent-soft: rgba(140, 90, 24, 0.08);
}

img,
svg {
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset-block-start: -100%;
  inset-inline-start: 1rem;
  z-index: 999;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--cream);
  text-decoration: none;
  font-size: 0.85rem;
}

.skip-link:focus {
  inset-block-start: 1rem;
}

/* ---------- Shared header ---------- */

.site-header {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem 2rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3.5rem);
}

.site-header--sticky {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 240, 226, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  line-height: 1;
  text-decoration: none;
}

.brand-mark {
  flex: none;
  width: 36px;
  height: 36px;
}

.brand-word {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.brand-word span {
  color: var(--accent);
}

.lang-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.2rem;
}

.lang-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.3rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid transparent;
  color: var(--ink-soft);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease),
    background-color 0.25s var(--ease);
}

.lang-nav a:hover {
  color: var(--accent);
  border-color: var(--line);
}

.lang-nav a[aria-current="page"] {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-soft);
}

body.lang-ar .lang-nav a {
  font-family: var(--font-ar-body);
  font-size: 0.82rem;
  letter-spacing: 0;
}

.lang-nav .nav-home {
  width: 2.3rem;
  padding-inline: 0;
  border-inline-start: 1px solid var(--line);
  border-radius: 0;
  margin-inline-start: 0.2rem;
}

.lang-nav .nav-home svg {
  width: 15px;
  height: 15px;
}

.header-note {
  color: var(--ink-soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.site-header--sticky.is-scrolled {
  box-shadow: 0 14px 34px -28px rgba(39, 32, 25, 0.5);
}

/* ---------- Home page ---------- */

body.home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(circle at 50% 0%, rgba(200, 162, 74, 0.16), transparent 38%),
    var(--cream);
}

body.home::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: url("../img/zellige.svg") center top / 128px repeat;
  opacity: 0.13;
  pointer-events: none;
}

body.home > .site-header,
body.home > .home-main,
body.home > .site-footer {
  position: relative;
  z-index: 1;
}

.home-main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: clamp(0.5rem, 2vw, 1.5rem) clamp(1.25rem, 4.5vw, 3.5rem)
    clamp(2.5rem, 5vw, 4rem);
}

.home-hero {
  text-align: center;
  padding: clamp(1.5rem, 4vw, 3.25rem) 0 clamp(2rem, 4vw, 2.8rem);
}

/* Ornament band above and below the main title — full page width */

.home-hero .hero-band {
  width: auto;
  max-width: none;
  margin-inline: calc(50% - 50vw);
}

.home-band--top {
  margin-top: clamp(0.7rem, 1.8vw, 1.15rem);
}

.home-band--bottom {
  margin-bottom: clamp(1.15rem, 2.4vw, 1.7rem);
}

.home-band--bottom + .home-subtitle {
  margin-top: 0;
}

.home-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.home-kicker::before,
.home-kicker::after {
  content: "";
  width: clamp(1.5rem, 4vw, 2.4rem);
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.home-title {
  margin: 0.8rem 0 0.6rem;
  font-family: var(--font-ar-display);
  font-size: clamp(3.2rem, 8.5vw, 6.6rem);
  font-weight: 700;
  line-height: 1;
}

.home-title em {
  color: var(--accent);
  font-style: normal;
}

.home-subtitle {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.78rem, 1.5vw, 1rem);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.home-subtitle span {
  display: inline-block;
  margin-inline-start: 0.55rem;
  color: var(--gold);
}

.home-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  margin: 1.4rem auto 2.3rem;
  color: var(--gold);
}

.home-ornament::before,
.home-ornament::after {
  content: "";
  width: clamp(2.5rem, 12vw, 7rem);
  height: 1px;
  background: linear-gradient(90deg, transparent, currentColor);
  opacity: 0.65;
}

.home-ornament::after {
  background: linear-gradient(90deg, currentColor, transparent);
}

.home-ornament svg {
  flex: none;
  width: 17px;
  height: 17px;
}

.home-choose {
  margin: 0 0 1.6rem;
  font-size: clamp(1rem, 2vw, 1.22rem);
  font-weight: 500;
  letter-spacing: 0.01em;
}

.home-choose span {
  display: block;
  margin-top: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.64rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.language-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.65rem, 1.2vw, 1rem);
}

.lang-card {
  position: relative;
  isolation: isolate;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(200, 162, 74, 0.6);
  background:
    radial-gradient(circle at 50% 38%, rgba(247, 240, 226, 0.12), transparent 58%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.07), transparent 58%),
    var(--card-bg);
  color: var(--cream);
  text-decoration: none;
  opacity: 0;
  translate: 0 22px;
  animation: cardIn 0.8s var(--ease) var(--delay, 0s) forwards;
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.lang-card::before,
.lang-card::after {
  content: none;
}

.lang-card:hover {
  transform: translateY(-7px);
  box-shadow: 0 28px 55px -28px rgba(39, 32, 25, 0.6);
}

.lang-card--ar {
  --card-bg: #0e5a46;
}

.lang-card--fr {
  --card-bg: #a9482b;
}

.lang-card--es {
  --card-bg: #244c8e;
}

.lang-card--en {
  --card-bg: #8c5a18;
}

.lang-door {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 0;
  height: 100%;
  aspect-ratio: 1000 / 1337;
  transform: translate(-50%, -50%);
  transition: transform 0.45s var(--ease);
}

.lang-door picture {
  position: absolute;
  inset: 0;
  display: block;
}

.lang-door-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
}

.lang-card:hover .lang-door {
  transform: translate(-50%, -50%) scale(1.012);
}

.lang-flag {
  position: absolute;
  top: 37.5%;
  left: 50%;
  z-index: 1;
  width: 48%;
  max-width: 130px;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 10px 18px rgba(15, 35, 26, 0.38));
  transition: transform 0.45s var(--ease);
}

.lang-flag img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px solid rgba(247, 240, 226, 0.92);
  border-radius: 2px;
}

.lang-card:hover .lang-flag {
  transform: translate(-50%, -50%) rotate(-1.2deg) scale(1.04);
}

.lang-text {
  position: absolute;
  right: 15.5%;
  bottom: 13.5%;
  left: 15.5%;
  z-index: 1;
  text-align: center;
  text-shadow: 0 2px 12px rgba(12, 36, 27, 0.5);
}

.lang-card .lang-name {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.lang-card[lang="ar"] .lang-name {
  font-family: var(--font-ar-display);
  font-size: clamp(1.65rem, 2.7vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
}

.lang-card .lang-sub {
  display: block;
  margin-top: 0.42rem;
  font-size: clamp(0.56rem, 0.78vw, 0.7rem);
  line-height: 1.4;
  opacity: 0.86;
}

body.lang-ar .lang-card .lang-sub,
.lang-card[lang="ar"] .lang-sub {
  font-family: var(--font-ar-body);
}

.home-location {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2.2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-align: center;
}

.home-location svg {
  flex: none;
  width: 15px;
  height: 15px;
  color: var(--gold);
}

@keyframes cardIn {
  to {
    opacity: 1;
    translate: 0 0;
  }
}

/* ---------- Interior page hero ---------- */

.page-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
}

/* Ornament bands above and below the title */

.hero-band {
  position: relative;
  z-index: 3;
  width: 100%;
  height: clamp(58px, 8.5vw, 124px);
  overflow: hidden;
  line-height: 0;
  background: #fdfbf6;
}

.hero-band img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.page-hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.75rem, 4.5vw, 3.5rem) clamp(1.25rem, 5vw, 3rem);
}

.page-hero h1 {
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.9rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-align: center;
  text-wrap: balance;
}

body.lang-ar .page-hero h1 {
  font-family: var(--font-ar-display);
  font-size: clamp(2.2rem, 5.2vw, 4.2rem);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0;
}

/* ---------- Sections ---------- */

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.25rem, 5vw, 4rem);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.container--narrow {
  max-width: 840px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 clamp(1.8rem, 3vw, 2.6rem);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.section-num {
  flex: none;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.16em;
}

.section-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.6vw, 2.9rem);
  font-weight: 500;
  line-height: 1.1;
}

body.lang-ar .section-head h2 {
  font-family: var(--font-ar-display);
  font-weight: 700;
  line-height: 1.35;
}

.section-note {
  margin-inline-start: auto;
  color: var(--ink-soft);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.lang-ar .section-note {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.section-head--light {
  border-color: var(--line-light);
}

.section-head--light h2 {
  color: var(--cream);
}

.section-head--light .section-num {
  color: var(--gold-2);
}

.section-head--light .section-note {
  color: rgba(247, 240, 226, 0.55);
}

/* ---------- Intro ---------- */

.section--intro {
  background: var(--cream);
}

.section--intro .lead {
  margin: 0 0 1.5rem;
  color: var(--ink);
  font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 400;
  line-height: 1.7;
}

body.lang-ar .section--intro .lead {
  font-size: clamp(1.4rem, 2.6vw, 1.95rem);
  font-weight: 500;
  line-height: 1.95;
}

.section--intro p:not(.lead) {
  margin: 0 0 1.15rem;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.85;
}

body.lang-ar .section--intro p:not(.lead) {
  font-size: 1.02rem;
  line-height: 2;
}

.section--intro p.story-close {
  margin: 2rem 0 0;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: clamp(1.05rem, 1.7vw, 1.2rem);
  line-height: 1.9;
}

body.lang-ar .section--intro p.story-close {
  font-size: clamp(1.1rem, 1.9vw, 1.28rem);
  line-height: 2.05;
}

.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 2.5rem 0 0;
  border: 1px solid var(--line);
  background: var(--line);
}

.facts div {
  padding: 1.2rem 1rem;
  background: var(--cream);
}

.facts dt {
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
  font-size: 0.64rem;
  letter-spacing: 0.13em;
  line-height: 1.55;
  text-transform: uppercase;
}

body.lang-ar .facts dt {
  font-size: 0.74rem;
  letter-spacing: 0;
  text-transform: none;
}

.facts dd {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.2vw, 1.8rem);
  line-height: 1.2;
}

body.lang-ar .facts dd {
  font-family: var(--font-ar-display);
  font-weight: 700;
}

/* ---------- Gallery ---------- */

.section--gallery {
  position: relative;
  background: var(--cream-2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.8rem, 1.6vw, 1.25rem);
}

.photo {
  position: relative;
  overflow: hidden;
  margin: 0;
  background: var(--cream-3);
}

.photo--wide {
  grid-column: 1 / -1;
}

.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.9s var(--ease);
}

.photo--wide img {
  aspect-ratio: 16 / 9;
}

.photo:not(.photo--wide) img {
  aspect-ratio: 4 / 3;
}

.photo:hover img {
  transform: scale(1.035);
}

.photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(21, 15, 11, 0.8) 0%,
    rgba(21, 15, 11, 0.12) 46%,
    transparent 68%
  );
  pointer-events: none;
}

.photo figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 2;
  padding: 2.4rem clamp(1rem, 2vw, 1.5rem) clamp(1rem, 2vw, 1.35rem);
  color: #fff;
  font-size: clamp(0.8rem, 1vw, 0.92rem);
  line-height: 1.5;
}

.photo figcaption .credit {
  display: block;
  margin-top: 0.25rem;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.64rem;
  letter-spacing: 0.05em;
}

/* Historical postcards: shown whole, caption under the plate */

.photo--doc {
  background: #17130e;
}

.photo.photo--doc:not(.photo--wide) img {
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
}

.photo--doc::after {
  display: none;
}

.photo--doc figcaption {
  position: static;
  padding: 0.85rem 0.95rem 1rem;
  color: var(--ink);
  background: var(--cream-3);
}

.photo--doc figcaption .credit {
  color: var(--ink-soft);
}

/* ---------- Video ---------- */

.section--video {
  position: relative;
  overflow: hidden;
  padding-top: clamp(1rem, 2.4vw, 2rem);
  background: var(--accent-deep);
  color: var(--cream);
}

.section--video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../img/zellige.svg") center / 150px repeat;
  opacity: 0.12;
  mix-blend-mode: soft-light;
  pointer-events: none;
}

.section--video .container {
  position: relative;
  z-index: 1;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  padding: clamp(0.4rem, 0.9vw, 0.7rem);
  border: 1px solid rgba(200, 162, 74, 0.48);
  background: rgba(0, 0, 0, 0.25);
}

.video-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.video-facade {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.video-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.82;
  filter: saturate(0.92);
  transition: transform 0.9s var(--ease), opacity 0.5s var(--ease);
}

.video-facade:hover .video-poster {
  transform: scale(1.035);
  opacity: 0.94;
}

.video-facade::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 59, 46, 0.04), rgba(8, 59, 46, 0.58));
  pointer-events: none;
}

.video-play {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(64px, 7vw, 92px);
  height: clamp(64px, 7vw, 92px);
  border: 1px solid rgba(230, 206, 140, 0.8);
  border-radius: 50%;
  background: rgba(247, 240, 226, 0.94);
  color: var(--accent-deep);
  box-shadow: 0 14px 45px rgba(0, 0, 0, 0.35);
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease);
}

.video-play:hover {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.06);
}

.video-play svg {
  width: 30%;
  height: auto;
  margin-inline-start: 7%;
}

.video-note {
  position: absolute;
  inset-block-end: 1.3rem;
  inset-inline-start: 1.3rem;
  z-index: 2;
  color: rgba(247, 240, 226, 0.85);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.lang-ar .video-note {
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: none;
}

.video-facade.is-playing::after,
.video-facade.is-playing .video-poster,
.video-facade.is-playing .video-play,
.video-facade.is-playing .video-note {
  display: none;
}

/* Real YouTube thumbnails: shown untouched, no tint or darkening */

.video-facade--thumb .video-poster {
  opacity: 1;
  filter: none;
}

.video-facade--thumb::after {
  background: none;
}

.video-facade--thumb .video-note {
  display: none;
}

.video-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0 0;
  color: rgba(247, 240, 226, 0.62);
  font-size: 0.78rem;
  line-height: 1.6;
}

.video-caption a {
  color: var(--gold-2);
  text-decoration: none;
  border-bottom: 1px solid rgba(230, 206, 140, 0.4);
}

.video-caption a:hover {
  border-bottom-color: var(--gold-2);
}

/* ---------- Map ---------- */

.section--map {
  background: var(--cream);
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: stretch;
  gap: clamp(1rem, 2vw, 1.5rem);
}

.map-frame {
  min-height: 420px;
  padding: 0.5rem;
  border: 1px solid var(--line);
  background: #fff;
}

.map-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 400px;
  border: 0;
}

.map-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: clamp(1.3rem, 2.5vw, 2rem);
  border: 1px solid var(--line);
  background: var(--accent-soft);
}

.map-label {
  color: var(--accent);
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.lang-ar .map-label {
  font-size: 0.75rem;
  letter-spacing: 0;
  text-transform: none;
}

.map-card h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 500;
  line-height: 1.15;
}

body.lang-ar .map-card h3 {
  font-family: var(--font-ar-display);
  font-weight: 700;
  line-height: 1.4;
}

.map-card address {
  color: var(--ink-soft);
  font-size: 0.9rem;
  font-style: normal;
  line-height: 1.8;
}

.coords {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.55rem;
  margin-top: auto;
  padding: 0.8rem 1rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--cream);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
  line-height: 1.4;
  text-decoration: none;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

body.lang-ar .btn {
  font-size: 0.82rem;
  letter-spacing: 0;
}

.btn:hover {
  background: transparent;
  color: var(--accent);
}

.btn svg {
  flex: none;
  width: 14px;
  height: 14px;
}

body[dir="rtl"] .btn svg {
  transform: scaleX(-1);
}

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

.site-footer {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem 2rem;
  padding: 1.75rem clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  background: var(--cream);
  color: var(--ink-soft);
  font-size: 0.74rem;
  line-height: 1.6;
}

.footer-brand {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.3rem;
  line-height: 1;
  text-decoration: none;
}

.footer-brand span {
  color: var(--accent);
}

.footer-center {
  text-align: center;
}

.footer-center p {
  margin: 0;
}

.footer-credit {
  max-width: 21rem;
  text-align: end;
  font-size: 0.65rem;
  line-height: 1.65;
}

.footer-credit a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-credit a:hover {
  color: var(--accent);
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .language-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .lang-card .lang-name {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
  }

  .lang-card[lang="ar"] .lang-name {
    font-size: clamp(1.8rem, 4.4vw, 2.5rem);
  }

  .lang-card .lang-sub {
    font-size: clamp(0.62rem, 1.1vw, 0.8rem);
  }

  .facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-card {
    min-height: 0;
  }

  .btn {
    margin-top: 0.5rem;
  }

  .hero-arch {
    opacity: 0.25;
    inset-inline-end: -4%;
  }
}

@media (max-width: 760px) {
  .site-header {
    padding-block: 0.85rem;
  }

  .brand-word {
    font-size: 1.35rem;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .lang-nav {
    width: 100%;
    justify-content: flex-start;
  }

  .lang-nav .nav-home {
    margin-inline-start: auto;
  }

  .page-hero {
    padding-block: 0;
  }

  .section-head {
    flex-wrap: wrap;
    gap: 0.5rem 0.9rem;
  }

  .section-note {
    width: 100%;
    margin-inline-start: 0;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .photo--wide {
    grid-column: auto;
  }

  .photo:not(.photo--wide) img,
  .photo--wide img {
    aspect-ratio: 4 / 3;
  }

  .site-footer {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 0.75rem;
    padding-block: 1.5rem;
  }

  .footer-center,
  .footer-credit {
    max-width: none;
    text-align: start;
  }
}

@media (max-width: 520px) {
  .home-main {
    padding-inline: 0.9rem;
  }

  .home-hero {
    padding-top: 1.2rem;
  }

  .home-kicker {
    font-size: 0.6rem;
    letter-spacing: 0.18em;
  }

  .home-title {
    font-size: clamp(3rem, 17vw, 4.4rem);
  }

  .home-subtitle {
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .home-ornament {
    margin-block: 1.1rem 1.8rem;
  }

  .home-choose {
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
  }

  .language-grid {
    gap: 0.55rem;
  }

  .lang-card {
    padding: 0;
  }

  .lang-card .lang-name {
    font-size: clamp(1.2rem, 6.2vw, 1.65rem);
  }

  .lang-card[lang="ar"] .lang-name {
    font-size: clamp(1.35rem, 7vw, 1.85rem);
  }

  .lang-card .lang-sub {
    display: none;
  }

  .home-location {
    align-items: flex-start;
    font-size: 0.7rem;
  }

  .home-location svg {
    margin-top: 0.18rem;
  }

  .site-header--sticky .lang-nav a {
    padding-inline: 0.5rem;
    font-size: 0.7rem;
  }

  body.lang-ar .site-header--sticky .lang-nav a {
    font-size: 0.76rem;
  }

  .page-hero h1 {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
  }

  body.lang-ar .page-hero h1 {
    font-size: clamp(2rem, 8.6vw, 2.9rem);
  }

  .page-hero-inner {
    padding: 1.5rem 1rem;
  }

  .section {
    padding-inline: 1rem;
  }

  .section--intro .lead {
    font-size: 1.22rem;
  }

  body.lang-ar .section--intro .lead {
    font-size: 1.3rem;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
  }

  .facts div {
    padding: 1rem 0.8rem;
  }

  .map-frame {
    min-height: 320px;
  }

  .map-frame iframe {
    min-height: 300px;
  }

  .video-caption {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}

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

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .lang-card,
  .js .reveal {
    opacity: 1;
    translate: none;
    transform: none;
  }
}
