/* Layout: full-screen rows that pin in place and slide sideways while you scroll down */
:root {
  --bg: #0e0e0d;
  --fg: #f3f1ec;
  --muted: #8d8a83;
  --line: #2b2a27;
  --frame: #1b1a18;
  --gap: 10px;
  --gutter: max(16px, 4vw);
  --font: "Google Sans Flex", "Google Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
html, body { background: var(--bg); }
body {
  color: var(--fg);
  font: 300 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
a { color: inherit; }
::selection { background: var(--fg); color: var(--bg); }

.wrap {
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}
.eyebrow { font-size: 12px; font-weight: 400; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- Intro ---------- */

.topbar {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 22px;
  font-size: 13px; font-weight: 400; letter-spacing: .04em;
}
.topbar a { text-decoration: none; color: var(--muted); transition: color .3s; }
.topbar a:hover, .topbar a:focus-visible { color: var(--fg); outline: none; }

.intro { padding-block: clamp(48px, 12vh, 120px) clamp(40px, 9vh, 96px); }
.intro__title {
  font-size: clamp(44px, 8vw, 120px); font-weight: 300;
  line-height: 1; letter-spacing: -.045em;
}
.intro__title .word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .1em; margin-bottom: -.1em; }
.intro__title .word > span { display: inline-block; animation: rise 1.4s var(--ease) both; animation-delay: calc(.1s + var(--i) * .09s); }
.intro__text {
  margin-top: clamp(18px, 3vh, 28px); max-width: 34ch;
  color: var(--muted); font-size: clamp(17px, 1.6vw, 21px); line-height: 1.5;
  animation: fade 1.2s .55s var(--ease) both;
}
.intro__text em { font-style: normal; color: var(--fg); }

/* ---------- Rows (horizontal scroll), stacked edge to edge ---------- */

.row { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.track { display: flex; gap: var(--gap); height: 100%; will-change: transform; }
.panel { flex: none; display: flex; gap: var(--gap); height: 100%; }

/* One horizontal photo fills the screen; two vertical photos share it */
.frame { position: relative; flex: none; height: 100%; overflow: hidden; background: var(--frame); }
.panel--h .frame { width: var(--vw, 100vw); }
.panel--v .frame { width: calc((var(--vw, 100vw) - var(--gap)) / 2); }

.frame img {
  position: absolute; top: 0; left: -8%;
  width: 116%; height: 100%; max-width: none;
  object-fit: cover;
  will-change: transform;
  opacity: 0; transition: opacity 1.2s var(--ease);
}
.frame img.is-loaded { opacity: 1; }

/* Caption: white text straight on the photo, bottom right */
.frame figcaption {
  position: absolute;
  right: clamp(18px, 3vw, 44px); bottom: clamp(22px, 5vh, 52px);
  max-width: 75%;
  display: grid; gap: 4px; justify-items: end; text-align: right;
  color: #fff;
  text-shadow: 0 1px 24px rgba(0, 0, 0, .25);
  will-change: transform;
}
.frame figcaption strong { font-size: clamp(22px, 2.4vw, 40px); font-weight: 300; line-height: 1.1; letter-spacing: -.015em; }
.frame figcaption span { font-size: 13px; font-weight: 400; letter-spacing: .05em; }

/* Row progress, bottom left of the screen */
.hud {
  position: absolute; z-index: 2;
  left: max(clamp(18px, 3vw, 44px), env(safe-area-inset-left, 0px)); bottom: clamp(22px, 5vh, 52px);
  display: flex; align-items: center; gap: 14px;
  color: #fff; font-size: 12px; font-weight: 400; letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 18px rgba(0, 0, 0, .3);
  mix-blend-mode: difference;
}
.hud__bar { position: relative; width: clamp(60px, 9vw, 140px); height: 1px; background: rgba(255, 255, 255, .35); }
.hud__bar i { position: absolute; inset: 0; background: #fff; transform: scaleX(0); transform-origin: 0 50%; }

.empty { padding-block: 40px 80px; color: var(--muted); font-size: 17px; }

/* ---------- Footer ---------- */

.footer { padding-block: clamp(96px, 20vh, 220px) 32px; }
.footer__cta {
  display: inline-block; margin-top: 16px;
  font-size: clamp(36px, 7vw, 112px); font-weight: 300; letter-spacing: -.04em; line-height: 1;
  text-decoration: none; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .8s var(--ease);
}
.footer__cta:hover, .footer__cta:focus-visible { background-size: 100% 1px; outline: none; }
.footer__meta {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px;
  margin-top: clamp(64px, 14vh, 140px); padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px;
}
.footer__meta a { text-decoration: none; transition: color .3s; }
.footer__meta a:hover, .footer__meta a:focus-visible { color: var(--fg); outline: none; }

@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes fade { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Phones: one photo per screen, vertical ones included */
@media (max-width: 700px) {
  .panel--v .frame { width: var(--vw, 100vw); }
  .frame figcaption { max-width: 85%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
