:root {
  color-scheme: dark;
  --bg: #090B10;
  --panel: rgba(255, 255, 255, 0.02);
  --surface: rgba(255, 255, 255, 0.03);
  --primary: #2EBAC6;
  --primary-hover: #36D1DE;
  --highlight: rgba(46, 186, 198, 0.15);
  --cream: #F8FAFC;
  --muted: #94A3B8;
  --border: rgba(255, 255, 255, 0.08);
  --white: #FFFFFF;
  --gold: #D4AF37;
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 28px rgba(0, 0, 0, 0.3);
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--cream);
  overflow-x: hidden;
  line-height: 1.5;
  font-weight: 500;
  position: relative;
}

/* Ambient Glowing Orbs */
body::before, body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.15;
}
body::before {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: #2EBAC6;
}
body::after {
  bottom: -10%;
  right: -10%;
  width: 40vw;
  height: 40vw;
  background: #4F46E5; /* Indigo tone */
}

.page {
  position: relative;
  padding: 0 20px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

/* Header & Navbar */
header {
  position: sticky;
  top: 12px;
  z-index: 50;
  background: rgba(9, 11, 16, 0.7) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1) !important;
  border-radius: var(--radius-md) !important;
  margin: 12px auto 28px !important;
  padding: 10px 16px !important;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
  color: var(--cream) !important;
  font-weight: 800;
  text-decoration: none;
  flex-shrink: 0;
}

.brand img {
  border-radius: 4px;
  mix-blend-mode: normal !important;
  height: 54px !important;
  filter: brightness(1.15) contrast(1.1);
}
.brand .mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border) !important;
  border-radius: 8px;
  background: var(--surface) !important;
  color: var(--primary) !important;
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted) !important;
}

.nav-links a {
  color: var(--muted) !important;
  text-decoration: none;
  transition: color 200ms ease;
  white-space: nowrap;
}

.nav-links a:hover {
  color: var(--cream) !important;
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.mobile-only-actions {
  display: none;
}

.nav-toggle {
  display: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--cream);
  padding: 8px 10px;
  transition: background 200ms ease;
}
.nav-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* Main Sections Layout */
main {
  display: grid;
  gap: 80px;
}

/* Hero Section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 0 20px;
  max-width: 900px;
  margin: 0 auto;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--cream);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.hero-copy h1 span.highlight-text {
  background: transparent;
  color: var(--primary);
  padding: 0;
  border-radius: 0;
  text-shadow: 0 0 30px rgba(46, 186, 198, 0.4);
}

.hero-copy p {
  max-width: 660px;
  margin-bottom: 40px;
  color: var(--muted);
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 1.6;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.hero-ctas .button,
.hero-ctas .button-alt {
  padding: 14px 28px;
  font-size: 0.95rem;
}

.hero-badge {
  margin-top: 40px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border);
  color: #64748B;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero-badge i {
  color: var(--primary) !important;
}

/* Trust Metrics Bar */
.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.metric {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  transition: background 200ms ease, border-color 200ms ease;
}
.metric:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.metric-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(46, 186, 198, 0.1);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(46, 186, 198, 0.2);
}

.metric-data strong {
  font-size: 1rem;
  font-weight: 700;
  color: var(--cream);
  display: block;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.metric-data span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Section Headings */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--cream);
  margin-bottom: 12px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-header p {
  color: var(--muted);
  font-size: 1.1rem;
  font-weight: 500;
}

/* How It Works Section */
.how-it-works-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.role-toggle {
  display: flex;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  padding: 6px;
  border-radius: var(--radius-full);
  width: fit-content;
  margin: 0 auto 40px;
  border: 1px solid var(--border);
}

.role-toggle button {
  border: none;
  background: transparent;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--muted);
  cursor: pointer;
  transition: all 200ms ease;
  font-family: inherit;
}

.role-toggle button.active {
  background: var(--primary);
  color: var(--bg);
  box-shadow: 0 0 15px rgba(46, 186, 198, 0.3);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.step-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background 200ms ease, border-color 200ms ease;
}
.step-card:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.step-num {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(46, 186, 198, 0.1);
  color: var(--primary);
  font-weight: 800;
  font-size: 1.2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(46, 186, 198, 0.2);
}

.step-card h4 {
  font-size: 1.15rem;
  color: var(--cream);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.step-card p {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.6;
}

/* Security & Seller Sections */
.security-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: center;
}

.security-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 200ms ease, border-color 200ms ease;
}
.security-box:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.15);
}

.security-list {
  display: grid;
  gap: 24px;
  margin-top: 32px;
}

.security-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.security-item-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--primary);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.security-item-text h5 {
  font-size: 1.05rem;
  color: var(--cream);
  font-weight: 700;
  margin-bottom: 4px;
}

.security-item-text p {
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 500;
  line-height: 1.5;
}

/* Override the old #sell styling */
.security-box#sell {
  background: linear-gradient(135deg, rgba(46, 186, 198, 0.1) 0%, rgba(9, 11, 16, 0.8) 100%);
  border: 1px solid rgba(46, 186, 198, 0.3);
  color: var(--cream) !important;
}
.security-box#sell .eyebrow {
  background: rgba(46, 186, 198, 0.2) !important;
  color: var(--primary) !important;
  border-color: rgba(46, 186, 198, 0.4) !important;
}

/* Footer */
footer {
  margin-top: 80px;
  padding-top: 60px;
  border-top: 1px solid var(--border);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
  margin-bottom: 48px;
}

.footer-brand h4 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  color: var(--cream);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.footer-brand p {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h5 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--cream);
  letter-spacing: 0.05em;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 12px;
}

.footer-col a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 200ms ease;
}

.footer-col a:hover {
  color: var(--cream);
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.newsletter-form input {
  flex: 1;
  min-width: 0;
  padding: 12px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  outline: none;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
  transition: border-color 200ms ease, background 200ms ease;
}
.newsletter-form input:focus {
  border-color: var(--primary);
  background: rgba(255, 255, 255, 0.05);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 16px;
}

.footer-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-badge {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
}

/* Responsive Media Queries */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .nav-links.active {
    display: flex;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: rgba(9, 11, 16, 0.95);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    flex-direction: column;
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    gap: 16px;
    align-items: stretch;
    text-align: center;
  }

  .nav-actions {
    display: none;
  }

  .mobile-only-actions {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    margin-top: 12px;
  }

  .nav-toggle {
    display: block;
  }

  .metrics-bar {
    grid-template-columns: repeat(2, 1fr);
  }

  .security-section {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 580px) {
  .page {
    padding: 0 16px 40px;
  }

  header {
    padding: 12px 16px !important;
    margin: 12px auto 24px !important;
  }

  .hero {
    padding: 24px 0 12px;
  }

  .eyebrow {
    font-size: 0.75rem;
    padding: 6px 14px;
    margin-bottom: 20px;
  }

  .hero-copy h1 {
    font-size: clamp(2rem, 8vw, 2.5rem);
    margin-bottom: 16px;
  }

  .hero-copy p {
    font-size: 1rem;
    margin-bottom: 28px;
  }

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

  .hero-ctas .button,
  .hero-ctas .button-alt {
    width: 100%;
  }

  .metrics-bar {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .how-it-works-card,
  .security-box {
    padding: 28px 20px;
  }

  .role-toggle {
    flex-direction: column;
    width: 100%;
  }

  .role-toggle button {
    width: 100%;
  }

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

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ==========================================================================
   RESTORED DYNAMIC AUTH HEADER COMPONENTS (AAVE THEME)
   ========================================================================== */

/* Header Search Box */
.header-search-box {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 12px;
  gap: 8px;
  min-width: 200px;
  transition: all 200ms ease;
}
.header-search-box:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(46, 186, 198, 0.15);
}
.header-search-box input {
  background: transparent;
  border: none;
  color: var(--cream);
  font-size: 0.85rem;
  width: 100%;
  outline: none;
}
.header-search-box input::placeholder {
  color: var(--muted);
}

/* Header Balance Badge */
.header-balance-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 186, 198, 0.1);
  border: 1px solid rgba(46, 186, 198, 0.2);
  color: var(--primary);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 200ms ease;
}
.header-balance-badge:hover {
  background: rgba(46, 186, 198, 0.15);
  border-color: rgba(46, 186, 198, 0.3);
}

/* Header Nav Buttons */
.header-nav-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 200ms ease;
}
.header-nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
}

/* User Menu & Dropdown */
.header-user-menu {
  position: relative;
}
.header-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  padding: 4px 10px 4px 4px;
  border-radius: var(--radius-full);
  cursor: pointer;
  color: var(--cream);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 200ms ease;
}
.header-user-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}
.user-avatar-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #090B10;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
}
.header-user-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 240px;
  background: rgba(9, 11, 16, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 100;
}
.header-user-dropdown.show {
  display: flex;
}
.dropdown-header-user {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.dropdown-header-user div:first-child {
  font-weight: 700;
  color: var(--cream);
}
.header-user-dropdown a,
.header-user-dropdown button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  border: none;
  text-align: left;
  cursor: pointer;
  transition: all 150ms ease;
  font-family: inherit;
  width: 100%;
}
.header-user-dropdown a:hover,
.header-user-dropdown button:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--cream);
}
.header-auth-btn {
  padding: 8px 16px;
  font-size: 0.85rem;
}
