/* ============================================================
   sections.css — announcement bar, header + dropdown nav,
   mobile drawer, hero, marquee, page headers, article body,
   footer, and responsive rules (mobile-first breakpoints last).
   ============================================================ */

/* ============================================================
   Announcement bar
   ============================================================ */

.announce {
  position: relative;
  z-index: 60;
  background: linear-gradient(90deg, var(--accent-deep), var(--accent-2-deep));
  color: #fff;
  text-align: center;
  font-size: 0.83rem;
  font-weight: 600;
  padding: 9px 18px;
}

.announce a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.announce a:hover {
  color: #fff;
  opacity: 0.85;
}

/* ============================================================
   Header
   ============================================================ */

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 7, 13, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}

.header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(6, 7, 13, 0.95);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 74px;
}

/* ---- Wordmark ---- */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: #fff;
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.03em;
}

.brand:hover {
  color: #fff;
}

/* Same 32x32 footprint the gradient chip occupied, so swapping in the real
   logo shifts nothing. object-fit keeps the mark's 1.54:1 aspect inside it. */
.brand-mark {
  display: block;
  flex: none;
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* One flex item, so "APEX" and "MRKTNG" stay a single unbroken word —
   a bare text node would become its own item and pick up the .brand gap. */
.brand-text {
  white-space: nowrap;
}

.brand em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---- Desktop nav ---- */

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

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: color 0.16s, background 0.16s;
  cursor: pointer;
  background: none;
  border: 0;
}

.nav-link:hover,
.nav-item:hover > .nav-link,
.nav-link.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.nav-link .caret {
  width: 10px;
  height: 10px;
  transition: transform 0.2s var(--ease);
  opacity: 0.7;
}

.nav-item:hover .caret,
.nav-item:focus-within .caret {
  transform: rotate(180deg);
}

/* ---- Dropdown ---- */

.nav-drop {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  min-width: 320px;
  padding: 10px;
  background: var(--ink-700);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease),
    visibility 0.18s;
}

.nav-drop.is-wide {
  min-width: 360px;
}

/* Hover bridge — keeps the menu open while crossing the 10px gap. */
.nav-item.has-drop::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 14px;
}

.nav-item:hover > .nav-drop,
.nav-item:focus-within > .nav-drop {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.nav-drop a {
  display: block;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  transition: background 0.15s;
}

.nav-drop a:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-drop a span {
  display: block;
  margin-top: 2px;
  font-size: 0.79rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-dim);
}

.nav-drop-foot {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.nav-drop-foot a {
  color: var(--accent-2);
  font-size: 0.85rem;
}

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

.header-cta {
  flex: none;
  margin-left: 8px;
}

/* ---- Mobile toggle ---- */

.nav-toggle {
  display: none;
  flex: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  padding: 0;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  cursor: pointer;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 11px;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.22s var(--ease), opacity 0.15s;
}

.nav-toggle span:nth-child(1) {
  top: 14px;
}

.nav-toggle span:nth-child(2) {
  top: 20px;
}

.nav-toggle span:nth-child(3) {
  top: 26px;
}

.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* ---- Mobile drawer ---- */

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 45;
  padding: 96px 20px 40px;
  background: var(--ink-900);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s var(--ease);
  visibility: hidden;
}

.mobile-nav.is-open {
  transform: translateX(0);
  visibility: visible;
}

.mobile-nav-item {
  border-bottom: 1px solid var(--line);
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 17px 4px;
  background: none;
  border: 0;
  text-align: left;
  font-size: 1.05rem;
  font-weight: 650;
  color: var(--text);
  cursor: pointer;
}

.mobile-nav-link .caret {
  width: 13px;
  height: 13px;
  color: var(--text-dim);
  transition: transform 0.2s var(--ease);
}

.mobile-nav-item.is-open .caret {
  transform: rotate(180deg);
}

.mobile-nav-sub {
  display: none;
  padding: 0 4px 14px;
}

.mobile-nav-item.is-open .mobile-nav-sub {
  display: block;
}

.mobile-nav-sub a {
  display: block;
  padding: 10px 0 10px 16px;
  border-left: 2px solid var(--line-strong);
  color: var(--text-muted);
  font-size: 0.94rem;
  font-weight: 550;
}

.mobile-nav-sub a:hover {
  color: var(--accent-2);
  border-left-color: var(--accent-2);
}

.mobile-nav-cta {
  margin-top: 28px;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding: 90px 0 96px;
  overflow: hidden;
}

.hero .glow-violet {
  width: 620px;
  height: 620px;
  top: -240px;
  left: -160px;
}

.hero .glow-mint {
  width: 460px;
  height: 460px;
  bottom: -260px;
  right: -120px;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 60px;
  align-items: center;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero h1 .line-2 {
  display: block;
}

.hero .lead {
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 40px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

/* Share the row evenly — without a basis the long captions push each
   stat onto its own line. */
.hero-proof > div {
  flex: 1 1 0;
  min-width: 150px;
}

.hero-proof .stat-value {
  font-size: 1.75rem;
  margin-bottom: 0;
}

.hero-proof p {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---- Hero visual: a stylised "acquisition engine" panel ---- */

.hero-panel {
  position: relative;
  padding: 26px;
  background: linear-gradient(
    160deg,
    rgba(109, 92, 255, 0.16),
    rgba(13, 16, 24, 0.94) 55%
  );
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.panel-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: var(--r);
}

.panel-row:last-of-type {
  margin-bottom: 0;
}

.panel-row .row-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-wash);
  color: var(--accent-bright);
}

.panel-row .row-icon svg {
  width: 16px;
  height: 16px;
}

.panel-row .row-icon.is-mint {
  background: var(--accent-2-wash);
  color: var(--accent-2);
}

.panel-row .row-text {
  min-width: 0;
}

.panel-row .row-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--text);
}

.panel-row .row-text span {
  font-size: 0.79rem;
  color: var(--text-dim);
}

.panel-row .row-value {
  margin-left: auto;
  flex: none;
  font-size: 0.85rem;
  font-weight: 750;
  color: var(--accent-2);
}

.panel-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 0 rgba(46, 230, 197, 0.6);
  animation: pulse 2.2s infinite;
}

@keyframes pulse {
  70% {
    box-shadow: 0 0 0 10px rgba(46, 230, 197, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(46, 230, 197, 0);
  }
}

/* ============================================================
   Client marquee
   ============================================================ */

.marquee-section {
  padding: 46px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-850);
}

.marquee-label {
  text-align: center;
  margin-bottom: 26px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.marquee {
  position: relative;
  overflow: hidden;
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 12%,
    #000 88%,
    transparent
  );
}

.marquee-track {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee:hover .marquee-track {
  animation-play-state: paused;
}

.marquee-item {
  flex: none;
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  color: var(--text-dim);
  opacity: 0.75;
  white-space: nowrap;
  transition: color 0.2s, opacity 0.2s;
}

.marquee-item:hover {
  color: var(--text);
  opacity: 1;
}

@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    gap: 26px 44px;
  }
}

/* ============================================================
   Split feature block (text + list side by side)
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 60px;
  align-items: center;
}

.split-media {
  padding: 30px;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.split.is-reversed .split-text {
  order: 2;
}

/* ============================================================
   CTA band
   ============================================================ */

.cta-band {
  position: relative;
  overflow: hidden;
  padding: 84px 0;
  background: linear-gradient(
    150deg,
    rgba(109, 92, 255, 0.2),
    rgba(6, 7, 13, 1) 62%
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.cta-band .glow-violet {
  width: 520px;
  height: 520px;
  top: -220px;
  right: -120px;
}

.cta-band .container {
  position: relative;
  z-index: 1;
  text-align: center;
}

.cta-band h2 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.cta-band .lead {
  max-width: 620px;
  margin: 0 auto 32px;
}

/* ============================================================
   Page header (interior pages)
   ============================================================ */

.page-head {
  position: relative;
  overflow: hidden;
  padding: 72px 0 60px;
  border-bottom: 1px solid var(--line);
}

.page-head .glow-violet {
  width: 520px;
  height: 520px;
  top: -280px;
  left: 10%;
}

.page-head h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  max-width: 880px;
}

.page-head .lead {
  max-width: 680px;
  margin-bottom: 0;
}

.page-head .hero-actions {
  margin-top: 32px;
  margin-bottom: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  font-size: 0.82rem;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-dim);
}

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

.breadcrumb span[aria-hidden] {
  opacity: 0.5;
}

/* ============================================================
   Blog
   ============================================================ */

.post-card {
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--ink-700);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  color: inherit;
  transition: border-color 0.22s var(--ease), transform 0.22s var(--ease),
    background 0.22s var(--ease);
}

.post-card:hover {
  color: inherit;
  border-color: var(--line-strong);
  background: var(--ink-600);
  transform: translateY(-3px);
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  font-size: 0.78rem;
  color: var(--text-dim);
}

.post-card h3 {
  margin-bottom: 10px;
}

.post-card p {
  font-size: 0.94rem;
  margin-bottom: 20px;
}

.post-card .link-arrow {
  margin-top: auto;
}

/* Featured post — full width, two columns */
.post-featured {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 40px;
  align-items: center;
  padding: 38px;
  background: linear-gradient(
    150deg,
    rgba(109, 92, 255, 0.14),
    rgba(18, 21, 31, 0.9) 60%
  );
  border: 1px solid rgba(109, 92, 255, 0.3);
  border-radius: var(--r-lg);
  margin-bottom: 32px;
}

.post-featured h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
}

/* ---- Article body ---- */

.article {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.06rem;
  line-height: 1.75;
}

.article > h2 {
  margin-top: 52px;
  font-size: clamp(1.5rem, 2.6vw, 1.95rem);
}

.article > h3 {
  margin-top: 36px;
  font-size: 1.22rem;
}

.article p,
.article li {
  color: var(--text-muted);
}

.article ul,
.article ol {
  margin: 0 0 1.3em;
  padding-left: 22px;
}

.article li {
  margin-bottom: 9px;
}

.article li::marker {
  color: var(--accent-bright);
}

.article blockquote {
  margin: 34px 0;
  padding: 22px 26px;
  border-left: 3px solid var(--accent);
  background: rgba(109, 92, 255, 0.07);
  border-radius: 0 var(--r) var(--r) 0;
  font-size: 1.05rem;
  color: var(--text);
}

.article blockquote p:last-child {
  margin-bottom: 0;
}

.article code {
  padding: 2px 7px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.88em;
  color: var(--accent-2);
}

.article-callout {
  margin: 34px 0;
  padding: 24px 26px;
  border: 1px solid rgba(46, 230, 197, 0.28);
  background: var(--accent-2-wash);
  border-radius: var(--r);
}

.article-callout h4 {
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-callout p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  padding: 72px 0 34px;
  background: var(--ink-850);
  border-top: 1px solid var(--line);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(4, minmax(0, 1fr));
  gap: 40px;
  padding-bottom: 46px;
  border-bottom: 1px solid var(--line);
}

.footer-brand .brand {
  margin-bottom: 18px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 320px;
}

.footer-col h4 {
  margin-bottom: 16px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

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

.footer-col li {
  margin-bottom: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
}

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

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  transition: color 0.18s, border-color 0.18s, background 0.18s;
}

.footer-social a:hover {
  color: var(--accent-2);
  border-color: rgba(46, 230, 197, 0.4);
  background: var(--accent-2-wash);
}

.footer-social svg {
  width: 17px;
  height: 17px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 26px;
  font-size: 0.83rem;
  color: var(--text-dim);
}

.footer-bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-bottom a {
  color: var(--text-dim);
}

.footer-bottom a:hover {
  color: var(--accent-2);
}

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

@media (max-width: 1080px) {
  .footer-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
  }

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

@media (max-width: 980px) {
  .nav,
  .header-cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .hero-grid,
  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 44px;
  }

  .split.is-reversed .split-text {
    order: 0;
  }

  .hero {
    padding: 60px 0 72px;
  }

  .post-featured {
    grid-template-columns: minmax(0, 1fr);
    gap: 26px;
    padding: 28px;
  }
}

@media (max-width: 700px) {
  .header-inner {
    height: 64px;
  }

  .hero-proof,
  .stat-inline {
    gap: 24px 30px;
  }

  /* Stack cleanly rather than leaving a ragged 2 + 1 row */
  .hero-proof > div {
    flex-basis: 100%;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer {
    padding-top: 54px;
  }

  .cta-band {
    padding: 60px 0;
  }

  .announce {
    font-size: 0.78rem;
  }
}

@media (max-width: 460px) {
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-actions .btn {
    width: 100%;
  }
}
