/* ===========================================================
   MARF — Architectural Visualization
   Clean rebuild — vanilla HTML/CSS/JS, no framework
   Type system matches the real site: Inter throughout —
   weight 100 for big display titles (tight tracking),
   weight 500 for meta/eyebrow text, weight 700 for the logo.
   =========================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;300;400;500;700&display=swap');

:root {
  --page-bg: #e8e3da;
  --bg: #f4efe6;
  --bg-alt: #b9ae9c;
  --ink: #1a1a1a;
  --ink-soft: #6b6a64;
  --line: rgba(20,20,20,0.12);
  --accent: #c9622b;
  --dark-bg: #4a4640;
  --dark-ink: #f2efe9;

  --sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --panel-w: 38vw;
  --panel-gap: 0px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Splash / intro loader ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--page-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}
.splash.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash__stack {
  position: relative;
  width: clamp(200px, 25vw, 310px);
  height: clamp(200px, 25vw, 310px);
  animation: splashPulse 1.4s ease-in-out infinite;
}
.splash__logo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 0.15s ease;
}
.splash__logo--cik {
  opacity: 0;
}
.splash.is-cik .splash__logo--marf {
  opacity: 0;
}
.splash.is-cik .splash__logo--cik {
  opacity: 1;
}
@keyframes splashPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.94); opacity: 0.85; }
}

@media (max-width: 900px) {
  body { cursor: auto; }
}

/* ---------- Custom cursor ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  width: 46px; height: 46px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 310;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, opacity 0.25s ease;
  mix-blend-mode: difference;
}
.cursor.is-big { width: 84px; height: 84px; }
@media (max-width: 900px) { .cursor { display: none; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 32px; left: 4vw;
  z-index: 260;
  display: flex;
  align-items: center;
  gap: 14px;
}
.logo-mark {
  width: 88px; height: 88px;
  object-fit: contain;
  flex-shrink: 0;
  transition: width 0.4s ease, height 0.4s ease;
}
.site-header.is-scrolled .logo-mark {
  width: 44px; height: 44px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text__title { font-family: var(--sans); font-size: 18px; font-weight: 700; }
.logo-text__tagline {
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

/* ---------- Menu trigger: "Menu" label + lines pill ---------- */
.menu-toggle {
  position: fixed;
  top: 36px; right: clamp(20px, 4vw, 56px);
  z-index: 300;
  display: flex;
  align-items: center;
  padding: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
}
.menu-toggle__lines {
  width: 30px;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.menu-toggle__lines span {
  display: block;
  height: 1.2px;
  width: 100%;
  border-radius: 2px;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.menu-toggle.is-open .menu-toggle__lines { width: 20px; }
.menu-toggle.is-open .menu-toggle__lines span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__lines span:last-child { transform: translateY(-4px) rotate(-45deg); }

/* ---------- Menu overlay: slim top curtain, not full-screen ---------- */
.menu-overlay {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 250;
  background: var(--bg);
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s ease;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
}
.menu-overlay.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

.menu-panel { display: flex; flex-direction: column; }

/* the old in-overlay project grid is retired in favor of the standalone Work page */
.menu-overlay .menu-panel__projects { display: none; }

.menu-panel__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 96px clamp(40px, 6vw, 90px) 18px 4vw;
}

.menu-panel__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--ink);
}
.menu-panel__contact a { color: var(--ink); }
.menu-panel__contact a:hover { color: var(--accent); }

/* sits inside the contact column, right under "Amsterdam" */
.menu-panel__social {
  display: flex;
  gap: 14px;
  margin-top: 10px;
}
.menu-panel__social a {
  display: flex;
  color: var(--ink);
}
.menu-panel__social a:hover { color: var(--accent); }

.menu-panel__links {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}
.menu-panel__links a {
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.menu-panel__links a:hover { color: var(--accent); }

@media (max-width: 800px) {
  .menu-panel__row { flex-direction: column; gap: 20px; }
  .menu-panel__links { align-items: flex-start; flex-direction: row; gap: 22px; }
}

/* ---------- About page: intro paragraph ---------- */
.about-intro {
  max-width: 1300px;
  margin: 0 auto;
  padding: clamp(110px, 15vw, 200px) clamp(20px, 4vw, 56px) clamp(110px, 15vw, 200px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.about-intro p {
  margin: 0;
  font-size: clamp(15px, 1.7vw, 21px);
  font-weight: 300;
  line-height: 1.6;
  color: var(--ink-soft);
}
.about-intro p strong {
  font-weight: 700;
  color: var(--ink);
}

@media (max-width: 700px) {
  .about-intro p { font-size: 13px; line-height: 1.55; }
}

/* ---------- About page: mission / vision blocks ---------- */
.about-block {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px clamp(20px, 4vw, 56px);
  border-bottom: 1px dashed var(--line);
}
.about-block--spaced {
  margin-top: 40px;
  border-top: 1px dashed var(--line);
}
.about-block__row {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.about-block__title {
  flex: 0 0 auto;
  width: clamp(140px, 22vw, 260px);
  font-family: var(--sans);
  font-weight: 100;
  letter-spacing: -0.5px;
  font-size: clamp(28px, 3vw, 40px);
  color: var(--ink-soft);
  margin: 0;
}
.about-block__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.about-block__body p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-soft);
}
.about-block__body strong { color: var(--ink); font-weight: 500; }

@media (max-width: 700px) {
  .about-block__row { flex-direction: column; gap: 16px; }
  .about-block__title { width: auto; }
}

/* ---------- About page: team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 6vw, 100px);
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px) 120px;
}
@media (max-width: 700px) {
  .team-grid { gap: 14px; padding-left: 5vw; padding-right: 5vw; }
}
.team-card__img {
  position: relative;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  margin-bottom: 16px;
  background: var(--ink);
}
.team-card__img img { width: 100%; height: 100%; object-fit: cover; }

.team-card__social {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg);
  transform: translateY(100%);
  transition: transform 0.3s ease;
}
.team-card__img:hover .team-card__social { transform: translateY(0); }
.team-card__social a { display: flex; color: var(--ink); }
.team-card__social a:hover { color: var(--accent); }
.team-card__name {
  font-family: var(--sans);
  font-size: 20px;
  font-weight: 300;
  color: var(--ink);
}
.team-card__role {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 4px;
}

@media (max-width: 700px) {
  .team-card__name { font-size: 12px; }
  .team-card__role { font-size: 8px; margin-top: 2px; }
}

/* ---------- Work index page: stacked-column masonry ----------
   CSS multi-column (column-fill:balance) needs the container's height known
   up front to decide where to break — with 80-odd tiles that collapsed the
   whole grid to 0 height, and column-fill:auto just dumped every tile into
   the first column. A plain CSS grid sidesteps that but locks tiles to
   shared row boundaries, so a short tile leaves dead space below it before
   the next row starts. Splitting the tiles into N independent flex columns
   (built in JS, see main.js) avoids both problems: each column just stacks
   its own tiles with a normal gap, no height-balancing step involved. */
.work-head {
  padding-top: clamp(70px, 9vw, 120px);
}

.work-grid {
  --work-gap: 6px;
  display: flex;
  gap: var(--work-gap);
  background: var(--page-bg);
  padding: 0 var(--work-gap);
}
.work-col {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-width: 0;
  gap: var(--work-gap);
}
.work-tile {
  position: relative;
  display: block;
  overflow: hidden;
  background: var(--ink);
  aspect-ratio: 3 / 4;
}
.work-tile__img, .work-tile__img img {
  width: 100%; height: 100%;
}
.work-tile__img img {
  display: block;
  object-fit: cover;
  filter: brightness(0.7);
  transition: transform 0.6s ease, filter 0.4s ease;
}
.work-tile:hover .work-tile__img img { transform: scale(1.04); filter: brightness(1); }
.work-tile__meta {
  position: absolute; z-index: 2;
  left: 24px; bottom: 58px; right: 24px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: rgba(242,239,233,0.65);
}
.work-tile__title {
  position: absolute; z-index: 2;
  left: 24px; bottom: 24px;
  font-size: clamp(18px, 1.8vw, 28px);
  font-weight: 100;
  letter-spacing: -0.3px;
  color: var(--dark-ink);
}

@media (max-width: 700px) {
  .work-tile__meta { left: 8px; right: 8px; bottom: 24px; font-size: 7px; }
  .work-tile__title { left: 8px; right: 8px; bottom: 8px; font-size: 10px; }
}

/* ---------- Horizontal gallery ---------- */
.gallery-spacer {
  position: relative;
  /* height set inline via JS based on panel count */
}
.gallery-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.gallery-track {
  display: flex;
  align-items: stretch;
  gap: var(--panel-gap);
  will-change: transform;
}
.gallery-intro {
  position: relative;
  flex-shrink: 0;
  width: 30vw;
  height: 100vh;
  display: flex;
  align-items: center;
  padding-left: 4vw;
}
.gallery-intro__title {
  font-family: var(--sans);
  font-weight: 100;
  color: var(--ink-soft);
  font-size: clamp(36px, 5vw, 72px);
  letter-spacing: -1.5px;
  margin: 0;
  text-align: left;
  width: 100%;
}
.gallery-intro__scroll {
  position: absolute;
  left: 4vw; bottom: 40px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
@media (max-width: 900px) {
  .gallery-intro { width: 80vw; }
}
.panel {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: var(--panel-w);
  height: 100vh;
  padding: 100px 100px 44px;
  background: var(--card-bg, var(--bg));
  color: var(--card-ink, var(--ink));
  box-shadow: 0 1px 3px rgba(20,20,20,0.06);
  transition: transform 0.4s ease;
}

.panel--alt { --card-bg: var(--bg-alt); --card-ink: var(--dark-ink); }
.panel--dark { --card-bg: var(--dark-bg); --card-ink: var(--dark-ink); }

/* automatic alternating palette so panels don't need manual color classes */
.panel:nth-of-type(3n+2) { --card-bg: var(--bg-alt); --card-ink: var(--dark-ink); }
.panel:nth-of-type(3n) { --card-bg: var(--dark-bg); --card-ink: var(--dark-ink); }

.panel__image-wrap {
  flex: 0 0 85%;
  overflow: hidden;
  margin-bottom: 30px;
}
.panel img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.6s ease;
}
.panel:hover img { transform: scale(1.08); }

.panel__caption { flex-shrink: 0; }
.panel__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  color: var(--card-ink, var(--ink-soft));
  opacity: 0.75;
}
.panel__meta-line { flex: 1; height: 1px; background: currentColor; opacity: 0.4; max-width: 60px; }
.panel__title {
  position: relative;
  display: inline-block;
  font-family: var(--sans);
  font-size: clamp(18px, 1.6vw, 24px);
  font-weight: 300;
  letter-spacing: -0.3px;
  color: var(--card-ink, var(--ink));
  padding-bottom: 4px;
}
.panel__title::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s ease;
}
.panel:hover .panel__title::after { transform: scaleX(1); }

/* Below 900px the sticky/horizontal-drag trick is disabled entirely (see the
   matchMedia guard in main.js) in favor of a normal vertical-scrolling 2-col
   grid — dragging photos sideways on a vertical swipe reads as broken on a
   phone, so mobile just gets an ordinary scrolling grid instead. */
@media (max-width: 900px) {
  .gallery-spacer { height: auto !important; }
  .gallery-sticky { position: static; height: auto; overflow: visible; display: block; }
  .gallery-track {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3vw;
    padding: 0 3vw 12vw;
    transform: none !important;
  }
  .gallery-intro {
    grid-column: 1 / -1;
    width: auto; height: auto;
    padding: 110px 0 20px;
  }
  .panel { width: auto; height: auto; padding: 14px 14px 16px; }
  .panel__image-wrap { flex: none; aspect-ratio: 3 / 4; margin-bottom: 10px; }
  .panel__caption { padding: 0; }
  .panel__meta { flex-wrap: wrap; row-gap: 4px; font-size: 9px; gap: 8px; }
  .panel__meta-line { display: none; }
  .panel__title { font-size: 14px; }
}

@media (max-width: 600px) {
  .site-header { top: 20px; left: 5vw; }
  .logo-mark, .site-header.is-scrolled .logo-mark { width: 40px; height: 40px; }
  .menu-toggle { top: 24px; right: 5vw; padding: 6px; }
  .menu-toggle__lines { width: 22px; gap: 6px; }
}


/* ---------- Contact CTA ---------- */
.contact-cta {
  padding: clamp(50px, 7vw, 90px) clamp(20px, 4vw, 56px);
  text-align: center;
}
.contact-cta__title {
  font-family: var(--sans);
  font-weight: 200;
  letter-spacing: -0.5px;
  font-size: clamp(22px, 2.8vw, 32px);
  max-width: 520px;
  margin: 0 auto 16px;
  line-height: 1.25;
}
.contact-cta__body { font-size: 14px; color: var(--ink-soft); max-width: 400px; margin: 0 auto 24px; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 28px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: background 0.3s ease, color 0.3s ease;
}
.btn:hover { background: var(--ink); color: var(--bg); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 24px clamp(20px, 4vw, 56px) 32px;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* ---------- Individual project page ---------- */
.project-page__head {
  padding: clamp(120px, 16vw, 220px) clamp(20px, 4vw, 56px) 40px;
  text-align: center;
}
.project-page__title {
  font-family: var(--sans);
  font-weight: 100;
  letter-spacing: -1.5px;
  font-size: clamp(40px, 6vw, 88px);
  margin: 0 0 20px;
}
.project-page__meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}
.project-page__meta-line { width: 60px; height: 1px; background: currentColor; opacity: 0.4; }

.project-page__gallery {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 12px;
}
.project-page__gallery img {
  width: 100%;
  display: block;
}
.project-page__gallery img.is-portrait {
  width: 70%;
  max-width: 100%;
  height: auto;
}

.project-page__coming-soon {
  position: relative;
  width: 100%;
}
.project-page__coming-soon img { filter: brightness(0.5); }
.project-page__coming-soon span {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(28px, 4vw, 56px);
  font-weight: 100;
  letter-spacing: -0.5px;
  color: var(--dark-ink);
  text-align: center;
  white-space: nowrap;
}

.project-page__next {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: clamp(60px, 8vw, 110px) 20px;
  text-align: center;
}
.project-page__next-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.project-page__next-title {
  font-family: var(--sans);
  font-weight: 100;
  letter-spacing: -1px;
  font-size: clamp(32px, 4vw, 52px);
}
.project-page__next:hover .project-page__next-title { color: var(--accent); }
