/* ==========================================================================
   Yasmine Moufti — site theme
   Drawn from the illustrated banner: cream paper, black ink line, tile teal,
   bread & flame orange, lamp yellow, wine brown.
   ========================================================================== */

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

:root {
  --cream: #F4E8D9;
  --cream-deep: #EBDCC7;
  --paper: #FBF5EC;
  --ink: #141210;
  --ink-soft: #4A433C;
  --muted: #8A7E72;
  --rule: #D9C8B2;
  --teal: #88A8A6;
  --teal-deep: #5E8481;
  --bread: #F8B870;
  --orange: #F88030;
  --yellow: #F8D848;
  --wine: #906038;

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --measure: 62ch;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t: 0.35s var(--ease);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  font-weight: 300;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

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

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

/* ---------- banana cursor (kept from the original site) ---------- */
body.has-banana, body.has-banana * { cursor: none !important; }
#banana {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 99999;
  font-size: 26px;
  transform: translate(-50%, -50%) rotate(-25deg);
  transition: transform 0.12s ease;
  user-select: none; will-change: transform;
}
#banana.hovered  { transform: translate(-50%, -50%) rotate(15deg) scale(1.2); }
#banana.clicking { transform: translate(-50%, -50%) rotate(-50deg) scale(0.85); }
@media (hover: none) {
  body.has-banana, body.has-banana * { cursor: auto !important; }
  #banana { display: none; }
}

/* ---------- ink helpers ---------- */
.ink-rule {                       /* a hand-drawn horizontal rule */
  display: block; width: 100%; height: 10px;
  color: var(--ink);
}
.eyebrow {
  font-family: var(--sans);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}

/* name card — the little tilted label from the gallery scene */
.name-card {
  display: inline-block;
  font-family: var(--sans); font-weight: 500;
  font-size: 12px; letter-spacing: 0.04em;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--ink);
  border-radius: 2px 3px 2px 4px;
  padding: 5px 10px 4px;
  transform: rotate(-2deg);
  box-shadow: 2px 3px 0 0 rgba(20,18,16,0.18);
}

/* pill button in ink */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 12px; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 12px 22px;
  transition: background var(--t), color var(--t), transform var(--t), box-shadow var(--t);
  box-shadow: 0 0 0 0 var(--ink);
}
.btn:hover { background: var(--ink); color: var(--cream); transform: translate(-1px, -1px); box-shadow: 3px 3px 0 0 var(--teal); }
.btn .arrow { display: inline-block; transition: transform var(--t); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 500;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px var(--gutter);
  background: rgba(244, 232, 217, 0.88);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1.5px solid transparent;
  transition: border-color var(--t);
}
.nav.scrolled { border-color: var(--ink); }
.nav-logo {
  font-family: var(--display); font-weight: 500; font-size: 20px;
  font-variation-settings: 'SOFT' 60, 'opsz' 24;
  letter-spacing: -0.01em; text-decoration: none; color: var(--ink);
  white-space: nowrap;
}
.nav-links { display: flex; gap: clamp(14px, 3vw, 34px); list-style: none; }
.nav-links a {
  font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  text-decoration: none; color: var(--ink);
  padding-bottom: 3px;
  background: linear-gradient(var(--teal), var(--teal)) no-repeat 0 100% / 0 2px;
  transition: background-size var(--t);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { background-size: 100% 2px; }

/* ---------- footer ---------- */
.footer {
  border-top: 1.5px solid var(--ink);
  padding: 32px var(--gutter) 40px;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 24px;
  font-size: 12px; letter-spacing: 0.06em; color: var(--muted);
}
.footer a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.footer a:hover { border-color: var(--ink); }

/* ==========================================================================
   HOME
   ========================================================================== */
.hero {
  position: relative;
  padding-top: 66px;             /* nav height */
  border-bottom: 1.5px solid var(--ink);
}
.hero-banner { width: 100%; }
.hero-banner > div { transition: none; }

.hero-copy {
  position: absolute;
  left: var(--gutter); top: 50%;
  transform: translateY(-38%);
  max-width: 30vw;
}
.hero-copy h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(40px, 4.6vw, 84px);
  font-variation-settings: 'SOFT' 80, 'opsz' 144;
  line-height: 0.98; letter-spacing: -0.02em;
  text-wrap: balance;
}
.hero-copy h1 em { font-style: italic; font-weight: 300; color: var(--wine); }
.hero-copy .tagline {
  margin-top: 18px;
  font-size: clamp(14px, 1.15vw, 18px);
  color: var(--ink-soft);
  max-width: 28ch;
}
.hero-copy .tagline strong { font-weight: 500; color: var(--ink); }
.hero-copy .btn { margin-top: 26px; }

.hero-tag {                     /* the scene label, bottom right of the banner */
  position: absolute; right: var(--gutter); bottom: 18px;
  display: flex; align-items: center; gap: 12px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
}

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 110px) var(--gutter); }
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: clamp(28px, 4vw, 48px);
}
.section-head h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(34px, 4.2vw, 60px);
  font-variation-settings: 'SOFT' 80, 'opsz' 96;
  line-height: 1; letter-spacing: -0.02em;
}
.section-head h2 .ink-rule { width: 100%; max-width: 220px; margin-top: 8px; }
.section-head .count { font-family: var(--display); font-size: 18px; color: var(--muted); font-variation-settings: 'opsz' 24; }

/* ---------- project grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px);
}
.card { text-decoration: none; color: inherit; display: block; position: relative; }
.card-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border: 1.5px solid var(--ink);
  background: var(--cream-deep);
  overflow: hidden;
  box-shadow: 8px 10px 0 -2px var(--rule);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card-frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.card:hover .card-frame { transform: translate(-2px, -4px) rotate(-0.6deg); box-shadow: 12px 14px 0 -2px var(--teal); }
.card:hover .card-frame img { transform: scale(1.04); }
.card-visual { position: relative; }
.card .name-card { position: absolute; left: -6px; bottom: -12px; z-index: 2; }
.card:nth-child(3n+2) .name-card { transform: rotate(1.5deg); left: auto; right: -6px; }
.card-meta {
  margin-top: 26px;
  font-size: 13px; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 4px 0;
}
.card-meta span + span::before { content: '·'; margin: 0 8px; color: var(--rule); }
.card-meta .sub { color: var(--ink-soft); }

/* ---------- about ---------- */
.about { border-top: 1.5px solid var(--ink); }
.about-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: clamp(28px, 6vw, 96px); align-items: start;
}
.about-illus { position: relative; min-height: 260px; }
.about-illus img { position: absolute; height: auto; }
.about-illus .il-bread  { left: 6%;  bottom: 0; width: 22%; }
.about-illus .il-candle { left: 40%; bottom: 0; width: 10%; }
.about-illus .il-lamp   { right: 4%; bottom: 0; width: 46%; }
.about-illus .il-table  { position: absolute; left: 0; right: 0; bottom: -8px; height: 12px; color: var(--ink); }
.about-text p {
  font-size: clamp(16px, 1.3vw, 19px); line-height: 1.7; color: var(--ink-soft);
  max-width: var(--measure); margin-bottom: 20px;
}
.about-text p:first-of-type {
  font-family: var(--display); font-weight: 400; font-variation-settings: 'SOFT' 60, 'opsz' 40;
  font-size: clamp(22px, 2vw, 30px); line-height: 1.35; color: var(--ink);
}
.about-text p:last-of-type { margin-bottom: 0; }
.venues { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- contact ---------- */
.contact { border-top: 1.5px solid var(--ink); background: var(--cream-deep); }
.contact-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 40px; }
.contact h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(30px, 3.6vw, 52px); font-variation-settings: 'SOFT' 80, 'opsz' 96;
  line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; max-width: 18ch;
}
.contact h2 em { font-style: italic; font-weight: 300; color: var(--wine); }
.contact-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.contact-actions .mail { font-size: 14px; color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--rule); }
.contact-actions .mail:hover { border-color: var(--ink); color: var(--ink); }
.contact .il-spot { width: 54px; height: auto; transform: rotate(-6deg); }

/* ==========================================================================
   PROJECT PAGES
   ========================================================================== */
main.project { padding-top: 66px; }

.proj-header {
  padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(28px, 4vw, 44px);
  border-bottom: 1.5px solid var(--ink);
}
.back-btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  text-decoration: none; color: var(--muted);
  background: none; border: none; padding: 0; margin-bottom: 28px;
  transition: color var(--t), gap var(--t);
}
.back-btn:hover { color: var(--ink); gap: 16px; }
.back-btn .arrow, .back-btn .back-arrow { display: inline-block; transition: transform var(--t); }
.back-btn:hover .arrow, .back-btn:hover .back-arrow { transform: translateX(-4px); }

.proj-title {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(36px, 5vw, 76px);
  font-variation-settings: 'SOFT' 80, 'opsz' 144;
  line-height: 1.02; letter-spacing: -0.02em;
  text-wrap: balance; max-width: 16ch;
  margin-bottom: 18px;
}
.proj-meta {
  display: flex; flex-wrap: wrap; gap: 8px 0;
  font-size: 13px; color: var(--muted);
}
.proj-meta span, .proj-meta .proj-meta-item { display: inline-flex; align-items: center; }
.proj-meta span::after, .proj-meta .proj-meta-item::after { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--teal); margin: 0 12px; }
.proj-meta span:last-child::after, .proj-meta .proj-meta-item:last-child::after { display: none; }
.proj-meta span:first-child { font-weight: 500; color: var(--ink-soft); }

.proj-body {
  display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(32px, 5vw, 80px);
  padding: clamp(36px, 5vw, 64px) var(--gutter) clamp(64px, 8vw, 110px);
  align-items: start;
}
.proj-desc { position: sticky; top: 96px; }
.proj-desc p { font-size: 16px; line-height: 1.75; color: var(--ink-soft); margin-bottom: 20px; max-width: var(--measure); }
.proj-desc p:first-child {
  font-family: var(--display); font-weight: 400; font-variation-settings: 'SOFT' 60, 'opsz' 40;
  font-size: clamp(20px, 1.6vw, 25px); line-height: 1.4; color: var(--ink);
}
.proj-desc p:last-child { margin-bottom: 0; }

.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.gal-img {
  width: 100%; display: block; object-fit: cover; aspect-ratio: 4 / 3;
  border: 1.5px solid var(--ink); background: var(--cream-deep);
  box-shadow: 6px 8px 0 -2px var(--rule);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}
.gallery .gal-img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.gal-img:hover { transform: translate(-2px, -3px) rotate(-0.4deg); box-shadow: 10px 12px 0 -2px var(--teal); }

/* ---------- lightbox ---------- */
#lightbox {
  display: none; position: fixed; inset: 0; z-index: 2000;
  background: rgba(20, 18, 16, 0.96);
  align-items: center; justify-content: center;
}
#lightbox.open { display: flex; }
#lb-img { max-width: 90vw; max-height: 86vh; object-fit: contain; user-select: none; border: 1.5px solid var(--cream); }
.lb-btn {
  position: absolute; background: none; border: none;
  color: rgba(244,232,217,0.7); font-size: 32px; padding: 16px 24px;
  transition: color 0.2s, transform 0.2s;
}
.lb-btn:hover { color: var(--cream); }
#lb-close { top: 16px; right: 20px; font-size: 22px; }
#lb-prev  { left: 8px;  top: 50%; transform: translateY(-50%); }
#lb-next  { right: 8px; top: 50%; transform: translateY(-50%); }
#lb-prev:hover { transform: translateY(-50%) translateX(-4px); }
#lb-next:hover { transform: translateY(-50%) translateX(4px); }
.lb-counter {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  color: rgba(244,232,217,0.6); font-size: 12px; letter-spacing: 0.12em;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .hero-copy { max-width: 32vw; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(3n+2) .name-card { left: -6px; right: auto; transform: rotate(-2deg); }
  .card:nth-child(2n) .name-card { left: auto; right: -6px; transform: rotate(1.5deg); }
}

@media (max-width: 860px) {
  /* banner: zoom in so the table fills the phone, and drop the copy underneath */
  .hero { border-bottom: none; }
  .hero-banner { border-bottom: 1.5px solid var(--ink); }
  .hero-banner > div { width: 200% !important; margin-left: -50% !important; }
  .hero-copy {
    position: static; transform: none; max-width: none;
    padding: 34px var(--gutter) 40px;
    border-bottom: 1.5px solid var(--ink);
  }
  .hero-copy h1 { font-size: clamp(44px, 12vw, 72px); }
  .hero-copy .tagline { max-width: 34ch; }
  .hero-tag { display: none; }

  .about-grid { grid-template-columns: 1fr; }
  .about-illus { min-height: 200px; order: 2; margin-top: 12px; }
  .proj-body { grid-template-columns: 1fr; }
  .proj-desc { position: static; }
}

@media (max-width: 600px) {
  .hero-banner > div { width: 260% !important; margin-left: -80% !important; }
  .nav { padding: 14px var(--gutter); }
  .nav-logo { font-size: 17px; }
  .nav-links a { font-size: 11px; letter-spacing: 0.1em; }
  .grid { grid-template-columns: 1fr; gap: 36px; }
  .card .name-card, .card:nth-child(2n) .name-card, .card:nth-child(3n+2) .name-card { left: -4px; right: auto; transform: rotate(-2deg); }
  .gallery { grid-template-columns: 1fr; gap: 18px; }
  .gallery .gal-img:first-child { aspect-ratio: 4 / 3; }
  .footer { flex-direction: column; align-items: flex-start; }
  .contact h2 { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
