/*
 * AdsPro tools landing page.
 *
 * Every value below is read from the site's own design system (`_dd` theme tokens: Syne display,
 * DM Sans body, #06060b/#0c0c14 grounds, #13131f cards, lime #c8ff00 + cyan #00e5ff, 8/14/20/28
 * radii). The brand colours resolve through the `--apx-*` aliases on `.apx`, each of which is
 * `var(--dd-x, literal)`, so the page follows the theme when the theme is present and still looks
 * identical when it is not — a plugin page cannot assume a theme. The only literals left are alpha
 * tints of those same brand colours (a glow or a hover border, which `var()` cannot re-alpha) and the
 * black/white pair used as contrast on a lime fill.
 *
 * Scoped under `.apx` so nothing here can reach a theme menu, header or footer.
 */

.apx {
  --apx-bg: var(--dd-bg, #06060b);
  --apx-bg2: var(--dd-bg2, #0c0c14);
  --apx-card: var(--dd-card, #13131f);
  --apx-card-h: var(--dd-card-h, #191930);
  --apx-lime: var(--dd-lime, #c8ff00);
  --apx-cyan: var(--dd-cyan, #00e5ff);
  --apx-txt: var(--dd-txt, #eeeef5);
  --apx-txt2: var(--dd-txt2, #9494ad);
  --apx-bdr: var(--dd-bdr, #222236);
  --apx-d: var(--dd-font-d, 'Syne', sans-serif);
  --apx-b: var(--dd-font-b, 'DM Sans', sans-serif);

  background: var(--apx-bg);
  color: var(--apx-txt);
  font-family: var(--apx-b);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.apx *, .apx *::before, .apx *::after { box-sizing: border-box; }

.apx a:focus-visible {
  outline: 3px solid var(--apx-cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.apx-wrap {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- hero ---------- */

.apx-hero {
  position: relative;
  overflow: hidden;
  padding: 104px 0 76px;
  border-bottom: 1px solid var(--apx-bdr);
}

.apx-hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 auto -10%;
  height: 620px;
  background:
    radial-gradient(46% 46% at 22% 34%, rgba(200, 255, 0, 0.16), transparent 70%),
    radial-gradient(42% 42% at 78% 22%, rgba(0, 229, 255, 0.14), transparent 70%);
  pointer-events: none;
}

.apx-hero .apx-wrap { position: relative; }

.apx-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border: 1px solid var(--apx-bdr);
  border-radius: 100px;
  background: rgba(19, 19, 31, 0.72);
  color: var(--apx-txt2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 26px;
}

.apx-eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--apx-lime);
  box-shadow: 0 0 14px var(--apx-lime);
}

.apx-h1 {
  font-family: var(--apx-d);
  font-size: 72px;
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.045em;
  color: #fff;
  margin: 0 0 24px;
  max-width: 17ch;
}

.apx-em {
  background: linear-gradient(135deg, var(--apx-lime) 0%, var(--apx-cyan) 50%, var(--apx-lime) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.apx-lead {
  font-size: 19px;
  line-height: 1.7;
  color: var(--apx-txt2);
  max-width: 62ch;
  margin: 0 0 34px;
}

.apx-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.apx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 34px;
  border-radius: 100px;
  border: 1.5px solid transparent;
  font-family: var(--apx-d);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
  transition: transform 0.25s var(--dd-ease, cubic-bezier(0.16, 1, 0.3, 1)), background-color .2s, border-color .2s;
}

.apx-pill--primary { background: var(--apx-lime); color: #000; }
.apx-pill--primary:hover { transform: translateY(-2px); background: #d8ff3d; }

.apx-pill--ghost { border-color: rgba(238, 238, 245, 0.22); color: var(--apx-txt); }
.apx-pill--ghost:hover { border-color: var(--apx-cyan); color: var(--apx-cyan); transform: translateY(-2px); }

/* ---------- stats strip ---------- */

.apx-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 30px 0 0;
}

.apx-stat {
  padding: 22px 24px;
  border: 1px solid var(--apx-bdr);
  border-radius: 14px;
  background: var(--apx-card);
}

.apx-stat__n {
  display: block;
  font-family: var(--apx-d);
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--apx-lime);
}

.apx-stat:nth-child(2) .apx-stat__n { color: var(--apx-cyan); }
.apx-stat:nth-child(3) .apx-stat__n { color: #fff; }
.apx-stat:nth-child(4) .apx-stat__n { color: var(--apx-cyan); }

.apx-stat__l {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--apx-txt2);
}

/* ---------- bands ---------- */

.apx-band { padding: 78px 0; }
.apx-band--alt { background: var(--apx-bg2); border-top: 1px solid var(--apx-bdr); border-bottom: 1px solid var(--apx-bdr); }

.apx-h2 {
  font-family: var(--apx-d);
  font-size: 44px;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 14px;
}

.apx-sub {
  font-size: 18px;
  color: var(--apx-txt2);
  max-width: 70ch;
  margin: 0 0 40px;
}

.apx-group {
  margin: 46px 0 0;
}

/* Body an operator wrote on the hub page itself, shown between the hero and the grid. */
.apx-prose { color: var(--apx-txt); max-width: 78ch; }
.apx-prose > :first-child { margin-top: 0; }
.apx-prose h1, .apx-prose h2, .apx-prose h3 {
  font-family: var(--apx-d);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}
.apx-prose h2 { font-size: 32px; margin: 34px 0 12px; }
.apx-prose h3 { font-size: 23px; margin: 28px 0 10px; }
.apx-prose p, .apx-prose li { color: var(--apx-txt2); font-size: 17px; line-height: 1.7; }
.apx-prose a { color: var(--apx-cyan); text-decoration: underline; text-underline-offset: 3px; }
.apx-prose strong { color: var(--apx-txt); }
.apx-prose .wp-block-button__link, .apx-prose .wp-element-button { border-radius: 100px; }

.apx-group:first-of-type { margin-top: 0; }

.apx-group__h {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--apx-d);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--apx-txt2);
  margin: 0 0 22px;
}

.apx-group__h::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--apx-bdr);
}

/* ---------- tool cards ----------
   The card anatomy below is the site's own `.dd-card` from `theme-style.css`: 36px padding, 20px
   radius, a 56px icon tile at 14px radius with a channel tint, Syne 22/700/-.5px over DM Sans
   15/1.65, a mono tag pill, an absolutely-placed `.dd-tool-badge` top-right, and a CTA whose gap
   widens on hover. Values are copied from those rules, not re-invented, so the landing grid reads
   as the same component the services and free-tools grids use. */

.apx-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

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

.apx-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  overflow: hidden;
  min-height: 100%;
  padding: 36px;
  padding-top: 52px;
  border: 1px solid var(--apx-bdr);
  border-radius: var(--dd-r-l, 20px);
  background: var(--apx-card);
  color: inherit;
  text-decoration: none;
  transition: all 0.5s var(--dd-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.apx-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--apx-lime), var(--apx-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--dd-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.apx-card:hover,
.apx-card:focus-visible {
  transform: translateY(-6px);
  border-color: rgba(200, 255, 0, 0.3);
  background: var(--apx-card-h);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3), 0 0 40px rgba(200, 255, 0, 0.06);
  outline: none;
}

.apx-card:hover::before,
.apx-card:focus-visible::before { transform: scaleX(1); }

.apx-card:focus-visible { box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.45); }

.apx-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;
  padding: 4px 12px;
  border-radius: 100px;
  background: rgba(200, 255, 0, 0.1);
  color: var(--apx-lime);
  font-family: var(--dd-font-m, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.apx-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--apx-tint, rgba(200, 255, 0, 0.12));
  font-size: 26px;
  line-height: 1;
}

/* the theme's six icon tints, written exactly as theme-style.css:473-478 writes them, one per job group */
.apx-card__icon--terms { --apx-tint: rgba(200,255,0,.12); }
.apx-card__icon--waste { --apx-tint: rgba(255,0,110,.12); }
.apx-card__icon--bid   { --apx-tint: rgba(255,138,0,.12); }
.apx-card__icon--build { --apx-tint: rgba(59,130,246,.12); }
.apx-card__icon--brand { --apx-tint: rgba(0,229,255,.12); }
.apx-card__icon--dig   { --apx-tint: rgba(168,85,247,.12); }

.apx-card__title {
  font-family: var(--apx-d);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.5px;
  color: #fff;
  margin: 0 0 10px;
}

.apx-card__desc {
  font-size: 15px;
  line-height: 1.65;
  color: var(--apx-txt2);
  margin: 0;
}

.apx-card__tag {
  display: inline-block;
  margin-top: 18px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--apx-bg);
  color: var(--dd-txt3, #5a5a72);
  font-family: var(--dd-font-m, 'JetBrains Mono', monospace);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.apx-card__go {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  font-family: var(--apx-d);
  font-size: 13px;
  font-weight: 600;
  color: var(--apx-lime);
  white-space: nowrap;
  transition: gap 0.3s var(--dd-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

.apx-card:hover .apx-card__go,
.apx-card:focus-visible .apx-card__go { gap: 14px; }

/* ---------- how it runs ---------- */

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

.apx-step {
  padding: 30px;
  border: 1px solid var(--apx-bdr);
  border-radius: 20px;
  background: var(--apx-card);
}

.apx-step__n {
  display: block;
  font-family: var(--apx-d);
  font-size: 44px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--apx-cyan);
  margin-bottom: 14px;
}

.apx-step__t {
  font-family: var(--apx-d);
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}

.apx-step__d { font-size: 15px; color: var(--apx-txt2); margin: 0; }

/* ---------- closing cta ---------- */

.apx-cta {
  padding: 66px 56px;
  border: 1px solid var(--apx-bdr);
  border-radius: 28px;
  background:
    radial-gradient(120% 160% at 12% 0%, rgba(200, 255, 0, 0.14), transparent 62%),
    radial-gradient(120% 160% at 88% 100%, rgba(0, 229, 255, 0.14), transparent 62%),
    var(--apx-card);
}

.apx-cta .apx-h2 { margin-bottom: 12px; }
.apx-cta .apx-sub { margin-bottom: 28px; }

.apx-note {
  padding: 0 0 54px;
  font-size: 14px;
  color: var(--apx-txt2);
}

.apx-empty {
  padding: 40px;
  border: 1px dashed var(--apx-bdr);
  border-radius: 20px;
  color: var(--apx-txt2);
  text-align: center;
}

/* ---------- responsive ---------- */

@media (max-width: 1024px) {
  .apx-grid, .apx-grid--3, .apx-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apx-h1 { font-size: 54px; }
}

@media (max-width: 767px) {
  .apx { font-size: 16px; }
  .apx-hero { padding: 66px 0 52px; }
  .apx-h1 { font-size: 38px; letter-spacing: -0.03em; }
  .apx-lead { font-size: 17px; }
  .apx-h2 { font-size: 31px; }
  .apx-band { padding: 54px 0; }
  .apx-grid, .apx-steps { grid-template-columns: minmax(0, 1fr); }
  .apx-cta { padding: 42px 26px; }
  .apx-wrap { padding: 0 18px; }
  .apx-pill { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .apx-card, .apx-pill { transition: none; }
  .apx-card:hover, .apx-pill:hover { transform: none; }
}
