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

:root {
  --bg: #0a0a0a;
  --surface: rgba(255, 255, 255, 0.04);
  --surface-border: rgba(255, 255, 255, 0.08);
  --text: #e8e8e8;
  --text-muted: #888;
  --accent: #ffffff;
  --mono: 'Space Mono', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
}

html {
  scroll-behavior: smooth;
  background: #000;
}

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

.noise {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
}

/* NAV */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  border-bottom: none;
  transition: background 0.3s, border-bottom 0.3s, backdrop-filter 0.3s;
}

header.scrolled {
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(0, 0, 0, 0.6);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  transition: color 0.2s;
}

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

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
  background: #000;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.15) 30%, rgba(0, 0, 0, 0.5) 55%, rgba(0, 0, 0, 0.85) 80%, #000 100%);
  z-index: 1;
  pointer-events: none;
}

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

.hero-content h1 {
  font-family: var(--sans);
  font-size: clamp(4rem, 12vw, 9rem);
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 1;
  margin-bottom: 1rem;
  color: #fff;
  text-transform: lowercase;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

.tagline {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: rgba(255, 255, 255, 0.9);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.45s;
}

/* HERO BUTTONS */
.hero-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(14px);
  animation: fadeUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.65s;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.25s, border-color 0.25s, transform 0.25s;
  cursor: pointer;
}

.hero-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-1px);
}

.btn-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.hero-btn-outline {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.hero-btn-outline:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* FIXED VIDEO BACKGROUND */
.bg-video-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-video-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

/* SECTIONS */
.section {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 6rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.section-content h2 {
  font-family: var(--sans);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  max-width: 700px;
}

.section-content p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  max-width: 600px;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.section-content p strong {
  color: var(--text);
  font-weight: 500;
}

.section-content p em {
  color: rgba(255, 255, 255, 0.6);
  font-style: italic;
}

/* TWEETS */
.tweets-section {
  max-width: 1400px;
  padding-top: 12rem;
  border-top: none;
}

.tweets-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -9999px;
  right: -9999px;
  height: 250px;
  background: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.85) 30%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.tweets-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.tweets-grid > * {
  min-width: 0;
  max-width: 100%;
}

.tweet-container {
  min-width: 0;
}

.tweet-container twitter-widget,
.tweets-grid .twitter-tweet-rendered,
.tweets-grid twitter-widget {
  width: 100% !important;
  max-width: 100% !important;
}

/* TWEET SKELETONS */
.tweet-skeleton {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  padding: 1.5rem;
  min-height: 150px;
}

.skel-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.skel-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  animation: shimmer 1.5s ease-in-out infinite;
}

.skel-name {
  width: 120px;
  height: 14px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  animation: shimmer 1.5s ease-in-out infinite 0.1s;
}

.skel-line {
  width: 100%;
  height: 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  margin-bottom: 0.6rem;
  animation: shimmer 1.5s ease-in-out infinite 0.2s;
}

.skel-line.short {
  width: 60%;
  animation-delay: 0.3s;
}

@keyframes shimmer {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* EXAMPLES */
.example-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.example-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 1.75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}

.example-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.example-msg {
  padding: 0.6rem 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.msg-author {
  display: block;
  font-family: var(--mono);
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.example-msg.sent {
  color: rgba(255, 255, 255, 0.5);
  padding-bottom: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.example-msg.reply {
  color: var(--accent);
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

/* HOW TO BUY */
.howtobuy-intro {
  margin-bottom: 2.5rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.step-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 16px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.3s, transform 0.3s;
}

.step-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
}

.step-number {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.step-card p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.7;
}

.step-card p strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
}

/* CHART */
.chart-section .section-content {
  margin-bottom: 2rem;
}

.chart-embed {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--surface-border);
  background: var(--surface);
}

.chart-embed iframe {
  width: 100%;
  height: 600px;
  display: block;
}

/* FOOTER */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1rem;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.3);
}

/* SCROLL ANIMATIONS */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.card-reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.97);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tweet-reveal {
  opacity: 0 !important;
  transform: translateY(50px) scale(0.92) !important;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.tweet-reveal.visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* RESPONSIVE */
@media (max-width: 640px) {
  nav {
    padding: 1rem 1.25rem;
  }

  .nav-links {
    gap: 1.25rem;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .section {
    padding: 4rem 1.25rem;
  }

  .tweets-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
  }

  .example-list {
    grid-template-columns: 1fr;
  }

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

  .chart-embed iframe {
    height: 400px;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
