/* SIARE landing — gallery wall
   One memorable thing: the SIARE wordmark. Everything else stays quiet. */

:root {
  --wall: #0b0b0a;
  --wall-lit: #1a1916;
  --mat: #1b1a17;
  --bone: #ece6d8;
  --muted: #d3ccbc;
  --gold: #c8a96b;
  --gold-line: rgba(200, 169, 107, 0.42);
  --display: "Cormorant Garamond", "Noto Naskh Arabic", "Times New Roman", serif;
  --ui: "Jost", "Noto Sans Arabic", "Helvetica Neue", Arial, sans-serif;
  --pad: clamp(20px, 4.2vw, 68px);
}

* { box-sizing: border-box; }

html { background: var(--wall); color-scheme: dark; scroll-behavior: smooth; }

body.gallery-page {
  margin: 0;
  min-height: 100vh;
  color: var(--bone);
  font-family: var(--ui);
  font-weight: 300;
  line-height: 1.6;
  background: transparent;
  overflow-x: hidden;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.5);
}
/* the whole page sits on the showroom photograph; a soft veil keeps text readable */
body.gallery-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(11, 11, 10, 0.34) 0%, rgba(11, 11, 10, 0.14) 36%, rgba(11, 11, 10, 0.26) 68%, rgba(11, 11, 10, 0.58) 100%),
    url("images/siare-home-bg.webp") 62% center / cover no-repeat,
    var(--wall);
}

.gallery-page a { color: inherit; }

/* ---------- top bar: language only ---------- */
.g-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 30;
  display: flex;
  justify-content: flex-end;
  padding: clamp(14px, 2vw, 28px) var(--pad);
}
.g-lang { position: relative; }
.g-lang-current {
  font: 400 13px/1 var(--ui);
  letter-spacing: 0.08em;
  color: var(--bone);
  background: rgba(11, 11, 10, 0.55);
  border: 1px solid var(--gold-line);
  padding: 0.65rem 0.95rem;
  cursor: pointer;
  border-radius: 2px;
  transition: border-color 0.25s;
}
.g-lang-current:hover, .g-lang-current[aria-expanded="true"] { border-color: var(--gold); }
.g-lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  background: #151412;
  border: 1px solid var(--gold-line);
  border-radius: 2px;
  padding: 4px;
}
.g-lang-menu[hidden] { display: none; }
.g-lang-menu button {
  display: block;
  width: 100%;
  text-align: start;
  font: 300 15px/1.2 var(--ui);
  color: var(--bone);
  background: none;
  border: 0;
  padding: 0.7rem 0.85rem;
  cursor: pointer;
}
.g-lang-menu button:hover, .g-lang-menu button[aria-current="true"] { background: rgba(200, 169, 107, 0.14); }

/* ---------- hero: the wordmark ---------- */
.g-hero {
  padding: clamp(78px, 9vw, 132px) var(--pad) 0;
}
.g-wordmark {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(4.5rem, 25vw, 36rem);
  line-height: 0.8;
  letter-spacing: 0.035em;
  text-align: center;
  white-space: nowrap;
  color: var(--bone);
  padding-inline-start: 0.035em; /* optical centering for the trailing tracking */
  animation: g-wordmark-in 1.7s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s both;
}
@keyframes g-wordmark-in {
  from { opacity: 0; letter-spacing: 0.14em; }
  to   { opacity: 1; letter-spacing: 0.035em; }
}

.g-hero-row {
  margin-top: clamp(1.4rem, 2.8vw, 2.4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.5rem, 2.8vw, 2.4rem);
  text-align: center;
}
.g-tagline {
  margin: 0;
  max-width: 30ch;
  font-family: var(--ui);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1.4rem, 2.5vw, 2.3rem);
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: #ffffff;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.55);
  text-wrap: balance;
}
html[lang="ar"] .g-tagline { line-height: 1.6; }

.g-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(0.8rem, 1.4vw, 1.3rem); }
.g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(66px, 5.6vw, 82px);
  min-width: clamp(250px, 23vw, 340px);
  padding: 1.2rem 2.8rem;
  font: 500 clamp(18px, 1.5vw, 22px)/1.2 var(--ui);
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: none;
  border: 1px solid var(--gold);
  border-radius: 2px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.4);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, transform 0.3s;
}
.g-btn:hover { transform: translateY(-2px); }
.g-btn-primary { background: var(--gold); color: #0b0b0a !important; }
.g-btn-primary:hover { background: #dcc182; border-color: #dcc182; }
.g-btn-ghost { background: rgba(11, 11, 10, 0.4); color: var(--bone); border-color: rgba(236, 230, 216, 0.7); }
.g-btn-ghost:hover { border-color: var(--bone); background: rgba(11, 11, 10, 0.62); }
.g-btn-light { background: var(--bone); color: #0b0b0a !important; border-color: var(--bone); }
.g-btn-light:hover { background: #ffffff; border-color: #ffffff; }
html[lang="ar"] .g-btn, html[lang="ar"] .g-plaque-code { letter-spacing: 0; }

/* ---------- the wall ---------- */
.g-gallery { margin-top: clamp(3rem, 7vw, 7rem); }
.g-hint {
  margin: 0 auto clamp(1.2rem, 2.2vw, 2rem);
  max-width: calc(1080px + 2 * var(--pad));
  padding: 0 var(--pad);
  font-size: 14px;
  color: var(--muted);
}

.g-wall {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 44px) clamp(16px, 2.2vw, 32px);
  max-width: calc(1080px + 2 * var(--pad));
  margin: 0 auto;
  padding: 0 var(--pad) clamp(60px, 8vw, 120px);
  align-items: start;
}

.g-piece {
  display: block;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  animation: g-hang 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) calc(0.7s + var(--i, 0) * 0.1s) forwards;
}
@keyframes g-hang { from { opacity: 0; } to { opacity: 1; } }

.g-frame {
  display: block;
  padding: clamp(6px, 0.85vw, 13px);
  background: var(--mat);
  border: 1px solid var(--gold-line);
  aspect-ratio: 4 / 5;
  transition: border-color 0.4s;
}
.g-art {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #e9e5db;
}
.g-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.g-piece:hover .g-frame, .g-piece:focus-visible .g-frame { border-color: var(--gold); }
.g-piece:hover .g-art img { transform: scale(1.035); }
.g-piece:focus-visible { outline: 2px solid var(--gold); outline-offset: 6px; }

.g-piece.is-noimg .g-art { display: grid; place-items: center; background: #14130f; }
.g-piece.is-noimg .g-art::after {
  content: "SIARE";
  font-family: var(--display);
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  letter-spacing: 0.12em;
  color: var(--gold);
}

.g-plaque {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.85rem;
}
.g-plaque-name {
  font-family: var(--ui);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  line-height: 1.3;
  color: var(--bone);
}
.g-plaque-code {
  flex: none;
  font: 300 12.5px/1 var(--ui);
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* skeleton frames while the collection loads */
.g-piece.is-skeleton { animation: none; opacity: 1; pointer-events: none; }
.g-piece.is-skeleton .g-frame { border-color: rgba(200, 169, 107, 0.18); animation: g-pulse 2.4s ease-in-out infinite; }
.g-piece.is-skeleton .g-plaque { height: 1.2rem; }
@keyframes g-pulse { 0%, 100% { background: var(--mat); } 50% { background: #23211d; } }


/* tablet and phone: two equal columns */
@media (max-width: 899px) {
  .g-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 720px; }
  .g-plaque { flex-direction: column; gap: 0.25rem; }
}

@media (max-width: 720px) {
  .g-actions { flex-direction: column; align-items: stretch; width: 100%; }
  .g-btn { width: 100%; min-width: 0; }
}
/* ---------- closing ---------- */
.g-closing {
  padding: 0 var(--pad) clamp(70px, 9vw, 130px);
  text-align: center;
}
.g-about {
  margin: 0 auto 2rem;
  max-width: 46ch;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--muted);
  text-wrap: balance;
}
.g-closing .g-actions { justify-content: center; }

/* ---------- footer links (also gives search engines clear paths) ---------- */
.g-foot {
  padding: 1.6rem var(--pad) 2.4rem;
  border-top: 1px solid rgba(200, 169, 107, 0.2);
}
.g-foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 1.8rem; }
.g-foot a, .g-foot button {
  font: 300 14px/1.4 var(--ui);
  color: var(--muted);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0.3rem 0;
  cursor: pointer;
  transition: color 0.25s;
}
.g-foot a:hover, .g-foot button:hover { color: var(--bone); }

.g-skip {
  position: absolute; inset-inline-start: -999px; top: 8px; z-index: 50;
  background: var(--gold); color: #0b0b0a; padding: 0.6rem 1rem;
}
.g-skip:focus { inset-inline-start: 8px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .g-wordmark, .g-piece { animation: none; opacity: 1; }
  .g-piece.is-skeleton .g-frame { animation: none; }
  .g-art img, .g-frame, .g-btn { transition: none; }
}
