/* ── 4TH DIMENSION — shared styles ──
   Palette: one warm family, light end. Contrast through weight & texture, never color. */

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

:root {
  --bone:   #f7f4ef;   /* page ground */
  --linen:  #efe9e1;   /* alternate ground */
  --sand:   #ddd2c4;   /* rules, borders */
  --clay:   #a8927b;   /* accent — muted */
  --umber:  #5c4f43;   /* body text */
  --ink:    #2e2a25;   /* headings */
  --pad: clamp(1.5rem, 5vw, 4.5rem);
  --gap: clamp(3.5rem, 8vw, 7.5rem);
}

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

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  background: var(--bone);
  color: var(--umber);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  color-scheme: light;
}

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

/* ── type roles ── */
.display {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  line-height: 1.1;
  color: var(--ink);
}
.label {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--clay);
}

/* ── nav ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem var(--pad);
  background: rgba(247,244,239,0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--sand);
}
.nav-logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; letter-spacing: 0.14em;
  text-transform: uppercase; text-decoration: none;
  color: var(--ink); font-weight: 400;
}
.nav-logo span { color: var(--clay); }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a {
  font-size: 0.72rem; font-weight: 400; letter-spacing: 0.16em;
  text-transform: uppercase; text-decoration: none;
  color: var(--umber); padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, color 0.25s;
}
.nav-links a:hover, .nav-links a.active { border-color: var(--clay); color: var(--ink); }
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.4rem; }
.nav-toggle span { display: block; width: 22px; height: 1px; background: var(--ink); margin: 6px 0; transition: transform 0.25s, opacity 0.25s; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0;
    flex-direction: column; gap: 1.6rem;
    background: var(--bone);
    padding: 6rem 3rem 3rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid var(--sand);
    min-width: 60vw;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ── hero ── */
.hero {
  position: relative;
  min-height: 92svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
}
.hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(46,42,37,0.55) 0%, rgba(46,42,37,0.08) 45%, transparent 70%);
}
.hero-content {
  position: relative; z-index: 2;
  padding: var(--pad);
  padding-bottom: clamp(3rem, 7vw, 5.5rem);
  color: #fff;
}
.hero-content .label { color: rgba(255,255,255,0.75); margin-bottom: 1rem; }
.hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  line-height: 1.08;
  color: #fff;
  max-width: 16ch;
}
.hero-content h1 em { font-style: italic; }

/* page hero (inner pages) */
.page-head {
  padding: calc(var(--gap) + 4rem) var(--pad) var(--gap);
  max-width: 1200px;
}
.page-head h1 { font-size: clamp(2.4rem, 4.5vw, 3.8rem); margin-top: 1rem; }

/* ── sections ── */
section { padding: var(--gap) var(--pad); }
.section-inner { max-width: 1200px; margin: 0 auto; }
.alt { background: var(--linen); }

h2.display { font-size: clamp(1.9rem, 3.4vw, 3rem); margin: 1rem 0 1.4rem; }
.lede {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  font-weight: 300; line-height: 1.45;
  color: var(--ink);
  max-width: 30ch;
}
p + p { margin-top: 1rem; }
.measure { max-width: 62ch; }

/* ── two-column ── */
.cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } }

/* ── project grid with title-block captions ── */
.works {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
}
.work { grid-column: span 6; text-decoration: none; }
.work.wide { grid-column: span 12; }
.work.third { grid-column: span 4; }
@media (max-width: 820px) {
  .work, .work.third { grid-column: span 12; }
}
.work figure { overflow: hidden; }
.work img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  transition: transform 0.6s ease;
}
.work.tall img { aspect-ratio: 3 / 4; }
.work:hover img { transform: scale(1.025); }

/* caption styled like a drawing-sheet title block */
.titleblock {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 1rem;
  border-top: 1px solid var(--sand);
  margin-top: 0.9rem; padding-top: 0.7rem;
}
.titleblock .tb-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; color: var(--ink); font-weight: 400;
}
.titleblock .tb-meta {
  font-size: 0.65rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--clay); text-align: right; white-space: nowrap;
}

/* ── stats strip ── */
.strip {
  display: flex; flex-wrap: wrap; gap: clamp(2rem, 5vw, 4.5rem);
  border-top: 1px solid var(--sand);
  border-bottom: 1px solid var(--sand);
  padding: 2.2rem 0;
}
.strip .stat .num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem; font-weight: 300; color: var(--ink); line-height: 1;
}
.strip .stat .what {
  font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--clay); margin-top: 0.45rem;
}

/* ── materials list (philosophy) ── */
.materials {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px; background: var(--sand); border: 1px solid var(--sand);
  margin-top: 2.4rem;
}
.materials div {
  background: var(--bone); padding: 1.4rem 1.5rem;
  font-size: 0.85rem;
}
.materials div b {
  display: block; font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem; font-weight: 400; color: var(--ink);
  margin-bottom: 0.3rem;
}

/* ── buttons ── */
.btn {
  display: inline-block;
  padding: 0.95rem 2.1rem;
  background: var(--ink); color: var(--bone);
  text-decoration: none;
  font-size: 0.74rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.25s;
}
.btn:hover { background: var(--clay); }
.btn.ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--umber);
}
.btn.ghost:hover { background: var(--ink); color: var(--bone); border-color: var(--ink); }

/* ── contact block ── */
.contact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(2rem, 4vw, 3.5rem);
}
.contact-grid h3 {
  font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--clay); font-weight: 500; margin-bottom: 0.8rem;
}
.contact-grid a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--sand); }
.contact-grid a:hover { border-color: var(--clay); }

/* ── footer ── */
footer {
  border-top: 1px solid var(--sand);
  padding: 2.2rem var(--pad);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  font-size: 0.75rem; color: var(--clay);
}
footer .social { display: flex; gap: 1.4rem; }
footer .social a {
  text-decoration: none; color: var(--umber);
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid transparent;
}
footer .social a:hover { border-color: var(--clay); }

/* ── reveal on scroll ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ── PROJECT CASE STUDY PAGE ── */

/* project hero — large, breathing room above the title */
.proj-hero {
  position: relative;
  min-height: 88svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding-top: 5rem;
}
.proj-hero img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
}
.proj-hero::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(46,42,37,0.6) 0%, rgba(46,42,37,0.1) 40%, transparent 70%);
}
.proj-hero-content {
  position: relative; z-index: 2;
  padding: var(--pad);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  color: #fff;
  max-width: 1200px;
}
.proj-hero-content .label { color: rgba(255,255,255,0.75); margin-bottom: 1rem; }
.proj-hero-content h1 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(2.4rem, 5vw, 4.2rem);
  line-height: 1.1;
  color: #fff;
  max-width: 20ch;
  margin-bottom: 0.8rem;
}
.proj-hero-content h1 em { font-style: italic; }
.proj-hero-content .sub {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: rgba(255,255,255,0.85);
}

/* project fact-sheet — a strip of project meta data */
.factsheet {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--sand);
  border: 1px solid var(--sand);
  margin-top: 2rem;
}
.factsheet div {
  background: var(--bone);
  padding: 1.4rem 1.5rem;
}
.factsheet .k {
  font-size: 0.65rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--clay); margin-bottom: 0.4rem;
}
.factsheet .v {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem; color: var(--ink); line-height: 1.3;
}

/* narrative block — for prose with side label */
.narrative {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}
@media (max-width: 820px) { .narrative { grid-template-columns: 1fr; } }
.narrative h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 300;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.15;
  color: var(--ink);
}
.narrative p { margin-bottom: 1rem; max-width: 60ch; }
.narrative p:last-child { margin-bottom: 0; }
.narrative em { font-style: italic; color: var(--ink); }

/* gallery — single full-bleed, paired half, etc. */
.full-img { padding: 0; }
.full-img img { width: 100%; max-height: 88vh; object-fit: cover; }

.img-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2vw, 1.5rem);
  padding: 0 var(--pad);
}
@media (max-width: 700px) { .img-pair { grid-template-columns: 1fr; } }
.img-pair img { width: 100%; aspect-ratio: 3/4; object-fit: cover; }

.caption {
  font-size: 0.78rem; color: var(--clay);
  letter-spacing: 0.08em; padding: 0.7rem var(--pad) 0;
  font-style: italic;
}

/* next project / prev navigation */
.proj-nav {
  border-top: 1px solid var(--sand);
  padding: 2.4rem var(--pad);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.proj-nav .which { font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--clay); }
.proj-nav .name { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.proj-nav .name:hover { color: var(--clay); }
