/* ============================================================
   Atelier Adrien Vasseur — one day of light
   Dawn → morning → golden hour → afternoon → dusk → night
   ============================================================ */

:root {
  --bg: #ECEAE5;          /* dawn plaster — tweened through the day by JS */
  --ink: #191713;
  --sun: #E4C98F;
  --mute: color-mix(in oklab, var(--ink) 52%, var(--bg));
  --line: color-mix(in oklab, var(--ink) 16%, transparent);
  --hair: 1px;
  --font-display: "Italiana", serif;
  --font-body: "Jost", sans-serif;
  --gutter: clamp(1.5rem, 5vw, 5rem);
}

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

html { scroll-behavior: auto; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--sun); color: #191713; }

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 1px solid currentColor;
  outline-offset: 5px;
}

sup { font-size: 0.55em; }

.dot { font-style: normal; color: color-mix(in oklab, var(--sun) 80%, var(--ink)); }

/* ---------- eyebrows / labels ---------- */
.section-eyebrow,
.work-meta, .work-scale,
.hero-eyebrow, .hero-cue,
.gauge-time, .gauge-phase,
.ix-year, .ix-status,
.facts dt, .night-address, .night-foot, .loader-word {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mute);
}

/* ============ Preloader ============ */
.loader {
  position: fixed; inset: 0; z-index: 60;
  background: #ECEAE5;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 2.2rem;
}
.loader-scene { position: relative; width: min(280px, 60vw); height: 80px; }
.loader-horizon {
  position: absolute; left: 0; right: 0; bottom: 24px;
  height: var(--hair); background: #191713;
  transform: scaleX(0);
}
.loader-sun {
  position: absolute; left: 50%; bottom: 24px;
  width: 22px; height: 22px; margin-left: -11px;
  border-radius: 50%; background: #E4C98F;
  transform: translateY(24px); opacity: 0;
}
.loader-word { color: #8d897f; }

/* ============ Sun gauge (fixed, right edge) ============ */
.sun-gauge {
  position: fixed; right: clamp(0.9rem, 2.5vw, 2.2rem); top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex; flex-direction: column; align-items: center; gap: 0.9rem;
  pointer-events: none;
  opacity: 0;
}
.gauge-time, .gauge-phase {
  color: var(--mute);
  writing-mode: vertical-rl;
  letter-spacing: 0.28em;
  font-variant-numeric: tabular-nums;
}
.gauge-line {
  position: relative;
  width: var(--hair); height: 34vh; min-height: 180px;
  background: var(--line);
}
.gauge-horizon {
  position: absolute; left: 50%; top: 68%;
  width: 13px; height: var(--hair);
  transform: translateX(-50%);
  background: var(--mute);
}
.gauge-disc {
  position: absolute; left: 50%; top: 68%;
  width: 11px; height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--sun);
  box-shadow: 0 0 14px 1px color-mix(in oklab, var(--sun) 65%, transparent);
}
.gauge-disc.is-set {
  background: transparent;
  border: 1px solid var(--mute);
  box-shadow: none;
}

/* ============ Nav ============ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: clamp(1.2rem, 3vw, 2rem) var(--gutter);
  mix-blend-mode: normal;
}
.nav-mark {
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  line-height: 1.5;
}
.nav-links { display: flex; gap: clamp(1.2rem, 3vw, 2.6rem); }
.nav-links a {
  font-size: 0.6875rem; font-weight: 400;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute);
  padding-bottom: 3px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size 0.45s cubic-bezier(0.22,1,0.36,1), color 0.3s;
}
.nav-links a:hover { color: var(--ink); background-size: 100% 1px; }

/* ============ Hero — dawn ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--gutter);
  overflow: hidden;
}
.hero-shadow {
  position: absolute; inset: -20%;
  background: linear-gradient(112deg,
    transparent 0%, transparent 38%,
    color-mix(in oklab, var(--ink) 7%, transparent) 47%,
    color-mix(in oklab, var(--ink) 7%, transparent) 60%,
    transparent 70%);
  animation: shadow-drift 46s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes shadow-drift {
  from { transform: translateX(-6%) rotate(0.001deg); }
  to   { transform: translateX(7%)  rotate(0.001deg); }
}
.hero-eyebrow { margin-bottom: clamp(1.4rem, 3vh, 2.6rem); }
.hero-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(3.4rem, 10.5vw, 9.8rem);
  line-height: 0.98;
  letter-spacing: 0.015em;
  text-transform: uppercase;
}
.line-mask { display: block; overflow: hidden; padding-bottom: 0.06em; }
.line { display: block; }
.line-indent { margin-left: clamp(1.5rem, 12vw, 11rem); }
.hero-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 3rem;
  margin-top: clamp(2.2rem, 6vh, 4.5rem);
}
.hero-note { max-width: 34ch; color: var(--mute); }
.hero-cue { display: flex; align-items: center; gap: 1rem; white-space: nowrap; }
.cue-line {
  display: inline-block; width: 64px; height: var(--hair);
  background: var(--mute);
  transform-origin: left center;
  animation: cue-sweep 2.8s cubic-bezier(0.6,0,0.3,1) infinite;
}
@keyframes cue-sweep {
  0% { transform: scaleX(0); transform-origin: left center; }
  45% { transform: scaleX(1); transform-origin: left center; }
  55% { transform: scaleX(1); transform-origin: right center; }
  100% { transform: scaleX(0); transform-origin: right center; }
}

/* ============ Works ============ */
.works { padding: clamp(6rem, 14vh, 11rem) var(--gutter) clamp(4rem, 10vh, 8rem); }
.works > .section-eyebrow { margin-bottom: clamp(4rem, 9vh, 7rem); }

.work {
  display: grid;
  grid-template-columns: minmax(280px, 5fr) 7fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: center;
  padding: clamp(3.5rem, 9vh, 7rem) 0;
  border-top: var(--hair) solid var(--line);
}
.work-flip { grid-template-columns: 7fr minmax(280px, 5fr); }
.work-flip .work-text { order: 2; }
.work-flip .work-figure { order: 1; }

.work-meta { margin-bottom: 1.1rem; }
.work-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.4vw, 5rem);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 1.4rem;
}
.work-desc { max-width: 38ch; color: var(--mute); margin-bottom: 1.6rem; }
.work-scale { color: color-mix(in oklab, var(--mute) 70%, var(--bg)); }

.work-figure { margin: 0; }

/* photograph + working-drawing card */
.work-media { position: relative; }
.work-photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: sepia(0.14) saturate(0.82) contrast(0.96) brightness(1.02);
}
.work:nth-of-type(2) .work-photo { aspect-ratio: 5 / 4; }
.work:nth-of-type(3) .work-photo { aspect-ratio: 16 / 10; }
html.has-js .work-photo { clip-path: inset(0 42% 0 42%); }
html.reduced .work-photo { clip-path: none !important; }
.drawing-card {
  position: absolute;
  bottom: -3rem;
  left: clamp(-3rem, -3vw, -1.25rem);
  width: 62%;
  background: var(--bg);
  border: var(--hair) solid var(--line);
  padding: clamp(0.9rem, 1.8vw, 1.5rem);
  box-shadow: 0 30px 60px -35px color-mix(in oklab, var(--ink) 45%, transparent);
}
.work-flip .drawing-card {
  left: auto;
  right: clamp(-3rem, -3vw, -1.25rem);
}
.drawing { width: 100%; height: auto; display: block; }
.drawing path, .drawing rect, .drawing circle, .drawing line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.1;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}
.drawing .dashed { stroke-dasharray: 3 6; opacity: 0.55; }
.drawing .wash { stroke: none; }
.drawing text {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  fill: var(--mute);
  stroke: none;
}
.work-caption {
  margin-top: 4.6rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--mute);
  text-align: right;
}
@media (min-width: 901px) {
  .work { align-items: start; }
  .work-text { position: sticky; top: clamp(6rem, 16vh, 9rem); }
}

/* ============ Sundial — golden hour ============ */
.sundial { position: relative; }
.sundial-stage {
  position: relative;
  min-height: 100svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(4rem, 10vh, 7rem) var(--gutter);
  overflow: hidden;
}
.sundial-pool {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 70% 55% at 50% 62%,
    color-mix(in oklab, var(--sun) 38%, transparent), transparent 70%);
  opacity: 0;
  pointer-events: none;
}
.sundial-claim {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.8rem, 7.5vw, 7rem);
  line-height: 1.02;
  text-transform: uppercase;
  margin: 1.6rem 0 0;
  position: relative;
}
.dial { width: min(640px, 88vw); margin-top: clamp(1rem, 4vh, 2.5rem); position: relative; }
.dial-svg { width: 100%; height: auto; display: block; overflow: visible; }
.dial-arc { stroke: var(--line); stroke-width: 1; }
.dial-ticks line { stroke: var(--mute); stroke-width: 1; }
.dial-ticks text {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.08em;
  fill: var(--mute);
}
.dial-gnomon { fill: var(--ink); }
.dial-sun { fill: var(--sun); }
.dial-shadow { stroke: var(--ink); stroke-width: 1.4; opacity: 0.7; }
.sundial-sub {
  max-width: 44ch;
  color: var(--mute);
  margin-top: clamp(1.6rem, 4vh, 2.6rem);
  position: relative;
}

/* ============ Atelier — afternoon ============ */
.about { padding: clamp(6rem, 15vh, 12rem) var(--gutter); }
.about .section-eyebrow { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.about-grid {
  display: grid;
  grid-template-columns: minmax(300px, 7fr) 5fr;
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}
.about-lede {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  line-height: 1.3;
  max-width: 24ch;
}
.facts { display: flex; flex-direction: column; }
.fact {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 2rem;
  padding: 1.05rem 0;
  border-bottom: var(--hair) solid var(--line);
}
.fact:first-child { border-top: var(--hair) solid var(--line); }
.facts dd {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ============ Index of works — dusk ============ */
.windex { padding: clamp(6rem, 14vh, 10rem) var(--gutter); }
.windex .section-eyebrow { margin-bottom: clamp(2.5rem, 6vh, 4rem); }
.index-list { list-style: none; }
.index-row {
  position: relative;
  display: grid;
  grid-template-columns: 5rem 1fr 1fr 8.5rem;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.15rem 0.9rem;
  border-bottom: var(--hair) solid var(--line);
  cursor: default;
}
.index-row:first-child { border-top: var(--hair) solid var(--line); }
.index-row::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg,
    color-mix(in oklab, var(--sun) 30%, transparent),
    color-mix(in oklab, var(--sun) 6%, transparent));
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.5s cubic-bezier(0.22,1,0.36,1);
  pointer-events: none;
}
.index-row:hover::before { transform: scaleX(1); }
.ix-year { font-variant-numeric: tabular-nums; }
.ix-name {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.1vw, 1.7rem);
  letter-spacing: 0.03em;
  position: relative;
}
.ix-place { color: var(--mute); position: relative; }
.ix-status { text-align: right; position: relative; }

/* ============ Night — contact ============ */
.night {
  min-height: 92svh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter) 2rem;
  gap: 1.4rem;
}
.night-scene { position: relative; width: min(320px, 70vw); height: 56px; margin-bottom: 1.5rem; }
.night-horizon {
  position: absolute; left: 0; right: 0; top: 26px;
  height: var(--hair); background: var(--line);
}
.night-sun {
  position: absolute; left: 50%; top: 40px;
  width: 16px; height: 16px; margin-left: -8px;
  border-radius: 50%;
  border: 1px solid var(--mute);
}
.night-line {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 3rem);
  line-height: 1.2;
  max-width: 22ch;
}
.night-mail {
  font-size: 1rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding-bottom: 5px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  transition: color 0.3s;
}
.night-mail:hover { color: var(--sun); }
.night-address { font-style: normal; }
.night-address .sep { margin: 0 0.9em; }
.night-foot {
  margin-top: clamp(3rem, 9vh, 6rem);
  width: 100%;
  display: flex; justify-content: space-between; gap: 1rem;
  padding-top: 1.2rem;
  border-top: var(--hair) solid var(--line);
}
.night-foot span {
  font-size: 0.6875rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--mute);
}

/* ============ Reveal defaults (JS adds motion) ============ */
.reveal { opacity: 1; }
html.has-js .reveal { opacity: 0; transform: translateY(22px); }
html.has-js .line { transform: translateY(110%); }
html.reduced .reveal, html.reduced .line { opacity: 1 !important; transform: none !important; }

/* ============ Responsive ============ */
@media (max-width: 960px) {
  .sun-gauge { display: none; }
}
@media (max-width: 900px) {
  .work, .work-flip { grid-template-columns: 1fr; gap: 2.2rem; }
  .work-flip .work-text { order: 1; }
  .work-flip .work-figure { order: 2; }
  .drawing-card, .work-flip .drawing-card {
    position: static;
    width: 100%;
    margin-top: 1.2rem;
    box-shadow: none;
  }
  .work-caption { margin-top: 1.2rem; }
  .about-grid { grid-template-columns: 1fr; }
  .index-row { grid-template-columns: 3.4rem 1fr 6.6rem; }
  .ix-place { display: none; }
  .hero-foot { flex-direction: column; align-items: flex-start; gap: 2rem; }
}
@media (max-width: 640px) {
  .nav-links a:not([href="#contact"]) { display: none; }
  .night-foot { flex-direction: column; align-items: center; gap: 0.5rem; text-align: center; }
  .index-row { padding: 1rem 0.4rem; }
}

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  .hero-shadow, .cue-line { animation: none; }
  .loader { display: none; }
}
