/* ============================================================
   ALMARRI BOAT — The Dawn Souq
   ice-white tile · sea-green stall steel · blue enamel · gold pinstripe
   ============================================================ */

:root {
  --ice: #f2f5f1;
  --ice-raised: #fbfcfa;
  --grout: rgba(13, 90, 82, 0.07);
  --green: #0d5a52;
  --green-deep: #083f39;
  --green-tint: #cfe4dd;
  --blue: #15489c;
  --blue-deep: #0d3271;
  --gold: #b9862f;
  --gold-bright: #d8ab55;
  --night: #071119;
  --slate: #26323a;
  --chalk: #f5f1e4;
  --ink: #17272b;
  --ink-soft: #46605c;
  --enamel-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  --chalk-dust: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.55' numOctaves='3' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 0.94 0 0 0 0.16 0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='discrete' tableValues='0 0 0 0.5 0.9'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23c)'/%3E%3C/svg%3E");
  --ar: "Aref Ruqaa", serif;
  --en: "Anton", sans-serif;
  --body: "Readex Pro", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  font-weight: 400;
  color: var(--ink);
  background-color: var(--ice);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
figure { margin: 0; }

a { color: var(--blue); }

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

/* ---------- bilingual signboard headings ---------- */

.bi-head { margin: 0; }
.bi-head .bi-ar {
  display: block;
  font-family: var(--ar);
  font-weight: 700;
  line-height: 1.35;
}
.bi-head .bi-en {
  display: block;
  font-family: var(--en);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1.1;
}

/* ============================================================
   NAV — white enamel plate with gold rule
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.65rem clamp(1rem, 4vw, 2.5rem);
  background: var(--ice-raised);
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 1px 0 var(--gold-bright), 0 6px 18px -12px rgba(7, 17, 25, 0.35);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.nav-brand img { border-radius: 50%; }
.nav-wordmark { display: flex; flex-direction: column; line-height: 1.15; }
.nav-name-en {
  font-family: var(--en);
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  color: var(--blue);
}
.nav-name-ar {
  font-family: var(--ar);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--gold);
}

.nav-links {
  display: flex;
  gap: clamp(0.9rem, 2.5vw, 1.8rem);
  margin-inline-start: auto;
}
.nav-links a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding-block: 0.2rem;
  background: linear-gradient(var(--gold), var(--gold)) no-repeat left bottom / 0% 2px;
  transition: background-size 0.25s ease-out;
}
[dir="rtl"] .nav-links a { background-position: right bottom; }
.nav-links a:hover { background-size: 100% 2px; }

.nav-actions { display: flex; align-items: center; gap: 0.8rem; }

.lang-toggle {
  font-family: var(--body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--blue);
  background: none;
  border: 1.5px solid var(--blue);
  border-radius: 3px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
  transition: background-color 0.2s ease-out, color 0.2s ease-out;
}
.lang-toggle:hover { background: var(--blue); color: #fff; }

/* ---------- WhatsApp plates ---------- */

.wa-plate {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--green);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18), 0 2px 8px -3px rgba(8, 63, 57, 0.6);
  transition: background-color 0.2s ease-out, transform 0.2s ease-out;
}
.wa-plate:hover { background: var(--green-deep); transform: translateY(-1px); }
.wa-plate-lg { font-size: 1.1rem; padding: 0.85rem 1.6rem; }

/* ============================================================
   HERO — before first light
   ============================================================ */

.hero {
  position: relative;
  min-height: min(92vh, 60rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--night);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(7, 17, 25, 0.55) 0%, rgba(7, 17, 25, 0.15) 45%, rgba(7, 17, 25, 0.72) 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(1.2rem, 5vw, 4rem);
  padding-bottom: clamp(3rem, 8vh, 5.5rem);
  max-width: 52rem;
}

.hero-head .bi-ar {
  font-size: clamp(2.7rem, 7.5vw, 5.6rem);
  color: #fff;
  text-shadow: 0 2px 24px rgba(7, 17, 25, 0.8);
}
.hero-head .bi-en {
  font-size: clamp(1.5rem, 3.6vw, 2.7rem);
  color: var(--gold-bright);
  margin-top: 0.3rem;
}

.hero-sub {
  color: #dbe6e3;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  font-weight: 300;
  max-width: 34rem;
  margin: 1.1rem 0 1.8rem;
}

.hero-cta { display: flex; align-items: center; gap: 1.6rem; flex-wrap: wrap; }

.hero-down {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.98rem;
  border-bottom: 1.5px solid var(--gold-bright);
  padding-bottom: 0.15rem;
  transition: color 0.2s ease-out;
}
.hero-down:hover { color: var(--gold-bright); }

/* the dawn horizon — the page's authored moment */
.dawn-line {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 5px;
  z-index: 2;
  background: linear-gradient(90deg, transparent, var(--gold-bright) 18%, #f4d9a0 50%, var(--gold-bright) 82%, transparent);
  opacity: 0.55;
  box-shadow: 0 0 18px 2px rgba(216, 171, 85, 0.35);
}

/* ============================================================
   PAINTED STRIP — blue enamel, gold pinstripes
   ============================================================ */

.strip {
  background: var(--blue);
  background-image: var(--enamel-noise);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  box-shadow: inset 0 6px 0 -5px var(--gold-bright), inset 0 -6px 0 -5px var(--gold-bright);
  padding: 0.85rem 1rem;
  overflow: hidden;
}

.strip-line {
  margin: 0;
  text-align: center;
  color: #fff;
  line-height: 2;
  font-size: clamp(0.85rem, 1.6vw, 1.05rem);
}
.strip-line span[lang="ar"] { font-family: var(--ar); font-weight: 700; }
.strip-line span:not([lang]) { font-family: var(--en); letter-spacing: 0.14em; font-size: 0.9em; }
.strip-dot { color: var(--gold-bright); margin: 0 0.55em; }

/* ============================================================
   SECTIONS — shared
   ============================================================ */

.section-head { text-align: center; }
.section-head .bi-ar { font-size: clamp(2rem, 4.5vw, 3.2rem); color: var(--blue); }
.section-head .bi-en { font-size: clamp(1.15rem, 2.4vw, 1.7rem); color: var(--green); margin-top: 0.2rem; }
.section-head-light .bi-ar { color: #fff; }
.section-head-light .bi-en { color: var(--gold-bright); }

/* ============================================================
   THE STALLS
   ============================================================ */

/* the market floor: straight-laid tile, grout confined to the hall sections */
.stalls, .made {
  background-image:
    linear-gradient(var(--grout) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grout) 1.5px, transparent 1.5px);
  background-size: 9rem 9rem;
}

.stalls { padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem); }
.stalls-inner { max-width: 82rem; margin-inline: auto; }

.stall-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1.2rem, 3vw, 2.2rem);
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

.stall {
  background: var(--ice-raised);
  border: 5px solid var(--green);
  border-radius: 4px;
  box-shadow: 0 14px 30px -18px rgba(8, 63, 57, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
/* hung on the stall frame, settling straight — only when JS can settle them */
.js .stall { transform: rotate(0.5deg); }
.js .stall:nth-child(3) { transform: rotate(-0.5deg); }
.js .stall.hung, .js .stall:nth-child(3).hung { transform: rotate(0); }

.stall-main {
  grid-column: 1 / -1;
  flex-direction: row;
}
.stall-main .stall-photo { flex: 1.25; min-height: 26rem; }
.stall-main .stall-board { flex: 1; }

.stall-photo { position: relative; overflow: hidden; }
.stall-photo img { width: 100%; height: 100%; object-fit: cover; }
.stall .stall-photo { aspect-ratio: 4 / 3; }
.stall-main .stall-photo { aspect-ratio: auto; }
.stall-main .stall-photo img { position: absolute; inset: 0; }
.stall-main .chalk-plate { margin-top: 0.4rem; }

.stall-board {
  padding: clamp(1.3rem, 2.5vw, 2.2rem);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.9rem;
  border-top: 3px solid var(--gold);
}
.stall-main .stall-board { border-top: none; justify-content: center; }

.stall-title .bi-ar { font-size: clamp(1.5rem, 2.6vw, 2.1rem); color: var(--blue); }
.stall-title .bi-en { font-size: clamp(1rem, 1.7vw, 1.25rem); color: var(--green); margin-top: 0.1rem; }

.stall-board p { margin: 0; color: var(--ink-soft); max-width: 42ch; }

/* chalk plates — where the souq writes the price */
.chalk-plate {
  margin-top: auto;
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  background: var(--slate);
  background-image: var(--chalk-dust), var(--enamel-noise);
  color: var(--chalk);
  text-decoration: none;
  padding: 0.75rem 1.25rem;
  border-radius: 3px;
  border: 1.5px dashed rgba(245, 241, 228, 0.4);
  box-shadow: 0 3px 10px -4px rgba(7, 17, 25, 0.6);
  transition: transform 0.25s ease-out, border-color 0.25s ease-out;
}
.chalk-plate:hover { transform: rotate(-1deg) scale(1.02); border-color: rgba(245, 241, 228, 0.8); }
.chalk-ar {
  font-family: var(--ar);
  font-weight: 700;
  font-size: 1.15rem;
  text-shadow: 0 0 1px rgba(245, 241, 228, 0.55), 0.5px 0.5px 0 rgba(245, 241, 228, 0.18);
}
.chalk-en {
  font-size: 0.88rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: #e9e2cf;
  text-shadow: 0 0 1px rgba(245, 241, 228, 0.4);
}

/* ============================================================
   MADE HERE — the workshop walk
   ============================================================ */

.made { padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem); }
.made-inner { max-width: 76rem; margin-inline: auto; }

.made-lede {
  text-align: center;
  color: var(--ink-soft);
  max-width: 46rem;
  margin: 1.2rem auto clamp(2.5rem, 6vw, 4.5rem);
  font-size: clamp(1rem, 1.8vw, 1.15rem);
}

.station {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.station:last-child { margin-bottom: 0; }
.station-flip .station-photo { order: 2; }
.station-flip .station-board { order: 1; }

.station-photo {
  border: 5px solid var(--green);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 16px 34px -20px rgba(8, 63, 57, 0.55);
}
.station-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }

.station-title .bi-ar { font-size: clamp(1.7rem, 3vw, 2.4rem); color: var(--blue); }
.station-title .bi-en { font-size: clamp(1.05rem, 1.9vw, 1.4rem); color: var(--green); margin-top: 0.1rem; }

.station-board p {
  margin: 0.8rem 0 0;
  color: var(--ink-soft);
  max-width: 46ch;
  font-size: clamp(0.98rem, 1.7vw, 1.08rem);
}

/* ============================================================
   THE FLOOR — gallery on painted steel
   ============================================================ */

.floor {
  background: var(--green-deep);
  background-image: var(--enamel-noise);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem);
}

.floor-lede {
  text-align: center;
  color: var(--green-tint);
  max-width: 44rem;
  margin: 1.2rem auto clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
}

.floor-grid {
  columns: 3 18rem;
  column-gap: 1.2rem;
  max-width: 76rem;
  margin-inline: auto;
}

.tile {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  background: var(--ice-raised);
  border: 4px solid var(--ice-raised);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 0 10px 24px -14px rgba(4, 24, 21, 0.8);
}
.tile img, .tile video { width: 100%; border-radius: 1px; }

.tile-video figcaption {
  font-size: 0.85rem;
  color: var(--ink-soft);
  padding: 0.5rem 0.6rem;
}

/* ============================================================
   COME TALK — the closing signboard
   ============================================================ */

.talk { padding: clamp(3.5rem, 9vw, 7rem) clamp(1rem, 4vw, 3rem); }

.talk-board {
  max-width: 56rem;
  margin-inline: auto;
  background: var(--blue);
  background-image: var(--enamel-noise);
  border: 4px solid var(--gold);
  border-radius: 6px;
  box-shadow: inset 0 0 0 3px var(--blue), inset 0 0 0 4.5px var(--gold-bright), 0 24px 48px -24px rgba(13, 50, 113, 0.6);
  padding: clamp(2.2rem, 6vw, 4.5rem) clamp(1.3rem, 5vw, 4rem);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.4rem;
}

.talk-head .bi-ar { font-size: clamp(2.4rem, 5.5vw, 4rem); color: #fff; }
.talk-head .bi-en { font-size: clamp(1.3rem, 2.8vw, 2rem); color: var(--gold-bright); margin-top: 0.2rem; }

.talk-sub { margin: 0; color: #d5e0f2; font-weight: 300; max-width: 38rem; }

.talk-facts { color: #bccdea; font-size: 0.95rem; }
.talk-facts p { margin: 0.3rem 0; }
.talk-facts .ph { color: #fff; text-decoration-color: var(--gold-bright); }

/* ============================================================
   FOOTER — night ledger
   ============================================================ */

.footer {
  background: var(--night);
  color: #9fb3ad;
  text-align: center;
  padding: 2.5rem 1rem 2.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.footer img { border-radius: 50%; opacity: 0.9; }
.footer-name { margin: 0.3rem 0 0; color: #fff; }
.footer-name span:first-child { font-family: var(--en); letter-spacing: 0.12em; font-size: 0.95rem; }
.footer-name span[lang="ar"] { font-family: var(--ar); font-weight: 700; color: var(--gold-bright); margin-inline-start: 0.5rem; }
.footer-line { margin: 0; font-size: 0.9rem; font-weight: 300; max-width: 34rem; }
.footer-copy { margin: 0.6rem 0 0; font-size: 0.8rem; color: #64766f; }

/* ============================================================
   RTL
   ============================================================ */

[dir="rtl"] .strip-line span:not([lang]) { letter-spacing: 0.08em; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 60rem) {
  .stall-main { flex-direction: column; }
  .stall-main .stall-photo { min-height: 0; aspect-ratio: 16 / 10; }
  .stall-main .stall-board { border-inline-start: none; border-top: 3px solid var(--gold); }
  .station, .station-flip { grid-template-columns: 1fr; gap: 1.2rem; }
  .station-flip .station-photo { order: 1; }
  .station-flip .station-board { order: 2; }
}

@media (max-width: 46rem) {
  .nav { flex-wrap: wrap; row-gap: 0.45rem; padding-block: 0.5rem; gap: 0.6rem; }
  .nav-brand img { width: 56px; height: 56px; }
  .nav-name-en { font-size: 0.9rem; }
  .nav-name-ar { font-size: 0.75rem; }
  .nav-links { order: 3; margin-inline-start: 0; width: 100%; justify-content: space-between; gap: 0.4rem; }
  .nav-links a { font-size: 0.88rem; }
  .nav-actions { margin-inline-start: auto; gap: 0.5rem; }
  .nav-wa span { display: none; }
  .wa-plate.nav-wa { padding: 0.45rem 0.55rem; }
  .lang-toggle { padding: 0.3rem 0.6rem; font-size: 0.85rem; }
  .stall-row { grid-template-columns: 1fr; }
  .hero { min-height: 88vh; }
  .hero-cta { gap: 1rem; }
}

/* ============================================================
   MOTION
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .stall, .js .stall:nth-child(3) { transform: none; transition: none; }
  .wa-plate, .chalk-plate { transition: none; }
  .dawn-line { transition: none; }
}

/* the dawn light falls onto the first stretch of the market floor */
.stalls {
  background-image:
    linear-gradient(to bottom, rgba(216, 171, 85, 0.07), transparent 22rem),
    linear-gradient(var(--grout) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--grout) 1.5px, transparent 1.5px);
  background-size: 100% 100%, 9rem 9rem, 9rem 9rem;
}
