:root {
  --ink: #14110e;
  --clay: #c9844a;
  --white: #f7f3ec;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Libre Bodoni", Palatino, "Palatino Linotype", serif;
  --font-body: "Public Sans", "Segoe UI", sans-serif;
  --fs-hero: clamp(64px, 13.5vw, 188px);
  --fs-display: clamp(64px, 13vw, 168px);
  --fs-title: clamp(44px, 7.2vw, 92px);
  --fs-body: 1.125rem;
  --fs-ui: 0.75rem;
  --lh-display: 0.84;
  --lh-title: 1.02;
  --lh-body: 1.55;
  --track-ui: 0.16em;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: auto; }

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

figure { margin: 0; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 12px;
  background: var(--clay);
  color: var(--ink);
}

.skip:focus { top: 16px; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: var(--ink);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}

.preloader.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-inner { text-align: center; }

.preloader-inner img {
  width: 88px;
  height: 88px;
  margin: 0 auto 28px;
  object-fit: cover;
  border-radius: 50%;
}

.preloader-count {
  font-family: var(--font-body);
  letter-spacing: var(--track-ui);
  font-size: var(--fs-ui);
  font-weight: 600;
  color: var(--clay);
}

.preloader-line {
  width: 140px;
  height: 1px;
  margin: 16px auto 0;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.preloader-line span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--clay);
}

.nav {
  position: fixed;
  top: 20px;
  left: 50%;
  z-index: 40;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 28px;
  height: 48px;
  padding: 0 18px 0 14px;
  background: rgba(20, 17, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
  border-radius: 999px;
  transition: transform 0.4s var(--ease), opacity 0.4s var(--ease);
}

.nav.is-away {
  transform: translateX(-50%) translateY(-80px);
  opacity: 0;
}

.nav-mark {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.nav-mark img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 50%;
}

.nav-links {
  display: flex;
  gap: 18px;
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 600;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.nav-links a:hover { color: var(--white); }

.hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 30%;
  will-change: transform;
}

.hero-bg {
  inset: -12% 0;
  background-image: url("/assets/img/tea.jpg");
}

.hero-fog {
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.62) 0%, rgba(9, 9, 11, 0.08) 32%, rgba(9, 9, 11, 0.12) 68%, var(--ink) 100%);
  pointer-events: none;
}

.hero-title {
  position: absolute;
  top: 14vh;
  left: 0;
  right: 0;
  z-index: 2;
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-hero);
  line-height: var(--lh-display);
  letter-spacing: -0.045em;
  color: var(--white);
  pointer-events: none;
}

.hero-title span {
  display: block;
  margin-top: 0.04em;
  font-style: italic;
  font-weight: 500;
  font-size: 0.34em;
  letter-spacing: -0.03em;
  color: var(--clay);
}

.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 50%;
  z-index: 5;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 600;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.lore {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: 120px 8vw;
  overflow: hidden;
}

.lore-bg {
  position: absolute;
  inset: -16% 0;
  background: url("/assets/img/call.jpg") center 30% / cover no-repeat;
  will-change: transform;
}

.lore-veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(9, 9, 11, 0.84) 0%, rgba(9, 9, 11, 0.28) 100%);
}

.lore-mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(9, 9, 11, 0.35), transparent 40%, rgba(9, 9, 11, 0.55));
  pointer-events: none;
}

.lore-panel {
  position: relative;
  z-index: 2;
  max-width: 16em;
}

.lore h2 {
  margin: 0 0 28px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-title);
  line-height: var(--lh-title);
  letter-spacing: -0.035em;
}

.lore h2 .w { display: inline-block; }

.lore h2,
.lore p { text-shadow: 0 2px 16px rgba(9, 9, 11, 0.55); }

.lore p {
  margin: 0;
  max-width: 34em;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: rgba(255, 255, 255, 0.92);
}

.display {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--fs-display);
  line-height: var(--lh-display);
  letter-spacing: -0.045em;
}

.descent {
  position: relative;
  height: 100vh;
  overflow: hidden;
}

.descent-bg {
  position: absolute;
  inset: -18% 0;
  z-index: 0;
  background: url("/assets/img/coast.jpg") center 40% / cover no-repeat;
  will-change: transform;
}

.descent-title {
  position: absolute;
  top: 7vh;
  left: 0;
  right: 0;
  z-index: 4;
  text-align: center;
  pointer-events: none;
}

.descent-stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding-top: 8vh;
  pointer-events: none;
}

.descent-still {
  display: block;
  width: min(760px, 78vw);
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  object-position: center 30%;
  background: var(--ink);
  border-radius: 16px;
  outline: 1px solid rgba(255, 255, 255, 0.28);
  box-shadow: 0 28px 48px rgba(9, 9, 11, 0.55);
  will-change: transform;
}

.descent-fog {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: radial-gradient(ellipse at 50% 60%, transparent 20%, rgba(9, 9, 11, 0.35) 80%);
  pointer-events: none;
}

.journey {
  position: relative;
  overflow-x: auto;
  background: var(--ink);
}

html.has-scroll .journey { overflow: hidden; }

.journey-title {
  position: absolute;
  top: 7vh;
  left: 8vw;
  z-index: 3;
  pointer-events: none;
}

.journey-track {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 100vh;
  padding: 0 10vw;
  width: max-content;
}

.journey-track figure {
  margin: 0;
  flex: none;
  width: min(52vw, 620px);
  transform-origin: center center;
  will-change: transform, opacity;
}

html.has-scroll .journey-track figure {
  transform: scale(0.84);
  opacity: 0.38;
}

.journey-track img {
  width: 100%;
  height: 68vh;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 12px;
}

.archive {
  position: relative;
  min-height: 110vh;
  overflow: hidden;
  padding: 12vh 6vw 16vh;
}

.archive-bg {
  position: absolute;
  inset: -12% 0;
  background: url("/assets/img/plaster.jpg") center / cover no-repeat;
}

.archive-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.55);
}

.archive .display {
  position: relative;
  z-index: 2;
  margin: 0 0 7vh;
}

.float-field {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

.float-field img {
  width: 100%;
  height: auto;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: center 28%;
  border-radius: 12px;
}

.ending {
  position: relative;
  height: 100vh;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.ending-bg {
  position: absolute;
  inset: -12% 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(201, 132, 74, 0.22), transparent 42%),
    #14110e;
}

.ending-fog {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 55%, rgba(9, 9, 11, 0.35), rgba(9, 9, 11, 0.78) 62%);
}

.ending-lockup {
  position: relative;
  z-index: 2;
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 0 8vw;
}

.ending-seal {
  width: min(120px, 22vw);
  height: min(120px, 22vw);
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 28px;
  will-change: transform, opacity;
}

.ending-title { max-width: 9em; }

.end-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin-top: 32px;
  padding: 0 1.25rem;
  background: var(--clay);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: 8px;
}

.end-btn:hover { opacity: 0.9; }

.foot {
  padding: 28px 8vw 40px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
  font-size: var(--fs-ui);
  font-weight: 600;
  letter-spacing: var(--track-ui);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.foot a:hover { color: var(--white); }

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

@media (max-width: 800px) {
  .nav {
    gap: 12px;
    max-width: calc(100% - 24px);
    padding: 0 14px 0 10px;
  }

  .nav-mark {
    font-size: 1rem;
    white-space: nowrap;
  }

  .nav-links {
    gap: 12px;
    letter-spacing: 0.08em;
  }

  .nav-links a { white-space: nowrap; }
  .hero-title { top: 12vh; }
  .lore { padding: 88px 22px; }
  .lore-panel { max-width: none; }
  .journey-title { left: 22px; }
  .descent-still { width: min(760px, 88vw); }
  .journey-track figure { width: 78vw; }
  .journey-track img { height: 56vh; }

  .float-field { gap: 10px; }

  .foot {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .nav-mark { font-size: 0; gap: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader { transition: none; }
  .nav { transition: none; }
  .journey { overflow-x: auto; }
  .journey-track figure { transform: none; opacity: 1; }
}
