/* =========================================================
   鹈鹕骑自行车 · 3D 艺术页
   Palette: #1a2744 / #c47a5a / #f0c9a0 / #f0a050 / #2e8b9a
   ========================================================= */

:root {
  --ink: #1a2744;
  --cream: #f5f0e8;
  --sand: #f0c9a0;
  --salmon: #c47a5a;
  --beak: #f0a050;
  --accent: #e87840;
  --teal: #2e8b9a;
  --font-display: "Playfair Display", "Noto Serif SC", "Songti SC", Georgia, serif;
  --font-body: "Inter", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #0d1528;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Fixed canvas ---------- */
#webgl {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
  cursor: grab;
}

#webgl:active {
  cursor: grabbing;
}

/* ---------- Loading ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: linear-gradient(180deg, #1a2744 0%, #c47a5a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  transition: opacity 0.8s ease, visibility 0.8s;
}

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

.loader__bird {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid rgba(245, 240, 232, 0.25);
  border-top-color: var(--sand);
  animation: spin 0.9s linear infinite;
}

.loader__text {
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.125rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- HUD / Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  pointer-events: none;
  mix-blend-mode: normal;
}

.nav__brand {
  pointer-events: auto;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--cream);
  text-decoration: none;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.35);
}

.nav__links {
  pointer-events: auto;
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.nav__links a {
  color: rgba(245, 240, 232, 0.85);
  text-decoration: none;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
  transition: color 0.25s ease;
}

.nav__links a:hover {
  color: var(--sand);
}

/* ---------- Scroll content ---------- */
.scroll {
  position: relative;
  z-index: 10;
  pointer-events: none;
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 8vw;
}

.section--hero {
  align-items: flex-end;
  padding-bottom: 12vh;
}

.section--center {
  justify-content: flex-start;
  align-items: center;
}

.section--center .copy {
  margin-top: 6vh;
}

.section--end {
  align-items: flex-end;
  padding-bottom: 10vh;
}

.copy {
  max-width: 28rem;
  pointer-events: auto;
}

.copy--dark {
  color: var(--cream);
}

.copy__kicker {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
  opacity: 0.75;
}

.copy--dark .copy__kicker {
  color: var(--sand);
  opacity: 1;
}

.copy__title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5.5rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.25);
}

.copy__body {
  font-size: clamp(0.95rem, 1.4vw, 1.125rem);
  line-height: 1.7;
  opacity: 0.9;
  max-width: 24rem;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
}

.copy__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
  padding: 0.85rem 1.5rem;
  border: 1.5px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-family: var(--font-body);
  font-size: 0.8125rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease,
    border-color 0.3s ease;
}

.copy__cta:hover,
.copy__cta.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--cream);
  transform: translateY(-2px);
}

.copy--card {
  background: rgba(245, 240, 232, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2rem 2.25rem;
  border-radius: 1.25rem;
  box-shadow: 0 16px 56px rgba(13, 21, 40, 0.28);
  color: var(--ink);
  border: 1px solid rgba(245, 240, 232, 0.55);
}

.copy--card .copy__kicker {
  color: var(--accent);
  opacity: 1;
}

.copy--card .copy__title {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  text-shadow: none;
}

.copy--card .copy__body {
  opacity: 0.8;
  text-shadow: none;
}

/* ---------- Stats row ---------- */
.stats {
  display: flex;
  gap: 1.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.stat {
  min-width: 5.5rem;
}

.stat__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--teal);
  line-height: 1.1;
}

.stat__label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 0.25rem;
}

/* ---------- Footer ---------- */
.footer {
  position: relative;
  z-index: 10;
  padding: 2rem 2rem 2.5rem;
  text-align: center;
  color: rgba(245, 240, 232, 0.55);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  pointer-events: none;
}

.footer a {
  color: var(--sand);
  text-decoration: none;
  pointer-events: auto;
}

.footer a:hover {
  color: var(--accent);
}

.friends {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.friends__label {
  color: rgba(245, 240, 232, 0.4);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
}

.friends__link {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.9rem;
  border: 1px solid rgba(240, 201, 160, 0.35);
  border-radius: 999px;
  font-size: 0.8rem;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.friends__link:hover {
  background: rgba(232, 120, 64, 0.2);
  border-color: var(--accent);
  color: var(--cream) !important;
}

/* ---------- Guess quiz — rock / slate style ---------- */
.guess {
  position: fixed;
  right: 1.25rem;
  bottom: 4.5rem;
  z-index: 18;
  width: min(15.5rem, calc(100vw - 2rem));
  pointer-events: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}

.guess.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.guess__card {
  pointer-events: auto;
  color: #e8dfd0;
  border-radius: 0.65rem 1.1rem 0.55rem 1rem;
  padding: 1rem 1rem 0.9rem;
  border: 1px solid rgba(0, 0, 0, 0.35);
  background:
    linear-gradient(145deg, rgba(92, 78, 62, 0.95) 0%, rgba(58, 48, 40, 0.96) 45%, rgba(42, 36, 32, 0.97) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 190, 0.12),
    inset 0 -2px 6px rgba(0, 0, 0, 0.35),
    0 10px 28px rgba(0, 0, 0, 0.4);
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}

.guess__kicker {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d4b48c;
  opacity: 0.9;
  margin-bottom: 0.4rem;
}

.guess__title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.75rem;
  color: #f0e6d4;
}

.guess__options {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.guess__opt {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(0, 0, 0, 0.4);
  background:
    linear-gradient(180deg, rgba(120, 104, 86, 0.55), rgba(72, 60, 48, 0.7));
  color: #ebe2d2;
  border-radius: 0.4rem 0.55rem 0.35rem 0.5rem;
  padding: 0.55rem 0.75rem;
  font-family: var(--font-body);
  font-size: 0.8rem;
  text-align: left;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.08);
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.15s ease;
}

.guess__opt:hover {
  border-color: rgba(212, 180, 140, 0.45);
  background:
    linear-gradient(180deg, rgba(148, 126, 100, 0.65), rgba(88, 72, 56, 0.75));
  transform: translateY(-1px);
}

.guess__opt.is-picked {
  border-color: rgba(232, 120, 64, 0.75);
  background:
    linear-gradient(180deg, rgba(160, 90, 48, 0.7), rgba(110, 58, 32, 0.85));
  color: #ffe8c8;
}

.guess__opt:disabled {
  cursor: default;
  opacity: 0.75;
}

.guess__opt.is-picked:disabled {
  opacity: 1;
}

.guess__result {
  margin-top: 0.7rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.06);
}

.guess__truth {
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(235, 226, 210, 0.85);
  margin: 0 0 0.55rem;
}

.guess__truth strong {
  color: #f0c9a0;
  font-weight: 600;
}

.guess__reset {
  appearance: none;
  border: 1px solid rgba(0, 0, 0, 0.45);
  background:
    linear-gradient(180deg, rgba(110, 96, 78, 0.7), rgba(64, 54, 44, 0.8));
  color: #e8dfd0;
  border-radius: 0.35rem 0.5rem 0.3rem 0.45rem;
  padding: 0.35rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 230, 190, 0.08);
  transition: background 0.22s ease, border-color 0.22s ease;
}

.guess__reset:hover {
  border-color: rgba(212, 180, 140, 0.4);
  background:
    linear-gradient(180deg, rgba(140, 120, 96, 0.75), rgba(78, 64, 50, 0.85));
}

@media (max-width: 720px) {
  .guess {
    right: 0.75rem;
    bottom: 3.75rem;
    width: min(13.5rem, calc(100vw - 1.5rem));
  }
}



/* ---------- Scroll hint ---------- */
.hint {
  position: fixed;
  bottom: 1.75rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  color: rgba(245, 240, 232, 0.7);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
  transition: opacity 0.5s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.hint__line {
  width: 1px;
  height: 36px;
  background: linear-gradient(to bottom, var(--sand), transparent);
  animation: drip 1.6s ease-in-out infinite;
}

@keyframes drip {
  0%,
  100% {
    transform: scaleY(0.5);
    opacity: 0.4;
  }
  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.hint.is-hidden {
  opacity: 0;
}

/* ---------- Progress ---------- */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--teal), var(--sand), var(--accent));
  z-index: 30;
  width: 0%;
  pointer-events: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .nav {
    padding: 1rem 1.25rem;
  }

  .nav__links {
    display: none;
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .section--hero {
    padding-bottom: 18vh;
  }

  .copy--card {
    padding: 1.5rem;
  }
}
