/* ============================================
   CHAINTRIP — styles
   ============================================ */

:root {
  --bg: #050505;
  --bg-soft: #080808;
  --green: #A8FF20;
  --green-strong: #7DFF00;
  --pink: #FF2DB2;
  --pink-soft: #FF4FC8;
  --text: #FFFFFF;
  --text-dim: #999999;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 60px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

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

.green { color: var(--green); }
.pink  { color: var(--pink); }

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(5, 5, 5, 0.72);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 3vw, 28px);
}

.header-nav a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--text-dim);
  transition: color 0.25s ease;
  padding: 8px 0;
}

.header-nav a:hover {
  color: var(--text);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 500;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  padding: 14px 30px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.25s ease, color 0.25s ease,
              background 0.25s ease, box-shadow 0.25s ease,
              transform 0.25s ease;
  min-height: 48px;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.btn-buy {
  border-color: var(--green);
  color: var(--green);
}

.btn-buy:hover {
  background: var(--green);
  color: #050505;
  border-color: var(--green);
  box-shadow: 0 0 32px rgba(168, 255, 32, 0.35);
}

.btn-header {
  min-height: 0;
  padding: 8px 16px;
  font-size: 0.72rem;
}

.header-nav a.btn-header {
  color: var(--green);
}

.header-nav a.btn-header:hover {
  color: #050505;
}

.btn-ghost {
  color: var(--text-dim);
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-big {
  padding: 18px 44px;
  font-size: 0.95rem;
  min-width: 180px;
}

/* Launched-state visibility */
.live-only {
  display: none !important;
}

body.is-live .live-only {
  display: inline-flex !important;
}

body.is-live .token-live.live-only {
  display: flex !important;
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 32px) 20px 0;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -4% 0;
  width: 100%;
  height: 108%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  animation: portalPulse 9s ease-in-out infinite;
  will-change: transform;
}

@keyframes portalPulse {
  0%, 100% { filter: brightness(0.92); }
  50%      { filter: brightness(1.06); }
}

/* readable dark center zone */
.hero-vignette {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 55% 60% at 50% 42%, rgba(5, 5, 5, 0.82), transparent 100%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.55) 0%, transparent 22%, transparent 62%, var(--bg) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

.hero-title {
  font-size: clamp(3rem, 12vw, 8.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1;
  text-shadow: 0 0 80px rgba(0, 0, 0, 0.9);
}

.hero-tagline {
  margin-top: 20px;
  font-size: clamp(1.15rem, 3.2vw, 1.7rem);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero-sub {
  margin-top: 10px;
  color: var(--text-dim);
  font-size: clamp(0.9rem, 2.4vw, 1.05rem);
  letter-spacing: 0.06em;
}

.hero-status {
  display: inline-block;
  margin-top: 30px;
  padding: 10px 26px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.28em;
  color: var(--green);
  border: 1px solid rgba(168, 255, 32, 0.35);
  background: rgba(5, 5, 5, 0.6);
}

body.is-live .hero-status {
  border-color: var(--green);
  box-shadow: 0 0 28px rgba(168, 255, 32, 0.25);
}

.hero-characters-wrap {
  position: relative;
  z-index: 2;
  margin-top: clamp(20px, 4vh, 48px);
  width: min(560px, 88vw);
}

.hero-characters {
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 72% 88% at 50% 50%, #000 58%, transparent 97%);
  mask-image: radial-gradient(ellipse 72% 88% at 50% 50%, #000 58%, transparent 97%);
}

/* ============================================
   SECTIONS
   ============================================ */

.section {
  position: relative;
  z-index: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: clamp(80px, 14vh, 150px) 24px;
  text-align: center;
}

.section-label {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.36em;
  color: var(--text-dim);
  margin-bottom: 34px;
}

/* --- THE TRIP --- */

.trip-headline {
  font-size: clamp(1.9rem, 5.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
}

.trip-sub {
  margin: 26px auto 0;
  max-width: 460px;
  color: var(--text-dim);
  font-size: 1rem;
}

.trip-sides {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  gap: clamp(14px, 4vw, 32px);
  flex-wrap: wrap;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.05em;
}

.trip-visual {
  margin: clamp(56px, 10vh, 100px) auto 0;
  max-width: 680px;
}

.trip-visual img {
  width: 100%;
  -webkit-mask-image: radial-gradient(ellipse 68% 74% at 50% 50%, #000 48%, transparent 92%);
  mask-image: radial-gradient(ellipse 68% 74% at 50% 50%, #000 48%, transparent 92%);
}

.trip-visual figcaption {
  margin-top: 22px;
  color: var(--text-dim);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
}

/* --- TOKEN STATUS --- */

.token-ticker {
  font-size: clamp(2.4rem, 7vw, 4.2rem);
  font-weight: 700;
  letter-spacing: 0.05em;
}

.token-state {
  margin-top: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  color: var(--text-dim);
}

body.is-live .token-state {
  color: var(--green);
}

.token-meta {
  margin: 44px auto 0;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.token-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 0.92rem;
}

.token-meta-key {
  color: var(--text-dim);
}

.token-live {
  margin-top: 44px;
  flex-direction: column;
  align-items: center;
  gap: 26px;
}

.contract-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.contract-label {
  font-size: 0.75rem;
  letter-spacing: 0.28em;
  color: var(--text-dim);
}

.contract-address {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  letter-spacing: 0.04em;
  color: var(--green);
  word-break: break-all;
  padding: 0 12px;
}

.token-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- ENTER THE TRIP --- */

.enter-buttons {
  display: flex;
  justify-content: center;
  gap: clamp(14px, 3vw, 24px);
  flex-wrap: wrap;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 70px 24px 50px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
}

.footer-tagline {
  margin-top: 8px;
  color: var(--text-dim);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.footer-links {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 28px;
}

.footer-links a {
  color: var(--text-dim);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  transition: color 0.25s ease;
  padding: 6px 0;
}

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

.footer-disclaimer {
  margin: 34px auto 0;
  max-width: 420px;
  color: #666666;
  font-size: 0.74rem;
  line-height: 1.7;
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 640px) {
  /* Wide portal background gets cropped on portrait screens —
     add faint edge glows matching the portal colors instead */
  .hero-vignette {
    background:
      radial-gradient(circle at 0% 38%, rgba(255, 45, 178, 0.14), transparent 42%),
      radial-gradient(circle at 100% 38%, rgba(168, 255, 32, 0.13), transparent 42%),
      radial-gradient(ellipse 80% 55% at 50% 38%, rgba(5, 5, 5, 0.82), transparent 100%),
      linear-gradient(180deg, rgba(5, 5, 5, 0.55) 0%, transparent 22%, transparent 62%, var(--bg) 100%);
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: calc(var(--header-h) + 20px);
  }

  .hero-characters-wrap {
    width: min(400px, 94vw);
  }

  .btn-big {
    width: 100%;
    max-width: 320px;
  }

  .token-actions {
    width: 100%;
  }

  .token-actions .btn {
    flex: 1 1 130px;
  }
}

/* ============================================
   REDUCED MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-bg {
    animation: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn {
    transition: none;
  }
}
