/* ─────────────────────────────────────────────────────────────
   Chastine Ibsen — style
   ───────────────────────────────────────────────────────────── */

:root {
  --paper: #f2eee8;
  --paper-2: #e8e2d9;
  --ink: #151311;
  --muted: #7d766d;
  --line: rgba(21, 19, 17, .18);
  --accent: #ff2d6f;

  --display: "Anton", "Impact", "Arial Narrow", sans-serif;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(16px, 2.4vw, 36px);
  --ease: cubic-bezier(.7, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; font-weight: inherit; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--accent); color: #fff; }
body.no-scroll { overflow: hidden; }

.skip { position: fixed; left: 8px; top: -60px; z-index: 200; padding: 8px 12px; background: var(--ink); color: var(--paper); }
.skip:focus { top: 8px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.label {
  font: 500 11px/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.link { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease-out); }
.link:hover { background-size: 100% 1px; }

/* ── Top bar (inverts over whatever is below it) ─────────── */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  color: #fff;
  mix-blend-mode: difference;
  font: 500 12px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.bar__mid { position: absolute; left: 50%; transform: translateX(-50%); opacity: .75; }
.bar__menu { display: inline-flex; align-items: center; gap: 12px; text-transform: uppercase; letter-spacing: .12em; padding: 6px 0; }
.bar__menu-label { display: inline-block; min-width: 3.6em; text-align: right; }
.bar__menu-icon { position: relative; width: 22px; height: 10px; }
.bar__menu-icon i { position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .5s var(--ease), top .5s var(--ease); }
.bar__menu-icon i:first-child { top: 0; }
.bar__menu-icon i:last-child { top: 8px; }
.menu-open .bar__menu-icon i:first-child { top: 4px; transform: rotate(45deg); }
.menu-open .bar__menu-icon i:last-child { top: 4px; transform: rotate(-45deg); }

/* ── Full-screen menu ─────────────────────────────────────── */
.menu {
  position: fixed; inset: 0; z-index: 50;
  background: var(--ink); color: var(--paper);
  display: grid; grid-template-rows: 1fr auto;
  padding: 90px var(--gutter) 24px;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease);
  overflow: hidden;
}
.menu[hidden] { display: none; }
.menu.is-open { clip-path: inset(0 0 0 0); }
.menu__list { align-self: center; position: relative; z-index: 2; }
.menu__list li { overflow: hidden; border-bottom: 1px solid rgba(242, 238, 232, .14); }
.menu__list li:first-child { border-top: 1px solid rgba(242, 238, 232, .14); }
.menu__list a {
  display: flex; align-items: baseline; gap: clamp(12px, 2vw, 32px);
  padding: .04em 0;
  font: 400 clamp(52px, 11.5vh, 132px)/1 var(--display);
  text-transform: uppercase;
  letter-spacing: -.005em;
  transform: translateY(105%);
  transition: transform .9s var(--ease-out), color .3s, opacity .3s;
}
.menu.is-open .menu__list a { transform: none; }
.menu.is-open .menu__list li:nth-child(1) a { transition-delay: .25s, 0s, 0s; }
.menu.is-open .menu__list li:nth-child(2) a { transition-delay: .31s, 0s, 0s; }
.menu.is-open .menu__list li:nth-child(3) a { transition-delay: .37s, 0s, 0s; }
.menu.is-open .menu__list li:nth-child(4) a { transition-delay: .43s, 0s, 0s; }
.menu.is-open .menu__list li:nth-child(5) a { transition-delay: .49s, 0s, 0s; }
.menu__n { font: 400 12px/1 var(--sans); letter-spacing: .1em; opacity: .5; transform: translateY(-1.2em); }
.menu__t { display: inline-block; transition: transform .5s var(--ease-out); }
.menu__list:hover a { opacity: .3; }
.menu__list a:hover, .menu__list a:focus-visible { opacity: 1; color: var(--accent); }
.menu__list a:hover .menu__t { transform: translateX(.18em); font-style: normal; }
.menu__foot {
  position: relative; z-index: 2;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  font: 500 12px/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; opacity: .7;
}
.menu__peek {
  position: absolute; right: var(--gutter); top: 50%; z-index: 1;
  width: min(30vw, 420px); aspect-ratio: 4 / 5;
  transform: translateY(-50%) rotate(3deg) scale(.92);
  background: center / cover no-repeat;
  opacity: 0; transition: opacity .4s, transform .6s var(--ease-out);
  pointer-events: none;
}
.menu__peek.is-on { opacity: 1; transform: translateY(-50%) rotate(-2deg) scale(1); }

/* ── Hero / first impression ─────────────────────────────── */
.hero {
  position: relative;
  height: 100vh; height: 100svh; min-height: 560px;
  overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero__float { position: absolute; inset: 0; }
.float {
  position: absolute;
  will-change: transform;
}
.float__inner {
  width: 100%; height: 100%;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .45);
}
.float img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); transition: transform 1.8s var(--ease-out); }
.is-ready .float__inner { clip-path: inset(0 0 0 0); }
.is-ready .float img { transform: scale(1); }

.hero__name {
  position: relative; z-index: 3;
  padding: 0 var(--gutter);
  margin-bottom: clamp(12px, 3vh, 36px);
  font: 400 20vw/.8 var(--display);
  text-transform: uppercase;
  letter-spacing: -.01em;
  color: #fff;
  mix-blend-mode: difference;
  pointer-events: none;
}
.hero__name .line { display: block; overflow: hidden; padding-top: .04em; }
.hero__name .line + .line { text-align: right; }
.hero__name .word { display: inline-block; white-space: nowrap; }
.hero__name .ch { display: inline-block; transform: translateY(110%); transition: transform 1.1s var(--ease-out); }
.is-ready .hero__name .ch { transform: none; }

.hero__marquee {
  position: relative; z-index: 4;
  border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
  padding: 10px 0;
  font: 400 clamp(22px, 2.6vw, 38px)/1 var(--serif);
  font-style: italic;
}
.marquee__track { display: flex; width: max-content; gap: .6em; animation: marquee 28s linear infinite; }
.marquee__track--slow { animation-duration: 50s; }
.marquee__track em { color: var(--accent); font-style: normal; font-size: .7em; align-self: center; }
@keyframes marquee { to { transform: translateX(-50%); } }

.hero__scroll {
  position: absolute; z-index: 5; left: var(--gutter); top: 50%;
  font: 500 11px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  writing-mode: vertical-rl; transform: rotate(180deg) translateY(50%);
  color: var(--ink);
  opacity: 0; transition: opacity 1s 1.4s;
}
.is-ready .hero__scroll { opacity: .7; }

/* ── Intro ────────────────────────────────────────────────── */
.intro { padding: clamp(80px, 16vh, 180px) var(--gutter) clamp(60px, 10vh, 120px); }
.intro__lead {
  max-width: 22ch;
  font: 400 clamp(34px, 5.6vw, 92px)/1.02 var(--serif);
  letter-spacing: -.015em;
  text-indent: 2.2em;
}
.intro__lead em { color: var(--accent); }
.intro__cols {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px var(--gutter);
  margin-top: clamp(60px, 10vh, 120px);
  padding-top: 24px; border-top: 1px solid var(--line);
}
.plain li { font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; }

/* ── Section heads ────────────────────────────────────────── */
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 16px 32px;
  padding: 0 var(--gutter) 18px;
  border-bottom: 1px solid var(--ink);
  margin: 0 0 clamp(40px, 8vh, 90px);
}
.section-head__title {
  font: 400 clamp(56px, 10vw, 168px)/.85 var(--display);
  text-transform: uppercase;
}
.section-head__title em { text-transform: none; font-size: .9em; letter-spacing: -.02em; }
.section-head__count { font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-bottom: 6px; }

/* ── Selected work ────────────────────────────────────────── */
.work { padding: clamp(40px, 8vh, 100px) 0 clamp(80px, 14vh, 160px); }
.work__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(64px, 14vh, 160px);
  padding: 0 var(--gutter);
  align-items: start;
}
.piece { margin: 0; cursor: zoom-in; }
.piece__frame { position: relative; overflow: hidden; background: var(--paper-2); }
.piece__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), filter .6s; }
.piece:hover .piece__frame img { transform: scale(1.035); }
.piece__cap {
  display: grid; grid-template-columns: auto 1fr; gap: 2px 14px;
  margin-top: 14px;
}
.piece__n { font: 500 11px/1.9 var(--sans); letter-spacing: .1em; color: var(--muted); grid-row: span 2; }
.piece__title { font: 400 clamp(22px, 2vw, 30px)/1.05 var(--serif); }
.piece__medium { font-size: 13px; color: var(--muted); }

/* reveal for pieces */
.piece .piece__frame { clip-path: inset(12% 0 0 0); transition: clip-path 1.2s var(--ease-out); }
.piece .piece__frame img { transform: scale(1.12); }
.piece.in .piece__frame { clip-path: inset(0 0 0 0); }
.piece.in .piece__frame img { transform: scale(1); }
.piece.in:hover .piece__frame img { transform: scale(1.035); }
.piece .piece__cap { opacity: 0; transform: translateY(14px); transition: opacity .8s .2s, transform .8s .2s var(--ease-out); }
.piece.in .piece__cap { opacity: 1; transform: none; }

/* layout rhythm — cycles every 8 pieces */
.piece:nth-child(8n+1) { grid-column: 1 / span 7; }
.piece:nth-child(8n+2) { grid-column: 9 / span 4; margin-top: 22vh; }
.piece:nth-child(8n+3) { grid-column: 3 / span 5; }
.piece:nth-child(8n+4) { grid-column: 9 / span 4; margin-top: 8vh; }
.piece:nth-child(8n+5) { grid-column: 2 / span 10; }
.piece:nth-child(8n+6) { grid-column: 1 / span 4; margin-top: 14vh; }
.piece:nth-child(8n+7) { grid-column: 6 / span 7; }
.piece:nth-child(8n+8) { grid-column: 4 / span 6; }

/* ── Index ────────────────────────────────────────────────── */
.index { position: relative; padding: clamp(40px, 8vh, 100px) 0 clamp(80px, 14vh, 160px); }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 4px; }
.filters button {
  font: 500 11px/1 var(--sans); letter-spacing: .1em; text-transform: uppercase;
  padding: 9px 14px; border: 1px solid var(--ink); border-radius: 999px;
  transition: background .25s, color .25s;
}
.filters button sup { font-size: 9px; margin-left: 3px; opacity: .6; }
.filters button:hover { background: var(--paper-2); }
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

.index .section-head { margin-bottom: 0; }
.index__list { padding: 0 var(--gutter); }
.row { border-bottom: 1px solid var(--line); }
.row[hidden] { display: none; }
.row button {
  width: 100%;
  display: grid; grid-template-columns: 60px minmax(0, 2.2fr) minmax(0, 1.6fr) minmax(0, .8fr) 40px;
  align-items: center; gap: 16px;
  padding: 18px 0;
  text-align: left;
  transition: padding .45s var(--ease-out), color .25s;
}
.row__n { font: 500 11px/1 var(--sans); letter-spacing: .1em; color: var(--muted); }
.row__title { font: 400 clamp(24px, 2.6vw, 40px)/1.05 var(--serif); }
.row__medium { font-size: 14px; color: var(--muted); }
.row__cat { font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.row__arrow { justify-self: end; transition: transform .45s var(--ease-out); }
.row__thumb { display: none; }
.row button:hover, .row button:focus-visible { padding-left: 18px; color: var(--accent); }
.row button:hover .row__arrow { transform: translateX(4px) rotate(-45deg); }

.index__preview {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: 260px; pointer-events: none;
  opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.85);
  transition: opacity .3s;
}
.index__preview.is-on { opacity: 1; }
.index__preview img { width: 100%; box-shadow: 0 24px 50px -20px rgba(0,0,0,.5); }

/* ── About ────────────────────────────────────────────────── */
.about {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter);
  padding: clamp(60px, 12vh, 140px) var(--gutter);
  background: var(--ink); color: var(--paper);
  align-items: center;
}
.about .label { color: rgba(242, 238, 232, .55); }
.about__img { grid-column: 1 / span 5; }
.about__text { grid-column: 7 / span 6; }
.about__lead { font: 400 clamp(28px, 3.4vw, 54px)/1.08 var(--serif); margin-bottom: 28px; letter-spacing: -.01em; }
.about__text p:not(.about__lead) { font-size: 17px; max-width: 46ch; opacity: .8; }

/* ── Contact / footer ─────────────────────────────────────── */
.contact { padding: clamp(80px, 16vh, 180px) 0 24px; text-align: center; overflow: hidden; }
.contact .label { margin-bottom: 18px; }
.contact__mail {
  display: inline-block;
  padding: 0 var(--gutter);
  font: 400 clamp(36px, 7.4vw, 128px)/1 var(--serif);
  font-style: italic;
  letter-spacing: -.02em;
  overflow-wrap: anywhere;
  transition: color .3s;
}
.contact__mail:hover { color: var(--accent); }
.contact__marquee {
  margin-top: clamp(60px, 12vh, 140px);
  font: 400 clamp(80px, 16vw, 260px)/.95 var(--display);
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1px var(--ink);
  overflow: hidden;
}
.contact__marquee .marquee__track { gap: .25em; }
.contact__marquee em { -webkit-text-stroke: 0; font-size: .35em; }
.contact__foot {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter) 0; margin-top: 20px;
  border-top: 1px solid var(--line);
  font: 500 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase;
}

/* ── Lightbox ─────────────────────────────────────────────── */
.lightbox {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(21, 19, 17, .97); color: var(--paper);
  display: grid; place-items: center;
  padding: 64px clamp(16px, 7vw, 120px) 24px;
  opacity: 0; transition: opacity .4s;
}
.lightbox[hidden] { display: none; }
.lightbox.is-open { opacity: 1; }
.lightbox__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 14px; max-height: 100%; min-height: 0; }
.lightbox__img { max-width: 100%; max-height: calc(100svh - 150px); width: auto; height: auto; object-fit: contain; transition: opacity .3s; }
.lightbox__img.is-loading { opacity: .25; }
.lightbox__cap { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: 6px 16px; text-align: center; }
.lightbox__n { font: 500 11px/1 var(--sans); letter-spacing: .12em; opacity: .55; }
.lightbox__title { font: 400 24px/1.1 var(--serif); }
.lightbox__medium { font-size: 13px; opacity: .65; }
.lightbox__close {
  position: absolute; top: 18px; right: var(--gutter);
  font: 500 12px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; padding: 6px 0;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(242, 238, 232, .3);
  font-size: 18px;
  transition: background .25s, color .25s;
}
.lightbox__nav:hover { background: var(--paper); color: var(--ink); }
.lightbox__nav--prev { left: var(--gutter); }
.lightbox__nav--next { right: var(--gutter); }

/* ── Loader ───────────────────────────────────────────────── */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  font: 400 clamp(60px, 12vw, 160px)/1 var(--display);
  transition: transform 1s var(--ease);
}
.loader span { animation: pulse 1.2s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .25; } to { opacity: 1; } }
.is-ready .loader { transform: translateY(-100%); }

/* ── Generic reveal ───────────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.reveal.in { opacity: 1; transform: none; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .bar__mid { display: none; }
  .intro__cols { grid-template-columns: 1fr 1fr; }
  .work__grid { row-gap: 56px; }
  .piece:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .piece:nth-child(3n+2) { grid-column: 4 / -1; }
  .piece:nth-child(3n+3) { grid-column: 1 / span 10; }
  .row button { grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 4px 14px; padding: 14px 0; }
  .row__thumb { display: block; grid-row: span 2; width: 64px; height: 64px; object-fit: cover; }
  .row__n, .row__cat { display: none; }
  .row__medium { grid-column: 2; grid-row: 2; font-size: 13px; }
  .row__arrow { grid-column: 3; grid-row: 1 / span 2; }
  .row button:hover { padding-left: 0; }
  .index__preview { display: none; }
  .about__img { grid-column: 1 / -1; max-width: 520px; }
  .about__text { grid-column: 1 / -1; }
  .menu__peek { display: none; }
  .lightbox__nav { top: auto; bottom: 18px; transform: none; width: 44px; height: 44px; }
  .lightbox { padding-bottom: 80px; }
  .lightbox__img { max-height: calc(100svh - 200px); }
}
@media (max-width: 560px) {
  .intro__cols { grid-template-columns: 1fr; gap: 28px; }
  .intro__lead { text-indent: 0; }
  .hero__scroll { display: none; }
  .contact__foot { flex-direction: column; align-items: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .marquee__track { animation: none; }
}
