/* ============================================================
   HAILEY · the HI. studio — gallery after dark
   ink room, cadmium accents, Fraunces display / Hanken body
   ============================================================ */

:root {
  --ink:      #120e17;
  --ink-2:    #171221;
  --ink-3:    #201a2b;
  --paper:    #f4f1ea;
  --paper-dim:#cdc5c9;
  --mute:     #94899a;
  --pink:     #f6a9c9;
  --pink-deep:#e27ba6;
  --cobalt:   #2b58b8;
  --sky:      #6fa3d8;
  --teal:     #1e6f5e;
  --crimson:  #a5352c;

  --font-display: "Fraunces", "Georgia", serif;
  --font-body: "Hanken Grotesk", "Segoe UI", sans-serif;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--pink) var(--ink);
}

body {
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-weight: 340;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ---------- atmosphere layers ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 12% 6%, rgba(246, 169, 201, .13), transparent 62%),
    radial-gradient(55% 48% at 88% 88%, rgba(124, 78, 168, .18), transparent 62%),
    radial-gradient(70% 55% at 82% 10%, rgba(43, 88, 184, .10), transparent 65%),
    linear-gradient(165deg, #1a1224 0%, #120e17 46%, #170f20 100%);
  overflow: hidden;
}
.bg::after {
  content: "";
  position: absolute;
  width: 62vmax;
  height: 62vmax;
  left: -14vmax;
  top: -18vmax;
  background: radial-gradient(circle, rgba(246, 169, 201, .15), transparent 62%);
  filter: blur(46px);
  animation: bg-drift 26s ease-in-out infinite alternate;
}
@keyframes bg-drift {
  to { transform: translate(34vw, 30vh) scale(1.2); }
}

#gl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 60;
  pointer-events: none;
  opacity: .07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.1s steps(4) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 3%); }
  50% { transform: translate(3%, -2%); }
  75% { transform: translate(-3%, -3%); }
  100% { transform: translate(2%, 2%); }
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 42%, transparent 55%, rgba(8, 5, 12, .58) 100%);
}

/* ---------- loader ---------- */

#loader {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  display: grid;
  place-content: center;
  gap: 22px;
  justify-items: center;
  transition: opacity .001s;
}

.loader-mark { position: relative; line-height: 1; }

.loader-hi {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(84px, 16vw, 180px);
  font-variation-settings: "opsz" 144;
  letter-spacing: -.03em;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 234, .28);
}

.loader-hi--fill {
  position: absolute;
  inset: 0;
  -webkit-text-stroke: 0;
  color: var(--pink);
  clip-path: inset(100% 0 0 0);
}

.loader-line {
  width: min(260px, 50vw);
  height: 1px;
  background: rgba(244, 241, 234, .14);
  overflow: hidden;
}
.loader-line i {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--pink);
}

.loader-note {
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ---------- header ---------- */

#top-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  gap: clamp(18px, 4vw, 46px);
  padding: 20px clamp(20px, 4.5vw, 56px);
  transition: background .5s, backdrop-filter .5s, padding .5s;
}
#top-bar.is-solid {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(18, 14, 23, .58);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  font-size: 30px;
  letter-spacing: -.02em;
  color: var(--paper);
  text-decoration: none;
  line-height: 1;
}
.brand-dot { color: var(--pink); }

#top-bar nav {
  margin-left: auto;
  display: flex;
  gap: clamp(16px, 3vw, 34px);
}
#top-bar nav a {
  color: var(--paper-dim);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  position: relative;
  transition: color .3s;
}
#top-bar nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: -6px;
  height: 2px;
  background: var(--pink);
  transition: right .35s var(--ease-out);
}
#top-bar nav a:hover { color: var(--paper); }
#top-bar nav a:hover::after { right: 0; }

.pill {
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--pink);
  padding: 11px 22px;
  border-radius: 99px;
  text-decoration: none;
  font-weight: 700;
  transition: transform .3s var(--ease-out), background .3s;
}
.pill:hover { transform: rotate(-2deg) scale(1.05); background: var(--paper); }

/* ---------- shared section bones ---------- */

main { position: relative; z-index: 10; }

.panel { position: relative; }

.kicker {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--pink);
  margin-bottom: 18px;
}

h2 {
  font-family: var(--font-display);
  font-weight: 620;
  font-variation-settings: "opsz" 144;
  font-size: clamp(44px, 6.4vw, 92px);
  line-height: .98;
  letter-spacing: -.02em;
}
h2 em {
  font-style: italic;
  font-weight: 400;
  color: var(--pink);
}

/* ---------- hero ---------- */

#hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-stage {
  position: relative;
  width: min(1200px, 94vw);
  height: min(78vh, 760px);
  display: grid;
  place-items: center;
}

.hero-eyebrow {
  position: absolute;
  top: 6%;
  left: 50%;
  transform: translateX(-50%);
  font-size: 13px;
  letter-spacing: .5em;
  text-transform: uppercase;
  color: var(--paper-dim);
  overflow: hidden;
  white-space: nowrap;
}
.hero-eyebrow span { display: inline-block; }

.hero-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  font-size: clamp(74px, 15.5vw, 236px);
  letter-spacing: .01em;
  line-height: 1;
  color: var(--paper);
  white-space: nowrap;
  z-index: 1;
  display: flex;
  overflow: hidden;
}
.hero-title .ch { display: inline-block; }

.hero-title--ghost {
  z-index: 3;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 234, .3);
  pointer-events: none;
}

#hero-avatar {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  clip-path: inset(9.5% 0 0 0); /* trims a bg-removal artifact above the hair */
  height: min(66vh, 640px);
  max-width: none;
  z-index: 2;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .55));
  user-select: none;
}

.hero-sub {
  position: absolute;
  bottom: 4%;
  left: 0;
  max-width: 300px;
  z-index: 4;
  font-size: 14px;
  color: var(--paper-dim);
  text-shadow: 0 1px 14px rgba(18, 14, 23, .9), 0 0 3px rgba(18, 14, 23, .7);
}
.hero-sub em {
  display: block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 480;
  font-variation-settings: "opsz" 144;
  font-size: clamp(28px, 3.4vw, 44px);
  color: var(--pink);
  margin-bottom: 10px;
}
.hero-sub b { color: var(--paper); }

.scroll-cue {
  position: absolute;
  bottom: 26px;
  right: clamp(20px, 4.5vw, 56px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 4;
}
.scroll-cue-text {
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--mute);
}
.scroll-cue-drip {
  width: 2px;
  height: 54px;
  background: linear-gradient(var(--pink), transparent);
  animation: drip 1.8s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes drip {
  0% { transform: scaleY(0); }
  55% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ---------- fly-through + marquee ---------- */

#flythrough {
  height: 130vh;
  position: relative;
  padding-top: 20vh;
}

.marquee {
  position: sticky;
  top: 42vh;
  overflow: hidden;
  transform: rotate(-2.5deg);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 26s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: "opsz" 144;
  font-size: clamp(44px, 7vw, 100px);
  letter-spacing: .02em;
  white-space: nowrap;
  color: transparent;
  -webkit-text-stroke: 1px rgba(244, 241, 234, .34);
}
.marquee-track span i {
  font-style: normal;
  -webkit-text-stroke: 0;
  color: var(--pink);
}
@keyframes marquee {
  to { transform: translateX(-33.333%); }
}

/* ---------- the work ---------- */

#work {
  height: 560vh;
  position: relative;
}

.work-hud {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  pointer-events: none;
}

.work-label {
  position: absolute;
  top: clamp(84px, 12vh, 130px);
  left: clamp(20px, 4.5vw, 56px);
  max-width: 380px;
}
.work-label h2 { margin-bottom: 14px; }
.work-hint {
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--paper-dim);
}
.work-hint b { color: var(--pink); font-weight: 600; }

.work-caption {
  position: absolute;
  left: clamp(20px, 4.5vw, 56px);
  bottom: clamp(26px, 6vh, 60px);
  display: grid;
  gap: 4px;
  padding-left: 18px;
  border-left: 2px solid var(--pink);
}
.caption-no {
  font-size: 11px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--mute);
}
.caption-title {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
  font-size: clamp(26px, 3vw, 40px);
  color: var(--paper);
  line-height: 1.05;
}
.caption-meta {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
}
.caption-view {
  justify-self: start;
  margin-top: 10px;
  pointer-events: auto;
  background: none;
  border: 1px solid rgba(244, 241, 234, .3);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 9px 18px;
  border-radius: 99px;
  cursor: pointer;
  transition: background .3s, color .3s, border-color .3s;
}
.caption-view:hover {
  background: var(--pink);
  border-color: var(--pink);
  color: var(--ink);
}

.dot-nav {
  position: absolute;
  right: clamp(18px, 3.5vw, 44px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 14px;
  pointer-events: auto;
}
.dot-nav button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, .4);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: transform .3s var(--ease-out), background .3s, border-color .3s;
}
.dot-nav button.is-on {
  background: var(--pink);
  border-color: var(--pink);
  transform: scale(1.5);
}

.fallback-grid { display: none; }

/* ---------- artist ---------- */

#artist {
  padding: clamp(110px, 16vh, 190px) clamp(20px, 4.5vw, 56px) 60px;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 14, 23, .82) 18%, rgba(18, 14, 23, .82) 82%, transparent 100%);
}

.artist-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 420px) 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}

.artist-frame {
  position: relative;
  transform: rotate(-2deg);
}
.artist-frame img {
  width: 100%;
  display: block;
  border: 10px solid var(--paper);
  box-shadow: 0 34px 70px rgba(0, 0, 0, .5);
}
.artist-frame::after {
  content: "";
  position: absolute;
  inset: -14px;
  border: 1px solid rgba(244, 241, 234, .16);
  transform: rotate(1.4deg);
  pointer-events: none;
}
.artist-frame figcaption {
  margin-top: 16px;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 60;
  color: var(--mute);
  font-size: 15px;
}

.artist-copy p {
  max-width: 56ch;
  margin-bottom: 18px;
  color: var(--paper-dim);
  font-size: clamp(15px, 1.25vw, 17px);
}
.artist-copy h2 { margin-bottom: 22px; }
.artist-copy b { color: var(--paper); font-weight: 600; }

.artist-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}
.artist-chips li {
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 9px 16px;
  border-radius: 99px;
  border: 1px solid rgba(244, 241, 234, .22);
  color: var(--paper-dim);
  transition: border-color .3s, color .3s, transform .3s;
}
.artist-chips li:hover {
  border-color: var(--pink);
  color: var(--pink);
  transform: rotate(-1.5deg);
}

.doxie-lane {
  max-width: 1160px;
  margin: 70px auto 0;
  height: 64px;
  position: relative;
  border-bottom: 1px dashed rgba(244, 241, 234, .14);
  overflow: hidden;
}
.doxie {
  position: absolute;
  bottom: 0;
  left: -160px;
  width: 132px;
  color: var(--pink);
  opacity: .95;
}
.doxie .shade { fill: var(--pink-deep); }
.doxie .ink { fill: var(--ink); }
.doxie .ink-line { stroke: var(--ink); stroke-width: 2.6; fill: none; stroke-linecap: round; }
.doxie .blush { fill: var(--paper); opacity: .35; }
.doxie-lane.is-walking .doxie {
  animation: trot 9s linear forwards;
}
@keyframes trot {
  0% { transform: translateX(0) translateY(0); }
  10% { transform: translateX(14vw) translateY(-1px); }
  20% { transform: translateX(28vw) translateY(0); }
  30% { transform: translateX(42vw) translateY(-1px); }
  100% { transform: translateX(calc(100vw + 280px)) translateY(0); }
}

/* ---------- commission ---------- */

#commission {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 140px clamp(20px, 4.5vw, 56px) 0;
}

.commission-inner {
  max-width: 1160px;
  margin: 0 auto;
  width: 100%;
  text-align: center;
}

.commission-title {
  font-size: clamp(56px, 9vw, 140px);
  margin-bottom: 26px;
}

.commission-sub {
  max-width: 52ch;
  margin: 0 auto 44px;
  color: var(--paper-dim);
}

.cta {
  display: inline-block;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 560;
  font-variation-settings: "opsz" 144;
  font-size: clamp(30px, 4.4vw, 58px);
  color: var(--ink);
  text-decoration: none;
  background: var(--pink);
  padding: .5em 1.2em;
  border-radius: 999px;
  position: relative;
  overflow: hidden;
  transition: transform .35s var(--ease-out), box-shadow .35s;
  box-shadow: 0 20px 60px rgba(246, 169, 201, .24);
}
.cta b { font-weight: 900; font-style: normal; }
.cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateX(-101%);
  transition: transform .45s var(--ease-out);
  border-radius: inherit;
  z-index: -0;
}
.cta:hover { transform: rotate(-2deg) scale(1.04); box-shadow: 0 26px 80px rgba(246, 169, 201, .38); }
.cta span, .cta b { position: relative; }

.commission-note {
  margin-top: 22px;
  font-size: 13px;
  color: var(--mute);
  font-style: italic;
}

footer {
  max-width: 1160px;
  margin: 120px auto 0;
  width: 100%;
  padding: 30px 0 34px;
  border-top: 1px solid rgba(244, 241, 234, .12);
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.foot-mark {
  font-family: var(--font-display);
  font-weight: 900;
  font-variation-settings: "opsz" 144;
  font-size: 26px;
}
.foot-line {
  color: var(--mute);
  font-size: 13px;
  letter-spacing: .06em;
}
.foot-top {
  margin-left: auto;
  color: var(--paper-dim);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
}
.foot-top:hover { color: var(--pink); }

/* ---------- lightbox ---------- */

#lightbox {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: rgba(14, 9, 18, .9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  place-items: center;
  padding: 5vmin;
}
#lightbox[hidden] { display: none; }

#lightbox figure {
  display: grid;
  gap: 16px;
  justify-items: center;
}
#lightbox img {
  max-height: 78vh;
  max-width: 90vw;
  border: 12px solid var(--paper);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .7);
}
#lightbox figcaption {
  font-family: var(--font-display);
  font-style: italic;
  font-variation-settings: "opsz" 60;
  font-size: 18px;
  color: var(--paper-dim);
}

.lightbox-close {
  position: absolute;
  top: 22px;
  right: 30px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, .3);
  background: none;
  color: var(--paper);
  font-size: 26px;
  cursor: pointer;
  transition: background .3s, color .3s, transform .3s;
}
.lightbox-close:hover {
  background: var(--pink);
  color: var(--ink);
  transform: rotate(90deg);
}

/* ---------- no-WebGL fallback ---------- */

body.no-gl #gl,
body.no-gl .work-hud .work-caption,
body.no-gl .dot-nav { display: none; }

body.no-gl #work { height: auto; }
body.no-gl .work-hud {
  position: static;
  height: auto;
  pointer-events: auto;
}
body.no-gl .work-label { position: static; margin: 140px 0 40px; }
body.no-gl .fallback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px;
  padding: 0 clamp(20px, 4.5vw, 56px) 120px;
}
body.no-gl .fallback-grid img {
  width: 100%;
  border: 8px solid var(--paper);
}
body.no-gl #hero-avatar { filter: none; }

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .artist-grid { grid-template-columns: 1fr; }
  .artist-frame { max-width: 380px; margin: 0 auto; }
  .hero-sub { max-width: 240px; }
  #top-bar nav { display: none; }
}

@media (max-width: 640px) {
  .hero-stage { height: 74vh; }
  .hero-eyebrow { letter-spacing: .3em; top: 4%; }
  .hero-title {
    font-size: clamp(64px, 19vw, 110px);
    top: 12%;
    transform: translate(-50%, 0);
  }
  .hero-title--ghost { display: none; }
  #hero-avatar { height: min(52vh, 480px); }
  .hero-sub {
    left: 50%;
    transform: translateX(-50%);
    bottom: -4%;
    text-align: center;
    max-width: 320px;
  }
  .hero-sub span { display: none; }
  .scroll-cue { display: none; }
  .work-label { max-width: 300px; }
  .dot-nav { display: none; }
  .work-caption { right: 20px; }
  .pill { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee-track { animation: none; }
  .grain { animation: none; }
  .scroll-cue-drip { animation: none; }
  .doxie-lane.is-walking .doxie { animation: none; left: 20px; }
}
