/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #f7f5f1;
  --bg-alt: #efebe4;
  --ink: #161514;
  --ink-soft: #3a3835;
  --muted: #7a756d;
  --line: #ddd7cd;
  --accent: #8c6b4f;
  --white: #fff;

  --font-display: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --font-body: "Jost", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --max-wide: 1680px;
  --header-h: 76px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

/* ==========================================================================
   Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 300 17px/1.7 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
p { margin: 0 0 1.1em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: -.01em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { width: 100%; max-width: calc(var(--max-wide) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--muted); }
.empty { color: var(--muted); text-align: center; padding: 60px 0; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--white); padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 16px; top: 16px; }

.kicker {
  font: 400 12px/1.4 var(--font-body);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 18px;
}
.kicker a { text-decoration: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  text-decoration: none;
}
.link-arrow svg { width: 22px; height: 22px; transition: transform .35s var(--ease); }
.link-arrow:hover svg { transform: translateX(6px); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 15px 30px; border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font-size: 13px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400;
  text-decoration: none; cursor: pointer; transition: background .3s, color .3s;
}
.btn:hover { background: transparent; color: var(--ink); }

.placeholder { display: block; width: 100%; aspect-ratio: 4 / 5; background: var(--bg-alt); }

/* Reveal on scroll (enabled by JS) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Header & navigation
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 245, 241, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: background .4s, color .4s, border-color .4s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h); max-width: calc(var(--max-wide) + var(--gutter) * 2);
  margin-inline: auto; padding-inline: var(--gutter);
}
.brand { text-decoration: none; display: flex; align-items: center; min-width: 0; }
.brand__name { font: 400 26px/1 var(--font-display); white-space: nowrap; letter-spacing: .01em; }
.brand__logo { max-height: 44px; width: auto; }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(16px, 2vw, 32px); }
.site-nav a {
  font-size: 13px; letter-spacing: .14em; text-transform: uppercase; font-weight: 400;
  text-decoration: none; position: relative; padding: 6px 0;
}
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease);
}
.site-nav ul a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav__social { display: flex; gap: 14px; }
.site-nav__social svg, .site-footer__social svg { width: 20px; height: 20px; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px 0; cursor: pointer; align-items: center; gap: 10px; }
.nav-toggle__label { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 24px; height: 1px; background: currentColor; transition: transform .3s, opacity .3s;
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after { top: 7px; }
.nav-open .nav-toggle__bars { background: transparent; }
.nav-open .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Home: header floats over the hero until scrolled */
.page-home .site-header--overlay { position: fixed; left: 0; right: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; color: var(--white); }
.page-home .site-header--overlay.is-scrolled { background: rgba(247, 245, 241, .94); color: var(--ink); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.page-home .site-header--overlay a:hover { color: inherit; opacity: .7; }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; position: relative; z-index: 2; }
  .site-nav {
    position: fixed; inset: 0; z-index: 1;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 40px;
    padding: calc(var(--header-h) + 20px) var(--gutter) 40px;
    background: var(--bg); color: var(--ink);
    opacity: 0; visibility: hidden; transition: opacity .4s, visibility .4s;
    overflow-y: auto;
  }
  .nav-open .site-nav { opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 6px; }
  .site-nav ul a { font: 400 clamp(34px, 9vw, 52px)/1.2 var(--font-display); letter-spacing: 0; text-transform: none; }
  .site-nav ul a::after { display: none; }
  .site-nav a[aria-current="page"] { font-style: italic; }
  .nav-open .site-header, .nav-open .page-home .site-header--overlay { color: var(--ink); }
  /* backdrop-filter would trap the fixed menu inside the header */
  .nav-open .site-header { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
  .nav-open .brand { position: relative; z-index: 2; }
  .nav-open { overflow: hidden; }
}

/* ==========================================================================
   Home
   ========================================================================== */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  display: flex; align-items: flex-end; color: var(--white); background: #1c1b1a; overflow: hidden;
}
.hero__media, .hero__media picture, .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__media img { object-fit: cover; animation: hero-zoom 14s var(--ease) both; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0) 55%), linear-gradient(to bottom, rgba(0,0,0,.35), rgba(0,0,0,0) 22%); }
.hero__content { position: relative; z-index: 1; width: 100%; max-width: calc(var(--max-wide) + var(--gutter) * 2); margin-inline: auto; padding: 0 var(--gutter) clamp(56px, 10vh, 110px); }
.hero .kicker { color: rgba(255,255,255,.82); }
.hero__title { font-size: clamp(44px, 8vw, 116px); max-width: 13ch; line-height: 1; }
.hero--empty { background: var(--bg-alt); color: var(--ink); }
.hero--empty::after { display: none; }
.hero--empty .kicker { color: var(--muted); }
.hero__scroll { position: absolute; z-index: 1; right: var(--gutter); bottom: clamp(56px, 10vh, 110px); width: 1px; height: 64px; background: rgba(255,255,255,.35); overflow: hidden; }
.hero__scroll span { position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: currentColor; animation: scroll-line 2.2s var(--ease) infinite; }
@keyframes hero-zoom { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes scroll-line { to { top: 100%; } }

.intro {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 110px);
  padding-block: clamp(80px, 12vw, 170px); align-items: start;
}
.intro__heading { font-size: clamp(34px, 4.4vw, 62px); font-style: italic; }
.intro__text { color: var(--ink-soft); max-width: 52ch; padding-top: 10px; }

.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 20px;
  border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: clamp(40px, 6vw, 80px);
}
.section-title { font-size: clamp(30px, 3.4vw, 46px); }
.section-count { font: italic 400 22px var(--font-display); color: var(--muted); }

.works { padding-bottom: clamp(60px, 8vw, 120px); }
.work {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(28px, 5vw, 90px);
  align-items: center; margin-bottom: clamp(70px, 10vw, 150px);
}
.work--reverse { grid-template-columns: 5fr 7fr; }
.work--reverse .work__media { order: 2; }
.work__media { display: block; overflow: hidden; background: var(--bg-alt); }
.work__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform 1.4s var(--ease); }
.work--reverse .work__media img { aspect-ratio: 4 / 5; }
.work__media:hover img { transform: scale(1.035); }
.work__num { font: italic 400 20px var(--font-display); color: var(--accent); display: block; margin-bottom: 14px; }
.work__title { font-size: clamp(42px, 5.6vw, 84px); margin-bottom: 22px; }
.work__title a { text-decoration: none; }
.work__text { color: var(--ink-soft); max-width: 42ch; margin-bottom: 28px; }

.featured { padding-bottom: clamp(80px, 10vw, 150px); }
.featured .section-head .link-arrow { font-size: 12px; }

/* ==========================================================================
   Cards (projects)
   ========================================================================== */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 3vw, 44px); }
.card__link { display: block; text-decoration: none; }
.card__link:hover { color: inherit; }
.card__media { overflow: hidden; background: var(--bg-alt); margin-bottom: 18px; }
.card__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform 1.2s var(--ease), opacity .4s; }
.card__link:hover .card__media img { transform: scale(1.04); }
.card__meta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.card__title { font-size: 28px; }
.card__year { font-size: 13px; color: var(--muted); letter-spacing: .1em; }
.card__text { color: var(--muted); font-size: 15px; margin-top: 8px; }

/* ==========================================================================
   Page head, gallery
   ========================================================================== */
.page-head { padding-block: clamp(70px, 10vw, 140px) clamp(40px, 6vw, 80px); text-align: center; }
.page-title { font-size: clamp(46px, 7vw, 100px); margin-bottom: 26px; }
.page-intro { max-width: 60ch; margin-inline: auto; color: var(--ink-soft); }
.notfound { min-height: 55vh; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(10px, 1.4vw, 22px); align-items: start; }
.gallery__item { margin: 0; }
.gallery__item a { display: block; overflow: hidden; background: var(--bg-alt); cursor: zoom-in; }
.gallery__item img { width: 100%; transition: transform 1.2s var(--ease), opacity .6s; }
.gallery__item a:hover img { transform: scale(1.025); }
.gallery__item figcaption { font-size: 14px; color: var(--muted); padding-top: 10px; }
/* JS masonry columns */
.gallery.is-masonry { display: flex; align-items: flex-start; }
.gallery__col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: clamp(10px, 1.4vw, 22px); }

.more { padding-block: clamp(70px, 9vw, 130px) 0; text-align: center; }
.more__list { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 40px; }
.more__list a { display: inline-flex; align-items: center; gap: 10px; font: 400 clamp(28px, 3vw, 40px)/1.3 var(--font-display); text-decoration: none; }
.more__list svg { width: 22px; height: 22px; opacity: 0; transform: translateX(-8px); transition: .35s var(--ease); }
.more__list a:hover svg { opacity: 1; transform: none; }

/* ==========================================================================
   Project
   ========================================================================== */
.project__meta { display: flex; justify-content: center; gap: 48px; margin: 0; }
.project__meta dt { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.project__meta dd { margin: 4px 0 0; font: 400 22px var(--font-display); }
.project__cover { margin: 0 auto; }
.project__cover img { width: 100%; max-height: 92vh; object-fit: cover; }
.project__text { max-width: 820px; padding-block: clamp(60px, 8vw, 110px); }
.lead { font: 400 clamp(24px, 2.6vw, 32px)/1.35 var(--font-display); margin-bottom: 1.2em; }
.prose { color: var(--ink-soft); }
.prose--narrow { max-width: 760px; padding-bottom: 100px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding-block: clamp(70px, 9vw, 120px) 0; }
.pager a { text-decoration: none; font: 400 clamp(24px, 2.6vw, 34px)/1.2 var(--font-display); border-top: 1px solid var(--line); padding-top: 22px; }
.pager .kicker { display: block; margin-bottom: 8px; }
.pager__next { text-align: right; grid-column: 2; }

/* ==========================================================================
   About & contact
   ========================================================================== */
.about { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(32px, 6vw, 100px); padding-block: clamp(50px, 7vw, 100px); align-items: start; }
.about__media { position: sticky; top: calc(var(--header-h) + 24px); }
.about__media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.about .page-title { margin-bottom: 30px; }
.about__h2 { font-size: clamp(28px, 3vw, 38px); margin: 56px 0 18px; padding-top: 22px; border-top: 1px solid var(--line); }
.clients { color: var(--ink-soft); line-height: 2; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 70px 1fr; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline__year { font: italic 400 20px var(--font-display); color: var(--accent); }

.studio { margin: 0 auto; padding-block: 0 clamp(40px, 6vw, 80px); }
.studio img { width: 100%; max-height: 80vh; object-fit: cover; }
.studio figcaption { text-align: center; color: var(--muted); font-size: 14px; padding-top: 12px; }

.contact {
  display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 100px);
  padding-block: clamp(70px, 9vw, 130px); border-top: 1px solid var(--line); scroll-margin-top: var(--header-h);
}
.contact__info .section-title { margin-bottom: 20px; }
.contact__list { margin: 36px 0 0; }
.contact__list div { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact__list dt { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.contact__list dd { margin: 2px 0 0; font: 400 22px var(--font-display); }
.contact__list a { text-decoration: none; }

.form { display: grid; gap: 22px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field span { display: block; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; border: 0; border-bottom: 1px solid var(--ink-soft); background: transparent;
  padding: 10px 0; font: 300 17px/1.5 var(--font-body); color: var(--ink); border-radius: 0;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); box-shadow: 0 1px 0 var(--accent); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); }
.check input { margin-top: 5px; accent-color: var(--ink); width: 16px; height: 16px; flex: none; }
.form .btn { justify-self: start; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 16px 20px; margin-bottom: 26px; font-size: 15px; }
.notice p { margin: 0; }
.notice--ok { background: #e6ede3; color: #2d4a27; }
.notice--error { background: #f4e3df; color: #7a2a1d; }

/* ==========================================================================
   CTA & footer
   ========================================================================== */
.cta { background: var(--bg-alt); margin-top: clamp(80px, 10vw, 140px); }
.cta__inner { padding-block: clamp(80px, 10vw, 140px); text-align: center; }
.cta__heading { font-size: clamp(38px, 5vw, 72px); font-style: italic; margin-bottom: 20px; }
.cta__text { max-width: 52ch; margin: 0 auto 36px; color: var(--ink-soft); }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 18px 32px; }
.cta__mail { font: 400 22px var(--font-display); text-decoration: none; border-bottom: 1px solid var(--line); }
.page-home .cta { margin-top: 0; }

.site-footer { background: var(--ink); color: #d9d4cb; font-size: 15px; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--white); }
.site-footer__inner {
  display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 32px; align-items: start;
  max-width: calc(var(--max-wide) + var(--gutter) * 2); margin-inline: auto; padding: 70px var(--gutter) 50px;
}
.site-footer__name { font: 400 30px/1.1 var(--font-display); color: var(--white); margin-bottom: 6px; }
.site-footer .muted { color: #8f897f; margin: 0; }
.site-footer__contact { display: flex; flex-direction: column; gap: 4px; }
.site-footer__social { display: flex; gap: 16px; }
.site-footer__bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: calc(var(--max-wide) + var(--gutter) * 2); margin-inline: auto;
  padding: 22px var(--gutter); border-top: 1px solid #2f2d2a; font-size: 13px; color: #8f897f;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(14, 13, 12, .97); color: #eee;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .35s, visibility .35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { position: absolute; inset: 64px 72px 70px; display: flex; align-items: center; justify-content: center; }
.lightbox__img { max-width: 100%; max-height: 100%; object-fit: contain; transition: opacity .3s; user-select: none; -webkit-user-drag: none; }
.lightbox__img.is-loading { opacity: 0; }
.lightbox button { position: absolute; background: none; border: 0; color: inherit; cursor: pointer; padding: 14px; opacity: .75; transition: opacity .2s; }
.lightbox button:hover { opacity: 1; }
.lightbox button svg { width: 30px; height: 30px; }
.lightbox__close { top: 10px; right: 12px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%) scaleX(-1); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 20px; padding: 20px 28px; font-size: 14px; }
.lightbox__count { letter-spacing: .14em; color: #9a948a; white-space: nowrap; }
.lightbox-open { overflow: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .intro, .about, .contact { grid-template-columns: 1fr; }
  .work, .work--reverse { grid-template-columns: 1fr; gap: 24px; }
  .work--reverse .work__media { order: 0; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .about__media { position: static; }
  .site-footer__inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .gallery { grid-template-columns: 1fr; }
  .card-grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .brand__name { font-size: 22px; }
  .hero__scroll { display: none; }
  .lightbox__stage { inset: 56px 0 64px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 4px; transform: none; }
  .lightbox__prev { transform: scaleX(-1); }
  .lightbox__bar { padding: 20px 70px; justify-content: center; text-align: center; }
  .lightbox__caption { display: none; }
  .project__meta { gap: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .js .reveal { opacity: 1; transform: none; }
}
