/* CoderPress CPB Landing — design tokens + layout (brief §3) */

.cpb-landing {
  --cpb-primary-700: #3730a3;
  --cpb-primary-600: #4f46e5;
  --cpb-primary-500: #6366f1;
  --cpb-secondary-700: #6d28d9;
  --cpb-secondary-500: #8b5cf6;
  --cpb-cta: #4f46e5;
  --cpb-cta-hover: #4338ca;
  --cpb-accent-cyan: #06b6d4;
  --cpb-success: #047857;
  --cpb-warning: #b45309;
  --cpb-error: #b91c1c;
  --cpb-bg: #f8fafc;
  --cpb-surface: #ffffff;
  --cpb-surface-alt: #eef2ff;
  --cpb-text: #0f172a;
  --cpb-muted: #475569;
  --cpb-subtle: #64748b;
  --cpb-border: #cbd5e1;
  --cpb-border-subtle: #e2e8f0;
  --cpb-focus: #0ea5e9;
  --cpb-shadow-sm: 0 1px 2px rgb(15 23 42 / 0.06);
  --cpb-shadow-md: 0 8px 24px rgb(15 23 42 / 0.08);
  --cpb-shadow-lg: 0 24px 60px rgb(30 41 59 / 0.14);
  --cpb-radius-control: 8px;
  --cpb-radius-btn: 12px;
  --cpb-radius-card: 16px;
  --cpb-radius-media: 24px;
  --cpb-radius-shell: 32px;
  --cpb-space-section: 56px;
  --cpb-wrap: 1120px;
  --cpb-wrap-narrow: 860px;

  color: var(--cpb-text);
  background: var(--cpb-bg);
  font-family: var(--cpb-font);
  font-size: 16px;
  line-height: 1.65;
}

@media (min-width: 768px) {
  .cpb-landing { --cpb-space-section: 72px; }
}

@media (min-width: 1100px) {
  .cpb-landing { --cpb-space-section: 112px; font-size: 17px; }
}

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

.cpb-landing :focus-visible {
  outline: 3px solid var(--cpb-focus);
  outline-offset: 3px;
}

.cpb-wrap {
  width: min(100% - 2rem, var(--cpb-wrap));
  margin-inline: auto;
}

.cpb-wrap--narrow { width: min(100% - 2rem, var(--cpb-wrap-narrow)); }

.cpb-section {
  padding-block: var(--cpb-space-section);
}

.cpb-section--alt { background: var(--cpb-surface-alt); }

.cpb-eyebrow {
  margin: 0 0 0.75rem;
  color: var(--cpb-primary-700);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.cpb-landing h1,
.cpb-landing h2,
.cpb-landing h3 {
  line-height: 1.12;
  font-weight: 700;
  color: var(--cpb-text);
  text-wrap: balance;
}

.cpb-landing h1 { font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.05; margin: 0 0 1rem; }
.cpb-landing h2 { font-size: clamp(2rem, 3.5vw, 2.75rem); margin: 0 0 1rem; }
.cpb-landing h3 { font-size: clamp(1.25rem, 2vw, 1.75rem); font-weight: 650; margin: 0 0 0.5rem; }

.cpb-lede,
.cpb-section-lede {
  max-width: 42rem;
  color: var(--cpb-muted);
  font-size: clamp(1.125rem, 1.5vw, 1.25rem);
  line-height: 1.6;
}

.cpb-micro,
.cpb-meta,
.cpb-note { color: var(--cpb-subtle); font-size: 0.875rem; }

.cpb-center { text-align: center; }
.cpb-cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.25rem 0; }
.cpb-cta-row.cpb-center { justify-content: center; }

.cpb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;
  padding: 0.75rem 1.25rem;
  border-radius: var(--cpb-radius-btn);
  border: 1px solid transparent;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.cpb-btn--sm { min-height: 44px; padding: 0.5rem 1rem; font-size: 0.9375rem; }
.cpb-btn--lg { min-height: 56px; padding: 0.9rem 1.4rem; border-radius: 14px; }

.cpb-btn--primary {
  background: var(--cpb-cta);
  color: #fff;
}

.cpb-btn--primary:hover { background: var(--cpb-cta-hover); color: #fff; }

.cpb-btn--secondary {
  background: var(--cpb-surface);
  color: var(--cpb-text);
  border-color: var(--cpb-border);
}

.cpb-btn--secondary:hover { border-color: var(--cpb-primary-600); color: var(--cpb-primary-700); }

.cpb-link {
  color: var(--cpb-primary-600);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.cpb-card {
  background: var(--cpb-surface);
  border: 1px solid var(--cpb-border-subtle);
  border-radius: var(--cpb-radius-card);
  padding: 1.25rem;
}

.cpb-grid-2,
.cpb-grid-3 {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cpb-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cpb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cpb-placeholder {
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, #e2e8f0 0%, #eef2ff 50%, #e2e8f0 100%);
  border: 1px dashed var(--cpb-border);
  border-radius: var(--cpb-radius-media);
  color: var(--cpb-muted);
  text-align: center;
  padding: 1rem;
}

.cpb-placeholder__label {
  max-width: 28rem;
  font-size: 0.875rem;
  font-weight: 650;
}

.cpb-placeholder--hero { border-radius: var(--cpb-radius-shell); }
.cpb-placeholder--demo { background: #0f172a; color: #e2e8f0; border-color: #1e293b; }

/* Announcement */
.cpb-announce {
  background: var(--cpb-primary-700);
  color: #fff;
  min-height: 40px;
}

.cpb-announce__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.65rem;
}

.cpb-announce__text { margin: 0; font-size: 0.875rem; }
.cpb-announce__cta { color: #fff; font-weight: 700; text-decoration: underline; }

/* Nav */
.cpb-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgb(248 250 252 / 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.cpb-nav.is-stuck {
  border-bottom-color: var(--cpb-border-subtle);
  box-shadow: var(--cpb-shadow-sm);
}

.cpb-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 64px;
}

.cpb-nav__logo img { display: block; height: auto; max-width: 140px; }
.cpb-nav__links { display: none; gap: 1rem; }
.cpb-nav__utils { display: flex; align-items: center; gap: 0.75rem; }
.cpb-nav__utils .cpb-link { display: none; }
.cpb-nav__utils .cpb-btn--primary { display: none; }

.cpb-nav__toggle {
  width: 44px;
  height: 44px;
  border: 1px solid var(--cpb-border);
  border-radius: var(--cpb-radius-control);
  background: var(--cpb-surface);
  position: relative;
}

.cpb-nav__toggle span:not(.screen-reader-text),
.cpb-nav__toggle span:not(.screen-reader-text)::before,
.cpb-nav__toggle span:not(.screen-reader-text)::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--cpb-text);
}

.cpb-nav__toggle span:not(.screen-reader-text) { top: 21px; }
.cpb-nav__toggle span:not(.screen-reader-text)::before { top: -7px; }
.cpb-nav__toggle span:not(.screen-reader-text)::after { top: 7px; }

.cpb-nav__drawer {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  background: var(--cpb-surface);
  border-bottom: 1px solid var(--cpb-border-subtle);
}

.cpb-nav__drawer a {
  min-height: 44px;
  display: flex;
  align-items: center;
  color: var(--cpb-text);
  text-decoration: none;
  font-weight: 600;
}

@media (min-width: 960px) {
  .cpb-nav__links { display: flex; }
  .cpb-nav__links a { color: var(--cpb-muted); text-decoration: none; font-size: 0.9375rem; }
  .cpb-nav__links a:hover { color: var(--cpb-primary-700); text-decoration: underline; }
  .cpb-nav__utils .cpb-link,
  .cpb-nav__utils .cpb-btn--primary { display: inline-flex; }
  .cpb-nav__toggle,
  .cpb-nav__drawer { display: none !important; }
}

/* Hero */
.cpb-hero__grid {
  display: grid;
  gap: 2rem;
}

@media (min-width: 1100px) {
  .cpb-hero__grid {
    grid-template-columns: 5fr 7fr;
    align-items: center;
  }
}

.cpb-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  padding: 0;
  margin: 1.25rem 0 0;
  list-style: none;
}

.cpb-trust-row a { color: var(--cpb-muted); font-size: 0.875rem; }

.cpb-browser-shell { position: relative; }
.cpb-hotspots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.cpb-hotspots li {
  background: var(--cpb-surface);
  border: 1px solid var(--cpb-border-subtle);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 650;
}

.cpb-proof__cards {
  display: grid;
  gap: 1rem;
  margin: 2rem 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.5rem;
}

@media (min-width: 900px) {
  .cpb-proof__cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: visible;
  }
}

.cpb-card--proof { scroll-snap-align: start; min-width: min(280px, 80vw); }

.cpb-demo__layout {
  display: grid;
  gap: 1.5rem;
  margin: 2rem 0;
}

@media (min-width: 900px) {
  .cpb-demo__layout { grid-template-columns: 280px 1fr; }
}

.cpb-demo__tasks { margin: 0; padding-left: 1.25rem; color: var(--cpb-muted); }
.cpb-demo__stage {
  background: #0f172a;
  border-radius: var(--cpb-radius-shell);
  padding: 0.75rem;
}

.cpb-demo__progress { color: #cbd5e1; margin: 0.75rem 0 0; font-size: 0.875rem; }

.cpb-split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 900px) {
  .cpb-split { grid-template-columns: 1fr 1fr; align-items: center; }
  .cpb-split--reverse > :first-child { order: 2; }
}

.cpb-checklist { margin: 1rem 0 1.5rem; padding-left: 1.2rem; color: var(--cpb-muted); }
.cpb-checklist li + li { margin-top: 0.5rem; }

@media (min-width: 768px) {
  .cpb-checklist--two {
    columns: 2;
    column-gap: 2rem;
  }
}

.cpb-price-example {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
  border: 1px solid var(--cpb-border-subtle);
  border-radius: var(--cpb-radius-card);
  overflow: hidden;
  background: var(--cpb-surface);
}

.cpb-price-example li {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--cpb-border-subtle);
}

.cpb-price-example li:last-child { border-bottom: 0; }
.cpb-price-example .is-total { font-weight: 700; color: var(--cpb-success); }

.cpb-steps {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
  counter-reset: cpb-step;
}

.cpb-steps > li {
  background: var(--cpb-surface);
  border: 1px solid var(--cpb-border-subtle);
  border-radius: var(--cpb-radius-card);
  padding: 1rem 1rem 1rem 3.25rem;
  position: relative;
  counter-increment: cpb-step;
}

.cpb-steps > li::before,
.cpb-steps__num {
  position: absolute;
  left: 1rem;
  top: 1rem;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  background: var(--cpb-surface-alt);
  color: var(--cpb-primary-700);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.875rem;
}

.cpb-steps > li::before { content: counter(cpb-step); }
.cpb-steps--cards > li::before { display: none; }
.cpb-steps--cards .cpb-steps__num { position: static; margin-bottom: 0.75rem; }

@media (min-width: 900px) {
  .cpb-steps--cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cpb-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--cpb-surface);
}

.cpb-table th,
.cpb-table td {
  border: 1px solid var(--cpb-border-subtle);
  padding: 0.85rem;
  text-align: left;
  vertical-align: top;
}

.cpb-compare-scroll,
.cpb-compare-table-wrap {
  overflow-x: auto;
  margin: 1.25rem 0;
  border-radius: var(--cpb-radius-card);
  box-shadow: var(--cpb-shadow-sm);
}

.cpb-table--compare th:first-child,
.cpb-table--compare td:first-child {
  position: sticky;
  left: 0;
  background: var(--cpb-surface);
  z-index: 1;
}

.cpb-swipe-hint {
  display: none;
  color: var(--cpb-subtle);
  font-size: 0.875rem;
}

@media (max-width: 899px) {
  .cpb-swipe-hint { display: block; }
}

.cpb-callout {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--cpb-warning);
  background: #fffbeb;
  border-radius: 0 var(--cpb-radius-card) var(--cpb-radius-card) 0;
}

.cpb-quote footer { color: var(--cpb-subtle); font-size: 0.875rem; margin-top: 0.75rem; }
.cpb-card--invite {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 1rem;
  border-style: dashed;
}

.cpb-lite-video { position: relative; margin: 1.5rem 0; }
.cpb-lite-video__button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  position: relative;
}

.cpb-lite-video__play {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
  width: 64px;
  height: 64px;
  border-radius: 999px;
  background: var(--cpb-cta);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}

.cpb-industry-grid {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .cpb-industry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cpb-timeline {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0;
  padding: 0;
  list-style: none;
}

.cpb-timeline li {
  background: var(--cpb-surface);
  border: 1px solid var(--cpb-border-subtle);
  border-radius: var(--cpb-radius-card);
  padding: 1rem;
}

@media (min-width: 900px) {
  .cpb-timeline { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

.cpb-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
}

.cpb-filters button {
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--cpb-border);
  background: var(--cpb-surface);
  cursor: pointer;
  font-weight: 650;
}

.cpb-filters button.is-active {
  background: var(--cpb-primary-700);
  border-color: var(--cpb-primary-700);
  color: #fff;
}

.cpb-budget-cards {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 768px) {
  .cpb-budget-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.cpb-budget-cards strong { display: block; margin-bottom: 0.35rem; }

.cpb-billing-toggle {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border: 1px solid var(--cpb-border);
  border-radius: 999px;
  background: var(--cpb-surface);
  margin: 1.25rem 0 1.5rem;
}

.cpb-billing-toggle button {
  min-height: 44px;
  min-width: 120px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 650;
  cursor: pointer;
}

.cpb-billing-toggle button[aria-selected="true"] {
  background: var(--cpb-primary-700);
  color: #fff;
}

.cpb-pricing-grid {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .cpb-pricing-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #cpb-plans-lifetime { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #cpb-plans-lifetime .cpb-plan.is-best { grid-column: 1 / -1; }
}

.cpb-plan__price {
  font-size: 2rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
}

.cpb-plan__price span { color: var(--cpb-primary-700); }
.cpb-plan__label { color: var(--cpb-muted); margin: 0; }
.cpb-plan ul { margin: 0 0 1.25rem; padding-left: 1.1rem; color: var(--cpb-muted); }
.cpb-plan .cpb-btn { width: 100%; }
.cpb-plan.is-popular,
.cpb-plan.is-best { box-shadow: var(--cpb-shadow-md); border-color: var(--cpb-primary-500); }
.cpb-plan__badge {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--cpb-surface-alt);
  color: var(--cpb-primary-700);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.cpb-guarantee { margin-top: 1.5rem; }
.cpb-freemius-badge { display: block; margin: 1.5rem auto 0; }

.cpb-ladder {
  max-width: 40rem;
  margin: 1.5rem auto;
  padding-left: 1.25rem;
  color: var(--cpb-muted);
}

.cpb-ladder li + li { margin-top: 0.75rem; }

.cpb-accordion__item {
  background: var(--cpb-surface);
  border: 1px solid var(--cpb-border-subtle);
  border-radius: var(--cpb-radius-card);
  margin-bottom: 0.75rem;
  padding: 0;
}

.cpb-accordion__item summary {
  min-height: 56px;
  display: flex;
  align-items: center;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  font-weight: 650;
  list-style: none;
}

.cpb-accordion__item summary::-webkit-details-marker { display: none; }
.cpb-accordion__panel { padding: 0 1.1rem 1.1rem; color: var(--cpb-muted); }

.cpb-final {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 55%, #f8fafc 100%);
}

.cpb-footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 3rem 0 2rem;
}

.cpb-footer a { color: #e2e8f0; text-decoration: none; }
.cpb-footer a:hover { text-decoration: underline; }
.cpb-footer h3 { color: #fff; font-size: 1rem; }
.cpb-footer ul { list-style: none; margin: 0; padding: 0; }
.cpb-footer li + li { margin-top: 0.5rem; }
.cpb-footer__grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .cpb-footer__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.cpb-footer__trust {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.875rem;
}

.cpb-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: var(--cpb-surface);
  border-top: 1px solid var(--cpb-border-subtle);
  box-shadow: var(--cpb-shadow-md);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}

.cpb-sticky-cta__inner {
  width: min(100%, var(--cpb-wrap));
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cpb-sticky-cta__dismiss {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  min-width: 44px;
  min-height: 44px;
}

@media (min-width: 900px) {
  .cpb-sticky-cta { display: none !important; }
}

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

@media (prefers-reduced-motion: reduce) {
  .cpb-landing *,
  .cpb-landing *::before,
  .cpb-landing *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
