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

/* ===== Design Tokens — Tesla-inspired ===== */
:root {
  --blue:        #3E6AE1;   /* Electric Blue — primary CTA only */
  --white:       #FFFFFF;
  --ash:         #F4F4F4;   /* Light Ash — alternate surface */
  --carbon:      #171A20;   /* Carbon Dark — headings, nav text */
  --graphite:    #393C41;   /* Graphite — body text */
  --pewter:      #5C5E62;   /* Pewter — tertiary, sub-links */
  --fog:         #8E8E8E;   /* Silver Fog — placeholder */
  --cloud:       #EEEEEE;   /* Cloud Gray — dividers */
  --pale:        #D0D1D2;   /* Pale Silver — subtle borders */
  --frost:       rgba(255,255,255,0.75);

  --t: 0.33s;               /* Universal transition */
  --ease: cubic-bezier(0.5,0,0,0.75);
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, "Arial", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--graphite);
  background: var(--white);
  overflow-x: hidden;
}

/* ===== Typography ===== */
.eyebrow {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: .04em;
  margin-bottom: 16px;
}

.h2 {
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--carbon);
  margin-bottom: 24px;
}

.body-text {
  font-size: 14px;
  font-weight: 400;
  line-height: 1.72;
  color: var(--graphite);
  margin-bottom: 20px;
  max-width: 540px;
}

.body-text-center {
  font-size: 14px;
  line-height: 1.72;
  color: var(--graphite);
  margin: 0 auto 52px;
  max-width: 520px;
  text-align: center;
}

/* ===== Buttons ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 200px;
  padding: 4px 24px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  border: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t), border-color var(--t), color var(--t), box-shadow 0.25s;
  box-shadow: rgba(0,0,0,0) 0 0 0 2px inset;
  white-space: nowrap;
}

.btn-primary:hover { background: #3460c8; }

.btn-primary:focus-visible {
  outline: none;
  box-shadow: rgba(62,106,225,0.5) 0 0 0 3px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  min-width: 160px;
  padding: 4px 24px;
  background: var(--white);
  color: var(--graphite);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  border: 3px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--t), border-color var(--t), color var(--t);
}

.btn-secondary:hover { background: var(--ash); }

.text-link {
  font-size: 14px;
  font-weight: 400;
  color: var(--pewter);
  text-decoration: none;
  display: inline-block;
  transition: box-shadow var(--t) var(--ease), color var(--t);
}

.text-link:hover {
  color: var(--carbon);
  box-shadow: 0 1px 0 var(--carbon);
}

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background-color var(--t), border-color var(--t);
}

.nav.scrolled {
  background: var(--frost);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--cloud);
}

.nav-inner {
  max-width: 1383px;
  margin: 0 auto;
  padding: 0 28px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 0;
}

.wordmark {
  font-size: 17px;
  font-weight: 500;
  color: var(--carbon);
  text-decoration: none;
  letter-spacing: .12em;
  text-transform: uppercase;
  flex-shrink: 0;
  transition: color var(--t);
}

.wordmark--white { color: var(--white); }

.nav-center {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 0;
}

.nav-center a {
  font-size: 14px;
  font-weight: 500;
  color: var(--carbon);
  text-decoration: none;
  padding: 4px 16px;
  border-radius: 4px;
  min-height: 32px;
  display: flex;
  align-items: center;
  transition: color var(--t), background-color var(--t);
}

.nav-center a:hover { background: rgba(0,0,0,0.04); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--carbon);
  border-radius: 1px;
  transition: all var(--t);
}

/* ===== Hero ===== */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  background: var(--carbon);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-gradient-bg {
  width: 100%;
  height: 100%;
  background-image: url('https://images.unsplash.com/photo-1477959858617-67f85cf4f1df?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
}

.hero-gradient-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-promo {
  font-size: 22px;
  font-weight: 400;
  color: var(--white);
  line-height: 0.91;
  margin-bottom: 20px;
  opacity: .7;
}

.hero-title {
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 12px;
}

.hero-sub {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255,255,255,.65);
  margin-bottom: 40px;
  max-width: 420px;
  line-height: 1.72;
}

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

.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,.35);
  font-size: 18px;
  animation: bounce 2s ease-in-out infinite;
  z-index: 1;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ===== Stats Band ===== */
.stats-band {
  background: var(--white);
  border-bottom: 1px solid var(--cloud);
}

.stats-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.stat-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.stat-n {
  font-size: 32px;
  font-weight: 500;
  color: var(--carbon);
  line-height: 1;
}

.stat-l {
  font-size: 14px;
  font-weight: 400;
  color: var(--pewter);
}

.stat-sep {
  width: 1px;
  height: 48px;
  background: var(--cloud);
  flex-shrink: 0;
}

/* ===== Section wrapper ===== */
.section {
  padding: 100px 28px;
  background: var(--white);
}

.section--ash { background: var(--ash); }

.section-wrap {
  max-width: 600px;
  margin: 0 auto 60px;
  text-align: center;
}

/* ===== Solutions Grid ===== */
.solutions-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  /* background: var(--cloud); */
}

.sol-card {
  background: var(--white);
  display: flex;
  flex-direction: column;
}

.sol-card--feature {
  grid-column: span 2;
  flex-direction: row;
}

.sol-media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sol-card--feature .sol-media { width: 240px; }
.sol-card:not(.sol-card--feature) .sol-media { height: 160px; }

/* Solution card images */
.sol-img--programmatic,
.sol-img--video,
.sol-img--native,
.sol-img--deals,
.sol-img--yield,
.sol-img--analytics {
  background-size: cover;
  background-position: center;
}

.sol-img--programmatic {
  background-image: url('https://images.unsplash.com/photo-1551288049-bebda4e38f71?auto=format&fit=crop&w=800&q=80');
}
.sol-img--video {
  background-image: url('https://images.unsplash.com/photo-1574717024653-61fd2cf4d44d?auto=format&fit=crop&w=600&q=80');
}
.sol-img--native {
  background-image: url('https://images.unsplash.com/photo-1512941937669-90a1b58e7e9c?auto=format&fit=crop&w=600&q=80');
}
.sol-img--deals {
  background-image: url('https://images.unsplash.com/photo-1521791136064-7986c2920216?auto=format&fit=crop&w=600&q=80');
}
.sol-img--yield {
  background-image: url('https://images.unsplash.com/photo-1460925895917-afdab827c52f?auto=format&fit=crop&w=600&q=80');
}
.sol-img--analytics {
  background-image: url('https://images.unsplash.com/photo-1543286386-713bdd548da4?auto=format&fit=crop&w=600&q=80');
}

.sol-icon-lg {
  font-size: 52px;
  color: var(--white);
  opacity: .5;
}

.sol-icon {
  font-size: 32px;
  color: var(--carbon);
  opacity: .3;
}

.sol-media--blue .sol-icon,
.sol-media--dark .sol-icon { color: var(--white); opacity: .5; }

.sol-body {
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.sol-body h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--carbon);
  line-height: 1.18;
}

.sol-body p {
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.72;
  flex: 1;
}

/* ===== Full-viewport feature section ===== */
.full-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--white);
  padding: 80px 28px;
}

.full-section--flip .full-section-inner {
  flex-direction: row-reverse;
}

.full-section-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 80px;
}

.full-section-text {
  flex: 1;
  max-width: 500px;
}

.full-section-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ===== Why AdsFlare — metric cards ===== */
.metric-card {
  background: var(--ash);
  padding: 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mc-offset { margin-left: 48px; }

.mc-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--pewter);
}

.mc-value {
  font-size: 40px;
  font-weight: 500;
  color: var(--carbon);
  line-height: 1.1;
}

.mc-note {
  font-size: 14px;
  color: var(--pewter);
}

/* ===== Feature list ===== */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 36px;
}

.feature-list li {
  display: flex;
  gap: 14px;
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.6;
}

.fl-marker {
  color: var(--blue);
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 1px;
}

/* ===== Verticals Grid ===== */
.verticals-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.vertical-card {
  position: relative;
  aspect-ratio: 2 / 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: default;
}

.vc-bg {
  position: absolute;
  inset: 0;
  background: var(--carbon);
  transition: transform 0.5s ease;
}

.vc-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.38);
}

.vertical-card:hover .vc-bg { transform: scale(1.02); }

.vc-bg--news {
  background-image: url('https://images.unsplash.com/photo-1504711434969-e33886168f5c?auto=format&fit=crop&w=800&q=80');
  background-size: cover; background-position: center;
}
.vc-bg--entertainment {
  background-image: url('https://images.unsplash.com/photo-1489599849927-2ee91cede3ba?auto=format&fit=crop&w=800&q=80');
  background-size: cover; background-position: center;
}
.vc-bg--tech {
  background-image: url('https://images.unsplash.com/photo-1461749280684-dccba630e2f6?auto=format&fit=crop&w=800&q=80');
  background-size: cover; background-position: center;
}
.vc-bg--finance {
  background-image: url('https://images.unsplash.com/photo-1611974789855-9c2a0a7236a3?auto=format&fit=crop&w=800&q=80');
  background-size: cover; background-position: center;
}
.vc-bg--lifestyle {
  background-image: url('https://images.unsplash.com/photo-1506126613408-eca07ce68773?auto=format&fit=crop&w=800&q=80');
  background-size: cover; background-position: center;
}
.vc-bg--gaming {
  background-image: url('https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=800&q=80');
  background-size: cover; background-position: center;
}

.vc-label {
  position: absolute;
  top: 20px;
  left: 20px;
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
}

/* ===== Steps ===== */
.steps {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  gap: 0;
}

.step {
  flex: 1;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step:first-child { padding-left: 0; }
.step:last-child  { padding-right: 0; }

.step-n {
  font-size: 40px;
  font-weight: 500;
  color: var(--cloud);
  line-height: 1;
}

.step h3 {
  font-size: 17px;
  font-weight: 500;
  color: var(--carbon);
}

.step p {
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.72;
}

.step-line {
  width: 1px;
  height: 120px;
  background: var(--cloud);
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 20px;
}

/* ===== About visual ===== */
.about-visual {
  gap: 20px;
}

.about-block {
  background: var(--carbon);
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.about-block--offset { margin-left: 40px; }

.about-block-num {
  font-size: 40px;
  font-weight: 500;
  color: var(--white);
}

.about-block-label {
  font-size: 14px;
  color: rgba(255,255,255,.5);
}

.about-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--cloud);
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--pewter);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.info-row span:last-child {
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.6;
}

/* ===== Contact ===== */
.contact-section {
  background: var(--ash);
  padding: 100px 28px;
}

.contact-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 80px;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 36px;
}

.cd-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cd-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--pewter);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.cd-row span:last-child {
  font-size: 14px;
  color: var(--graphite);
}

.contact-form-wrap {
  background: var(--white);
  padding: 40px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cf-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cf-group label {
  font-size: 14px;
  font-weight: 500;
  color: var(--carbon);
}

.cf-group input,
.cf-group select,
.cf-group textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--white);
  border: 1px solid var(--pale);
  border-radius: 0;
  font-size: 14px;
  font-family: inherit;
  color: var(--carbon);
  outline: none;
  resize: vertical;
  transition: border-color var(--t);
  -webkit-appearance: none;
}

.cf-group input::placeholder,
.cf-group textarea::placeholder { color: var(--fog); }

.cf-group input:focus,
.cf-group select:focus,
.cf-group textarea:focus {
  border-color: var(--carbon);
}

.btn-submit {
  width: 100%;
  min-width: unset;
}

/* ===== Footer ===== */
.footer {
  background: var(--carbon);
  padding: 48px 28px 32px;
  color: var(--pewter);
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-nav {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.footer-nav a {
  font-size: 14px;
  font-weight: 400;
  color: var(--pewter);
  text-decoration: none;
  padding: 4px 16px;
  transition: color var(--t);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 12px;
  color: var(--pewter);
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  font-size: 12px;
  color: var(--pewter);
  text-decoration: none;
  transition: color var(--t);
}

.footer-legal a:hover { color: var(--white); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .solutions-grid {
    grid-template-columns: 1fr 1fr;
  }
  .sol-card--feature {
    grid-column: span 2;
  }
  .verticals-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .full-section-inner {
    gap: 48px;
  }
  .full-section--flip .full-section-inner {
    flex-direction: column-reverse;
  }
  .full-section-inner {
    flex-direction: column;
  }
  .full-section-text,
  .full-section-visual {
    max-width: 100%;
  }
  .steps {
    flex-direction: column;
    gap: 36px;
  }
  .step { padding: 0; }
  .step-line {
    width: 40px;
    height: 1px;
    align-self: auto;
    margin: 0;
  }
}

@media (max-width: 768px) {
  .nav-center {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px 0;
    border-bottom: 1px solid var(--cloud);
    z-index: 99;
  }

  .nav-center.open { display: flex; }
  .hamburger { display: flex; }

  .h2 { font-size: 28px; }

  .hero-title { font-size: 28px; }
  .hero-promo { font-size: 16px; }

  .stats-inner {
    flex-wrap: wrap;
    gap: 28px;
  }
  .stat-sep { display: none; }

  .solutions-grid {
    grid-template-columns: 1fr;
    background: none;
    gap: 0;
  }
  .sol-card--feature {
    grid-column: span 1;
    flex-direction: column;
  }
  .sol-card--feature .sol-media { width: 100%; height: 160px; }

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

  .contact-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .contact-form-wrap { padding: 28px 20px; }

  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-nav { flex-direction: column; gap: 0; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .mc-offset { margin-left: 0; }
  .about-block--offset { margin-left: 0; }

  .cf-row { grid-template-columns: 1fr; }
}
