/* ============================================
   APIARIES.AI — Production Stylesheet
   Dark sovereign theme, gold accent
   Hardfin-inspired layout structure
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Core palette */
  --bg-primary: #09090B;
  --bg-secondary: #111114;
  --bg-tertiary: #18181B;
  --bg-card: #141417;
  --bg-card-hover: #1C1C20;

  --text-primary: #EDEDF0;
  --text-secondary: #A0A0AB;
  --text-muted: #6B6B76;

  --gold: #D4A843;
  --gold-light: #E8C96A;
  --gold-dim: #A88832;
  --gold-glow: rgba(212, 168, 67, 0.12);

  --border: #27272A;
  --border-light: #3F3F46;

  --radius: 8px;
  --radius-lg: 12px;

  /* Typography scale */
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* Spacing */
  --section-pad: clamp(4rem, 8vw, 7rem) clamp(1.25rem, 5vw, 6rem);
  --container: 1200px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-light); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
}


/* --- Google Fonts Loader --- */
/* Add to <head>:
   <link href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
*/


/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.nav-logo svg { width: 32px; height: 32px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .2s;
  position: relative;
}

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

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-dropdown-trigger::after {
  content: '';
  border: 4px solid transparent;
  border-top-color: var(--text-muted);
  margin-top: 2px;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, visibility .2s, transform .2s;
  transform: translateX(-50%) translateY(4px);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown-menu a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: background .15s, color .15s;
}

.nav-dropdown-menu a:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

/* Nav CTA */
.nav-cta {
  background: var(--gold);
  color: var(--bg-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  transition: background .2s, transform .1s;
}

.nav-cta:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  transform: translateY(-1px);
}

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  transition: transform .3s, opacity .2s;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: flex-start;
    padding: 2rem 1.5rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform .3s ease;
  }

  .nav-links.open { transform: translateX(0); }

  .nav-links li { width: 100%; }

  .nav-links a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border);
  }

  .nav-dropdown-menu {
    position: static;
    transform: none;
    background: transparent;
    border: none;
    padding: 0 0 0 1rem;
    opacity: 1;
    visibility: visible;
  }

  .nav-cta {
    display: block;
    text-align: center;
    margin-top: 1.5rem;
    padding: 0.75rem;
  }
}


/* ============================================
   HERO
   ============================================ */
.hero {
  padding: clamp(8rem, 18vh, 12rem) clamp(1.25rem, 4vw, 3rem) clamp(4rem, 8vh, 6rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 0.35rem 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 500;
}

.hero-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold);
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all .2s;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--gold);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--gold-light);
  color: var(--bg-primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-light);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  background: var(--bg-tertiary);
}


/* ============================================
   SECTIONS — General
   ============================================ */
section { padding: var(--section-pad); }

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.65;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header.center {
  text-align: center;
}

.section-header.center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* Alternating bg */
.bg-alt { background: var(--bg-secondary); }


/* ============================================
   GRIDS
   ============================================ */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 960px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}


/* ============================================
   CARDS — "Replace" Cards (what we replace)
   ============================================ */
.replace-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color .25s, transform .25s, background .25s;
}

.replace-card:hover {
  border-color: var(--border-light);
  transform: translateY(-2px);
  background: var(--bg-card-hover);
}

.replace-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--gold-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--gold);
  font-size: 1.25rem;
}

.replace-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}

.replace-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}


/* ============================================
   CARDS — Industry Cards
   ============================================ */
.industry-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: all .25s;
  display: flex;
  flex-direction: column;
}

.industry-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.industry-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.industry-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.industry-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}

.industry-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 1.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}

.industry-card .card-link::after {
  content: '→';
  transition: transform .2s;
}

.industry-card:hover .card-link::after {
  transform: translateX(3px);
}


/* ============================================
   CARDS — Benefit Cards
   ============================================ */
.benefit-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: border-color .25s;
}

.benefit-card:hover {
  border-color: var(--border-light);
}

.benefit-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.benefit-card h3 .check {
  color: var(--gold);
  font-size: 1rem;
}

.benefit-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding-left: 1.5rem;
}


/* ============================================
   STEPS / How It Works
   ============================================ */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 1.75rem;
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  display: block;
  margin-bottom: 1rem;
  font-weight: 500;
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 960px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; }
}


/* ============================================
   INDUSTRY PAGE — Challenges / Solutions
   ============================================ */
.industry-hero {
  padding: clamp(8rem, 16vh, 11rem) clamp(1.25rem, 4vw, 3rem) clamp(3rem, 6vh, 5rem);
  text-align: center;
}

.industry-hero .section-label {
  margin-bottom: 1rem;
}

.industry-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.03em;
  max-width: 750px;
  margin: 0 auto 1rem;
}

.industry-hero p {
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
}

/* Challenge row */
.challenge-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding: var(--section-pad);
}

.challenge-list {
  list-style: none;
}

.challenge-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.challenge-list li:last-child { border-bottom: none; }

.challenge-num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--gold);
  min-width: 2rem;
  padding-top: 2px;
  font-weight: 500;
}

.challenge-list h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.challenge-list p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

@media (max-width: 768px) {
  .challenge-row { grid-template-columns: 1fr; gap: 2rem; }
}

/* Solution cards for industry pages */
.solution-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color .25s, transform .2s;
}

.solution-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-2px);
}

.solution-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.solution-card h3 .icon {
  color: var(--gold);
}

.solution-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}


/* ============================================
   PRICING
   ============================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: border-color .3s, transform .3s;
}

.pricing-card:hover {
  transform: translateY(-3px);
}

.pricing-card.featured {
  border-color: var(--gold-dim);
  position: relative;
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  color: var(--bg-primary);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.85rem;
  border-radius: 100px;
}

.pricing-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.pricing-card .price {
  font-family: var(--font-display);
  font-size: 2.25rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.pricing-card .price span {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 400;
}

.pricing-card .price-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.pricing-card ul {
  list-style: none;
  margin-bottom: 1.75rem;
}

.pricing-card ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.4rem 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pricing-card ul li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 600;
  flex-shrink: 0;
}

.pricing-card .btn {
  width: 100%;
  justify-content: center;
  font-size: 0.875rem;
  padding: 0.65rem 1rem;
}

@media (max-width: 1024px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .pricing-grid { grid-template-columns: 1fr; }
}

/* Add-ons table */
.addons-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 2rem;
}

.addons-table th,
.addons-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.addons-table th {
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.addons-table td:last-child {
  color: var(--gold);
  font-weight: 600;
  text-align: right;
}


/* ============================================
   CTA Section
   ============================================ */
.cta-section {
  padding: var(--section-pad);
  text-align: center;
  position: relative;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  margin-bottom: 1rem;
  position: relative;
}

.cta-section p {
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  position: relative;
}

.cta-section .hero-actions {
  position: relative;
}


/* ============================================
   FOOTER
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 3.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  background: var(--bg-secondary);
}

.footer-grid {
  max-width: var(--container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  max-width: 280px;
  line-height: 1.55;
}

.footer-col h4 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-weight: 600;
}

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 0.5rem; }

.footer-col ul a {
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: color .2s;
}

.footer-col ul a:hover { color: var(--text-primary); }

.footer-bottom {
  max-width: var(--container);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}


/* ============================================
   SCROLL REVEAL
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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


/* ============================================
   STAT ROW
   ============================================ */
.stat-row {
  display: flex;
  justify-content: center;
  gap: clamp(2rem, 6vw, 5rem);
  padding: 2.5rem 0;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}


/* ============================================
   MISC / UTILITY
   ============================================ */
.divider {
  border: none;
  height: 1px;
  background: var(--border);
  margin: 0;
}

.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; }
