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

:root {
  color-scheme: dark;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --hero-bg: radial-gradient(circle at 20% 20%, rgba(107, 181, 255, 0.35), transparent 55%),
    radial-gradient(circle at 80% 10%, rgba(255, 197, 122, 0.4), transparent 45%),
    #061829;
  --accent: #74f8ff;
  --border: rgba(255, 255, 255, 0.25);
  --tile-size: 100vh;
  --minimap-height: 10vh;
  --minimap-tile-size: min(96px, var(--tile-size));
  --minimap-dot-size: 10px;
  --minimap-line-color: rgba(255, 255, 255, 0.25);
  --minimap-fish-size: 56px;
  --track-offset: 0px;
  --column-height: 100vh;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 200vh;
  font-family: inherit;
  background: #030e18;
  color: #f0f6ff;
  overflow-x: hidden;
}

html {
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100vh;
  margin: 0;
  background: var(--hero-bg);
  overflow: hidden;
  isolation: isolate;
}

.hero__title-zone {
  display: none;
  flex: 0 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  text-align: center;
  color: rgba(255, 255, 255, 0.9);
}

.hero__title-main {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  letter-spacing: 0.02em;
}

.hero__title-sub {
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
}

.hero__viewport {
  position: relative;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(9, 24, 41, 0.9), rgba(2, 8, 16, 0.95));
}

.hero__track {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  transform: translate3d(var(--track-offset), 0, 0);
  transition: transform 1600ms cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
  z-index: 1;
}

.hero__track.is-snapping {
  transition: none !important;
}

.hero__tile {
  position: relative;
  display: flex;
  width: var(--tile-size);
  height: var(--column-height);
  flex: 0 0 var(--tile-size);
  overflow: hidden;
  contain: layout paint;
  isolation: isolate;
}

.hero__tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 25%, rgba(0, 8, 17, 0.75) 100%);
  pointer-events: none;
}

.hero__tile-inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
}

.hero__tile-row {
  flex: 1 1 0%;
  width: 100%;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero__tile-row--top {
  background-position: center bottom;
}

.hero__tile-row--mid {
  position: relative;
  flex: 0 0 var(--tile-size);
  height: var(--tile-size);
  background-position: center;
}

.hero__tile-row--bottom {
  background-position: center top;
}


.hero__player-layer {
  pointer-events: none;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc((var(--column-height) - var(--tile-size)) / 2);
  z-index: 2;
}

.hero__player-layer img {
  width: calc(var(--tile-size) * 0.8);
  height: calc(var(--tile-size) * 0.8);
  max-width: 80vw;
  max-height: 80vh;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
  filter: drop-shadow(0 35px 30px rgba(0, 0, 0, 0.65));
}

.hero__foreground {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  height: 100%;
  transform: translate3d(var(--track-offset), 0, 0);
  transition: transform 1600ms cubic-bezier(0.33, 1, 0.68, 1);
  will-change: transform;
  z-index: 3;
}

.hero__foreground.is-snapping {
  transition: none !important;
}

.hero__tile-foreground {
  position: relative;
  width: var(--tile-size);
  height: var(--column-height);
  flex: 0 0 var(--tile-size);
}

.hero__tile-foreground-mid {
  position: relative;
  width: 100%;
  height: var(--tile-size);
  margin: calc((var(--column-height) - var(--tile-size)) / 2) 0;
}

.hero__object,
.hero__animation {
  position: absolute;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transition: transform 200ms ease, filter 200ms ease;
  z-index: 3;
}

.hero__object {
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  border-radius: 16px;
  isolation: isolate;
}

.hero__object:hover,
.hero__animation:hover {
  transform: translateY(-4px) scale(1.02);
  filter: drop-shadow(0 12px 16px rgba(6, 17, 32, 0.55));
}

.hero__object:focus-visible,
.hero__animation:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hero__animation img {
  display: block;
  width: 100%;
  height: auto;
  opacity: 1;
  mix-blend-mode: normal;
  pointer-events: none;
}

.hero__arrow {
  position: absolute; /* keep arrows positioned relative to viewport instead of track */
  top: 50%; /* vertically align center point */
  width: calc(var(--tile-size) * 0.1); /* match width to 8% of square tile */
  height: calc(var(--tile-size) * 0.1); /* match height to 8% of square tile */
  border-radius: 200%; /* maintain circular button shape */
  border: 1px solid var(--border); /* subtle ring around the button */
  background: transparent; /* inherit backdrop so only icon shows */
  display: grid; /* center icon without extra wrappers */
  place-items: center; /* align icon perfectly in both axes */
  cursor: pointer; /* show clickable cursor */
  transform: translateY(-50%); /* offset absolute positioning to true center */
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease; /* smooth hover feedback */
  z-index: 5; /* keep arrows above scenery */
  border: none; /* remove default border for custom ring */
}

.hero__arrow--left {
  left: clamp(0.5rem, 3vw, 2rem); /* responsive horizontal inset for left arrow */
}

.hero__arrow--right {
  right: clamp(0.5rem, 3vw, 2rem); /* responsive horizontal inset for right arrow */
}

.hero__arrow:hover {
  transform: translateY(-50%) scale(1.35); /* subtle growth on hover */
  /* border-color: var(--accent); */
  /* background: rgba(4, 15, 29, 0.068); faint glow to signal hover state */
}

.hero__arrow:focus-visible {
  outline: 2px solid var(--accent); /* clear keyboard focus ring */
  outline-offset: 2px; /* offset ring from button edge */
}

.hero__arrow-icon {
  width: calc(var(--tile-size) * 0.05); /* icon fills half of the button width */
  height: calc(var(--tile-size) * 0.05); /* icon fills half of the button height */
  transition: filter 150ms ease; /* allow smooth brightness change */
}

.hero__arrow:active .hero__arrow-icon,
.hero__arrow.is-pressed .hero__arrow-icon {
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8)) brightness(1.35); /* flash icon a bit lighter on click */
}

.content {
  width: min(900px, 100%);
  margin: 0 auto;
  padding: clamp(2rem, 8vw, 4rem) clamp(1.2rem, 6vw, 3rem);
}

.content h2 {
  margin-top: 0;
}

.content p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.content__tile-details {
  margin-top: clamp(1.25rem, 4vw, 2rem);
  padding: clamp(1rem, 4vw, 1.5rem);
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(3, 14, 24, 0.65);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  transition: opacity 200ms ease;
}

.content__tile-details h3 {
  margin: 0 0 0.35rem;
}

.content__tile-meta {
  margin: 0 0 0.75rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.content__tile-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.35rem;
}

.content__tile-list li {
  color: rgba(255, 255, 255, 0.88);
}

.content__tile-details-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  font-style: italic;
}

.minimap {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: max(calc(var(--minimap-dot-size) * 2 + 12px), 32px);
  background: transparent;
  background-color: transparent !important;
  border-top: none;
  z-index: 12;
  display: flex;
  align-items: stretch;
  box-shadow: none;
  pointer-events: auto;
  justify-content: center;
}

.minimap__items {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(900px, calc(100vw - 32px));
  max-width: 900px;
  min-width: 0;
  margin: 0 auto;
  padding: 0 8px;
  background: transparent;
  background-color: transparent !important;
  height: 100%;
  pointer-events: auto;
  position: relative;
}

.minimap__item {
  position: relative;
  isolation: isolate;
  border: none;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  background-color: transparent !important;
  background-image: none !important;
  padding: 0;
  margin: 0;
  height: 100%;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, outline-color 140ms ease;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 12px;
}

.minimap__dot {
  position: absolute;
  inset: 0;
  margin: auto;
  width: var(--minimap-dot-size);
  height: var(--minimap-dot-size);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  opacity: 1;
  pointer-events: none;
  z-index: 2;
  transform: scale(1);
  transform-origin: center;
  transition: transform 160ms ease, opacity 160ms ease;
}

.minimap__item.is-empty .minimap__dot {
  display: none;
}

.minimap__item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2px;
  background: var(--minimap-line-color);
  opacity: 0.5;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 160ms ease;
}

.minimap__thumb {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translateX(-50%);
  width: 76px;
  height: 76px;
  max-width: 140%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease;
}

.minimap__item:hover .minimap__thumb,
.minimap__item.show-thumb .minimap__thumb,
.minimap.is-open .minimap__thumb {
  opacity: 1;
}

.minimap__preview {
  position: absolute;
  bottom: 110%;
  left: 50%;
  transform: translate(-50%, 0);
  width: 96px;
  height: 96px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  padding: 0.4rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 140ms ease, transform 140ms ease;
}

.minimap__preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -4px);
}

.minimap__preview--image {
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.minimap__fish {
  position: absolute;
  bottom: 6px;
  left: 0;
  width: var(--minimap-fish-size);
  height: calc(var(--minimap-fish-size) * 0.6);
  background: url("../svg/fish_icon.svg") center/contain no-repeat;
  opacity: 1;
  pointer-events: none;
  transform: translateX(0);
  transition: transform 160ms ease, width 160ms ease, height 160ms ease;
  z-index: 3;
}

@media (orientation: landscape) {
  .minimap__items {
    width: min(900px, calc(100vw - 32px));
    max-width: 900px;
  }
}

@media (orientation: portrait) {
  .minimap__items {
    width: min(900px, calc(100vw - 32px));
    max-width: min(900px, calc(100vw - 32px));
  }
}

.content__video {
  margin-top: clamp(2rem, 6vw, 3rem);
  display: grid;
  gap: 1rem;
}

.content__video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #01070f;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
}

.content__video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (orientation: portrait) {
  .hero__title-zone {
    display: none;
  }

  .hero__viewport {
    width: 100vw;
    height: 100vh;
    flex: 0 0 auto;
  }

  .hero {
    --column-height: 100vh;
    height: 100vh;
  }

  .hero__tile-row--top,
  .hero__tile-row--bottom {
    flex: 1 1 0%;
  }
}

@media (orientation: landscape) {
  .hero__title-zone {
    display: none;
  }

  .hero__viewport {
    width: 100vw;
    height: 100vh;
  }

  .hero__tile-inner {
    justify-content: center;
  }

  .hero__tile-row--top,
  .hero__tile-row--bottom {
    display: none;
  }

  .hero__tile-row--mid {
    flex: 1 1 auto;
    height: 100%;
  }
}
