:root {
  color-scheme: dark;
  --bg: #141410;
  --ink: #f4f4f0;
  --muted: #c2bfaf;
  --subtle: #8b887a;
  --yellow: #fbe80c;
  --line: rgba(244, 244, 240, .14);
  --edge: clamp(20px, 4.4vw, 64px);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
body.page { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
h1, p, dl, dd, ul { margin: 0; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap;
}
header { border-bottom: 1px solid var(--line); }
.hd {
  height: 112px; padding: 0 var(--edge) 4px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.lg { display: block; width: 246px; max-width: 100%; height: auto; }
.dk { font-size: 15px; color: var(--muted); }
.cs-main { flex: 1; display: flex; }
.cs-text, .cs-show { flex: 1 1 560px; min-width: 0; display: flex; flex-direction: column; }
.cs-text {
  justify-content: center; gap: 52px;
  padding: clamp(48px, 6.5vw, 104px) clamp(20px, 4vw, 56px) clamp(48px, 6.5vw, 104px) var(--edge);
}
.cs-group, .cs-contact { max-width: 600px; }
.cs-group { display: flex; flex-direction: column; gap: 30px; }
.cs-h1 {
  font-family: 'Castoro', Georgia, serif; font-size: clamp(46px, 5.4vw, 88px);
  font-weight: 400; line-height: 1.02; letter-spacing: -.012em;
}
.mask { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.rise { display: block; animation: rise 1.1s cubic-bezier(.2,.75,.1,1) 150ms both; }
.mask + .mask .rise { animation-delay: 260ms; }
@keyframes rise { from { transform: translateY(112%); } }
@keyframes fade { from { opacity: 0; } }
.cs-p { max-width: 34em; font-size: 18px; line-height: 1.6; color: var(--muted); animation: fade 1s ease 550ms both; }
.cs-contact { animation: fade 1s ease 750ms both; }
.contact-intro { margin-bottom: 12px; font-size: 15px; color: var(--subtle); }
.cs-dl { border-top: 1px solid var(--line); }
.cs-dl > div {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line);
}
dt { font-size: 15px; color: var(--subtle); }
dd { min-width: 0; font-size: 19px; font-weight: 500; overflow-wrap: anywhere; }
.ct { color: var(--ink); text-decoration: none; border-bottom: 1px solid rgba(244,244,240,.3); }
.ct:hover { color: var(--yellow); border-color: var(--yellow); }
.cs-show { min-height: 560px; }
.cs-media { position: relative; flex: 1; min-height: 420px; overflow: hidden; background: #32302a; touch-action: pan-y; }
.sl { position: absolute; inset: 0; visibility: hidden; }
.sl.on { visibility: visible; z-index: 2; }
.sl.was { visibility: visible; z-index: 1; }
.sl img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sl.was img { filter: brightness(.5); transition: filter 1.5s ease; }
.sl.on img { animation: drift 9s cubic-bezier(.2,.6,.2,1) both; }
@keyframes drift { from { transform: scale(1.07); } }
.sl.on.wipe { animation: course 1.8s both; }
.cs-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding: 14px var(--edge) 14px 24px;
}
.captions { display: grid; flex: 1 1 220px; min-width: 0; min-height: 44px; }
.cap {
  grid-area: 1 / 1; opacity: 0; visibility: hidden; transform: translateY(6px);
  font-size: 15px; line-height: 1.45; color: var(--muted);
  transition: opacity .5s ease, transform .5s ease;
}
.cap.on { opacity: 1; visibility: visible; transform: none; }
.cap strong { color: var(--ink); font-weight: 500; }
.controls { display: flex; min-width: 0; max-width: 100%; align-items: center; gap: 4px; }
.controls button {
  margin: 0; padding: 0; border: 0; border-radius: 0; cursor: pointer;
  color: var(--muted); background: transparent; touch-action: manipulation;
}
.controls button:hover { color: var(--yellow); }
.controls .nv, .controls .pp {
  flex: 0 0 44px; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center;
}
.controls .pp { order: 9; border: 1px solid rgba(244,244,240,.3); margin-left: 10px; color: var(--ink); }
.controls .pp:hover { border-color: var(--yellow); }
.pp .play, .pp.off .pause { display: none; }
.pp.off .play { display: block; }
.steps { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pg { width: 14px; min-width: 0; height: 44px; display: flex; align-items: center; }
.track { display: block; width: 100%; height: 2px; overflow: hidden; background: rgba(244,244,240,.22); }
.pg:hover .track { background: rgba(244,244,240,.5); }
.pg.on .track { background: rgba(251,232,12,.42); }
.fill { display: block; height: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; }
.pg.on .fill { animation: progress 6.5s linear both; }
.paused .pg.on .fill { animation-play-state: paused; }
@keyframes progress { to { transform: scaleX(1); } }
.cs-foot {
  padding: 18px var(--edge) 22px; display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: baseline; gap: 10px 32px; border-top: 1px solid var(--line); font-size: 14px; line-height: 1.5;
}
.cs-cred { padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px 32px; color: var(--muted); }
.cs-foot p { color: var(--subtle); }
@media (max-width: 1199px) {
  .hd { height: 88px; }
  .cs-main { flex-direction: column; }
  .cs-text { flex: none; justify-content: flex-start; gap: 40px; padding: clamp(40px,7vw,72px) clamp(24px,6vw,56px) clamp(36px,5vw,56px); }
  .cs-h1 { font-size: clamp(44px,8.4vw,76px); }
  .cs-group, .cs-contact { max-width: 680px; }
  .cs-dl { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); column-gap: 32px; }
  .cs-show, .cs-media { flex: none; min-height: 0; }
  .cs-media { aspect-ratio: 16 / 10; }
  .cs-bar { padding: 14px clamp(24px,6vw,56px); }
  .cs-foot { padding-inline: clamp(24px,6vw,56px); }
}
@media (max-width: 767px) {
  .hd { height: 72px; }
  .dk { display: none; }
  .cs-text { gap: 32px; padding: 32px 20px; }
  .cs-h1 { font-size: clamp(38px,11vw,52px); }
  .cs-p { font-size: 17px; }
  .cs-dl { grid-template-columns: minmax(0,1fr); }
  .cs-media { aspect-ratio: 4 / 5; }
  .cs-bar { padding: 14px 20px 16px; }
  .pg { width: 10px; }
  .controls .pp { margin-left: 6px; }
  .cs-foot { flex-direction: column; padding: 20px 20px 24px; }
  .cs-cred { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .rise, .cs-p, .cs-contact, .sl.on img, .sl.on.wipe { animation: none; }
  .sl.was img, .cap { transition: none; }
}

/* Six tile columns lift in sequence when the project photo changes. */
@keyframes course {
  0% { clip-path: polygon(0% 100%,0% 100%,16.667% 100%,16.667% 100%,33.333% 100%,33.333% 100%,50% 100%,50% 100%,66.667% 100%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  6.25% { clip-path: polygon(0% 100%,0% 99.219%,16.667% 99.219%,16.667% 100%,33.333% 100%,33.333% 100%,50% 100%,50% 100%,66.667% 100%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  12.5% { clip-path: polygon(0% 100%,0% 93.75%,16.667% 93.75%,16.667% 99.95%,33.333% 99.95%,33.333% 100%,50% 100%,50% 100%,66.667% 100%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  18.75% { clip-path: polygon(0% 100%,0% 78.906%,16.667% 78.906%,16.667% 97.856%,33.333% 97.856%,33.333% 100%,50% 100%,50% 100%,66.667% 100%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  25% { clip-path: polygon(0% 100%,0% 50%,16.667% 50%,16.667% 89.2%,33.333% 89.2%,33.333% 99.6%,50% 99.6%,50% 100%,66.667% 100%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  31.25% { clip-path: polygon(0% 100%,0% 21.094%,16.667% 21.094%,16.667% 69.294%,33.333% 69.294%,33.333% 95.444%,50% 95.444%,50% 99.994%,66.667% 99.994%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  37.5% { clip-path: polygon(0% 100%,0% 6.25%,16.667% 6.25%,16.667% 36.45%,33.333% 36.45%,33.333% 82.85%,50% 82.85%,50% 98.65%,66.667% 98.65%,66.667% 100%,83.333% 100%,83.333% 100%,100% 100%,100% 100%); }
  43.75% { clip-path: polygon(0% 100%,0% 0.781%,16.667% 0.781%,16.667% 13.731%,33.333% 13.731%,33.333% 57.131%,50% 57.131%,50% 91.681%,66.667% 91.681%,66.667% 99.831%,83.333% 99.831%,83.333% 100%,100% 100%,100% 100%); }
  50% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 3.2%,33.333% 3.2%,33.333% 25.6%,50% 25.6%,50% 74.4%,66.667% 74.4%,66.667% 96.8%,83.333% 96.8%,83.333% 100%,100% 100%,100% 100%); }
  56.25% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0.169%,33.333% 0.169%,33.333% 8.319%,50% 8.319%,50% 42.869%,66.667% 42.869%,66.667% 86.269%,83.333% 86.269%,83.333% 99.219%,100% 99.219%,100% 100%); }
  62.5% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 1.35%,50% 1.35%,50% 17.15%,66.667% 17.15%,66.667% 63.55%,83.333% 63.55%,83.333% 93.75%,100% 93.75%,100% 100%); }
  68.75% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 0.006%,50% 0.006%,50% 4.556%,66.667% 4.556%,66.667% 30.706%,83.333% 30.706%,83.333% 78.906%,100% 78.906%,100% 100%); }
  75% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 0%,50% 0%,50% 0.4%,66.667% 0.4%,66.667% 10.8%,83.333% 10.8%,83.333% 50%,100% 50%,100% 100%); }
  81.25% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 0%,50% 0%,50% 0%,66.667% 0%,66.667% 2.144%,83.333% 2.144%,83.333% 21.094%,100% 21.094%,100% 100%); }
  87.5% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 0%,50% 0%,50% 0%,66.667% 0%,66.667% 0.05%,83.333% 0.05%,83.333% 6.25%,100% 6.25%,100% 100%); }
  93.75% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 0%,50% 0%,50% 0%,66.667% 0%,66.667% 0%,83.333% 0%,83.333% 0.781%,100% 0.781%,100% 100%); }
  100% { clip-path: polygon(0% 100%,0% 0%,16.667% 0%,16.667% 0%,33.333% 0%,33.333% 0%,50% 0%,50% 0%,66.667% 0%,66.667% 0%,83.333% 0%,83.333% 0%,100% 0%,100% 100%); }
}
