/* ============================================
   MURIEL — editorial residence landing page
   ============================================ */

:root {
  /* Atelier palette (warm ivory) */
  --bg: #f2ede5;
  --bg-2: #ebe4d8;
  --ink: #1a1612;
  --ink-2: #2b2520;
  --muted: #6b5f52;
  --line: rgba(26, 22, 18, 0.14);
  --line-soft: rgba(26, 22, 18, 0.08);
  --accent: #6b5f52;

  /* type */
  --f-display: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --f-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* rhythm */
  --pad-x: clamp(24px, 5vw, 80px);
  --section-y: clamp(80px, 12vh, 160px);
}

/* Monograph — deep charcoal */
[data-theme="monograph"] {
  --bg: #13110f;
  --bg-2: #1c1916;
  --ink: #f0e9dd;
  --ink-2: #d9d0c0;
  --muted: #8a7f72;
  --line: rgba(240, 233, 221, 0.14);
  --line-soft: rgba(240, 233, 221, 0.08);
  --accent: #c4b49a;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color 0.6s ease, color 0.6s ease;
}

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

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

/* ---- Typography utilities ---- */
.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.display {
  font-family: var(--f-display);
  font-weight: 300;
  letter-spacing: -0.015em;
  line-height: 0.95;
  font-feature-settings: "liga", "dlig";
}

h2.display { font-size: clamp(40px, 6vw, 88px); }
h3.display { font-size: clamp(28px, 3.5vw, 48px); }

.lede {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.25;
  letter-spacing: -0.005em;
  color: var(--ink-2);
  text-wrap: pretty;
}

.body-copy {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink-2);
  max-width: 58ch;
  text-wrap: pretty;
}

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad-x);
  mix-blend-mode: difference;
  color: #f0e9dd;
  pointer-events: none;
  transition: padding 0.4s ease;
}
.nav > * { pointer-events: auto; }
.nav.scrolled { padding: 14px var(--pad-x); }

.nav-mark {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: inherit;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 36px;
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.nav-links a {
  color: inherit;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity 0.2s;
}
.nav-links a:hover { opacity: 1; }

.nav-cta {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: inherit;
  text-decoration: none;
  border: 1px solid currentColor;
  padding: 10px 18px;
  transition: background 0.2s, color 0.2s;
  background: transparent;
  cursor: pointer;
}
.nav-cta:hover { background: currentColor; color: var(--bg); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100vh;
  width: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-media {
  position: absolute; inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  will-change: transform;
}
.hero-media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(0,0,0,0.22) 0%,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,0) 55%,
    rgba(0,0,0,0.45) 100%);
}
.hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 var(--pad-x) clamp(40px, 6vh, 80px);
  color: #f0e9dd;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: end;
}
.hero-wordmark {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: auto;
  padding-top: 26vh;
}
.hero-wordmark .w {
  font-family: var(--f-display);
  font-weight: 200;
  font-size: clamp(80px, 18vw, 260px);
  letter-spacing: 0.04em;
  line-height: 0.9;
  color: #f0e9dd;
  text-shadow: 0 2px 40px rgba(0,0,0,0.25);
}
.hero-meta {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 48px;
  grid-column: 1 / -1;
  padding-top: clamp(40px, 8vh, 120px);
  border-top: 1px solid rgba(240, 233, 221, 0.25);
  padding-block-start: 24px;
}
.hero-tag {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(22px, 2.4vw, 32px);
  line-height: 1.2;
  max-width: 28ch;
  letter-spacing: -0.005em;
}
.hero-coord {
  font-family: var(--f-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  opacity: 0.8;
  text-align: right;
  line-height: 1.9;
}
.hero-scroll {
  position: absolute;
  left: var(--pad-x);
  bottom: 18px;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: #f0e9dd;
  opacity: 0.7;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-scroll .bar {
  display: inline-block;
  width: 30px;
  height: 1px;
  background: currentColor;
  animation: scrollBar 2.4s ease-in-out infinite;
}
@keyframes scrollBar {
  0%, 100% { transform: scaleX(0.3); transform-origin: left; }
  50% { transform: scaleX(1); transform-origin: left; }
}

@media (max-width: 720px) {
  .hero-meta { flex-direction: column; align-items: flex-start; }
  .hero-coord { text-align: left; }
}

/* ---- Spec strip ---- */
.spec {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 40px var(--pad-x);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 24px;
}
.spec-item { display: flex; flex-direction: column; gap: 8px; }
.spec-k {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.spec-v {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(22px, 2vw, 28px);
  letter-spacing: -0.01em;
  color: var(--ink);
}
@media (max-width: 900px) {
  .spec { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
}

/* ---- Section base ---- */
.section {
  padding: var(--section-y) var(--pad-x);
  position: relative;
}
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(32px, 6vw, 96px);
  margin-bottom: clamp(48px, 8vw, 96px);
  align-items: start;
}
.section-head .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head .num-line {
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-head .num-line::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
@media (max-width: 760px) {
  .section-head { grid-template-columns: 1fr; gap: 28px; }
}

/* ---- Story / overview ---- */
.story-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.story-body .pull {
  position: sticky;
  top: 120px;
}
.story-body .body-copy + .body-copy { margin-top: 20px; }
.story-figure {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: 24px;
  align-items: end;
}
.story-figure img { aspect-ratio: 4/3; object-fit: cover; }
.story-figure img:first-child { aspect-ratio: 3/4; }
figcaption {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 12px;
}
@media (max-width: 900px) {
  .story-body { grid-template-columns: 1fr; }
  .story-body .pull { position: static; }
}

/* ---- Gallery ---- */
.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.g-img { cursor: zoom-in; overflow: hidden; background: var(--bg-2); }
.g-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.g-img:hover img { transform: scale(1.025); }

.g-a { grid-column: span 7; aspect-ratio: 4/3; }
.g-b { grid-column: span 5; aspect-ratio: 3/4; }
.g-c { grid-column: span 4; aspect-ratio: 3/4; margin-top: clamp(40px, 6vw, 80px); }
.g-d { grid-column: span 8; aspect-ratio: 16/10; }
.g-e { grid-column: span 6; aspect-ratio: 4/3; }
.g-f { grid-column: span 6; aspect-ratio: 4/3; }
.g-g { grid-column: span 12; aspect-ratio: 21/9; }
.g-h { grid-column: span 5; aspect-ratio: 3/4; margin-top: clamp(40px, 6vw, 80px); }
.g-i { grid-column: span 7; aspect-ratio: 4/3; }
@media (max-width: 720px) {
  .gallery > * { grid-column: 1 / -1 !important; margin-top: 0 !important; aspect-ratio: 4/3 !important; }
}

/* ---- Pull quote band ---- */
.quote {
  padding: clamp(80px, 12vw, 160px) var(--pad-x);
  background: var(--bg-2);
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.quote blockquote {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.012em;
  max-width: 26ch;
  margin: 0 auto;
  text-align: center;
  text-wrap: balance;
}
.quote cite {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-style: normal;
  margin-top: 36px;
  color: var(--muted);
  text-align: center;
}

/* ---- Location ---- */
.location-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}
.location-points {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.location-points > div {
  background: var(--bg);
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.location-points .d {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 28px;
  letter-spacing: -0.01em;
}
.location-points .l {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.map-stage {
  position: relative;
  aspect-ratio: 5/6;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.map-stage svg { width: 100%; height: 100%; display: block; }
.map-pin {
  position: absolute;
  top: 48%;
  left: 52%;
  transform: translate(-50%, -50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--ink);
}
.map-pin::after {
  content: "";
  position: absolute; inset: -22px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  opacity: 0.3;
  animation: pulse 3s ease-out infinite;
}
@keyframes pulse {
  0% { transform: scale(0.8); opacity: 0.4; }
  100% { transform: scale(2.2); opacity: 0; }
}
.map-label {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  pointer-events: none;
}
@media (max-width: 900px) {
  .location-grid { grid-template-columns: 1fr; }
}

/* ---- Team / credits ---- */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  background: var(--line);
  border: 1px solid var(--line);
}
.team-item {
  background: var(--bg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 220px;
}
.team-item .role {
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.team-item .name {
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1.1;
  margin-top: auto;
}
@media (max-width: 900px) {
  .team { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Register interest ---- */
.register {
  background: var(--ink);
  color: var(--bg);
  padding: var(--section-y) var(--pad-x);
  position: relative;
}
[data-theme="monograph"] .register { background: var(--bg-2); }
.register-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}
.register h2 { color: var(--bg); }
[data-theme="monograph"] .register h2 { color: var(--ink); }
.register .eyebrow,
.register .note {
  color: rgba(255, 255, 255, 0.55);
}
[data-theme="monograph"] .register .eyebrow,
[data-theme="monograph"] .register .note { color: var(--muted); }

.register .body-copy {
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
}
[data-theme="monograph"] .register .body-copy { color: var(--ink-2); }

.form { display: flex; flex-direction: column; gap: 0; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.form-row.single { grid-template-columns: 1fr; }
.field {
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.22);
  border-right: 1px solid rgba(255,255,255,0.22);
  padding: 18px 0 12px 0;
}
[data-theme="monograph"] .field {
  border-bottom-color: var(--line);
  border-right-color: var(--line);
}
.field:nth-child(2n), .form-row.single .field { border-right: 0; }
.field label {
  display: block;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 8px;
}
[data-theme="monograph"] .field label { color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  color: inherit;
  font-family: var(--f-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: -0.005em;
  outline: none;
  padding: 4px 0;
  appearance: none;
  -webkit-appearance: none;
}
.field input::placeholder, .field textarea::placeholder {
  color: rgba(255,255,255,0.3);
  font-family: var(--f-display);
}
[data-theme="monograph"] .field input::placeholder, [data-theme="monograph"] .field textarea::placeholder {
  color: rgba(26,22,18,0.3);
}
.field textarea { resize: none; min-height: 60px; }
.field select {
  font-family: var(--f-display);
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='white' stroke-width='1' fill='none'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 28px;
}
[data-theme="monograph"] .field select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' stroke='%231a1612' stroke-width='1' fill='none'/></svg>");
}
.field option { color: #1a1612; background: #f2ede5; }
.field.error { border-bottom-color: #c97068; }
.field.error label { color: #c97068; }

.form-foot {
  margin-top: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.submit {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  padding: 18px 40px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.submit:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
[data-theme="monograph"] .submit:hover:not(:disabled) { background: var(--ink); color: var(--bg); }
.submit:disabled { opacity: 0.4; cursor: wait; }

.note {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.form-success {
  padding: 60px 0;
  text-align: left;
}
.form-success .display {
  font-size: clamp(32px, 4vw, 48px);
  margin-bottom: 16px;
}

/* ---- Footer ---- */
.foot {
  padding: 48px var(--pad-x);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  align-items: start;
  font-family: var(--f-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--muted);
}
.foot .col { display: flex; flex-direction: column; gap: 6px; }
.foot .col .k { opacity: 0.6; }
.foot .col .v { color: var(--ink); letter-spacing: 0.18em; }
.foot .col a { color: inherit; text-decoration: none; }
.foot .col a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .foot { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Scroll reveal ---- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 1s ease, transform 1s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed; inset: 0;
  z-index: 200;
  background: rgba(10, 8, 6, 0.92);
  backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6);
}
.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(240, 233, 221, 0.4);
  color: #f0e9dd;
  width: 48px; height: 48px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: background 0.2s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover { background: rgba(240, 233, 221, 0.1); }
.lb-close { top: 28px; right: 28px; }
.lb-prev { left: 28px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 28px; top: 50%; transform: translateY(-50%); }
.lb-counter {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(240, 233, 221, 0.6);
}
