/* ————————————————————————————————
   CHLOE HAN — The Atelier Archive
   ———————————————————————————————— */
:root {
  --bg: #f4f5f3;
  --ink: #1b1813;
  --ink-soft: rgba(27, 24, 19, 0.55);
  --ink-faint: rgba(27, 24, 19, 0.32);
  --hairline: rgba(27, 24, 19, 0.16);
  --gold: #96742a;
  --serif: "Cormorant", "Cormorant Garamond", Georgia, serif;
  --mono: "Space Mono", "SFMono-Regular", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle paper grain */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 2000;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
::selection { background: var(--gold); color: var(--bg); }

.mono {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ————— top bar ————— */
.bar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 20px 4vw;
  z-index: 100;
  mix-blend-mode: multiply;
}
.bar a.wordmark { font-family: var(--mono); font-size: 12px; letter-spacing: .22em; display: flex; align-items: center; gap: 12px; }
.bar a.wordmark img { height: 30px; width: auto; }
.bar nav { display: flex; gap: 28px; }
.bar nav a { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; position: relative; }
.bar nav a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; height: 1px; width: 100%;
  background: var(--ink); transform: scaleX(0); transform-origin: right;
  transition: transform .45s cubic-bezier(.77,0,.18,1);
}
.bar nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.bar .clock { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; color: var(--ink-soft); min-width: 160px; text-align: right; font-variant-numeric: tabular-nums; }

/* ————— hero ————— */
.hero {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 4vw 6vh;
  position: relative;
}
.hero > * { position: relative; }
.hero-bg {
  position: absolute; inset: 0; overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 96%);
  mask-image: linear-gradient(to bottom, black 40%, transparent 96%);
  will-change: transform;
}
.hero-bg img {
  position: absolute; top: -5%; left: -5%;
  width: 110%; height: 110%;
  object-fit: cover; object-position: center top;
  opacity: 0.9;
  will-change: transform;
}
.hero-bg img.bloom {
  opacity: 0;
  filter: saturate(2) contrast(1.08) brightness(0.97);
  transition: opacity 0.7s ease;
  -webkit-mask-image: radial-gradient(circle var(--br, 400px) at var(--mx, 50%) var(--my, 40%), black 0%, rgba(0,0,0,0.75) 45%, transparent 75%);
  mask-image: radial-gradient(circle var(--br, 400px) at var(--mx, 50%) var(--my, 40%), black 0%, rgba(0,0,0,0.75) 45%, transparent 75%);
}
.hero.bloom-on .hero-bg img.bloom { opacity: 1; }
.hero-bg img.drop {
  opacity: var(--do, 0);
  filter: saturate(2.2) contrast(1.1);
  -webkit-mask-image: radial-gradient(circle var(--dr, 0px) at var(--dx, 50%) var(--dy, 50%), transparent 0%, rgba(0,0,0,0.85) 55%, transparent 78%);
  mask-image: radial-gradient(circle var(--dr, 0px) at var(--dx, 50%) var(--dy, 50%), transparent 0%, rgba(0,0,0,0.85) 55%, transparent 78%);
}
.hero-center {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding-top: 8vh;
}
.hero-logo {
  height: clamp(260px, 42vh, 470px);
  width: auto; max-width: 76vw;
  object-fit: contain;
  will-change: transform, opacity;
}
.hero-sub {
  display: flex; justify-content: space-between; align-items: flex-end;
  border-top: 1px solid var(--hairline);
  margin-top: 4vh; padding-top: 18px;
  gap: 24px; flex-wrap: wrap;
}
.hero-sub .mono { color: var(--ink-soft); }

/* ————— section shell ————— */
section { padding: 14vh 4vw; }
.sec-head {
  display: flex; justify-content: space-between; align-items: baseline;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 14px; margin-bottom: 0;
}
.sec-head h2 {
  font-weight: 500; font-size: clamp(30px, 4.6vw, 72px);
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 1;
}
.sec-head .mono { color: var(--ink-soft); }

/* ————— works index ————— */
.works { padding-bottom: 6vh; }
.work-row {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: baseline;
  gap: 3vw;
  padding: 30px 0 26px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
  cursor: pointer;
  transition: padding-left .5s cubic-bezier(.77,0,.18,1);
}
.work-row:hover { padding-left: 18px; }
.work-row .no { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); }
.work-row h3 {
  font-weight: 500; font-size: clamp(26px, 3.6vw, 56px);
  line-height: 1; text-transform: uppercase; letter-spacing: -0.01em;
  transition: color .3s;
}
.work-row:hover h3 { color: var(--gold); }
.work-row .meta { text-align: right; }
.work-row .meta .cat { color: var(--ink); }
.work-row .meta .mat { color: var(--ink-soft); margin-top: 5px; }
.work-row .badge {
  display: inline-block; border: 1px solid var(--gold); color: var(--gold);
  border-radius: 999px; padding: 3px 10px 2px; margin-top: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
}

/* floating hover preview */
.preview {
  position: fixed; top: 0; left: 0;
  width: 320px; aspect-ratio: 4/3;
  pointer-events: none; overflow: hidden;
  z-index: 90; opacity: 0;
  will-change: transform;
}
.preview img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transition: opacity .25s;
}
.preview img.on { opacity: 1; }

/* ————— gouache to gold (pinned crossfade) ————— */
.g2g-space { height: 320vh; position: relative; padding: 0; }
.g2g {
  position: sticky; top: 0; height: 100svh;
  display: grid; grid-template-columns: 1fr min(46vw, 720px) 1fr;
  align-items: center;
  overflow: hidden;
}
.g2g-copy { padding-left: 4vw; }
.g2g-copy h2 {
  font-size: clamp(28px, 3.2vw, 52px); font-weight: 500;
  text-transform: uppercase; line-height: 1.05;
}
.g2g-copy h2 em { font-style: italic; color: var(--gold); }
.g2g-copy p { margin-top: 18px; max-width: 30ch; color: var(--ink-soft); font-size: 19px; }
.g2g-fig { position: relative; aspect-ratio: 8/5; overflow: hidden; }
.g2g-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.g2g-fig .gold-img { opacity: 0; }
.g2g-side {
  padding-right: 4vw;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.g2g-side .lbl { color: var(--ink-soft); transition: color .3s; }
.g2g-side .track {
  width: 1px; height: 150px; background: var(--hairline);
  position: relative;
}
.g2g-side .track .fill {
  position: absolute; top: 0; left: 0; width: 100%; height: 0%;
  background: var(--gold);
}
.g2g-side .track .fill::after {
  content: ""; position: absolute; bottom: -3px; left: 50%;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold); transform: translateX(-50%);
}
.g2g-hint {
  margin-top: 30px; display: inline-block; color: var(--ink-soft);
  animation: hintPulse 2.2s ease-in-out infinite;
  transition: opacity .5s;
}
@keyframes hintPulse {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(7px); }
}
.g2g-space.engaged .g2g-hint { opacity: 0; animation: none; }

/* ————— gouache horizontal strip ————— */
.strip-space { padding: 0; position: relative; }
.strip-head { padding: 0 4vw 6vh; }
.strip-wrap { overflow: hidden; height: 100svh; display: flex; align-items: center; }
.strip {
  display: flex; gap: 3vw; align-items: center;
  padding: 0 4vw; width: max-content;
  will-change: transform;
}
.strip figure { flex: 0 0 auto; }
.strip img { height: 54vh; width: auto; }
.strip figcaption { margin-top: 10px; color: var(--ink-soft); }

/* ————— archive ————— */
.archive-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 3vw; margin-top: 7vh;
}
.archive-grid > * .imgbox { overflow: hidden; aspect-ratio: 4/3; }
.archive-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.19,1,.22,1); }
.archive-grid > *:hover img { transform: scale(1.05); }
.archive-grid figcaption { margin-top: 12px; }
.archive-grid figcaption .mono { color: var(--ink-soft); }
.arch-card { display: block; }
.arch-card:hover figcaption > div:first-child { color: var(--gold); }

/* ————— about ————— */
.about-grid {
  display: grid; grid-template-columns: minmax(240px, 380px) 1fr;
  gap: 6vw; margin-top: 7vh; align-items: start;
}
.about-grid .portrait { filter: grayscale(1) contrast(1.02); }
.about-copy p {
  font-size: clamp(21px, 2vw, 30px); line-height: 1.45; font-weight: 500;
}
.about-copy p + p { margin-top: 1.2em; }
.about-copy .cred { margin-top: 5vh; color: var(--ink-soft); font-size: 18px; }
.lists { display: grid; grid-template-columns: 1fr 1fr; gap: 4vw; margin-top: 8vh; }
.lists h4 { border-bottom: 1px solid var(--ink); padding-bottom: 10px; margin-bottom: 4px; font-weight: 500; }
.lists ol { list-style: none; }
.lists li {
  display: flex; gap: 16px; padding: 12px 0;
  border-bottom: 1px solid var(--hairline); align-items: baseline;
}
.lists li .n { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); min-width: 26px; }
.lists li a:hover { color: var(--gold); }

/* ————— contact / footer ————— */
.contact { text-align: center; padding-bottom: 8vh; position: relative; }
.contact::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/brand/orchid-2.jpg") center bottom / cover no-repeat;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to top, black 30%, transparent 100%);
  mask-image: linear-gradient(to top, black 30%, transparent 100%);
  pointer-events: none;
}
.contact > * { position: relative; }
.contact .monogram { height: 74px; width: auto; margin: 0 auto 4vh; }
.contact .mono { color: var(--ink-soft); }
.contact .big {
  display: block;
  font-size: clamp(44px, 9vw, 150px);
  font-weight: 500; text-transform: uppercase; line-height: 1;
  margin: 4vh 0; letter-spacing: -0.015em;
  transition: color .3s; font-style: italic;
}
.contact .big:hover { color: var(--gold); }
footer {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 24px 4vw; border-top: 1px solid var(--hairline);
  gap: 16px; flex-wrap: wrap;
}
footer .mono { color: var(--ink-soft); }
footer .links { display: flex; gap: 22px; }
footer .links a:hover { color: var(--gold); }

/* ————— case page ————— */
.case-hero { min-height: 88svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 0 4vw 5vh; position: relative; }
.case-hero::before {
  content: ""; position: absolute; inset: 0;
  background: url("../assets/brand/orchid-1.jpg") center top / cover no-repeat;
  opacity: 0.55;
  -webkit-mask-image: linear-gradient(to bottom, black 30%, transparent 92%);
  mask-image: linear-gradient(to bottom, black 30%, transparent 92%);
  pointer-events: none;
}
.case-hero > * { position: relative; }
.case-hero .no { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin-bottom: 2vh; }
.case-hero h1 {
  font-weight: 500; font-size: clamp(48px, 10.5vw, 170px);
  line-height: 0.94; text-transform: uppercase; letter-spacing: -0.015em;
}
.case-meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px; border-top: 1px solid var(--ink);
  margin-top: 5vh; padding-top: 18px;
}
.case-meta .k { color: var(--ink-soft); display: block; margin-bottom: 8px; }
.case-meta .v { font-size: 17px; line-height: 1.4; }
.case-desc { max-width: 60ch; padding: 10vh 4vw; }
.case-desc p { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.45; font-weight: 500; }
.case-gallery { padding: 4vh 4vw 10vh; display: grid; gap: 5vh; }
.case-gallery figure { overflow: hidden; }
.case-gallery img { width: 100%; }
.case-gallery figcaption { margin-top: 10px; color: var(--ink-soft); }
.case-next { text-align: center; padding: 16vh 4vw; }
.case-next .mono { color: var(--ink-soft); }
.case-next a {
  display: block; font-size: clamp(36px, 7vw, 110px); font-weight: 500;
  text-transform: uppercase; line-height: 1; margin-top: 2vh; letter-spacing: -0.01em;
}
.case-next a:hover { color: var(--gold); }

/* reveal helper */
.rv { opacity: 0; transform: translateY(40px); }

/* ————— responsive ————— */
@media (max-width: 900px) {
  .bar { padding: 14px 5vw; }
  .bar .clock { display: none; }
  .bar nav { gap: 14px; }
  .bar nav a, .bar a.wordmark { font-size: 10px; letter-spacing: .1em; }
  .hero-logo { height: 30vh; }
  .g2g { grid-template-columns: 1fr; padding: 0 6vw; }
  .g2g-copy { padding: 0 0 4vh; }
  .g2g-side { display: none; }
  .work-row { grid-template-columns: 44px 1fr; }
  .work-row .meta { grid-column: 2; text-align: left; margin-top: 6px; }
  .preview { display: none; }
  .archive-grid { grid-template-columns: 1fr; gap: 8vh; }
  .about-grid { grid-template-columns: 1fr; }
  .lists { grid-template-columns: 1fr; }
  .strip img { height: 38vh; }
}
@media (prefers-reduced-motion: reduce) {
  .rv { opacity: 1 !important; transform: none !important; }
}
