/* ==========================================================================
   TRILLIUM COIN — Main Stylesheet
   --------------------------------------------------------------------------
   Premium dark-mode web3 landing page for Trillium ($TRILLIUM)
   Built on top of Tailwind CSS (via CDN) with custom utilities below.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design Tokens (CSS Custom Properties)
   -------------------------------------------------------------------------- */
:root {
  /* Surface */
  --bg:        #0b0f19;
  --bg-2:      #0a0d17;
  --surface:   rgba(20, 26, 44, 0.6);
  --surface-2: rgba(15, 20, 34, 0.4);

  /* Brand: Gold */
  --gold-50:   #fff6d9;
  --gold-100:  #fde9a8;
  --gold-200:  #fbd778;
  --gold-300:  #f5c66e;
  --gold-400:  #e6b04a;
  --gold-500:  #d4a437;
  --gold-600:  #b18324;
  --gold-700:  #8b6914;
  --gold-800:  #6b4d10;

  /* Accent: Violet (ambient depth) */
  --violet:    #6366f1;
  --violet-2:  #8b5cf6;

  /* Text */
  --text:        #ffffff;
  --text-muted:  #9ca3af;
  --text-dim:    #6b7280;
  --ink:         #0b0f19;

  /* Borders / lines */
  --line:        rgba(255, 255, 255, 0.06);
  --line-strong: rgba(245, 198, 110, 0.22);
  --line-gold:   rgba(245, 198, 110, 0.45);

  /* Typography */
  --font-display: "Unbounded", system-ui, -apple-system, sans-serif;
  --font-body:    "Manrope", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Radii */
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-card: 0 24px 60px -20px rgba(0, 0, 0, 0.55);
  --shadow-gold: 0 14px 32px -10px rgba(245, 198, 110, 0.6);
  --shadow-gold-strong: 0 22px 44px -10px rgba(245, 198, 110, 0.85);

  /* Layout */
  --header-h: 68px;
}

/* --------------------------------------------------------------------------
   2. Base / Reset
   -------------------------------------------------------------------------- */
* { box-sizing: border-box; -webkit-font-smoothing: antialiased; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  min-width: 320px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(245, 198, 110, 0.35);
  color: #fff;
}

::-webkit-scrollbar         { width: 10px; height: 10px; }
::-webkit-scrollbar-track   { background: var(--bg-2); }
::-webkit-scrollbar-thumb   { background: linear-gradient(180deg, var(--gold-500), var(--gold-700)); border-radius: 8px; }

/* --------------------------------------------------------------------------
   3. Typography Utilities
   -------------------------------------------------------------------------- */
.font-display { font-family: var(--font-display); letter-spacing: -0.02em; }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

.text-balance { text-wrap: balance; }

/* Gradient text - gold */
.grad-gold {
  background: linear-gradient(135deg,
    var(--gold-100) 0%,
    var(--gold-300) 35%,
    var(--gold-500) 65%,
    var(--gold-700) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* Gradient text - gold blended with violet (premium web3) */
.grad-mixed {
  background: linear-gradient(135deg,
    var(--gold-300) 0%,
    var(--gold-500) 40%,
    var(--violet-2) 100%);
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   4. Ambient Background Layers
   -------------------------------------------------------------------------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(55% 45% at 12% 8%,  rgba(99, 102, 241, 0.16),  transparent 60%),
    radial-gradient(50% 40% at 88% 15%, rgba(245, 198, 110, 0.12), transparent 60%),
    radial-gradient(70% 50% at 50% 110%, rgba(139, 92, 246, 0.10), transparent 65%),
    var(--bg);
}

.ambient::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse at 50% 30%, #000 30%, transparent 85%);
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.025;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.7'/></svg>");
}

/* --------------------------------------------------------------------------
   5. Glassmorphism Surfaces
   -------------------------------------------------------------------------- */
.glass {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.glass-gold {
  background: linear-gradient(180deg,
    rgba(245, 198, 110, 0.06),
    rgba(212, 164, 55, 0.02));
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

/* --------------------------------------------------------------------------
   6. Brand Mark (Logo Container)
   -------------------------------------------------------------------------- */
.brand-mark {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 -1px 0 rgba(0, 0, 0, 0.25) inset,
    0 6px 20px -6px rgba(245, 198, 110, 0.55);
}

.brand-mark img,
.brand-mark svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* --------------------------------------------------------------------------
   7. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: var(--r-pill);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid transparent;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg,
    var(--gold-100) 0%,
    var(--gold-300) 30%,
    var(--gold-500) 70%,
    var(--gold-600) 100%);
  color: var(--ink);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    var(--shadow-gold);
}

.btn-primary:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 -1px 0 rgba(0, 0, 0, 0.2) inset,
    var(--shadow-gold-strong);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.btn-ghost:hover {
  background: rgba(245, 198, 110, 0.06);
  border-color: var(--line-gold);
}

.btn-sm { padding: 10px 18px; font-size: 0.82rem; }

/* --------------------------------------------------------------------------
   8. Social Icon Buttons
   -------------------------------------------------------------------------- */
.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  color: #d1d5db;
  transition: all 0.18s ease;
}

.icon-btn:hover {
  color: var(--gold-300);
  border-color: var(--line-gold);
  background: rgba(245, 198, 110, 0.06);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   9. Site Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(11, 15, 25, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s ease;
}

.site-header.scrolled {
  background: rgba(11, 15, 25, 0.92);
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: var(--header-h) 0 auto 0;
  z-index: 49;
  padding: 18px 20px 22px;
  background: rgba(11, 15, 25, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line-strong);
  transform: translateY(-110%);
  transition: transform 0.3s ease;
}

.mobile-drawer.open { transform: translateY(0); }

/* --------------------------------------------------------------------------
   10. Hero — Animated Coin
   -------------------------------------------------------------------------- */
.coin-wrap {
  position: relative;
  width: clamp(260px, 38vw, 420px);
  aspect-ratio: 1;
  margin: 0 auto;
}

.coin-wrap .halo {
  position: absolute;
  inset: -20%;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(245, 198, 110, 0.35), transparent 55%),
    radial-gradient(circle at 30% 70%, rgba(139, 92, 246, 0.25), transparent 60%);
  filter: blur(40px);
  animation: pulseHalo 6s ease-in-out infinite;
}

@keyframes pulseHalo {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.08); }
}

.coin-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  animation: floaty 7s ease-in-out infinite;
  filter: drop-shadow(0 30px 50px rgba(212, 164, 55, 0.35));
}

@keyframes floaty {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(2deg); }
}

.coin-orbit {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  animation: spin 22s linear infinite;
}

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

/* Floating mechanic tags */
.float-tag {
  position: absolute;
  z-index: 3;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 500;
  background: rgba(11, 15, 25, 0.75);
  border: 1px solid var(--line-strong);
  color: var(--gold-300);
  backdrop-filter: blur(10px);
  animation: floaty 9s ease-in-out infinite;
}

.float-tag.t1 { top:  8%;  left: -8%;  animation-delay: -1s;   }
.float-tag.t2 { bottom: 14%; right: -6%; animation-delay: -3.5s; }
.float-tag.t3 { top: 52%;  left: -14%; animation-delay: -5s;   }

/* --------------------------------------------------------------------------
   11. Kicker Pills
   -------------------------------------------------------------------------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line-strong);
  background: rgba(245, 198, 110, 0.05);
  color: var(--gold-300);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.kicker .pulse {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--gold-300);
  box-shadow: 0 0 0 0 rgba(245, 198, 110, 0.5);
  animation: pulseDot 1.8s ease-out infinite;
}

@keyframes pulseDot {
  0%   { box-shadow: 0 0 0 0 rgba(245, 198, 110, 0.55); }
  70%  { box-shadow: 0 0 0 12px rgba(245, 198, 110, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 198, 110, 0); }
}

/* --------------------------------------------------------------------------
   12. Contract Address Bar
   -------------------------------------------------------------------------- */
.contract-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: rgba(11, 15, 25, 0.65);
  border: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: #cbd5e1;
}

.contract-bar code {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.contract-bar .copy-btn {
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  font-size: 1rem;
  transition: color 0.2s ease;
}

.contract-bar .copy-btn:hover { color: var(--gold-300); }

/* --------------------------------------------------------------------------
   13. Marquee Ticker
   -------------------------------------------------------------------------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(11, 15, 25, 0.5);
}

.ticker-track {
  display: flex;
  gap: 48px;
  white-space: nowrap;
  padding: 14px 0;
  animation: ticker 38s linear infinite;
}

@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  letter-spacing: 0.05em;
}

.ticker-item .sep {
  width: 6px;
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
}

/* --------------------------------------------------------------------------
   14. Feature Cards
   -------------------------------------------------------------------------- */
.feat-card {
  position: relative;
  overflow: hidden;
  transition:
    transform 0.25s ease,
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.feat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 0%, rgba(245, 198, 110, 0.10), transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.feat-card:hover {
  transform: translateY(-6px);
  border-color: rgba(245, 198, 110, 0.3);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(245, 198, 110, 0.12);
}

.feat-card:hover::before { opacity: 1; }

.feat-icon {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  background: linear-gradient(135deg,
    rgba(245, 198, 110, 0.12),
    rgba(139, 92, 246, 0.08));
  border: 1px solid var(--line-strong);
  color: var(--gold-300);
  font-size: 1.5rem;
}

/* --------------------------------------------------------------------------
   15. Roadmap — Vertical Timeline
   -------------------------------------------------------------------------- */
.timeline {
  position: relative;
  padding-left: 0;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(245, 198, 110, 0)   0%,
    rgba(245, 198, 110, 0.5) 12%,
    rgba(139, 92, 246, 0.45) 50%,
    rgba(245, 198, 110, 0.5) 88%,
    rgba(245, 198, 110, 0)   100%);
}

@media (min-width: 768px) {
  .timeline::before {
    left: 50%;
    transform: translateX(-1px);
  }
}

.tl-item {
  position: relative;
  padding-left: 72px;
}

@media (min-width: 768px) {
  .tl-item       { padding-left: 0; width: 50%; }
  .tl-item.right { margin-left: auto; padding-left: 56px; }
  .tl-item.left  { padding-right: 56px; text-align: right; }
}

.tl-node {
  position: absolute;
  left: 16px;
  top: 4px;
  z-index: 2;
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  border: 2px solid var(--bg);
  box-shadow:
    0 0 0 1px rgba(245, 198, 110, 0.35),
    0 0 24px -2px rgba(245, 198, 110, 0.7);
}

.tl-node::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: var(--r-pill);
  background: var(--bg);
}

@media (min-width: 768px) {
  .tl-item.right .tl-node { left: -13px; }
  .tl-item.left  .tl-node { left: auto; right: -13px; }
}

/* Roadmap phase tag chips */
.tag-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #d1d5db;
}

/* --------------------------------------------------------------------------
   16. Reveal-on-Scroll Animation
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* --------------------------------------------------------------------------
   17. Toast Notification
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 99;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  background: linear-gradient(135deg, var(--gold-300), var(--gold-500));
  color: var(--ink);
  font-weight: 600;
  font-size: 0.88rem;
  transform: translateX(-50%) translateY(120%);
  box-shadow: 0 18px 40px -10px rgba(245, 198, 110, 0.55);
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.toast.show { transform: translateX(-50%) translateY(0); }

/* --------------------------------------------------------------------------
   18. Responsive Tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .coin-wrap { max-width: 320px; }
  .float-tag { font-size: 0.7rem; padding: 6px 10px; }
}

/* --------------------------------------------------------------------------
   19. Accessibility — Reduced Motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
