/* ==========================================================================
   Hasna & Hassania — styles.css
   Vanilla CSS, custom properties, editorial layout.
   ========================================================================== */

:root {
  --c-bg:        #f4ebd9;
  --c-bg-alt:    #ece0c7;
  --c-ink:       #2a2420;
  --c-ink-soft:  #5a4e44;
  --c-accent:    #b5482a;
  --c-accent-2:  #d4a24c;
  --c-accent-3:  #6b8a9a;
  --c-accent-4:  #7a8465;
  --c-hairline:  #c9b896;
  --c-shadow:    rgba(74, 50, 30, 0.08);
  --c-overlay:   rgba(42, 36, 32, 0.78);

  --f-serif:  'Cormorant Garamond', 'Times New Roman', serif;
  --f-sans:   'DM Sans', system-ui, -apple-system, sans-serif;
  --f-arabic: 'Noto Naskh Arabic', 'Amiri', serif;

  --header-h:  76px;
  --max-w:     1240px;
  --narrow-w:  780px;

  --ease-out:   cubic-bezier(0.2, 0.6, 0.2, 1);
  --dur:        600ms;
  --dur-hover:  800ms;
}

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

html, body {
  margin: 0;
  padding: 0;
  background: var(--c-bg);
  color: var(--c-ink);
}

html { scroll-behavior: smooth; }

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

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--ease-out);
}

a:hover { color: var(--c-accent); }

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

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

/* Arabic typography */
html[dir="rtl"] body {
  font-family: var(--f-arabic);
  text-align: right;
}

html[dir="rtl"] .hero-paragraph,
html[dir="rtl"] .about-body,
html[dir="rtl"] .work-intro,
html[dir="rtl"] .section-intro {
  font-family: var(--f-arabic);
}

/* =========================================================
   Containers
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container-narrow {
  max-width: var(--narrow-w);
}

.hairline {
  border: 0;
  border-top: 1px solid var(--c-hairline);
  margin: 0;
  width: 100%;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 50;
  transition: background-color 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}

.site-header.is-scrolled {
  background: rgba(244, 235, 217, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 0 var(--c-hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--header-h);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1440px;
  margin-inline: auto;
  color: var(--c-bg);
}

.site-header.is-scrolled .header-inner {
  color: var(--c-ink);
}

html[dir="rtl"] .header-inner { flex-direction: row-reverse; }

.wordmark {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
  color: inherit;
  white-space: nowrap;
}

.wordmark .amp {
  color: var(--c-accent-2);
  font-style: italic;
  margin: 0 0.1em;
}

.site-nav {
  display: flex;
  gap: clamp(1.25rem, 2.8vw, 2.5rem);
  font-family: var(--f-sans);
  font-size: 0.88rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-nav a { color: inherit; }

html[dir="rtl"] .site-nav {
  flex-direction: row-reverse;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--f-sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: inherit;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  transition: background-color 400ms var(--ease-out), backdrop-filter 400ms var(--ease-out);
}

/* Over the hero image (header not yet scrolled): glass pill for readability */
.site-header:not(.is-scrolled) .lang-switcher {
  background: rgba(42, 36, 32, 0.38);
  backdrop-filter: blur(10px) saturate(120%);
  -webkit-backdrop-filter: blur(10px) saturate(120%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* After scroll, header has its own background — remove the pill */
.site-header.is-scrolled .lang-switcher {
  background: transparent;
  border: 1px solid transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.lang-btn {
  color: inherit;
  opacity: 0.82;
  transition: opacity 200ms var(--ease-out), color 200ms var(--ease-out);
  padding: 0.2rem 0.15rem;
}

.lang-btn:hover { opacity: 1; }

.lang-btn.is-active {
  opacity: 1;
  color: var(--c-accent-2);
  font-weight: 600;
}

.site-header.is-scrolled .lang-btn.is-active {
  color: var(--c-accent);
}

.lang-sep { opacity: 0.5; }

/* Arabic button uses Arabic font */
.lang-btn[data-lang="ar"] {
  font-family: var(--f-arabic);
  font-size: 1rem;
  line-height: 1;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  width: 32px;
  height: 32px;
  position: relative;
  color: inherit;
}

.nav-toggle span {
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: currentColor;
  transition: transform 300ms var(--ease-out), opacity 200ms;
}

.nav-toggle span:nth-child(1) { top: 10px; }
.nav-toggle span:nth-child(2) { top: 16px; }
.nav-toggle span:nth-child(3) { top: 22px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: var(--c-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  font-family: var(--f-serif);
  font-size: 1.75rem;
  color: var(--c-ink);
  text-align: center;
}

.mobile-lang {
  font-size: 0.9rem;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  color: var(--c-bg);
}

.hero-img {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(42, 36, 32, 0.18) 0%,
    rgba(42, 36, 32, 0.05) 35%,
    rgba(42, 36, 32, 0.55) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 0 clamp(1.25rem, 4vw, 2.5rem) clamp(4rem, 10vh, 7rem);
}

.hero-claim {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 22ch;
  margin: 0 0 1.25rem;
  color: var(--c-bg);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

html[dir="rtl"] .hero-claim { font-family: var(--f-arabic); letter-spacing: 0; }

.hero-paragraph {
  font-family: var(--f-sans);
  font-size: clamp(1rem, 1.1vw, 1.1rem);
  line-height: 1.65;
  max-width: 36rem;
  margin: 0;
  color: var(--c-bg);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.3);
}

html[dir="rtl"] .hero-paragraph { font-family: var(--f-arabic); }

.scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: block;
  width: 1px;
  height: 48px;
}

.scroll-cue-line {
  position: absolute;
  inset: 0;
  background: var(--c-bg);
  opacity: 0.6;
  animation: scroll-pulse 2.6s var(--ease-out) infinite;
  transform-origin: top;
}

@keyframes scroll-pulse {
  0%   { transform: scaleY(0); opacity: 0.8; }
  50%  { transform: scaleY(1); opacity: 0.6; }
  100% { transform: scaleY(0) translateY(48px); opacity: 0; }
}

/* =========================================================
   Sections — shared
   ========================================================= */
.section {
  padding-block: clamp(5rem, 10vw, 9rem);
  position: relative;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

html[dir="rtl"] .section-head { flex-direction: row-reverse; }

.section-number {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--c-accent-2);
  letter-spacing: 0.02em;
}

.section-label {
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
}

html[dir="rtl"] .section-label { letter-spacing: 0.08em; }

.section-heading {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--c-ink);
  margin: 0 0 1.25rem;
  max-width: 26ch;
}

html[dir="rtl"] .section-heading { font-family: var(--f-arabic); letter-spacing: 0; }

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--c-ink-soft);
  max-width: 48ch;
  margin: 0 0 2rem;
}

/* =========================================================
   About
   ========================================================= */
.about-grid {
  display: grid;
  grid-template-columns: 40fr 60fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.about-image {
  position: relative;
  overflow: hidden;
}

.about-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 20%;
}

.about-body p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--c-ink-soft);
  margin: 0 0 1.2em;
}

.about-body p:last-child { margin-bottom: 0; }

.about-body p:first-of-type::first-letter {
  font-family: var(--f-serif);
  font-size: 3.4rem;
  line-height: 0.9;
  float: left;
  padding-inline-end: 0.45rem;
  padding-block-start: 0.2rem;
  color: var(--c-accent);
  font-weight: 500;
}

html[dir="rtl"] .about-body p:first-of-type::first-letter {
  float: right;
}

/* =========================================================
   Audio narration player
   ========================================================= */
.audio-narration[hidden] { display: none !important; }

.audio-narration {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.8vw, 1.1rem);
  margin: 0 0 clamp(1.75rem, 3vw, 2.4rem);
  padding: 0.75rem 1rem 0.75rem 0.75rem;
  background: linear-gradient(
    to right,
    rgba(180, 72, 42, 0.05),
    rgba(212, 162, 76, 0.035) 60%,
    transparent
  );
  border-inline-start: 1px solid var(--c-hairline);
}

html[dir="rtl"] .audio-narration {
  background: linear-gradient(
    to left,
    rgba(180, 72, 42, 0.05),
    rgba(212, 162, 76, 0.035) 60%,
    transparent
  );
}

.audio-toggle {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  background: var(--c-bg);
  transition: background-color 260ms var(--ease-out),
              color 260ms var(--ease-out),
              transform 260ms var(--ease-out);
}

.audio-toggle:hover {
  background: var(--c-accent);
  color: var(--c-bg);
  transform: scale(1.03);
}

.audio-toggle .audio-ico {
  width: 18px;
  height: 18px;
  fill: currentColor;
  transition: opacity 160ms var(--ease-out);
}

.audio-toggle .audio-ico-pause { display: none; }

.audio-toggle[aria-pressed="true"] .audio-ico-play  { display: none; }
.audio-toggle[aria-pressed="true"] .audio-ico-pause { display: block; }

.audio-toggle.is-loading .audio-ico {
  opacity: 0.3;
}

.audio-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  line-height: 1.2;
}

.audio-label {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--c-ink-soft);
  letter-spacing: 0.01em;
}

html[dir="rtl"] .audio-label { font-family: var(--f-arabic); font-style: normal; }

.audio-progress {
  position: relative;
  width: 100%;
  height: 2px;
  background: var(--c-hairline);
  overflow: hidden;
}

.audio-progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  inset-inline-start: 0;
  width: 0%;
  background: var(--c-accent);
  transition: width 120ms linear;
}

.audio-time {
  flex-shrink: 0;
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 0.82rem;
  color: var(--c-accent-2);
  letter-spacing: 0.04em;
  min-width: 3.2rem;
  text-align: end;
  font-variant-numeric: tabular-nums;
}

/* Word-level highlighting inside .about-body when narration is active */
.about-body.is-narrating .w {
  color: var(--c-ink-soft);
  opacity: 0.55;
  transition: color 320ms var(--ease-out),
              opacity 320ms var(--ease-out),
              background-color 320ms var(--ease-out);
  padding: 0 0.05em;
  border-radius: 2px;
}

.about-body.is-narrating .w--past {
  opacity: 0.78;
}

.about-body.is-narrating .w--active {
  color: var(--c-ink);
  opacity: 1;
  background: rgba(212, 162, 76, 0.18);
}

/* First-letter drop-cap dims too while narrating */
.about-body.is-narrating p:first-of-type::first-letter {
  opacity: 0.75;
  transition: opacity 320ms var(--ease-out);
}

@media (prefers-reduced-motion: reduce) {
  .about-body.is-narrating .w {
    transition: none;
  }
  .audio-progress-fill {
    transition: none;
  }
}

@media (max-width: 480px) {
  .audio-narration {
    padding: 0.6rem 0.75rem;
    gap: 0.75rem;
  }
  .audio-toggle {
    width: 40px;
    height: 40px;
  }
  .audio-toggle .audio-ico {
    width: 16px;
    height: 16px;
  }
  .audio-label { font-size: 0.86rem; }
  .audio-time  { font-size: 0.78rem; min-width: 2.8rem; }
}

/* =========================================================
   Works — 12-col editorial grid
   ========================================================= */
.works-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
}

.w-span-4  { grid-column: span 4; }
.w-span-5  { grid-column: span 5; }
.w-span-6  { grid-column: span 6; }
.w-span-7  { grid-column: span 7; }
.w-span-12 { grid-column: span 12; }

.w-stack {
  display: grid;
  gap: clamp(1.25rem, 2.5vw, 2.5rem);
  align-content: start;
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.work-click {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--c-bg-alt);
  position: relative;
}

.work-click img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 30%;
  transition: transform var(--dur-hover) var(--ease-out);
}

.w-span-6 .work-click img,
.w-span-12 .work-click img {
  aspect-ratio: 16 / 11;
}

.w-span-7.w-tall .work-click img {
  aspect-ratio: 4 / 5;
  min-height: 100%;
}

.work-card:hover .work-click img {
  transform: scale(1.03);
}

.work-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-inline-start: 0.1rem;
}

.work-no {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--c-accent-2);
  letter-spacing: 0.05em;
}

.work-title {
  font-family: var(--f-serif);
  font-weight: 500;
  font-size: clamp(1.3rem, 1.7vw, 1.55rem);
  line-height: 1.2;
  color: var(--c-ink);
  margin: 0;
  letter-spacing: -0.005em;
}

html[dir="rtl"] .work-title { font-family: var(--f-arabic); letter-spacing: 0; }

.work-intro {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--c-ink-soft);
  margin: 0;
  max-width: 48ch;
  overflow-wrap: break-word;
  hyphens: auto;
}

.work-title {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* =========================================================
   Gallery — masonry via CSS columns
   ========================================================= */
.gallery-masonry {
  column-count: 3;
  column-gap: clamp(1rem, 2vw, 1.75rem);
}

.gal-item {
  break-inside: avoid;
  margin: 0 0 clamp(1rem, 2vw, 1.75rem);
  display: block;
}

.gal-click {
  display: block;
  width: 100%;
  overflow: hidden;
  background: var(--c-bg-alt);
}

.gal-click img {
  width: 100%;
  height: auto;
  transition: transform var(--dur-hover) var(--ease-out);
}

.gal-item:hover .gal-click img {
  transform: scale(1.03);
}

/* =========================================================
   Instagram
   ========================================================= */
.insta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin-block: 2rem;
}

.insta-tile {
  display: block;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--c-bg-alt);
}

.insta-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-hover) var(--ease-out);
}

.insta-tile:hover img {
  transform: scale(1.05);
}

.insta-cta {
  margin-top: 2.5rem;
}

/* =========================================================
   Contact
   ========================================================= */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-block: 2rem;
}

html[dir="rtl"] .cta-row { flex-direction: row-reverse; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 2.1rem;
  font-family: var(--f-sans);
  font-weight: 500;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: background-color 250ms var(--ease-out), color 250ms var(--ease-out), border-color 250ms var(--ease-out), transform 250ms var(--ease-out);
  cursor: pointer;
}

html[dir="rtl"] .btn { font-family: var(--f-arabic); letter-spacing: 0; font-size: 1rem; }

.btn-primary {
  background: var(--c-accent);
  color: var(--c-bg);
  border-color: var(--c-accent);
}

.btn-primary:hover {
  background: var(--c-ink);
  color: var(--c-bg);
  border-color: var(--c-ink);
}

.btn-outline {
  background: transparent;
  color: var(--c-ink);
  border-color: var(--c-ink);
}

.btn-outline:hover {
  background: var(--c-ink);
  color: var(--c-bg);
}

.location-line {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--c-ink-soft);
  margin-top: 2.5rem;
}

html[dir="rtl"] .location-line { font-family: var(--f-arabic); font-style: normal; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  padding-block: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 2rem;
  padding-top: clamp(2rem, 4vw, 3rem);
}

.footer-brand .wordmark-line {
  font-family: var(--f-serif);
  font-size: 1.1rem;
}

.footer-nav {
  display: flex;
  gap: clamp(1rem, 2.5vw, 2rem);
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: var(--c-ink-soft);
}

.footer-lang {
  justify-self: end;
  color: var(--c-ink-soft);
}

html[dir="rtl"] .footer-lang { justify-self: start; }

.footer-copy {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.8rem;
  color: var(--c-ink-soft);
  opacity: 0.75;
  margin: 2rem 0 0;
}

/* =========================================================
   Lightbox
   ========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--c-overlay);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms var(--ease-out);
  padding: 2rem;
}

.lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lb-figure {
  margin: 0;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lb-figure img {
  max-width: 90vw;
  max-height: 82vh;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
}

.lb-figure figcaption {
  color: var(--c-bg);
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.85;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  color: var(--c-bg);
  background: transparent;
  font-size: 2.4rem;
  line-height: 1;
  padding: 0.5rem 0.8rem;
  transition: opacity 200ms, color 200ms;
  opacity: 0.8;
}

.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  opacity: 1;
  color: var(--c-accent-2);
}

.lb-close { top: 1.25rem; inset-inline-end: 1.5rem; font-size: 2.8rem; }
.lb-prev  { inset-inline-start: 1.5rem; top: 50%; transform: translateY(-50%); }
.lb-next  { inset-inline-end: 1.5rem;   top: 50%; transform: translateY(-50%); }

html[dir="rtl"] .lb-prev  { transform: translateY(-50%) scaleX(-1); }
html[dir="rtl"] .lb-next  { transform: translateY(-50%) scaleX(-1); }

/* =========================================================
   Reveal animations
   ========================================================= */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  will-change: opacity, transform;
}

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

/* stagger via inline --reveal-delay or nth-child */
.works-grid .reveal:nth-child(odd)  { transition-delay: 0ms; }
.works-grid .reveal:nth-child(even) { transition-delay: 80ms; }
.insta-grid .reveal:nth-child(1) { transition-delay: 0ms; }
.insta-grid .reveal:nth-child(2) { transition-delay: 80ms; }
.insta-grid .reveal:nth-child(3) { transition-delay: 160ms; }
.insta-grid .reveal:nth-child(4) { transition-delay: 240ms; }
.insta-grid .reveal:nth-child(5) { transition-delay: 320ms; }
.insta-grid .reveal:nth-child(6) { transition-delay: 400ms; }

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

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1024px) {
  .gallery-masonry { column-count: 2; }

  .works-grid { gap: 1.5rem; }

  .w-span-4, .w-span-5, .w-span-6, .w-span-7 { grid-column: span 6; }
  .w-span-12 { grid-column: span 12; }

  .w-stack { grid-column: span 6; }
}

@media (max-width: 768px) {
  .site-nav { display: none; }
  .nav-toggle { display: inline-block; }

  /* Compact glass pill for lang-switcher on mobile header */
  .site-header:not(.is-scrolled) .lang-switcher {
    padding: 0.35rem 0.7rem;
    font-size: 0.78rem;
    gap: 0.25rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  /* Portrait image on mobile: keep portrait ratio (don't crop head), limit height */
  .about-image { max-width: 420px; margin-inline: auto; }
  .about-image img {
    aspect-ratio: 4 / 5;
    object-position: center 18%;
  }

  .works-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }

  .w-span-4, .w-span-5, .w-span-6, .w-span-7, .w-span-12 { grid-column: span 6; }
  .w-stack { grid-column: span 6; }

  .w-span-6 .work-click img,
  .w-span-12 .work-click img {
    aspect-ratio: 4 / 5;
  }

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

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.5rem;
  }

  .footer-nav { justify-content: center; }
  .footer-lang { justify-self: center; }

  .cta-row { flex-direction: column; }
  .btn { width: 100%; }

  .lb-close { top: 0.5rem; inset-inline-end: 0.5rem; }
  .lb-prev, .lb-next { font-size: 2rem; }

  /* Tighter section padding on mobile */
  .section { padding-block: clamp(3rem, 8vw, 5rem); }
}

@media (max-width: 480px) {
  .gallery-masonry { column-count: 1; }

  /* Works grid: single column on narrow phones, readable card sizes */
  .works-grid { grid-template-columns: 1fr; gap: 1.75rem; }
  .w-span-4, .w-span-5, .w-span-6, .w-span-7, .w-span-12,
  .w-stack { grid-column: auto; }

  .w-span-6 .work-click img,
  .w-span-12 .work-click img,
  .w-span-7.w-tall .work-click img {
    aspect-ratio: 4 / 5;
  }

  .hero-claim { font-size: 2.5rem; line-height: 1.08; }
  .hero-paragraph { font-size: 0.98rem; }

  .hero-content { padding-bottom: 4rem; }

  /* Ensure lang pill doesn't wrap awkwardly */
  .lang-switcher { white-space: nowrap; }
}
