/* =========================================================
   Vesper - photography studio
   One theme family: warm white paper, cool graphite ink,
   one locked accent (deep cobalt). Radius is 0 everywhere.
   ========================================================= */

:root {
  --paper:      #f4f2ef;
  --paper-2:    #eae6e0;
  --paper-3:    #dfdad3;
  --ink:        #16181b;
  --ink-soft:   #5b6067;
  --ink-faint:  #666c74;
  --line:       rgba(22, 24, 27, .14);
  --accent:     #22467f;
  --accent-ink: #f4f2ef;

  --shell: min(1440px, 100%);
  --gut: clamp(20px, 5vw, 72px);
  --sect: clamp(96px, 16vh, 200px);

  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 68px;

  --z-fx: 5;
  --z-nav: 40;
  --z-grain: 60;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #121316;
    --paper-2:    #191b1f;
    --paper-3:    #23262b;
    --ink:        #ece9e4;
    --ink-soft:   #9ba0a8;
    --ink-faint:  #8d939b;
    --line:       rgba(236, 233, 228, .16);
    --accent:     #8aabe6;
    --accent-ink: #101216;
  }
}

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

/* lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Archivo, system-ui, sans-serif;
  font-weight: 300;
  font-size: clamp(15px, .48vw + 13.6px, 17px);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
p { margin: 0 0 1.1em; }
h1, h2, h3 { margin: 0; font-weight: 300; }

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

:where(a, button, input, select, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- type ---------- */
.display {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(3.1rem, 8.4vw, 8.2rem);
  line-height: 1.02;
  letter-spacing: -.018em;
}
.h2 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 300;
  font-size: clamp(2.2rem, 4.6vw, 4.2rem);
  line-height: 1.08;
  letter-spacing: -.014em;
}
.link {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  transition: color .35s var(--ease);
}
.link:hover { color: var(--accent); }

/* ---------- buttons (one shape system: square, 1px) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  white-space: nowrap;
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 500;
  padding: 15px 26px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  border-radius: 0;
  transition: transform .25s var(--ease), background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--solid {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
  font-family: inherit;
}
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: var(--z-nav);
  height: var(--nav-h);
  transition: transform .5s var(--ease), background-color .5s var(--ease), border-color .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav--hidden { transform: translateY(-100%); }
.nav--solid {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--line);
}
/* over the hero the nav carries its own scrim, otherwise the labels sit
   on whatever the photograph happens to be doing up there */
.nav--over::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 132px;
  background: linear-gradient(to bottom, rgba(9,10,12,.78), rgba(9,10,12,0));
  pointer-events: none;
}
.nav--solid::before { display: none; }
.nav__inner {
  position: relative;
  height: 100%;
  max-width: var(--shell); margin: 0 auto; padding: 0 var(--gut);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.wordmark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 24px; letter-spacing: .13em; text-transform: uppercase;
  color: inherit; text-decoration: none; line-height: 1;
}
.nav__links { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.nav__links a {
  color: inherit; text-decoration: none;
  font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; font-weight: 400;
  opacity: .78; transition: opacity .3s var(--ease);
}
.nav__links a:hover { opacity: 1; }
.nav__cta {
  border: 1px solid currentColor; padding: 9px 16px; opacity: 1 !important;
}
.nav--over { color: #fff; }
.nav--over .nav__links a { opacity: .9; }

@media (max-width: 620px) {
  .nav__links a:not(.nav__cta) { display: none; }
}

/* ---------- shared frame boxes (blur-up + reveal) ---------- */
.frame__box {
  position: relative;
  aspect-ratio: var(--ratio, 4/5);
  overflow: hidden;
  background-color: var(--paper-2);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  clip-path: inset(0 0 0 0);
}
.frame__box img {
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .9s var(--ease);
  will-change: transform;
}
.frame__box.is-loaded img { opacity: 1; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  color: #fff;
}
.hero__media { position: absolute; inset: 0; }
.hero__canvas, .hero__fallback {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
}
.hero__canvas { opacity: 0; transition: opacity 1s var(--ease); }
.hero__canvas.is-live { opacity: 1; }
.hero__canvas.is-live + .hero__fallback { opacity: 0; }
.hero__fallback { transition: opacity 1s var(--ease); }
.hero__scrim {
  position: absolute; inset: 0;
  /* the hero frames run from near-white to near-black, so the scrim has to
     carry AA contrast on the brightest of them, not the average one */
  background:
    linear-gradient(95deg, rgba(9,10,12,.80) 0%, rgba(9,10,12,.56) 32%, rgba(9,10,12,.22) 58%, rgba(9,10,12,0) 82%),
    linear-gradient(to top, rgba(9,10,12,.42) 0%, rgba(9,10,12,0) 40%),
    linear-gradient(to bottom, rgba(9,10,12,.16) 0%, rgba(9,10,12,0) 22%);
}
.hero__copy {
  position: relative;
  width: 100%;
  max-width: var(--shell); margin: 0 auto;
  padding: var(--nav-h) var(--gut) clamp(48px, 9vh, 96px);
}
.hero__sub {
  max-width: 46ch;
  margin: clamp(20px, 3vh, 34px) 0 clamp(26px, 4vh, 40px);
  color: rgba(255, 255, 255, .88);
  font-size: clamp(15px, 1.1vw, 18px);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn--solid { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hero .btn--solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.hero .btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .5); }
.hero .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, .1); }

/* ---------- statement ---------- */
.statement {
  max-width: var(--shell); margin: 0 auto;
  padding: var(--sect) var(--gut);
}
.statement__body {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.75rem, 3.5vw, 3.1rem);
  line-height: 1.24;
  letter-spacing: -.01em;
  max-width: 22ch;
  margin: 0;
}
.statement__quiet { color: var(--ink-faint); }

/* ---------- selected work ---------- */
.work { max-width: var(--shell); margin: 0 auto; padding: 0 var(--gut) var(--sect); }
.work .h2 { margin-bottom: clamp(40px, 7vh, 82px); }

.work__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(16px, 2.4vw, 40px);
  row-gap: clamp(48px, 8vh, 110px);
}
.frame { margin: 0; }
.frame figcaption {
  margin-top: 14px;
  font-size: 12.5px;
  letter-spacing: .04em;
  color: var(--ink-soft);
}
.frame--a { grid-column: 1 / span 5; }
.frame--b { grid-column: 8 / span 5; margin-top: 14vh; }
.frame--c { grid-column: 2 / span 7; }
.frame--d { grid-column: 10 / span 3; align-self: end; }
.frame--e { grid-column: 1 / span 6; }
.frame--f { grid-column: 8 / span 4; margin-top: 12vh; }

@media (max-width: 900px) {
  .work__grid { display: block; }
  .frame + .frame { margin-top: clamp(44px, 9vh, 90px); }
  .frame--b, .frame--f { margin-top: clamp(44px, 9vh, 90px); }
}

/* ---------- series: horizontal pan ---------- */
/* default is a plain horizontal scroller so the series is readable with no
   JS and under reduced motion; the scroll-pin adds .is-pinned on top */
.series {
  position: relative;
  background: var(--paper-2);
  padding: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.series.is-pinned { overflow: hidden; scroll-snap-type: none; }
.series__intro, .slide { scroll-snap-align: center; }
.series__track {
  display: flex; align-items: center;
  gap: clamp(24px, 4vw, 68px);
  height: 100dvh;
  padding: 0 var(--gut);
  width: max-content;
}
.series__intro { width: min(74vw, 460px); flex: none; }
.series__intro p { margin-top: 22px; color: var(--ink-soft); max-width: 34ch; }
.slide { margin: 0; width: min(76vw, 700px); flex: none; }
.slide figcaption {
  margin-top: 14px; font-size: 12.5px; letter-spacing: .04em; color: var(--ink-soft);
}

@media (max-width: 760px) {
  .series__track {
    width: auto; height: auto; display: block;
    padding: var(--sect) var(--gut);
  }
  .series__intro { width: auto; }
  .slide { width: auto; margin-top: clamp(40px, 8vh, 72px); }
}

/* ---------- services: accordion strips ---------- */
.services { max-width: var(--shell); margin: 0 auto; padding: var(--sect) var(--gut); }
.services .h2 { margin-bottom: clamp(40px, 7vh, 82px); }

.strips { display: flex; gap: 10px; height: min(74vh, 680px); }
.strip {
  position: relative; flex: 1 1 0; min-width: 0;
  overflow: hidden;
  cursor: pointer;
  transition: flex-grow .9s var(--ease);
}
.strip:hover, .strip:focus-visible, .strip.is-open { flex-grow: 2.6; }
.strip__img {
  position: absolute; inset: 0;
  background-color: var(--paper-2);
  background-position: center; background-size: cover; background-repeat: no-repeat;
}
.strip__img img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06);
  transition: transform 1.2s var(--ease), filter .9s var(--ease);
  filter: saturate(.86) brightness(.82);
}
.strip:hover .strip__img img, .strip:focus-visible .strip__img img { transform: scale(1); filter: saturate(1) brightness(.92); }
.strip::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(12,13,15,.72), rgba(12,13,15,.05) 62%);
}
.strip__body {
  position: absolute; inset: auto 0 0 0; z-index: 1;
  padding: clamp(20px, 2.4vw, 34px);
  color: #fff;
}
.strip__body h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 2.1rem);
  line-height: 1.1;
}
.strip__body p {
  margin: 14px 0 0;
  max-width: 40ch;
  font-size: 14px;
  color: rgba(255,255,255,.86);
  opacity: 0; transform: translateY(10px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}
.strip:hover .strip__body p, .strip:focus-visible .strip__body p, .strip.is-open .strip__body p {
  opacity: 1; transform: none;
}

@media (max-width: 860px) {
  .strips { display: block; height: auto; }
  .strip { height: 58vh; }
  .strip + .strip { margin-top: 10px; }
  .strip__body p { opacity: 1; transform: none; }
}

/* ---------- studio ---------- */
.studio {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 var(--gut) var(--sect);
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: clamp(32px, 6vw, 110px);
  align-items: center;
}
.studio__copy { max-width: 54ch; }
.studio__copy .h2 { margin-bottom: 28px; }
.studio__copy p { color: var(--ink-soft); }

@media (max-width: 900px) {
  .studio { grid-template-columns: 1fr; }
}

/* ---------- words ---------- */
.words {
  max-width: var(--shell); margin: 0 auto;
  padding: 0 var(--gut) var(--sect);
  display: grid; grid-template-columns: repeat(12, 1fr);
  row-gap: clamp(56px, 9vh, 120px);
}
.quote { margin: 0; padding-top: 22px; border-top: 1px solid var(--line); }
.quote p {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.3rem, 2vw, 1.85rem);
  line-height: 1.36;
  margin-bottom: 18px;
}
.quote cite { font-style: normal; font-size: 12.5px; letter-spacing: .04em; color: var(--ink-faint); }
.quote--1 { grid-column: 1 / span 5; }
.quote--2 { grid-column: 7 / span 5; }
.quote--3 { grid-column: 3 / span 5; }

@media (max-width: 900px) {
  .words { display: block; }
  .quote + .quote { margin-top: clamp(44px, 8vh, 80px); }
}

/* ---------- book ---------- */
.book {
  max-width: var(--shell); margin: 0 auto;
  padding: var(--sect) var(--gut);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: 5fr 6fr;
  gap: clamp(40px, 6vw, 110px);
}
.book__intro .h2 { margin-bottom: 26px; }
.book__intro p { color: var(--ink-soft); max-width: 42ch; }
.book__contact { margin-top: 30px; line-height: 2.2; }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 24px; align-content: start; }
.field { display: grid; gap: 8px; }
.field--wide, .form__foot { grid-column: 1 / -1; }
.field label {
  font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  font-weight: 500; color: var(--ink);
}
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink);
  background: transparent;
  border: 0; border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 0;
  transition: border-color .35s var(--ease);
}
.field textarea { resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: var(--ink-faint); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-bottom-color: var(--accent); border-bottom-width: 2px; padding-bottom: 9px;
}
.field select { appearance: none; cursor: pointer; }
.field__help { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.field__error { margin: 0; font-size: 12.5px; color: var(--accent); font-weight: 400; }
.field.is-bad input, .field.is-bad select { border-bottom-color: var(--accent); }

.form__foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.form__status { margin: 0; font-size: 13px; color: var(--ink-soft); }
.form__note { flex: 1 0 100%; margin: 0; font-size: 12.5px; color: var(--ink-faint); }

@media (max-width: 900px) {
  .book { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}

/* ---------- footer ---------- */
.foot {
  max-width: var(--shell); margin: 0 auto;
  padding: clamp(60px, 8vh, 110px) var(--gut) 48px;
  border-top: 1px solid var(--line);
}
.foot__mark {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(3.5rem, 15vw, 13rem);
  line-height: .9; letter-spacing: -.02em;
  margin: 0 0 clamp(40px, 6vh, 80px);
  color: var(--ink);
}
.foot__cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  font-size: 13.5px; color: var(--ink-soft);
}
.foot__cols p { margin: 0; line-height: 1.9; }
.foot__legal {
  margin: clamp(40px, 6vh, 70px) 0 0;
  font-size: 12px; color: var(--ink-faint);
}
@media (max-width: 700px) { .foot__cols { grid-template-columns: 1fr; } }

/* ---------- webgl hover layer + grain ---------- */
.fx {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: var(--z-fx);
  pointer-events: none;
  opacity: 0;
  transition: opacity .3s linear;
}
.fx.is-live { opacity: 1; }

.grain {
  position: fixed; inset: -50%;
  z-index: var(--z-grain);
  pointer-events: none;
  opacity: .32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.38'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}
@media (prefers-color-scheme: dark) {
  .grain { mix-blend-mode: screen; opacity: .16; }
}

/* ---------- reveal primitives ---------- */
.line-mask span {
  display: block;
  overflow: hidden;
}
.line-mask i {
  display: block; font-style: inherit;
  transform: translateY(105%);
  will-change: transform;
}
.reveal { opacity: 0; transform: translateY(18px); will-change: transform, opacity; }

.no-motion .line-mask i { transform: none; }
.no-motion .reveal { opacity: 1; transform: none; }
.no-motion .frame__box { clip-path: none !important; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .line-mask i { transform: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .fx { display: none; }
}
