/* ==========================================================================
   Wadi Al Zahab - Kurdish Textile House
   Design system: dark editorial gallery-luxury, warm gold on deep ink.
   Hand-crafted modern CSS. Shared across EN / AR / KU (RTL aware).
   Shape rule: buttons = pill, media + inputs = 8px radius.
   Accent: gold, locked across the whole site.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* ---- non-themed structure ---- */
  --gold-grad: linear-gradient(135deg, #ecd49a 0%, #c9a24b 48%, #9c7a33 100%);
  --on-gold: #2a1f0c;            /* text on gold buttons (both themes) */
  --on-image: #f4ece0;           /* text over photographs (both themes) */
  --on-image-dim: rgba(244, 236, 224, 0.82);

  --r:        8px;
  --r-lg:     14px;
  --maxw:     1280px;
  --gutter:   clamp(1.15rem, 4vw, 2.4rem);
  --section:  clamp(4.5rem, 10vw, 8.5rem);

  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --z-nav: 100;
  --z-overlay: 200;
  --z-lightbox: 300;
}

/* ---- Dark theme (default, also when no JS) ---- */
:root, :root[data-theme="dark"] {
  --ink:        #0f0c0a;
  --ink-soft:   #14100b;
  --surface:    #19130d;
  --surface-2:  #221a11;
  --bone:       #f3ead9;
  --bone-dim:   rgba(243, 234, 217, 0.64);
  --bone-faint: rgba(243, 234, 217, 0.40);
  --gold:        #c9a24b;
  --gold-bright: #e6c878;
  --gold-deep:   #9c7a33;
  --line:        rgba(243, 234, 217, 0.12);
  --line-strong: rgba(243, 234, 217, 0.22);
  --shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.75);
  --header-bg: rgba(15, 12, 10, 0.82);
  --drawer-bg: rgba(12, 9, 7, 0.97);
  --logo-filter: invert(1) brightness(1.7);
  --map-filter: grayscale(0.3) contrast(1.05) brightness(0.9);
  --ambient-1: rgba(201, 162, 75, 0.16);
  --ambient-2: rgba(156, 122, 51, 0.10);
}

/* ---- Light theme ---- */
:root[data-theme="light"] {
  --ink:        #f5f0e6;
  --ink-soft:   #ece4d5;
  --surface:    #fdfbf6;
  --surface-2:  #f4ede0;
  --bone:       #211b12;
  --bone-dim:   rgba(33, 27, 18, 0.66);
  --bone-faint: rgba(33, 27, 18, 0.45);
  --gold:        #9a7325;
  --gold-bright: #876316;
  --gold-deep:   #6f521f;
  --line:        rgba(33, 27, 18, 0.13);
  --line-strong: rgba(33, 27, 18, 0.22);
  --shadow: 0 30px 70px -32px rgba(83, 62, 24, 0.30);
  --header-bg: rgba(245, 240, 230, 0.86);
  --drawer-bg: rgba(245, 240, 230, 0.98);
  --logo-filter: none;
  --map-filter: contrast(1.02) saturate(1.04);
  --ambient-1: rgba(201, 162, 75, 0.18);
  --ambient-2: rgba(156, 122, 51, 0.08);
}

/* ---- Per-language fonts (set via [data-lang] on <html>) ---- */
html[data-lang="ar"] { --serif: "Amiri", "Cairo", Georgia, serif; --sans: "Cairo", system-ui, sans-serif; }
html[data-lang="ku"] { --serif: "Vazirmatn", system-ui, serif; --sans: "Vazirmatn", system-ui, sans-serif; }
html[data-lang="ar"] :is(h1, h2, h3, h4, .brand__name) { font-weight: 700; }
html[data-lang="ku"] :is(h1, h2, h3, h4, .brand__name) { font-weight: 600; }
html[data-lang="ar"] .quote, html[data-lang="ku"] .quote { font-style: normal; }

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  background: var(--ink);
  color: var(--bone);
  line-height: 1.6;
  font-size: 1rem;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
ul { list-style: none; padding: 0; }

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

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

/* Warm grain / glow ambience fixed behind everything */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 50% at 78% -5%, var(--ambient-1), transparent 60%),
    radial-gradient(50% 40% at 0% 100%, var(--ambient-2), transparent 60%);
  transition: background 0.5s var(--ease);
}

/* ---------- Layout helpers ---------- */
.shell { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { position: relative; z-index: 1; padding-block: var(--section); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
}
.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.005em;
  color: var(--bone);
}
.display {
  font-size: clamp(2.7rem, 6.4vw, 5.4rem);
  line-height: 1.0;
  font-weight: 500;
}
.h2 { font-size: clamp(2.05rem, 4.4vw, 3.4rem); line-height: 1.06; }
.h3 { font-size: clamp(1.35rem, 2.2vw, 1.85rem); }
.serif-em { font-style: italic; color: var(--gold-bright); }

.lead {
  font-size: clamp(1.02rem, 1.4vw, 1.18rem);
  color: var(--bone-dim);
  line-height: 1.7;
  max-width: 54ch;
}
.muted { color: var(--bone-dim); }
.prose p { color: var(--bone-dim); line-height: 1.8; max-width: 64ch; }
.prose p + p { margin-top: 1.1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.95em 1.7em;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease),
    color 0.4s var(--ease), border-color 0.4s var(--ease), box-shadow 0.4s var(--ease);
  will-change: transform;
}
.btn svg { width: 1.05em; height: 1.05em; }
.btn:active { transform: translateY(1px) scale(0.99); }

.btn--gold {
  background: var(--gold-grad);
  color: #2a1f0c;
  box-shadow: 0 14px 34px -14px rgba(201, 162, 75, 0.6);
}
.btn--gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 42px -14px rgba(201, 162, 75, 0.7);
}
.btn--ghost {
  border: 1px solid var(--line-strong);
  color: var(--bone);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  transform: translateY(-2px);
}
.btn--whatsapp { background: #1f7a4d; color: #fff; box-shadow: 0 14px 34px -16px rgba(31, 122, 77, 0.8); }
.btn--whatsapp:hover { transform: translateY(-2px); background: #23895a; }

/* arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  color: var(--bone);
  width: max-content;
}
.arrow-link svg { width: 1.1em; height: 1.1em; transition: transform 0.4s var(--ease); color: var(--gold); }
.arrow-link:hover { color: var(--gold-bright); }
.arrow-link:hover svg { transform: translateX(5px); }
[dir="rtl"] .arrow-link svg { transform: scaleX(-1); }
[dir="rtl"] .arrow-link:hover svg { transform: scaleX(-1) translateX(5px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: var(--z-nav);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
body { transition: background 0.5s var(--ease), color 0.5s var(--ease); }

.site-header.is-scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: inline-flex; align-items: center; gap: 0.7rem; }
.brand img { height: 38px; width: auto; filter: var(--logo-filter); transition: filter 0.4s var(--ease); }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__name { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; letter-spacing: 0.01em; }
.brand__sub { font-size: 0.58rem; letter-spacing: 0.34em; text-transform: uppercase; color: var(--gold); margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__link {
  position: relative;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--bone-dim);
  padding-block: 0.4rem;
  transition: color 0.3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: inline-start;
  transition: transform 0.4s var(--ease);
}
.nav__link:hover, .nav__link.is-active { color: var(--bone); }
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }

.nav__right { display: flex; align-items: center; gap: 1.1rem; }

/* language switcher */
.lang {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--bone);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.5rem 2rem 0.5rem 0.9rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.3s var(--ease);
}
[dir="rtl"] .lang select { padding: 0.5rem 0.9rem 0.5rem 2rem; }
.lang select:hover { border-color: var(--gold); }
.lang select option { background: var(--surface); color: var(--bone); }
.lang__chev {
  position: absolute;
  inset-inline-end: 0.7rem;
  pointer-events: none;
  width: 0.9rem;
  color: var(--gold);
}

.nav__cta { display: inline-flex; }

/* theme toggle */
.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--bone);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease);
}
.theme-toggle:hover { border-color: var(--gold); color: var(--gold-bright); }
.theme-toggle svg { width: 1.2rem; height: 1.2rem; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }

.nav__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--bone); }
.nav__toggle svg { width: 26px; height: 26px; }

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  background: var(--drawer-bg);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  padding: 2rem var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.5s var(--ease);
  visibility: hidden;
}
.drawer.is-open { transform: translateY(0); visibility: visible; }
.drawer__top { display: flex; align-items: center; justify-content: space-between; }
.drawer__close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; color: var(--bone); }
.drawer__close svg { width: 26px; height: 26px; }
.drawer__links { margin-top: 3rem; display: flex; flex-direction: column; gap: 0.4rem; }
.drawer__links a {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 500;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--line);
  transition: color 0.3s var(--ease), padding-inline 0.3s var(--ease);
}
.drawer__links a:hover { color: var(--gold-bright); padding-inline-start: 0.5rem; }
.drawer__foot { margin-top: auto; padding-top: 2rem; color: var(--bone-dim); font-size: 0.9rem; display: grid; gap: 0.5rem; }
.drawer__foot a:hover { color: var(--gold); }
.drawer__controls { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; }
.lang-pills { display: flex; gap: 0.5rem; }
.lang-pills button {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--bone-dim);
  font-size: 0.85rem;
  font-weight: 600;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.lang-pills button.is-active { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; }
.lang-pills button:not(.is-active):hover { border-color: var(--gold); color: var(--bone); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding-top: clamp(6rem, 12vh, 8rem);
  padding-bottom: clamp(3rem, 8vh, 5rem);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__content { max-width: 38rem; }
.hero__title {
  margin-top: 1.6rem;
  font-size: clamp(2.8rem, 6.6vw, 5.6rem);
  line-height: 1.04;
}
.hero__title span { display: block; }
.hero__title .gold { color: var(--gold-bright); display: inline; }
.hero__sub { margin-top: 1.6rem; }
.hero__actions { margin-top: 2.3rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.hero__meta {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem 2.4rem;
}
.hero__meta div { display: flex; flex-direction: column; gap: 0.2rem; }
.hero__meta dt { font-family: var(--serif); font-size: 1.7rem; color: var(--gold-bright); font-weight: 600; }
.hero__meta dd { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--bone-dim); text-transform: uppercase; }

.hero__figure {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}
.hero__figure::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(15, 12, 10, 0.55));
  pointer-events: none;
}
.hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: kenburns 18s ease-in-out infinite alternate;
}
.hero__tag {
  position: absolute;
  inset-inline-start: 1.1rem;
  inset-block-end: 1.1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(15, 12, 10, 0.55);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}
.hero__tag b { color: var(--gold-bright); font-weight: 600; }
@keyframes kenburns {
  from { transform: scale(1.02); }
  to   { transform: scale(1.12); }
}

/* gold seam divider */
.seam { height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0.5; }

/* ---------- Section heading ---------- */
.head { max-width: 56rem; }
.head__title { margin-top: 1rem; }
.head__sub { margin-top: 1.1rem; }
.head--between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: none;
}

/* ---------- Categories (bento) ---------- */
.cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: clamp(0.8rem, 1.5vw, 1.1rem);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.cat {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  border: 1px solid var(--line);
  min-height: 240px;
  display: flex;
  align-items: flex-end;
  isolation: isolate;
}
.cat--feature { grid-row: span 2; }
.cat img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  transition: transform 1.1s var(--ease);
}
.cat::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(15,12,10,0.05) 30%, rgba(15,12,10,0.82));
  transition: background 0.5s var(--ease);
}
.cat:hover img { transform: scale(1.07); }
.cat:hover::after { background: linear-gradient(180deg, rgba(15,12,10,0.15) 20%, rgba(15,12,10,0.88)); }
.cat__body { padding: clamp(1.1rem, 2.2vw, 1.7rem); position: relative; }
.cat__name { font-family: var(--serif); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 600; color: var(--on-image); }
.cat__desc { color: var(--on-image-dim); font-size: 0.86rem; margin-top: 0.25rem; max-width: 26ch; }
.cat__plus {
  position: absolute;
  inset-block-start: 1.2rem;
  inset-inline-end: 1.2rem;
  width: 2.4rem; height: 2.4rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--gold);
  background: rgba(15,12,10,0.35);
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}
.cat:hover .cat__plus { background: var(--gold); color: var(--ink); transform: rotate(90deg); }
.cat__plus svg { width: 1.1rem; height: 1.1rem; }

/* ---------- Gallery (fabrics masonry) ---------- */
.gallery {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  columns: 4 220px;
  column-gap: clamp(0.7rem, 1.4vw, 1rem);
}
.gallery__item {
  position: relative;
  display: block;
  width: 100%;
  margin-bottom: clamp(0.7rem, 1.4vw, 1rem);
  break-inside: avoid;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--surface);
}
.gallery__item img { width: 100%; height: auto; transition: transform 0.9s var(--ease), opacity 0.6s var(--ease); }
.gallery__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(15,12,10,0.5));
  opacity: 0; transition: opacity 0.4s var(--ease);
}
.gallery__zoom {
  position: absolute;
  inset-block-end: 0.8rem; inset-inline-end: 0.8rem;
  width: 2.3rem; height: 2.3rem;
  border-radius: 999px;
  background: rgba(15,12,10,0.5);
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--gold-bright);
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
  z-index: 2;
}
.gallery__zoom svg { width: 1.1rem; height: 1.1rem; }
.gallery__item:hover img { transform: scale(1.06); }
.gallery__item:hover::after { opacity: 1; }
.gallery__item:hover .gallery__zoom { opacity: 1; transform: translateY(0); }
.gallery__item.is-hidden { display: none; }

/* ---------- Collection filters ---------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: clamp(1.8rem, 4vw, 2.6rem);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.62em 1.25em;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  color: var(--bone-dim);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.chip:hover { border-color: var(--gold); color: var(--bone); }
.chip.is-active { background: var(--gold-grad); color: var(--on-gold); border-color: transparent; }
.chip__n { font-variant-numeric: tabular-nums; opacity: 0.7; font-weight: 500; }
.chip.is-active .chip__n { opacity: 0.85; }
.collection-count { margin-top: 1.4rem; color: var(--bone-faint); font-size: 0.85rem; letter-spacing: 0.04em; }

/* ---------- Marquee band ---------- */
.band {
  position: relative;
  z-index: 1;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-block: 1px solid var(--line);
  background: var(--ink-soft);
  overflow: hidden;
}
.marquee { display: flex; width: max-content; gap: 1rem; animation: marquee 48s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee__item {
  width: clamp(150px, 18vw, 230px);
  aspect-ratio: 4 / 5;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  flex: 0 0 auto;
}
.marquee__item img { width: 100%; height: 100%; object-fit: cover; }
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
[dir="rtl"] .marquee { animation-direction: reverse; }

/* ---------- Bags carousel ---------- */
.rail-wrap { margin-top: clamp(2.5rem, 5vw, 3.5rem); position: relative; }
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(260px, 30%);
  gap: clamp(0.9rem, 1.8vw, 1.4rem);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 1rem;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail__card { scroll-snap-align: start; }
.rail__media {
  aspect-ratio: 1 / 1;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.rail__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.rail__card:hover .rail__media img { transform: scale(1.05); }
.rail__name { font-family: var(--serif); font-size: 1.25rem; margin-top: 0.9rem; }
.rail__meta { color: var(--gold); font-size: 0.8rem; letter-spacing: 0.05em; margin-top: 0.15rem; }

.rail-nav { display: flex; gap: 0.6rem; }
.rail-btn {
  width: 3rem; height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--bone);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.rail-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.rail-btn svg { width: 1.3rem; height: 1.3rem; }
[dir="rtl"] .rail-btn svg { transform: scaleX(-1); }

/* ---------- Heritage split ---------- */
.heritage__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.heritage__media {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.heritage__media img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r); border: 1px solid var(--line); }
.heritage__media .tall { grid-row: span 2; aspect-ratio: 3 / 5; }
.heritage__media .short { aspect-ratio: 4 / 3; }
.quote {
  margin-block: 1.6rem;
  padding-inline-start: 1.4rem;
  border-inline-start: 2px solid var(--gold);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  font-style: italic;
  line-height: 1.4;
  color: var(--bone);
}

/* ---------- Visit / contact ---------- */
.visit__grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
}
.visit__panel { display: flex; flex-direction: column; justify-content: center; }
.info-list { margin-top: 2rem; display: grid; gap: 1.5rem; }
.info {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.1rem;
  align-items: start;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}
.info:last-child { border-bottom: none; padding-bottom: 0; }
.info__icon {
  width: 2.8rem; height: 2.8rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--gold);
  flex: none;
}
.info__icon svg { width: 1.25rem; height: 1.25rem; }
.info__label { display: block; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone-faint); }
.info__value { display: block; font-size: 1.02rem; margin-top: 0.3rem; color: var(--bone); line-height: 1.5; }
.info__value a:hover { color: var(--gold-bright); }
.visit__actions { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.8rem; }
.map-frame {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line-strong);
  min-height: 420px;
  box-shadow: var(--shadow);
}
.map-frame iframe { width: 100%; height: 100%; min-height: 420px; border: 0; filter: var(--map-filter); }

/* ---------- Contact form ---------- */
.form { margin-top: 2rem; display: grid; gap: 1.2rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bone-dim); }
.field input, .field textarea {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  color: var(--bone);
  padding: 0.9rem 1rem;
  font: inherit;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--bone-faint); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: var(--surface-2); }
.field textarea { resize: vertical; min-height: 140px; }
.form__note { font-size: 0.82rem; color: var(--bone-faint); }

/* ---------- Pillars (about) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
}
.pillar {
  padding-inline: clamp(1.2rem, 2.4vw, 2.4rem);
  border-inline-start: 1px solid var(--line);
}
.pillar:first-child { border-inline-start: none; padding-inline-start: 0; }
.pillar:last-child { padding-inline-end: 0; }
.pillar__icon {
  width: 3rem; height: 3rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.pillar__icon svg { width: 1.4rem; height: 1.4rem; }
.pillar h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); }
.pillar p { color: var(--bone-dim); margin-top: 0.7rem; line-height: 1.75; }

/* ---------- Closing CTA ---------- */
.cta-band { text-align: center; }
.cta-band__inner { max-width: 44rem; margin-inline: auto; }
.cta-band .h2 { margin-top: 1rem; }
.cta-band p { margin-top: 1rem; }
.cta-row { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }

/* form status */
.form__status { font-size: 0.9rem; color: var(--gold-bright); min-height: 1.2em; }

/* ---------- Page hero (about/contact) ---------- */
.page-hero {
  position: relative;
  z-index: 1;
  padding-top: clamp(9rem, 18vh, 12rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}
.page-hero__inner { max-width: 52rem; }
.page-hero__title { margin-top: 1.1rem; font-size: clamp(2.6rem, 6vw, 4.4rem); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  background: var(--ink-soft);
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}
.footer__brand .brand__name { font-size: 1.4rem; }
.footer__desc { margin-top: 1.1rem; color: var(--bone-dim); max-width: 34ch; line-height: 1.7; }
.footer__col h4 { font-family: var(--sans); font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--bone-faint); font-weight: 600; }
.footer__col ul { margin-top: 1.2rem; display: grid; gap: 0.7rem; }
.footer__col a, .footer__col li { color: var(--bone-dim); font-size: 0.92rem; transition: color 0.3s var(--ease); }
.footer__col a:hover { color: var(--gold-bright); }
.socials { display: flex; gap: 0.6rem; margin-top: 1.6rem; }
.socials a {
  width: 2.6rem; height: 2.6rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  color: var(--bone);
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), transform 0.3s var(--ease);
}
.socials a:hover { border-color: var(--gold); color: var(--gold-bright); transform: translateY(-2px); }
.socials svg { width: 1.2rem; height: 1.2rem; }
.footer__bottom {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--bone-faint);
  font-size: 0.82rem;
}
.footer__bottom a { color: var(--gold); }

/* ---------- Lightbox ---------- */
.lightbox {
  /* always-dark viewer: keep controls light in either theme */
  --bone: #f3ead9;
  --bone-dim: rgba(243, 234, 217, 0.64);
  --line-strong: rgba(243, 234, 217, 0.22);
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(8, 6, 4, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: clamp(1rem, 4vw, 3rem);
}
.lightbox.is-open { display: flex; }
.lightbox__img {
  max-width: min(92vw, 1000px);
  max-height: 86vh;
  border-radius: var(--r);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  object-fit: contain;
  animation: lbin 0.4s var(--ease);
}
@keyframes lbin { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.lb-btn {
  position: absolute;
  width: 3.2rem; height: 3.2rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(15,12,10,0.5);
  color: var(--bone);
  display: grid; place-items: center;
  transition: border-color 0.3s var(--ease), color 0.3s var(--ease), background 0.3s var(--ease);
}
.lb-btn:hover { border-color: var(--gold); color: var(--gold-bright); background: rgba(15,12,10,0.8); }
.lb-btn svg { width: 1.5rem; height: 1.5rem; }
.lb-close { inset-block-start: clamp(1rem, 3vw, 2rem); inset-inline-end: clamp(1rem, 3vw, 2rem); }
.lb-prev { inset-inline-start: clamp(0.6rem, 3vw, 2rem); }
.lb-next { inset-inline-end: clamp(0.6rem, 3vw, 2rem); }
[dir="rtl"] .lb-prev svg, [dir="rtl"] .lb-next svg { transform: scaleX(-1); }
.lb-count {
  position: absolute;
  inset-block-end: clamp(1rem, 3vw, 2rem);
  inset-inline-start: 50%;
  transform: translateX(-50%);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  color: var(--bone-dim);
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }

/* Hero load animation */
.hero .anim { opacity: 0; transform: translateY(24px); }
.hero.is-ready .anim { animation: rise 1s var(--ease) forwards; }
.hero.is-ready .anim[data-delay="1"] { animation-delay: 0.1s; }
.hero.is-ready .anim[data-delay="2"] { animation-delay: 0.22s; }
.hero.is-ready .anim[data-delay="3"] { animation-delay: 0.34s; }
.hero.is-ready .anim[data-delay="4"] { animation-delay: 0.46s; }
.hero.is-ready .anim[data-delay="5"] { animation-delay: 0.58s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__figure { max-width: 30rem; }
  .heritage__grid, .visit__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .gallery { columns: 3 200px; }
}

@media (max-width: 768px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .lang { display: none; }
  .hero { min-height: auto; }
  .cats { grid-template-columns: 1fr; }
  .cat--feature { grid-row: span 1; }
  .heritage__media .tall { aspect-ratio: 4 / 3; grid-row: span 1; }
  .gallery { columns: 2 140px; }
  .form__row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero__meta dt { font-size: 1.4rem; }
  .pillars { grid-template-columns: 1fr; }
  .pillar { padding-inline: 0; padding-top: 1.6rem; margin-top: 1.6rem; border-inline-start: none; border-top: 1px solid var(--line); }
  .pillar:first-child { padding-top: 0; margin-top: 0; border-top: none; }
}

@media (max-width: 480px) {
  .gallery { columns: 2 120px; }
  .hero__title { font-size: clamp(2.4rem, 12vw, 3rem); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .hero__figure img { animation: none; }
  .marquee { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .hero .anim { opacity: 1; transform: none; }
}

/* ---------- RTL fine-tuning (fonts are set per-page in <head>) ---------- */
[dir="rtl"] .eyebrow { letter-spacing: 0; }
[dir="rtl"] .ico-arrow { transform: scaleX(-1); }
[dir="rtl"] .brand__sub,
[dir="rtl"] .nav__link,
[dir="rtl"] .info__label,
[dir="rtl"] .footer__col h4 { letter-spacing: 0.04em; }
[dir="rtl"] .hero__meta dd { letter-spacing: 0; }
