/* ============================================
   Avermont — Global Styles
   Dark theme with purple accent,
   Liquid Brokers card-in-page design
   ============================================ */

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

:root {
  /* Color palette — extracted from Liquid Brokers reference */
  --bg-outer: #08060e;
  --bg-card: #0b0d12;
  --purple-glow: rgba(120, 90, 255, 0.35);
  --purple-soft: rgba(120, 90, 255, 0.18);
  --bg-nav: rgba(255, 255, 255, 0.06);
  --bg-nav-hover: rgba(255, 255, 255, 0.10);
  --bg-nav-active: rgba(255, 255, 255, 0.14);
  --text-primary: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.30);
  --border-color: rgba(255, 255, 255, 0.08);
  --accent: #8b5cf6;
  --accent-secondary: #6d28d9;

  /* Typography */
  --font-family: "Roboto Flex", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 16px;

  /* Spacing */
  --header-height: 72px;
  --card-radius: 24px;
  --card-padding: 20px;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  background-color: var(--bg-outer);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Page Wrapper — outer dark background
   ============================================ */

.page-wrapper {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* ============================================
   Page Card — rounded inner container
   Matches the Liquid Brokers card look
   ============================================ */

.page-card {
  position: relative;
  flex: 1;
  background: var(--bg-card);
  overflow: hidden;
  border: none;
  box-shadow: none;
}

/* ============================================
   Purple ambient glow — extracted from Liquid Brokers
   Volumetric off-axis bloom, not flat or centered
   ============================================ */

.card-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    /* Primary volumetric purple bloom — top-left, large & soft */
    radial-gradient(1200px 800px at 15% 10%,
      var(--purple-glow) 0%,
      var(--purple-soft) 35%,
      rgba(0, 0, 0, 0) 70%),
    /* Vignette — darkens all edges for cinematic depth */
    radial-gradient(100% 100% at 50% 50%,
      rgba(0, 0, 0, 0) 55%,
      rgba(0, 0, 0, 0.55) 100%),
    /* Base fill */
    linear-gradient(180deg,
      #0b0d12 0%,
      #0b0d12 100%);
}

/* Subtle noise/grain overlay for depth — matches reference texture */
.card-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.05;
  pointer-events: none;
  /* CSS noise pattern — fine grain texture */
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* ============================================
   Particle canvas — floating dust inside card
   ============================================ */

#particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}


/* ============================================
   Header — inside the card
   ============================================ */

.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 0 40px;
  background: transparent;
}

.header-inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-spacer-left,
.header-spacer {
  min-width: 120px;
}

/* ============================================
   Pill Navigation
   ============================================ */

.nav-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-nav);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 5px;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 22px;
  border: none;
  border-radius: 100px;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--bg-nav-hover);
}

.nav-tab.active {
  color: var(--text-primary);
  background: var(--bg-nav-active);
}

.nav-icon {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-tab.active .nav-icon {
  opacity: 1;
}

/* ============================================
   Main Content Area — inside the card
   ============================================ */

.content-area {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: calc(var(--header-height) + 6vh);
  pointer-events: none;
}

/* Re-enable pointer events on interactive content */
.content-area .tab-content {
  pointer-events: auto;
}

/* ============================================
   Tab Content
   ============================================ */

.tab-content {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  padding: 0 24px;
  animation: fadeIn 0.35s ease;
}

.tab-content.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

/* Badge / Label chip */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 100px;
  background: var(--bg-nav);
  border: 1px solid var(--border-color);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

/* Decorative dot before badge text */
.badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* Hero Brand logo */
.hero-brand {
  margin-bottom: 12px;
}

.hero-logo {
  height: clamp(120px, 16vw, 200px);
  width: auto;
  display: block;
  margin: 0 auto;
  margin-top: -40px;
  margin-bottom: -55px;
}

/* Hero Heading — all tabs use Space Grotesk */
.hero-heading {
  font-family: "Space Grotesk", var(--font-family);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #ffffff;
  margin-bottom: 24px;
}

/* Accent font for the home tab description */
#tab-home .hero-description {
  font-family: "Space Grotesk", var(--font-family);
  font-weight: 400;
}

/* ============================================
   Metrics Grid — 4 glass cards below hero text
   ============================================ */

.metrics-grid {
  display: grid;
  /* Auto-fit columns: at least 166px wide, stretch equally to fill space */
  grid-template-columns: repeat(auto-fit, minmax(166px, 1fr));
  /* Force every row to the same height */
  grid-auto-rows: 1fr;
  gap: 16px;
  margin-top: 48px;
  width: 100%;
  max-width: 820px;
}

.metric-card {
  /* Stretch to fill the grid cell so all cards are identical */
  height: 100%;
  min-width: 166px;
  padding: 24px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  transition: border-color 0.3s ease, background 0.3s ease;
  display: flex;
  flex-direction: column;
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(139, 92, 246, 0.25);
}

.metric-icon {
  color: var(--accent);
  margin-bottom: 16px;
  opacity: 0.8;
}

.metric-value {
  font-family: "Space Grotesk", var(--font-family);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 8px;
}

.metric-desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Hero Description */
.hero-description {
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 480px;
}

.hero-description.secondary {
  margin-top: 12px;
}

/* Contact line — icon + text inline */
.contact-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.contact-icon {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.8;
}

/* Email link */
.email-link {
  color: var(--text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 2px;
  transition: border-color 0.2s ease;
}

.email-link:hover {
  border-color: var(--accent);
}

/* Privacy Text */
.privacy-text {
  max-width: 520px;
  text-align: center;
}

.privacy-text p {
  font-size: clamp(15px, 1.8vw, 17px);
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.privacy-text p:last-child {
  margin-bottom: 0;
}


/* ============================================
   Footer — below the card
   ============================================ */

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: #ffffff;
  letter-spacing: 0.01em;
  z-index: 2;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet — ≤768px */
@media (max-width: 768px) {

  html,
  body {
    overflow: auto;
  }

  .page-wrapper {
    height: auto;
    min-height: 100vh;
  }

  .page-card {
    overflow: visible;
  }

  .site-header {
    position: relative;
    height: auto;
    padding: 12px 16px;
    justify-content: center;
  }

  .header-inner {
    justify-content: center;
  }

  .header-spacer-left,
  .header-spacer {
    display: none;
  }

  .nav-pill {
    gap: 2px;
    padding: 3px;
  }

  .nav-tab {
    padding: 7px 12px;
    font-size: 13px;
    gap: 5px;
  }

  .content-area {
    position: relative;
    inset: auto;
    padding-top: 20px;
    padding-bottom: 40px;
    min-height: 0;
  }

  .tab-content {
    max-width: 100%;
    padding: 0 20px;
  }

  .hero-logo {
    height: 90px;
    margin-top: -16px;
    margin-bottom: -24px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 32px;
  }

  .metric-card {
    padding: 20px 16px;
  }
}

/* Mobile — ≤480px: icons only in navbar, 2x2 card grid */
@media (max-width: 480px) {
  .site-header {
    padding: 10px 12px;
  }

  /* Hide text labels, show icons only */
  .nav-tab span,
  .nav-tab {
    font-size: 0;
    gap: 0;
    padding: 8px 12px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
  }

  .nav-pill {
    gap: 1px;
    padding: 3px;
  }

  .hero-heading {
    font-size: 26px;
    margin-bottom: 16px;
  }

  .hero-logo {
    height: 72px;
    margin-top: -12px;
    margin-bottom: -18px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 24px;
    max-width: 100%;
  }

  .metric-card {
    padding: 16px 14px;
  }

  .metric-icon svg {
    width: 20px;
    height: 20px;
  }

  .metric-icon {
    margin-bottom: 12px;
  }

  .metric-value {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .metric-desc {
    font-size: 12px;
  }

  .hero-description {
    font-size: 14px;
  }

  .content-area {
    padding-top: 16px;
    padding-bottom: 32px;
  }

  .tab-content {
    padding: 0 16px;
  }
}