/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: "Archivo Black";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/archivo-black-latin.woff2") format("woff2");
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: #0d0d0d;
  color: #f0f0f0;
  overflow-y: auto;
  min-height: 100vh;
}

:root {
  --gold: #c9a227;
  --chrome-h: 5.5rem;
}

/* The home page is a single locked screen: the hero, no scrolling. */
html:has(body.site-hub),
body.site-hub {
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

body.site-hub {
  min-height: 0;
  background: #0d0d0d;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: zoom-out;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-image {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6);
  object-fit: contain;
}

/* ===== Landing hero ===== */
#landing {
  display: block;
  background: #0d0d0d;
  color: #f0f0f0;
}

.hero {
  position: relative;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #0d0d0d;
}

.hero-name {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1.2vw;
  text-align: center;
  pointer-events: none;
  user-select: none;
  transform: none;
}

.hero-name-back { z-index: 1; }
.hero-name-front { z-index: 5; }

.hero-name-back .glyph.front,
.hero-name-back .glyph.prime {
  color: transparent;
  text-shadow: none;
}

.hero-name-front .glyph.back {
  color: transparent;
  text-shadow: none;
}

.hero-veil {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 46%, rgba(13, 13, 13, 0.28) 0%, transparent 62%);
}

.hero-name .line {
  display: block;
  width: max-content;
  max-width: none;
  margin-inline: auto;
  font-family: "Archivo Black", "Arial Black", Impact, sans-serif;
  font-weight: 400;
  line-height: 0.78;
  letter-spacing: -0.045em;
  color: var(--gold);
  white-space: nowrap;
}

.glyph {
  position: relative;
  display: inline;
  text-shadow:
    0 0 14px rgba(13, 13, 13, 0.95),
    0 2px 22px rgba(13, 13, 13, 0.9);
}

.glyph.back { z-index: 1; }
.glyph.front { z-index: 4; }
.glyph.prime { z-index: 6; }

.hero-collage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.flow-row {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 2;
  overflow: hidden;
}

.flow-row-top {
  top: calc(var(--chrome-h) * 0.28);
}

.flow-row-mid {
  top: 31vh;
}

.flow-row-low {
  top: 56vh;
}

.flow-track {
  display: flex;
  align-items: flex-start;
  gap: 0;
  width: max-content;
  animation-name: flow-ltr;
  animation-duration: 13s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
  animation-play-state: running;
  will-change: transform;
}

.flow-set {
  display: flex;
  align-items: flex-start;
  flex: 0 0 auto;
  --flow-gap: clamp(22rem, 44vw, 52rem);
  gap: var(--flow-gap);
  padding-right: var(--flow-gap);
}

.flow-row-mid .flow-track {
  animation-duration: 19s;
  animation-delay: -6s;
}

.flow-row-mid .flow-set {
  --flow-gap: clamp(28rem, 60vw, 68rem);
}

.flow-row-low .flow-track {
  animation-duration: 26s;
  animation-delay: -11s;
}

.flow-row-low .flow-set {
  --flow-gap: clamp(24rem, 49.6vw, 58rem);
}

@keyframes flow-ltr {
  from { transform: translate3d(-50%, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.flow-frame {
  flex: 0 0 auto;
  width: var(--fw, 18vw);
  height: var(--fh, 26vh);
  margin-top: var(--oy, 0vh);
  overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.45);
  border: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  cursor: zoom-in;
  pointer-events: auto;
  appearance: none;
}

.flow-frame:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.flow-frame.sz-s { --fw: 12vw; --fh: 17vh; }
.flow-frame.sz-m { --fw: 17vw; --fh: 25vh; }
.flow-frame.sz-l { --fw: 23vw; --fh: 33vh; }
.flow-frame.sz-t { --fw: 14vw; --fh: 38vh; }
.flow-frame.oy-up { --oy: 0vh; }
.flow-frame.oy-mid { --oy: 6vh; }
.flow-frame.oy-dn { --oy: 13vh; }

.flow-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  display: block;
}

.site-chrome {
  position: fixed;
  z-index: 80;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--chrome-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: max(0.45rem, env(safe-area-inset-top)) max(1.1rem, env(safe-area-inset-right)) 0.35rem max(1.1rem, env(safe-area-inset-left));
  pointer-events: none;
}

body.site-hub .site-chrome {
  background: linear-gradient(to bottom, rgba(13, 13, 13, 0.94) 62%, rgba(13, 13, 13, 0));
}

body:not(.site-hub) .site-chrome {
  background: #0d0d0d;
}

.site-chrome > * {
  pointer-events: auto;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  max-width: calc(100% - 4.5rem);
  height: auto;
  line-height: 1.15;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  color: #f4efe8;
  text-decoration: none;
}

.site-logo:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

@media (max-width: 820px) {
  :root {
    --chrome-h: 4.55rem;
  }

  .site-logo {
    height: auto;
    font-size: 1rem;
  }

  .hero-name {
    padding: 0 2vw;
  }

  .flow-frame.sz-s { --fw: 32vw; --fh: 16vh; }
  .flow-frame.sz-m { --fw: 42vw; --fh: 21vh; }
  .flow-frame.sz-l { --fw: 54vw; --fh: 27vh; }
  .flow-frame.sz-t { --fw: 36vw; --fh: 32vh; }
  .flow-frame.oy-mid { --oy: 3vh; }
  .flow-frame.oy-dn { --oy: 7vh; }

  .flow-row-mid { top: 30vh; }
  .flow-row-low { top: 54vh; }
}

@media (max-height: 700px) and (min-width: 821px) {
  .flow-frame.sz-s { --fh: 15vh; }
  .flow-frame.sz-m { --fh: 20vh; }
  .flow-frame.sz-l { --fh: 26vh; }
  .flow-frame.sz-t { --fh: 30vh; }
}

@media (prefers-reduced-motion: reduce) {
  .flow-track {
    animation-duration: 52s;
    animation-play-state: running;
  }

  .flow-row-mid .flow-track { animation-duration: 76s; }
  .flow-row-low .flow-track { animation-duration: 104s; }
}

/* ===== 404 page ===== */
.miss-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: var(--chrome-h) 1.25rem 2rem;
  text-align: center;
}

.miss-page h1 {
  font-family: "Archivo Black", "Arial Black", Impact, sans-serif;
  font-weight: 400;
  font-size: clamp(5rem, 22vw, 14rem);
  line-height: 0.8;
  letter-spacing: -0.045em;
  color: var(--gold);
}

.miss-page p {
  color: #c8c8c8;
  font-size: 1.1rem;
  line-height: 1.6;
}

.home-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.1rem;
  color: #f0f0f0;
  text-decoration: none;
  border: 1px solid #444;
  border-radius: 30px;
}

.home-link:hover,
.home-link:focus-visible {
  color: var(--gold);
  border-color: var(--gold);
}
