:root {
  color-scheme: dark;
  --bg: #09090a;
  --ink: #f2efe9;
  --dim: rgba(242, 239, 233, 0.66);
  --line: rgba(242, 239, 233, 0.22);
  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', sans-serif;
  --gutter: clamp(16px, 4vw, 44px);
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-snap-type: y proximity; }
body { margin: 0; color: var(--ink); font: 400 15px/1.5 var(--sans); }
body.over-photo { cursor: pointer; }
[hidden] { display: none !important; }
p, h1, h2 { margin: 0; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
/* Darkened corners, like a lens, to pull the eye to the lit photo. */
body:not(.flat)::after {
  content: ''; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 80% 80% at 50% 48%, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.5) 100%);
}
.stop { height: 100vh; height: 100svh; scroll-snap-align: start; }

.kicker {
  font: 500 11px/1 var(--sans);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--dim);
}

header {
  position: fixed; z-index: 3; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: var(--gutter);
}
#brand { font: 400 22px/1 var(--serif); color: var(--ink); text-decoration: none; }
button {
  font: 500 11px/1 var(--sans); letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink); background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; transition: background 0.2s, color 0.2s;
}
button:hover, button:focus-visible { background: var(--ink); color: var(--bg); outline: none; }

#menu {
  position: fixed; z-index: 3; top: calc(var(--gutter) + 48px); right: var(--gutter);
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
#menu button, #menu-btn { background: rgba(9, 9, 10, 0.55); backdrop-filter: blur(8px); }
#menu button:hover, #menu-btn:hover { background: var(--ink); }

.overlay { position: fixed; z-index: 2; pointer-events: none; opacity: 0; }

#card {
  inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 18px; padding: var(--gutter); text-align: center;
}
#card { background: radial-gradient(ellipse 62% 44% at 50% 50%, rgba(9, 9, 10, 0.72) 0%, rgba(9, 9, 10, 0.45) 45%, rgba(9, 9, 10, 0) 100%); }
#card h1 { font: 400 clamp(52px, 11vw, 148px)/0.95 var(--serif); letter-spacing: -0.01em; text-wrap: balance; }
#card-text { max-width: 44ch; color: var(--dim); }
#card-contact { color: var(--ink); text-underline-offset: 4px; }
#card.live #card-contact { pointer-events: auto; }

#caption { text-shadow: 0 1px 14px var(--bg); left: var(--gutter); bottom: calc(var(--gutter) + 14px); max-width: min(70vw, 420px); }
#caption h2 { font: 400 clamp(28px, 4vw, 40px)/1.05 var(--serif); margin: 10px 0 4px; }
#caption-text { color: var(--dim); font-size: 13px; }

#hint { left: 50%; bottom: calc(var(--gutter) + 14px); transform: translateX(-50%); }

#bar { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; height: 2px; background: var(--line); }
#bar-fill { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }

#notice {
  position: fixed; z-index: 5; left: 50%; top: var(--gutter); transform: translateX(-50%);
  max-width: calc(100vw - 2 * var(--gutter)); padding: 10px 16px; border-radius: 8px;
  background: #2a1512; border: 1px solid #7a3b30; color: #f6ede9; font-size: 13px;
}

#lightbox {
  position: fixed; z-index: 4; inset: 0; background: rgba(9, 9, 10, 0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: var(--gutter); cursor: zoom-out;
}
#lightbox-img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100svh - 150px); object-fit: contain; }
#lightbox-title { font: 400 22px/1 var(--serif); }
#lightbox-close { position: absolute; top: var(--gutter); right: var(--gutter); }

/* Simple view: no 3D, same photos */
body.flat #stage, body.flat header, body.flat .overlay, body.flat #bar { display: none; }
body.flat main { max-width: 1200px; margin: 0 auto; padding: var(--gutter); }
body.flat section { padding: 8vh 0; }
body.flat h1 { font: 400 clamp(52px, 11vw, 148px)/0.95 var(--serif); margin-top: 18px; }
body.flat h2 { font: 400 clamp(32px, 5vw, 56px)/1 var(--serif); margin-bottom: 28px; }
.flat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 28px; align-items: start; }
.flat-grid figure { margin: 0; }
.flat-grid img { width: 100%; height: auto; display: block; }
.flat-grid figcaption { margin-top: 8px; color: var(--dim); font-size: 13px; }
.flat-outro p { max-width: 52ch; color: var(--dim); margin-bottom: 14px; }
.flat-outro a { color: var(--ink); }
