/* ─────────────────────────────────────────────
   LongHand Studio
   Paper, ink, and one vermilion seal.
   ───────────────────────────────────────────── */

:root {
  --paper: #ebe5d9;
  --paper-2: #e1dacb;
  --ink: #0c0b0a;
  --red: #d3401f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --pad: clamp(1.1rem, 2.6vw, 3rem);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: clamp(1rem, 1.05vw, 1.15rem);
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.is-dark { background: var(--ink); }
body.is-loading { overflow: hidden; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; }
::selection { background: var(--red); color: var(--paper); }

.mono {
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.4;
}
.label { display: block; opacity: .6; }

h2 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3rem, 8.4vw, 9.5rem);
  line-height: .92;
  letter-spacing: -.035em;
}
h2 em { font-weight: 300; }

/* split-text masks */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.wi { display: inline-block; will-change: transform; }
.ch { display: inline-block; will-change: transform; }

/* ───────── Grain + cursor ───────── */
.grain {
  position: fixed; inset: -50%; z-index: 90; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: .16; mix-blend-mode: overlay;
  animation: grain 1.1s steps(5) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -4%); } 60% { transform: translate(-2%, 3%); }
  80% { transform: translate(3%, 1%); } 100% { transform: translate(0, 0); }
}

.cursor {
  position: fixed; top: 0; left: 0; z-index: 100; pointer-events: none;
  width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
  background: var(--paper); mix-blend-mode: difference;
  display: grid; place-items: center;
  transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), background .3s;
}
.cursor__label {
  font-family: var(--mono); font-size: .6rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink); opacity: 0; white-space: nowrap; transition: opacity .25s;
}
.cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor.is-label { width: 92px; height: 92px; margin: -46px 0 0 -46px; }
.cursor.is-label .cursor__label { opacity: 1; }
@media (hover: none) { .cursor { display: none; } }

/* ───────── Loader ───────── */
.loader {
  position: fixed; inset: 0; z-index: 200; background: var(--ink); color: var(--paper);
  display: flex; flex-direction: column; justify-content: flex-end; padding: var(--pad);
  clip-path: inset(0 0 0 0);
}
.loader__mark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 4.4rem);
  letter-spacing: -.03em; white-space: nowrap; overflow: hidden;
}
.loader__mark > * { display: inline-block; }
.loader__row { display: flex; justify-content: space-between; align-items: flex-end; }
.loader__count b { font-family: var(--serif); font-weight: 300; font-size: clamp(3rem, 9vw, 8rem); letter-spacing: -.04em; line-height: .8; font-variant-numeric: tabular-nums; }
.loader__bar { height: 1px; background: rgba(235, 229, 217, .18); margin-top: 1rem; }
.loader__bar i { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }

/* ───────── Fixed chrome ───────── */
#ink { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 1.3rem var(--pad);
  color: var(--paper); mix-blend-mode: difference;
}
.nav__brand { font-family: var(--serif); font-size: clamp(1.15rem, 4.2vw, 1.45rem); letter-spacing: -.02em; white-space: nowrap; }
.nav__links { display: flex; gap: clamp(1rem, 2.4vw, 2.6rem); }
.nav__links a { position: relative; padding: .3rem 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }

.progress { position: fixed; right: 0; top: 0; bottom: 0; width: 2px; z-index: 50; mix-blend-mode: difference; }
.progress i { display: block; width: 100%; height: 100%; background: var(--paper); transform: scaleY(0); transform-origin: top; }

main { position: relative; }
section, footer { position: relative; }

/* ───────── Hero ───────── */
.hero {
  z-index: 1; min-height: 100svh; padding: 6.5rem var(--pad) 1.6rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.hero__top { display: flex; justify-content: space-between; gap: 1rem; opacity: .7; }
.hero__title {
  font-family: var(--serif); font-weight: 300; line-height: .78; letter-spacing: -.045em;
  font-size: clamp(4.4rem, 20.5vw, 26rem);
  display: flex; flex-direction: column; margin: auto 0;
}
.hero__l1, .hero__l2 { display: block; overflow: hidden; padding: .06em 0 .3em; margin-bottom: -.3em; }
.hero__l2 { align-self: flex-end; padding-right: .08em; }
.hero__l2 em { font-weight: 300; }
.seal {
  display: inline-block; width: .11em; height: .11em; border-radius: 50%; background: var(--red);
  margin-left: .06em; transform: scale(0);
}
.hero__foot { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1.5rem; }
.hero__foot > :last-child { text-align: right; }
.hero__lede { font-family: var(--serif); font-size: clamp(1.15rem, 1.7vw, 1.7rem); line-height: 1.2; max-width: 24ch; text-align: center; font-style: italic; }
.hero__scroll { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ───────── Manifesto ───────── */
.manifesto { z-index: 1; padding: clamp(7rem, 18vh, 14rem) var(--pad) clamp(4rem, 10vh, 8rem); }
.manifesto__text {
  font-family: var(--serif); font-weight: 300; letter-spacing: -.025em; line-height: 1.02;
  font-size: clamp(2.1rem, 5.6vw, 6.4rem);
  max-width: 17ch; margin: 2.2rem 0 0 auto; width: min(100%, 76vw);
  max-width: none;
}
.manifesto__text em { color: var(--red); }
.manifesto__text .wd { display: inline-block; opacity: .12; }
.manifesto__line { display: block; width: min(100%, 1200px); margin: clamp(3rem, 8vh, 6rem) 0 0 auto; opacity: .85; }

/* ───────── Marquee ───────── */
.marquee { z-index: 1; overflow: hidden; padding: 1.2rem 0 clamp(4rem, 10vh, 8rem); }
.marquee__track { display: flex; width: max-content; will-change: transform; }
.marquee__track span {
  font-family: var(--serif); font-style: italic; font-weight: 300; white-space: nowrap;
  font-size: clamp(4rem, 13vw, 15rem); line-height: 1; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px var(--ink);
  padding-right: .25em;
}
.marquee__track i { display: inline-block; width: .13em; height: .13em; border-radius: 50%; background: var(--red); vertical-align: middle; margin: 0 .22em; }

/* ───────── The Collection ───────── */
.room { z-index: 3; height: 820vh; background: var(--ink); color: var(--paper); }
.room__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
#room { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.room__sticky::after { /* vignette */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(12, 11, 10, .75) 100%);
}
.room__intro {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; gap: 2rem; pointer-events: none;
}
.room__intro h2 { font-size: clamp(3.4rem, 11vw, 13rem); }
.room__intro h2 em { color: var(--red); }
.room__hud {
  position: absolute; z-index: 2; top: 5.2rem; left: var(--pad); right: var(--pad);
  display: flex; justify-content: space-between; opacity: .55;
}
.room__caption {
  position: absolute; z-index: 2; bottom: clamp(2.2rem, 6vh, 4rem); left: var(--pad);
  max-width: min(30rem, 80vw); opacity: 0;
  transition: left .01s;
}
.room__caption.is-right { left: auto; right: var(--pad); text-align: right; }
.room__num { display: flex; align-items: baseline; gap: .6rem; font-family: var(--serif); }
.room__caption.is-right .room__num { justify-content: flex-end; }
.room__num b { font-weight: 300; font-size: clamp(3.4rem, 7vw, 7rem); line-height: .8; letter-spacing: -.04em; color: var(--red); font-variant-numeric: tabular-nums; }
.room__num span { font-size: 1.1rem; opacity: .5; }
.room__caption h3 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(2rem, 3.6vw, 3.6rem); line-height: 1; letter-spacing: -.02em; margin: .9rem 0 .7rem; }
.room__caption p { opacity: .6; }
.room__status { margin-top: .7rem; }
.room__status::before { content: ""; display: inline-block; width: .5em; height: .5em; border-radius: 50%; border: 1px solid currentColor; margin-right: .7em; }
.room__caption .room__status.is-available { opacity: 1; color: var(--red); }
.room__status.is-available::before { background: var(--red); border-color: var(--red); }
.room__enquire[hidden] { display: none; }
.room__enquire { display: inline-flex; gap: .7rem; margin-top: 1.3rem; padding-bottom: .35rem; border-bottom: 1px solid rgba(235, 229, 217, .35); transition: border-color .3s, color .3s; }
.room__enquire:hover { color: var(--red); border-color: var(--red); }
.room__enquire span { transition: transform .4s var(--ease); }
.room__enquire:hover span { transform: translateX(.35rem); }
.room__bar { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; height: 2px; background: rgba(235, 229, 217, .1); }
.room__bar i { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: left; }

/* ───────── Artist ───────── */
.artist { z-index: 3; background: var(--paper); padding: clamp(6rem, 16vh, 12rem) var(--pad) clamp(5rem, 12vh, 9rem); min-height: 100vh; }
.artist__head h2 { margin-top: 1.6rem; max-width: 9ch; }
.artist__head h2 em { color: var(--red); }
.artist__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 7rem); margin-top: clamp(3rem, 9vh, 7rem); align-items: start; }
.portrait { perspective: 1200px; }
.portrait__inner {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink);
  clip-path: inset(100% 0 0 0); transform-style: preserve-3d; will-change: transform;
}
.portrait__inner img { position: absolute; inset: -8% 0; width: 100%; height: 116%; object-fit: cover; object-position: 50% 40%; filter: grayscale(1) contrast(1.08); transition: filter 1.2s var(--ease); }
.portrait:hover .portrait__inner img { filter: grayscale(0) contrast(1); }
.portrait__ph {
  position: absolute; inset: -8% 0; height: 116%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .8rem;
  color: var(--paper);
  background:
    radial-gradient(120% 80% at 30% 20%, rgba(211, 64, 31, .28), transparent 60%),
    radial-gradient(90% 70% at 80% 90%, rgba(235, 229, 217, .12), transparent 60%),
    #151311;
}
.portrait__ph em { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 5vw, 5rem); letter-spacing: -.03em; }
.portrait__ph span { opacity: .55; }
.portrait figcaption { display: flex; justify-content: space-between; margin-top: .9rem; opacity: .65; }
.artist__lead { font-family: var(--serif); font-weight: 300; font-size: clamp(1.7rem, 3.1vw, 3.3rem); line-height: 1.06; letter-spacing: -.02em; }
.artist__cols { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.4rem, 3vw, 3rem); margin-top: clamp(2rem, 5vh, 3.6rem); max-width: 46rem; opacity: .82; }
.artist__cols p + p { margin-top: 1.1em; }
.artist__close { font-family: var(--serif); font-weight: 300; font-size: clamp(1.6rem, 2.7vw, 2.9rem); line-height: 1.08; letter-spacing: -.02em; max-width: 22ch; margin-top: clamp(2.6rem, 7vh, 5rem); }
.artist__close em { color: var(--red); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(2.4rem, 6vh, 4.5rem); border-top: 1px solid rgba(12, 11, 10, .18); }
.facts > div { padding: 1.1rem 1rem 0 0; }
.facts dt { opacity: .55; margin-bottom: .5rem; }
.facts dd { font-family: var(--serif); font-size: clamp(1.3rem, 1.9vw, 1.9rem); line-height: 1.1; }
.signature { display: block; width: min(18rem, 60%); margin-top: clamp(2rem, 5vh, 3.5rem); color: var(--red); }

/* ───────── Practice ───────── */
.practice { z-index: 3; background: var(--paper); padding: clamp(4rem, 10vh, 8rem) var(--pad) clamp(6rem, 14vh, 11rem); }
.practice__head h2 { margin-top: 1.6rem; }
.practice__head h2 em { color: var(--red); }
.practice__list { margin-top: clamp(3rem, 8vh, 6rem); border-top: 1px solid rgba(12, 11, 10, .2); }
.row {
  position: relative; display: grid; grid-template-columns: 5rem minmax(0, 1.25fr) minmax(0, 1fr) 3rem; align-items: center; gap: 1.5rem;
  padding: clamp(1.5rem, 3.6vh, 2.6rem) 0; border-bottom: 1px solid rgba(12, 11, 10, .2);
  transition: color .5s var(--ease), padding .6s var(--ease);
}
.row::before {
  content: ""; position: absolute; inset: 0 calc(var(--pad) * -1); background: var(--ink); z-index: 0;
  transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease);
}
.row > * { position: relative; z-index: 1; }
.row h3 { font-family: var(--serif); font-weight: 300; font-size: clamp(2rem, 5vw, 5.4rem); line-height: 1; letter-spacing: -.03em; transition: transform .6s var(--ease), font-style .1s; }
.row p { opacity: .7; max-width: 30ch; }
.row__n { opacity: .55; }
.row__a { font-size: 1.6rem; justify-self: end; transition: transform .6s var(--ease), color .4s; }
@media (hover: hover) {
  .row:hover { color: var(--paper); }
  .row:hover::before { transform: scaleY(1); transform-origin: top; }
  .row:hover h3 { transform: translateX(1.2rem); font-style: italic; }
  .row:hover .row__a { transform: rotate(45deg); color: var(--red); }
}

/* ───────── Contact + footer (dark, ribbon floats over) ───────── */
.contact {
  z-index: 1; color: var(--paper); min-height: 100vh; padding: clamp(7rem, 18vh, 13rem) var(--pad) 4rem;
  display: flex; flex-direction: column; justify-content: center;
}
.contact__title { font-size: clamp(3.4rem, 11.5vw, 14rem); margin: 1.8rem 0 1.4rem; max-width: 9ch; }
.contact__title em { color: var(--red); }
.contact__sub { opacity: .6; max-width: 28ch; }
.contact__mail {
  display: inline-block; align-self: flex-start; margin-top: clamp(2.4rem, 6vh, 4.5rem);
  font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(1.6rem, 4vw, 4.2rem); letter-spacing: -.02em; line-height: 1.1;
}
.contact__mail span { background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: .12em; transition: background-size .7s var(--ease), color .4s; }
.contact__mail:hover span { background-size: 0 1px; background-position: 100% 100%; color: var(--red); }
.contact__links { display: flex; gap: clamp(1.4rem, 3vw, 3rem); margin-top: 3rem; }
.contact__links a { display: inline-block; padding: .5rem 0; opacity: .7; transition: opacity .3s, color .3s; }
.contact__links a:hover { opacity: 1; color: var(--red); }

.footer { z-index: 1; color: var(--paper); padding: 2rem var(--pad) 0; overflow: hidden; }
.footer__row { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.2rem; border-top: 1px solid rgba(235, 229, 217, .18); opacity: .75; }
.footer__mark {
  font-family: var(--serif); font-weight: 300; white-space: nowrap; text-align: center;
  font-size: 15.6vw; line-height: .95; letter-spacing: -.05em; margin: 2rem 0 -.12em;
}

/* ───────── Responsive ───────── */
@media (max-width: 860px) {
  .nav__links a:not(:last-child):not(:first-child) { display: none; }
  .hero__top span:last-child { display: none; }
  .room__hud span:first-child { display: none; }
  .room__hud { white-space: nowrap; }
  .nav__links { gap: .9rem; }
  .hero__title { font-size: 23vw; }
  .hero__foot { grid-template-columns: 1fr; gap: 1rem; }
  .hero__lede { text-align: left; }
  .hero__foot > :last-child { text-align: left; }
  .hero__scroll { display: none; }
  .manifesto__text { width: 100%; }
  .artist__grid { grid-template-columns: 1fr; }
  .artist__cols { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .row { grid-template-columns: 2.4rem 1fr 2rem; }
  .row p { grid-column: 2 / 3; grid-row: 2; }
  .room__caption, .room__caption.is-right { left: var(--pad); right: auto; text-align: left; }
  .room__caption.is-right .room__num { justify-content: flex-start; }
  .footer__row { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .grain, .hero__scroll { animation: none; }
}
