:root {
  --container: min(1120px, 92vw);
  --bg-0: #041224;
  --bg-1: #09233d;
  --bg-2: #13486e;
  --text: #e8f6ff;
  --text-soft: #c9e4f5;
  --line: rgba(162, 220, 255, 0.3);
  --panel: rgba(4, 24, 43, 0.74);
  --panel-strong: rgba(3, 20, 36, 0.9);
  --accent: #8ad7ff;
  --accent-strong: #54c2ff;
  --button-text: #03233f;
  --shadow: 0 16px 40px rgba(4, 20, 35, 0.45);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: "Chakra Petch", sans-serif;
  background:
    radial-gradient(circle at 8% -8%, rgba(111, 190, 233, 0.34), transparent 44%),
    radial-gradient(circle at 90% -10%, rgba(176, 230, 255, 0.26), transparent 40%),
    linear-gradient(170deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
}

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

.site-shell {
  position: relative;
  isolation: isolate;
  overflow-x: hidden;
}

.container {
  width: var(--container);
  margin-inline: auto;
}

/* ── Z-stack ── */
main,
footer {
  position: relative;
  z-index: 3;
}

main {
  padding-top: 64px;
}

main section[id] {
  scroll-margin-top: 82px;
}

/* ── Topbar ── */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 80;
  background: #041a2e;
  border-bottom: 1px solid rgba(162, 220, 255, 0.12);
}

.topbar-inner {
  width: var(--container);
  margin-inline: auto;
  min-height: 64px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}

.brand {
  justify-self: start;
  font-family: "Rubik Mono One", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #e4f6ff;
  white-space: nowrap;
}

.topbar-links {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 28px;
  color: #bfe8ff;
  font-size: 1rem;
}

.topbar-links a {
  opacity: 0.88;
  transition: opacity 180ms ease, transform 220ms ease, color 220ms ease;
}

.topbar-links a:hover {
  opacity: 1;
  color: #eaf8ff;
  transform: translateY(-1px);
}

.topbar-links a:active {
  transform: translateY(1px) scale(0.98);
}

/* ── Pills ── */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1;
  padding: 10px 20px;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 220ms ease, box-shadow 220ms ease, background-color 220ms ease;
}

.pill:hover {
  transform: translateY(-1px);
}

.pill:active {
  transform: translateY(1px) scale(0.985);
}

.pill.solid {
  background: linear-gradient(135deg, #bdeeff 0%, var(--accent-strong) 100%);
  color: var(--button-text);
  box-shadow: 0 14px 28px rgba(73, 162, 216, 0.34);
}

.pill.ghost {
  background: rgba(7, 33, 59, 0.6);
  border-color: rgba(148, 218, 255, 0.44);
  color: #d8f2ff;
}

/* ── Mobile hamburger ── */
.icon-button {
  display: none; /* hidden by default, shown via media query */
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(159, 218, 255, 0.32);
  border-radius: 12px;
  background: rgba(7, 30, 51, 0.9);
  color: #dff6ff;
  cursor: pointer;
  flex-shrink: 0;
}

/* ── Mobile menu ── */
.mobile-menu {
  width: var(--container);
  margin: 0 auto 10px;
}

.menu-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(170, 226, 255, 0.22);
  background: rgba(5, 25, 45, 0.93);
}

.menu-card a {
  color: #d7f2ff;
  transition: transform 220ms ease, opacity 220ms ease;
}

.menu-card a:active {
  transform: translateX(3px);
  opacity: 0.86;
}

.hidden {
  display: none;
}

/* ── Hero ── */
.hero-zone {
  position: relative;
  min-height: min(620px, 80vh);
  padding: 60px 0 100px;
  width: 100%;
  overflow: hidden;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  background-image: url("art/banner.png");
  background-size: cover;
  background-position: center 30%;
  background-repeat: no-repeat;
  opacity: 1;
}

.hero-zone::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 14, 28, 0.82) 0%, rgba(3, 14, 28, 0.55) 50%, rgba(3, 14, 28, 0.1) 100%),
    linear-gradient(180deg, rgba(3, 14, 24, 0.2) 0%, rgba(3, 12, 22, 0.55) 100%);
}

.hero-grid {
  position: relative;
  z-index: 4;
  display: block;
}

.hero-inner {
  max-width: 64ch;
  padding-top: clamp(24px, 5vw, 54px);
}

.hero-tag {
  margin: 0;
  display: inline-flex;
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #dcf3ff;
  border: 1px solid rgba(191, 232, 255, 0.4);
  background: rgba(8, 42, 69, 0.56);
}

.hero-title {
  margin: 16px 0 12px;
  font-family: "Rubik Mono One", sans-serif;
  text-transform: uppercase;
  font-size: clamp(2rem, 6.5vw, 4.8rem);
  line-height: 1.04;
  color: #f2fbff;
  text-shadow: 0 20px 30px rgba(2, 14, 24, 0.42);
}

.hero-sub {
  margin: 0;
  max-width: 58ch;
  color: #d2ecfb;
  font-size: clamp(1rem, 2.1vw, 1.2rem);
  line-height: 1.62;
}

.hero-actions {
  margin-top: 24px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.ca-chip {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(174, 231, 255, 0.4);
  background: rgba(6, 28, 49, 0.84);
}

.ca-label {
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b4dcf6;
}

.ca-value {
  font-family: "Rubik Mono One", sans-serif;
  font-size: 0.68rem;
  color: #e6f7ff;
  letter-spacing: 0.03em;
  max-width: min(52vw, 520px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ca-copy {
  border-radius: 999px;
  border: 1px solid rgba(164, 219, 247, 0.42);
  background: rgba(11, 52, 84, 0.74);
  color: #e2f5ff;
  padding: 7px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms ease;
}

.ca-copy:hover {
  background: rgba(11, 62, 100, 0.9);
}

/* ── Marquee ── */
.ice-marquee {
  position: relative;
  z-index: 6;
  overflow: hidden;
  border-top: 1px solid rgba(166, 225, 255, 0.28);
  border-bottom: 1px solid rgba(166, 225, 255, 0.28);
  background: #07243d;
}

.marquee-track {
  display: flex;
  overflow: hidden;
}

.marquee-group {
  flex: 0 0 100%;
  display: flex;
  gap: 34px;
  padding: 14px 10px;
  min-width: 100%;
  justify-content: space-around;
  will-change: transform;
  animation: drift 18s linear infinite;
}

.marquee-group span {
  font-family: "Rubik Mono One", sans-serif;
  font-size: 0.69rem;
  letter-spacing: 0.14em;
  color: #def6ff;
  white-space: nowrap;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-100%, 0, 0); }
}

/* ── Sections ── */
.section-shell {
  width: var(--container);
  margin-inline: auto;
  padding: 84px 0;
}

.section-head {
  max-width: 70ch;
}

.section-kicker {
  margin: 0;
  color: #9bdcff;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.section-head h2 {
  margin: 10px 0 14px;
  font-family: "Rubik Mono One", sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.3rem, 4.1vw, 2.2rem);
  line-height: 1.15;
  color: #f0fbff;
}

.section-head p {
  margin: 0;
  font-size: 1.04rem;
  line-height: 1.7;
  color: var(--text-soft);
}

/* ── Overview cards ── */
.origin-grid {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.origin-card {
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 20px;
}

.origin-card h3 {
  margin: 0;
  font-family: "Rubik Mono One", sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #e9f8ff;
}

.origin-card p {
  margin: 10px 0 0;
  color: #c2e1f2;
  line-height: 1.62;
}

/* ── Gallery ── */
.gallery-shell {
  padding-top: 8px;
}

.gallery-grid {
  margin-top: 26px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: stretch;
}

.gallery-grid figure,
.gallery-note {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(169, 224, 255, 0.3);
  background: var(--panel-strong);
  box-shadow: 0 20px 46px rgba(0, 17, 32, 0.42);
}

.gallery-banner {
  grid-column: span 8;
  min-height: 330px;
}

.gallery-portrait {
  grid-column: span 4;
  min-height: 330px;
}

.gallery-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.gallery-link:hover {
  transform: scale(1.01);
  filter: brightness(1.03);
}

.gallery-link:active {
  transform: scale(0.99);
}

.gallery-link:focus-visible {
  outline: 2px solid #bdeeff;
  outline-offset: -2px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(3, 13, 24, 0.84);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 36px);
}

.lightbox.hidden {
  display: none;
}

.lightbox-image {
  width: min(1100px, 92vw);
  max-height: 86vh;
  object-fit: contain;
  border-radius: 14px;
  border: 1px solid rgba(190, 235, 255, 0.32);
  box-shadow: 0 22px 46px rgba(0, 14, 28, 0.62);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: 1px solid rgba(169, 224, 255, 0.45);
  border-radius: 10px;
  background: rgba(5, 30, 52, 0.9);
  color: #eaf8ff;
  font: inherit;
  font-weight: 600;
  padding: 10px 14px;
  cursor: pointer;
}

/* FIX: was "3 / span 8" which offset it from the content above */
.gallery-note {
  grid-column: 1 / span 12;
  padding: 20px;
}

.gallery-note h3 {
  margin: 0;
  font-family: "Rubik Mono One", sans-serif;
  text-transform: uppercase;
  font-size: 0.92rem;
}

.gallery-note p {
  margin: 12px 0 0;
  color: #c6e4f5;
  line-height: 1.64;
}

/* ── Links / Join card ── */
.join-card {
  border-radius: 26px;
  border: 1px solid rgba(162, 221, 255, 0.3);
  background:
    radial-gradient(circle at 15% 18%, rgba(174, 225, 249, 0.28), transparent 40%),
    linear-gradient(135deg, rgba(7, 33, 57, 0.86) 0%, rgba(7, 52, 86, 0.74) 100%);
  padding: clamp(26px, 4vw, 44px);
  box-shadow: var(--shadow);
}

.join-card h2 {
  margin: 0;
  font-family: "Rubik Mono One", sans-serif;
  text-transform: uppercase;
  font-size: clamp(1.24rem, 4vw, 2.1rem);
  line-height: 1.15;
}

.join-card p {
  margin: 14px 0 0;
  max-width: 62ch;
  color: #d3ecfb;
  line-height: 1.64;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid rgba(171, 229, 255, 0.2);
  background: rgba(3, 16, 30, 0.82);
}

.footer-inner {
  width: var(--container);
  margin-inline: auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer .brand {
  font-size: 0.8rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  color: #bce4f7;
}

[data-reveal] {
  opacity: 1;
  transform: none;
  transition: none;
}

/* ── Responsive ── */
@media (max-width: 1200px) {
  .topbar-links,
  .topbar-actions .pill {
    display: none;
  }

  .icon-button {
    display: inline-flex;
  }
}

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

  .gallery-banner {
    grid-column: span 12;
  }

  .gallery-portrait {
    grid-column: span 6;
  }

  .gallery-note {
    grid-column: span 6;
  }
}

@media (max-width: 720px) {
  .topbar-inner {
    min-height: 56px;
    padding: 0 16px;
    gap: 16px;
  }

  main {
    padding-top: 56px;
  }

  main section[id] {
    scroll-margin-top: 72px;
  }

  .hero-zone {
    min-height: 440px;
    padding: 32px 0 64px;
  }

  .hero-title {
    max-width: 12ch;
  }

  .hero-inner {
    padding-top: 14px;
  }

  .ca-chip {
    width: 100%;
    justify-content: space-between;
    border-radius: 16px;
  }

  .ca-value {
    max-width: 44vw;
  }

  .section-shell {
    padding: 68px 0;
  }

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

  .gallery-portrait,
  .gallery-note {
    grid-column: span 12;
  }

  .gallery-banner,
  .gallery-portrait {
    min-height: 280px;
  }

  .footer-inner {
    min-height: 96px;
    padding: 10px 0;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
  }
}

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

  .marquee-group {
    animation-name: drift !important;
    animation-duration: 18s !important;
    animation-timing-function: linear !important;
    animation-iteration-count: infinite !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
