:root {
  --paper: #ffffff;
  --paper-deep: #eef0f2;
  --surface: rgba(248, 248, 247, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(15, 24, 34, 0.1);
  --line-strong: rgba(15, 24, 34, 0.18);
  --ink: #101a24;
  --muted: #5f6770;
  --trail: #e6e8ea;
  --trail-shadow: rgba(54, 62, 70, 0.16);
  --forest: #39424b;
  --earth: #8e959d;
  --night: #101821;
  --card: #121b24;
  --card-text: #e8eef4;
  --map-progress: 0;
  --rail-progress: 0;
  --card-progress: 0;
  --rail-width: clamp(16rem, 22vw, 18rem);
  --viewport-height: 100vh;
  --display: "DIN Condensed", "Avenir Next Condensed", "Impact", sans-serif;
  --body: "Avenir Next", "Helvetica Neue", sans-serif;
}

@supports (height: 100svh) {
  :root {
    --viewport-height: 100svh;
  }
}

@supports (height: 100dvh) {
  :root {
    --viewport-height: 100dvh;
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--paper);
}

body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent 18%),
    var(--paper);
}

body.is-loading {
  overflow: hidden;
}

body.intro-active {
  overflow: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.initial-loader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: #ffffff;
  color: #111111;
  transition:
    opacity 480ms ease,
    visibility 480ms ease;
}

body:not(.is-loading) .initial-loader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.initial-loader-mark {
  display: grid;
  justify-items: center;
  gap: 0.75rem;
}

.initial-loader-image {
  width: clamp(11rem, 18vw, 15rem);
  padding: 0.65rem;
  background: #ffffff;
}

.initial-loader-image img {
  display: block;
  width: 100%;
  height: auto;
}

.initial-loader-label {
  order: 2;
  margin: 0;
  font-family: "Bradley Hand", "Snell Roundhand", "Apple Chancery", cursive;
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: 0.04em;
  width: 10ch;
  text-align: left;
}

.initial-loader-label span {
  display: inline-block;
  width: 0;
  overflow: hidden;
  white-space: nowrap;
  animation: loader-write 1.15s steps(10, end) forwards;
}

.initial-loader-label span::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.92em;
  margin-left: 0.16rem;
  background: currentColor;
  vertical-align: -0.08em;
  animation: loader-caret 0.72s step-end infinite;
}

.initial-loader-note {
  display: none;
  margin: 0;
  color: rgba(17, 17, 17, 0.58);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.intro-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  color: #e7edf3;
  background: #0b1118;
  transition:
    opacity 840ms ease,
    visibility 840ms ease;
}

body.intro-complete .intro-gate {
  pointer-events: none;
}

body.intro-menu-ready .intro-gate {
  opacity: 0;
  visibility: hidden;
}

.intro-media {
  position: absolute;
  inset: 0;
}

.intro-video,
.intro-fallback,
.intro-film {
  position: absolute;
  inset: 0;
}

.intro-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: none;
}

.intro-fallback {
  background: url("assets/landing-background.png") center center / cover no-repeat;
  animation: intro-pan 5.4s linear both;
  transition: opacity 280ms ease;
}

.intro-video.is-ready + .intro-fallback {
  opacity: 0;
}

.intro-film {
  display: none;
}

.intro-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: var(--viewport-height);
  padding: 1.5rem;
}

.intro-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.intro-copy {
  align-self: end;
  display: grid;
  gap: 1.2rem;
  width: min(34rem, 100%);
  padding-bottom: clamp(2rem, 8vh, 5rem);
}

.intro-label,
.section-eyebrow,
.rail-kicker {
  margin: 0;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.intro-copy h1 {
  margin: 0;
  max-width: 10ch;
  font-family: var(--display);
  font-size: clamp(4rem, 11vw, 8.25rem);
  line-height: 0.9;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.intro-deck {
  margin: 0;
  max-width: 32rem;
  font-size: clamp(1.02rem, 2vw, 1.16rem);
  line-height: 1.65;
  color: rgba(229, 237, 245, 0.86);
}

.map-sequence {
  position: relative;
  height: var(--viewport-height);
  background:
    linear-gradient(180deg, #0c131b 0 10vh, var(--paper) 38vh 100%);
}

.sequence-stage {
  position: sticky;
  top: 0;
  height: var(--viewport-height);
  overflow: hidden;
}

.map-board {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.map-rail {
  position: absolute;
  z-index: 5;
  left: 1rem;
  bottom: 1rem;
  width: var(--rail-width);
  max-height: calc(var(--viewport-height) - 2rem);
  padding: 1.45rem 1.35rem 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: rgba(252, 252, 251, 0.94);
  opacity: calc(var(--rail-progress) * 1.15);
  pointer-events: none;
  transform: translateY(calc((1 - var(--rail-progress)) * 3.2rem));
  transition:
    opacity 420ms ease 110ms,
    transform 760ms cubic-bezier(0.2, 0.8, 0.2, 1) 110ms;
}

.sequence-stage.menu-ready .map-rail {
  pointer-events: auto;
}

.rail-nav {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.section-link {
  display: block;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(24, 28, 20, 0.08);
  font-size: 0.96rem;
  color: var(--muted);
}

.section-link.is-current {
  color: var(--ink);
  border-color: var(--line-strong);
}

.rail-statement {
  margin: auto 0 0;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.8vw, 2.42rem);
  line-height: 0.95;
  text-transform: uppercase;
}

.map-board {
  background: #e4e6e8;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 33, 0.16);
  overflow: hidden;
}

.map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.map-texture,
.map-grid,
.map-haze {
  position: absolute;
}

.map-texture {
  inset: 0;
  background: url("assets/landing-background.png") center center / cover no-repeat;
}

.map-frame-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 120ms ease;
}

.map-texture.frame-ready .map-frame-canvas {
  opacity: 1;
}

.map-grid {
  inset: 0;
  display: none;
}

.map-haze {
  inset: 0;
  display: none;
}

.map-haze-left {
  inset: auto auto -10% -10%;
  width: 28rem;
  height: 28rem;
}

.map-haze-right {
  inset: -12% -8% auto auto;
  width: 24rem;
  height: 24rem;
}

.map-badge {
  position: absolute;
  z-index: 3;
  top: 1.45rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.map-badge {
  left: 1.65rem;
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.3vw, 4.1rem);
  line-height: 0.86;
  color: rgba(224, 236, 245, 0.96);
  text-shadow: 0 1px 0 rgba(18, 27, 38, 0.42);
}

.contact-dock {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.92rem;
  opacity: calc(var(--rail-progress) * 1.1);
  pointer-events: none;
  transform: translateY(calc((1 - var(--rail-progress)) * 2.6rem));
  transition:
    opacity 380ms ease 150ms,
    transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1) 150ms;
}

.sequence-stage.menu-ready .contact-dock {
  pointer-events: auto;
}

.contact-dock-link {
  width: 3.15rem;
  height: 3.15rem;
  display: inline-grid;
  place-items: center;
  align-items: center;
  color: #ffffff;
  transition: opacity 160ms ease;
}

.contact-dock-link svg {
  width: 3.15rem;
  height: 3.15rem;
  display: block;
  fill: currentColor;
}

.contact-dock-link:hover,
.contact-dock-link:focus-visible {
  color: #ffffff;
  opacity: 1;
}

.contact-dock-link:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.72);
  outline-offset: 0.25rem;
}

.map-invite {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: min(18ch, calc(100vw - 4rem));
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.3rem, 7vw, 6rem);
  line-height: 0.88;
  text-align: center;
  color: rgba(226, 236, 245, 0.94);
  transform: translate(-50%, -52%);
  opacity: calc(1 - (var(--rail-progress) * 1.35));
  text-transform: uppercase;
  text-shadow: 0 1px 0 rgba(16, 26, 35, 0.44);
}

.story-content {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0;
  padding: 3rem 1.4rem 6rem;
}

.content-section {
  padding: 2rem 0 3.5rem;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1.6rem;
}

.section-page-link {
  width: fit-content;
  font-size: 0.92rem;
  color: var(--muted);
}

.section-heading h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.8vw, 4.2rem);
  line-height: 0.92;
  text-transform: uppercase;
}

.intro-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 0.9fr);
  gap: 1.5rem;
}

.intro-copy-block {
  display: grid;
  gap: 1rem;
}

.intro-copy-block p {
  max-width: 48rem;
  margin: 0;
  font-size: 1.06rem;
  line-height: 1.7;
  color: var(--ink);
}

.intro-metrics {
  display: grid;
  gap: 0.8rem;
}

.metric-card,
.story-card,
.work-item,
.gallery-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 24%),
    var(--surface);
}

.metric-card {
  padding: 1rem;
  display: grid;
  gap: 0.3rem;
}

.metric-card span,
.story-card-meta,
.work-item-meta,
.gallery-caption span {
  font-size: 0.76rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.metric-card strong {
  font-size: 1rem;
  line-height: 1.4;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.story-card {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
}

.story-card h3 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.story-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.story-card a {
  display: inline-flex;
  width: fit-content;
  min-height: 2.2rem;
  align-items: center;
  color: var(--ink);
}

.works-list {
  display: grid;
  gap: 0.85rem;
}

.work-item {
  display: grid;
  grid-template-columns: minmax(8rem, 0.55fr) minmax(0, 1.25fr) minmax(12rem, 0.9fr);
  gap: 1rem;
  padding: 1rem;
  align-items: start;
}

.work-item h3 {
  margin: 0;
  font-size: 1.2rem;
}

.work-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  min-height: 17rem;
}

.gallery-item[data-size="wide"] {
  grid-column: span 7;
}

.gallery-item[data-size="tall"] {
  grid-column: span 5;
  min-height: 28rem;
}

.gallery-item[data-size="square"] {
  grid-column: span 4;
}

.gallery-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(248, 248, 246, 0.2), transparent 28%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.38), transparent 26%),
    radial-gradient(circle at 78% 72%, rgba(98, 104, 110, 0.36), transparent 24%),
    linear-gradient(160deg, rgba(23, 28, 34, 0.92), rgba(92, 98, 104, 0.72));
  filter: saturate(0.82) contrast(0.96);
}

.gallery-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(238, 238, 236, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 238, 236, 0.07) 1px, transparent 1px);
  background-size: 2.2rem 2.2rem;
  opacity: 0.32;
}

.gallery-caption {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: grid;
  gap: 0.35rem;
  color: #f7f6f2;
}

.gallery-item:nth-child(2) .gallery-art {
  background:
    linear-gradient(180deg, rgba(248, 248, 246, 0.22), transparent 20%),
    radial-gradient(circle at 52% -4%, rgba(255, 255, 255, 0.5), transparent 28%),
    radial-gradient(circle at 24% 70%, rgba(78, 84, 90, 0.4), transparent 24%),
    linear-gradient(180deg, rgba(22, 27, 33, 0.94), rgba(104, 110, 116, 0.72));
}

.gallery-item:nth-child(3) .gallery-art {
  background:
    linear-gradient(180deg, rgba(248, 248, 246, 0.18), transparent 34%),
    radial-gradient(circle at 68% 18%, rgba(214, 218, 222, 0.28), transparent 24%),
    linear-gradient(140deg, rgba(24, 29, 35, 0.94), rgba(90, 96, 102, 0.7));
}

.gallery-item:nth-child(4) .gallery-art {
  background:
    linear-gradient(180deg, rgba(248, 248, 246, 0.18), transparent 28%),
    radial-gradient(circle at 16% 26%, rgba(208, 212, 216, 0.28), transparent 24%),
    radial-gradient(circle at 82% 80%, rgba(94, 100, 106, 0.32), transparent 22%),
    linear-gradient(160deg, rgba(20, 25, 31, 0.96), rgba(84, 90, 96, 0.72));
}

.gallery-caption strong {
  font-family: var(--display);
  font-size: 2rem;
  line-height: 0.9;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.4rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.site-footer p {
  margin: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@keyframes intro-pan {
  from {
    transform: scale(1.18) translate3d(0, 0, 0);
  }

  to {
    transform: scale(1.04) translate3d(-2%, -1%, 0);
  }
}

@keyframes loader-write {
  from {
    width: 0;
  }

  to {
    width: 10ch;
  }
}

@keyframes loader-caret {
  0%,
  49% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@media (max-width: 1100px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-item {
    grid-template-columns: 1fr;
  }

  .gallery-item[data-size="wide"] {
    grid-column: span 12;
  }

  .gallery-item[data-size="tall"] {
    grid-column: span 7;
  }

  .gallery-item[data-size="square"] {
    grid-column: span 5;
  }
}

@media (max-width: 900px) {
  :root {
    --rail-width: min(18rem, calc(100vw - 2rem));
  }

  .intro-meta {
    flex-direction: column;
  }

  .map-sequence {
    height: var(--viewport-height);
  }

  .map-rail {
    width: var(--rail-width);
  }

  .map-board {
    inset: 0;
  }

  .map-badge {
    left: 1rem;
  }

  .contact-dock {
    right: 0.9rem;
    bottom: 0.9rem;
  }

  .intro-layout {
    grid-template-columns: 1fr;
  }

  .gallery-item[data-size="tall"] {
    grid-column: span 12;
  }

  .gallery-item[data-size="square"] {
    grid-column: span 6;
  }

  .site-footer {
    flex-direction: column;
  }
}

@media (max-width: 680px) {
  .initial-loader-mark {
    gap: 0.55rem;
  }

  .initial-loader-note {
    display: block;
  }

  .intro-shell,
  .story-content,
  .site-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .intro-copy h1 {
    font-size: clamp(3.3rem, 20vw, 5.1rem);
  }

  .map-badge {
    top: 1rem;
    left: 1rem;
    font-size: 2.4rem;
  }

  .contact-dock {
    display: none;
  }

  .contact-dock-link {
    width: 2.45rem;
    height: 2.45rem;
  }

  .contact-dock-link svg {
    width: 2.45rem;
    height: 2.45rem;
  }

  .map-invite {
    width: min(12ch, calc(100vw - 3rem));
    font-size: clamp(2.4rem, 12vw, 4.1rem);
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .gallery-item[data-size="wide"],
  .gallery-item[data-size="tall"],
  .gallery-item[data-size="square"] {
    grid-column: span 6;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .initial-loader-label span,
  .initial-loader-label span::after,
  .intro-fallback,
  .map-board,
  .map-rail,
  .intro-gate {
    animation: none;
    transition: none;
  }

  .initial-loader-label span {
    width: 10ch;
  }
}
