:root {
  color-scheme: dark;
  --ink: #03131f;
  --paper: #e9f7f4;
  --muted: #9cb8bd;
  --line: rgba(180, 227, 224, .22);
}

* { box-sizing: border-box; }

html,
body {
  min-width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow-x: hidden;
  background: #03131f;
  color: var(--paper);
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background: #05263a url("../assets/ocean-field-v2.png") center / cover no-repeat;
  filter: saturate(.72) brightness(.34) contrast(1.12);
  transform: scale(1.04);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background-color: rgba(2, 18, 29, .62);
  box-shadow: inset 0 0 180px rgba(0, 0, 0, .76);
  pointer-events: none;
}

.ocean-hall {
  position: relative;
  width: min(1240px, 100%);
  min-height: 100dvh;
  margin: 0 auto;
  padding: clamp(26px, 5vw, 68px) clamp(18px, 4vw, 52px) 28px;
}

.depth-markers {
  position: fixed;
  top: 0;
  bottom: 0;
  left: max(10px, calc(50% - 650px));
  width: 1px;
  background: var(--line);
  pointer-events: none;
}

.depth-markers i {
  position: absolute;
  left: -5px;
  width: 11px;
  height: 1px;
  background: rgba(180, 227, 224, .5);
}

.depth-markers i:nth-child(1) { top: 12%; }
.depth-markers i:nth-child(2) { top: 36%; }
.depth-markers i:nth-child(3) { top: 65%; }
.depth-markers i:nth-child(4) { top: 88%; }

.hall-header {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(0, 1.35fr);
  align-items: end;
  gap: 28px;
  margin: 0 0 clamp(22px, 4vw, 46px);
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
  animation: surface-in .7s both;
}

.eyebrow,
.mode-kicker,
.hall-footer {
  margin: 0;
  color: #86bfc1;
  font-family: "Bahnschrift Condensed", "Arial Narrow", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
}

.title-lockup {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.title-lockup h1 {
  margin: 0;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(48px, 8vw, 92px);
  font-weight: 900;
  letter-spacing: -.08em;
  line-height: .86;
  text-shadow: 0 10px 36px rgba(0, 0, 0, .42);
}

.title-lockup p {
  max-width: 240px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
  text-align: right;
}

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

.mode-card {
  --accent: #ff7b63;
  position: relative;
  isolation: isolate;
  min-height: 470px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, transparent);
  background-color: rgba(5, 25, 38, .88);
  color: inherit;
  text-decoration: none;
  clip-path: polygon(0 0, calc(100% - 24px) 0, 100% 24px, 100% 100%, 0 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .3);
  transition: transform .28s ease, border-color .28s ease, background-color .28s ease;
  animation: card-rise .75s both;
}

.mode-card:nth-child(2) { animation-delay: .08s; }
.mode-card:nth-child(3) { animation-delay: .16s; }

.mode-card::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .48;
  background-image: repeating-linear-gradient(112deg, transparent 0 32px, rgba(255,255,255,.025) 33px 34px);
}

.mode-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--accent);
  transform: scaleX(.22);
  transform-origin: left;
  transition: transform .32s ease;
}

.mode-card:hover,
.mode-card:focus-visible {
  z-index: 2;
  outline: none;
  border-color: var(--accent);
  background-color: rgba(7, 36, 50, .96);
  transform: translateY(-8px);
}

.mode-card:hover::after,
.mode-card:focus-visible::after { transform: scaleX(1); }

.mode-free { --accent: #83e6a2; }
.mode-tides { --accent: #72e5ed; }

.mode-number {
  position: absolute;
  top: 18px;
  right: 20px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 14px;
  font-style: italic;
}

.mode-copy {
  position: relative;
  z-index: 3;
  padding: 32px 28px;
}

.mode-kicker { color: var(--accent); }

.mode-copy h2 {
  margin: 13px 0 16px;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(32px, 4vw, 46px);
  letter-spacing: -.05em;
  line-height: 1;
}

.mode-copy > p:not(.mode-kicker) {
  max-width: 320px;
  margin: 0;
  color: #b7cacc;
  font-size: 13px;
  line-height: 1.72;
}

.mode-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.mode-tags span {
  border: 1px solid rgba(225, 248, 244, .2);
  padding: 5px 8px;
  color: #dcebe8;
  font-size: 10px;
  letter-spacing: .04em;
}

.fish-stage {
  position: absolute;
  inset: 205px -30px 54px 0;
  z-index: 1;
  pointer-events: none;
}

.fish {
  position: absolute;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .55));
  transform-origin: center;
  transition: transform .45s cubic-bezier(.2,.8,.2,1);
  animation: fish-drift 4.5s ease-in-out infinite;
}

.fish-a {
  right: 4%;
  bottom: 8%;
  width: 74%;
}

.fish-b {
  top: 0;
  left: 4%;
  width: 40%;
  opacity: .74;
  animation-delay: -.9s;
}

.mode-classic .fish-a { width: 48%; }
.mode-classic .fish-b { width: 56%; }
.mode-free .fish-a { right: -13%; width: 100%; }
.mode-free .fish-b { top: 17%; left: -9%; width: 72%; }
.mode-tides .fish-a { right: -14%; width: 105%; }
.mode-tides .fish-b { top: 4%; left: 2%; width: 44%; }

.mode-card:hover .fish-a,
.mode-card:focus-visible .fish-a { transform: translateX(-10px) scale(1.05); }

.mode-card:hover .fish-b,
.mode-card:focus-visible .fish-b { transform: translateX(8px) scale(.96); }

.mode-enter {
  position: absolute;
  right: 24px;
  bottom: 22px;
  left: 24px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(225, 248, 244, .2);
  padding-top: 14px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.mode-enter b {
  color: var(--accent);
  font-size: 19px;
}

.hall-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px 0 0;
  color: #76969b;
}

.hall-footer i {
  width: 28px;
  height: 1px;
  background: var(--line);
}

@keyframes surface-in {
  from { opacity: 0; transform: translateY(-16px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes card-rise {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fish-drift {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -7px; }
}

@media (max-width: 760px) {
  .ocean-hall { padding: 24px 14px 22px; }
  .depth-markers { display: none; }
  .hall-header { display: block; margin-bottom: 18px; padding: 0 4px 16px; }
  .eyebrow { margin-bottom: 17px; }
  .title-lockup { align-items: end; }
  .title-lockup h1 { font-size: 49px; }
  .title-lockup p { max-width: 155px; font-size: 11px; line-height: 1.6; }
  .mode-grid { grid-template-columns: 1fr; gap: 10px; }
  .mode-card { min-height: 184px; clip-path: polygon(0 0, calc(100% - 17px) 0, 100% 17px, 100% 100%, 0 100%); }
  .mode-copy { width: 68%; padding: 22px 18px; }
  .mode-copy h2 { margin: 8px 0 9px; font-size: 30px; }
  .mode-copy > p:not(.mode-kicker) { font-size: 11px; line-height: 1.55; }
  .mode-tags { gap: 4px; margin-top: 10px; }
  .mode-tags span { padding: 3px 5px; font-size: 8px; }
  .fish-stage { inset: 18px -18px 28px 58%; }
  .mode-enter { right: 16px; bottom: 12px; left: auto; width: 34%; padding-top: 8px; font-size: 9px; }
  .mode-number { top: 11px; right: 13px; }
  .mode-classic .fish-a { right: 4%; bottom: 4%; width: 54%; }
  .mode-classic .fish-b { top: 15%; left: 2%; width: 55%; }
  .mode-free .fish-a { right: -28%; bottom: 8%; width: 118%; }
  .mode-free .fish-b { top: 29%; left: -12%; width: 72%; }
  .mode-tides .fish-a { right: -32%; bottom: 4%; width: 120%; }
  .mode-tides .fish-b { top: 8%; left: -3%; width: 48%; }
  .hall-footer { gap: 8px; padding-top: 18px; font-size: 8px; }
  .hall-footer i { width: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
