:root {
  --bg-dark: #0a0a0c;
  --bg-card: #121216;
  --bg-elevated: #18181d;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #f97316;
  --accent-hover: #ea580c;
  --accent-glow: rgba(249, 115, 22, 0.35);
  --border: rgba(255, 255, 255, 0.08);
  --font-sans: "Space Grotesk", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  --radius: 12px;
  --radius-lg: 20px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
}

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

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

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

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

.nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: color var(--transition);
}

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

.nav-x {
  font-weight: 700;
  letter-spacing: -0.03em;
}

.nav-telegram {
  font-size: 0.85rem;
}

/* Hero – frame matches image exactly (1868×620 = 3:1) so full image visible, no crop */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1868 / 620;
  min-height: 0;
  display: flex;
  align-items: center;
  padding-top: 0;
  overflow: hidden;
  background: var(--bg-dark);
}

.hero-banner-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-banner-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 10, 12, 0.5) 0%,
    rgba(10, 10, 12, 0.6) 50%,
    rgba(10, 10, 12, 0.85) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 3rem 1.25rem;
  width: 100%;
}

.hero-title {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  max-width: 18ch;
}

.hero-title .accent {
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}

.hero-lead {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text);
  max-width: 42rem;
  margin: 0 0 1.5rem;
  line-height: 1.65;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Contract */
.contract-section {
  padding: 3rem 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.contract-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  text-transform: uppercase;
}

/* Stats row: tokens bought back, market cap */
.hero-stats {
  margin-top: 1.75rem;
  padding: 0.75rem 0;
  min-height: 3.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1.5rem 2rem;
}

.hero-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
}

.hero-stat-label {
  display: block;
  width: 100%;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 0.1rem;
}

.hero-stat-value {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 16px var(--accent-glow);
}

.hero-stat-symbol {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
}

/* Mobile-only sticky bar: always visible at bottom */
.mobile-buyback-bar {
  display: none;
}

.mobile-buyback-bar .mobile-buyback-extra {
  width: 100%;
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.contract-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.contract-address {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  word-break: break-all;
  flex: 1;
  min-width: 0;
}

.copy-btn {
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: var(--accent);
  color: #fff;
}

.copy-btn.copied .copy-text {
  display: none;
}

.copy-btn .copy-done {
  display: none;
}

.copy-btn.copied .copy-done {
  display: inline;
}

/* Features */
.features {
  padding: 4rem 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.feature-card:hover {
  border-color: rgba(249, 115, 22, 0.3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.feature-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 0.75rem;
  color: var(--text);
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Lore */
.lore {
  padding: 4rem 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 2rem;
  letter-spacing: -0.02em;
}

.lore-content {
  max-width: 42rem;
}

.lore-content p {
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.75;
}

.lore-content p:last-child {
  margin-bottom: 0;
}

/* Market */
.market {
  padding: 4rem 0;
}

.market-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.market-link {
  display: inline-block;
  padding: 0.875rem 1.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: all var(--transition);
}

.market-link:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

/* Footer */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.footer-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.footer-x {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

.footer-telegram {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

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

/* Tablet + Mobile: banner in its own block so full image is visible */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  .header-inner {
    height: 56px;
  }

  .nav {
    gap: 1.25rem;
  }

  .nav a {
    font-size: 0.85rem;
  }

  /* Stack banner above text; no gap under header */
  main {
    padding-top: 0;
  }

  .hero {
    flex-direction: column;
    min-height: 0;
    align-items: stretch;
    margin-top: 0;
  }

  .hero-banner-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 2.1 / 1;
    min-height: 0;
    flex-shrink: 0;
    background: var(--bg-dark);
  }

  .hero-banner-wrap .hero-overlay {
    display: none;
  }

  /* Move image up inside banner (reduces gap under header) */
  .hero-banner-img {
    object-fit: contain;
    object-position: center top;
  }

  .hero-content {
    padding: 2.5rem 1rem;
    background: var(--bg-dark);
  }

  .hero-stats {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    gap: 1rem 1.5rem;
  }

  .hero-stat-label {
    font-size: 0.65rem;
  }

  .hero-stat-value {
    font-size: 1.1rem;
  }

  .hero-stat-symbol {
    font-size: 0.9rem;
  }

  .mobile-buyback-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 90;
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border-top: 2px solid var(--accent);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }

  .mobile-buyback-bar .mobile-buyback-label {
    width: 100%;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    text-align: center;
  }

  .mobile-buyback-bar .mobile-buyback-value {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent);
  }

  .mobile-buyback-bar .mobile-buyback-symbol {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
  }

  .mobile-buyback-bar .mobile-buyback-extra {
    font-size: 0.65rem;
    margin-top: 0.15rem;
  }

  body {
    padding-bottom: 4rem;
  }

  .section-title {
    font-size: 1.65rem;
    margin-bottom: 1.5rem;
  }

  .features,
  .lore,
  .market {
    padding: 3rem 0;
  }

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

/* Mobile */
@media (max-width: 640px) {
  .container {
    padding: 0 1rem;
  }

  .header-inner {
    height: 52px;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

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

  /* Banner: full width, aspect ratio so full image visible; image aligned to top */
  .hero-banner-wrap {
    aspect-ratio: 2 / 1;
  }

  .hero-banner-img {
    object-position: center top;
  }

  .hero-content {
    padding: 2rem 1rem 2.5rem;
  }

  .hero-title {
    max-width: none;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.25rem;
  }

  .hero-stats {
    margin-top: 1.25rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    gap: 1rem 1.25rem;
  }

  .hero-stat-label {
    font-size: 0.6rem;
  }

  .hero-stat-value {
    font-size: 1rem;
  }

  .hero-stat-symbol {
    font-size: 0.8rem;
  }

  .contract-section {
    padding: 2rem 0;
  }

  .contract-box {
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
  }

  .contract-address {
    font-size: 0.8rem;
  }

  .copy-btn {
    width: 100%;
    min-height: 44px;
  }

  .features-grid {
    gap: 1rem;
  }

  .feature-card {
    padding: 1.25rem;
  }

  .feature-card h3 {
    font-size: 1.1rem;
  }

  .feature-card p {
    font-size: 0.9rem;
  }

  .lore-content p {
    font-size: 0.95rem;
  }

  .market-links {
    gap: 0.75rem;
  }

  .market-link {
    flex: 1 1 calc(50% - 0.375rem);
    min-width: 0;
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .footer {
    padding: 1.5rem 0;
  }

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

  .footer-text {
    font-size: 0.8rem;
    line-height: 1.5;
  }
}

/* Small mobile */
@media (max-width: 380px) {
  .hero-stat-value {
    font-size: 0.95rem;
  }

  .nav {
    gap: 0.75rem;
  }

  .nav a {
    font-size: 0.75rem;
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .market-link {
    flex: 1 1 100%;
  }
}
