/* ============================================
   QGIS Publisher product page
   Extends home.css tokens, buttons, footer, type
   ============================================ */

:root {
  --qp: #0d652d;
  --qp-deep: #0a4f23;
  --qp-mid: #188038;
  --qp-soft: #eef6f0;
  --qp-line: #c5ddcc;
  --qp-map: #d7e8dc;
}

.qp-hero .btn:focus-visible,
.qp-text-link:focus-visible,
.qp-demo-card:focus-visible,
.qp-deploy-card a:focus-visible,
.qp-shot a:focus-visible {
  outline: 3px solid rgba(13, 101, 45, 0.45);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */
.qp-hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 72px;
  background:
    radial-gradient(circle at 82% 18%, rgba(13, 101, 45, 0.12), transparent 38%),
    radial-gradient(circle at 12% 88%, rgba(21, 101, 192, 0.08), transparent 42%),
    linear-gradient(110deg, #e4eef6 0%, #e8f2ec 46%, #e7f0e8 100%);
}

.qp-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(13, 101, 45, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13, 101, 45, 0.045) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse 70% 80% at 78% 42%, #000 20%, transparent 72%);
}

.qp-hero .container {
  position: relative;
}

.qp-hero .eyebrow {
  color: var(--qp-deep);
}

.qp-hero h1 {
  font-size: clamp(36px, 5vw, 52px);
  margin-bottom: 12px;
  max-width: 14em;
}

.qp-hero .hero-kicker {
  color: var(--qp-deep);
}

.qp-hero .hero-actions {
  align-items: center;
}

.qp-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.qp-badge img {
  width: 40px;
  height: 40px;
}

.qp-badge-name {
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--qp-deep);
}

.qp-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 15px;
  font-weight: 700;
  color: var(--qp-deep);
}

.qp-text-link svg {
  width: 16px;
  height: 16px;
  transition: transform 0.15s ease;
}

.qp-text-link:hover svg,
.qp-text-link:focus-visible svg {
  transform: translateX(3px);
}

.qp-hero .btn-primary {
  background: var(--qp);
  color: var(--white);
}

.qp-hero .btn-primary:hover,
.qp-hero .btn-primary:focus {
  background: var(--qp-deep);
}

.qp-hero .btn-outline {
  color: var(--qp-deep);
  border-color: var(--qp);
}

.qp-hero .btn-outline:hover,
.qp-hero .btn-outline:focus {
  background: var(--qp-soft);
  color: var(--qp-deep);
}

.qp-hero code,
.qp-section code,
.qp-card code,
.qp-flow-step code,
.body-copy code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  font-weight: 600;
  padding: 0.05em 0.28em;
  background: var(--qp-soft);
  border-radius: 4px;
  color: var(--qp-deep);
}

/* ---------- QGIS → Publisher → Web visual ---------- */
.qp-story {
  margin: 0;
  padding: 18px 16px 16px;
  background:
    radial-gradient(circle at 50% 18%, rgba(13, 101, 45, 0.08), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #f4faf6 100%);
  border: 1px solid var(--qp-line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.qp-story-label {
  margin: 0 0 14px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qp-deep);
}

.qp-story-flow {
  display: grid;
  justify-items: stretch;
  gap: 0;
}

.qp-stage {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.qp-stage--hub {
  border-color: var(--qp);
  box-shadow: 0 8px 24px rgba(13, 101, 45, 0.12);
}

.qp-stage--map {
  background: #eef3f0;
}

.qp-stage-head {
  padding: 10px 12px 8px;
  border-bottom: 1px solid var(--line);
}

.qp-stage-kicker {
  margin: 0 0 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qp);
}

.qp-stage-name {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
}

.qp-stage-body {
  padding: 10px 12px 12px;
  flex: 1;
}

.qp-qgis-list {
  display: grid;
  gap: 6px;
  margin: 0;
}

.qp-qgis-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  background: var(--qp-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--navy-deep);
}

.qp-qgis-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.qp-stage-shot {
  display: block;
  width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  object-position: top center;
  background: #f4f7f8;
}

.qp-stage--map .qp-stage-shot {
  max-height: 280px;
  object-fit: cover;
}

.qp-browser {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.qp-browser-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  background: #e8eee9;
  border-bottom: 1px solid var(--line);
}

.qp-browser-bar span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c5d0c8;
}

.qp-browser-bar p {
  margin-left: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.qp-join {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  color: var(--qp);
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.qp-join span {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Shared section chrome ---------- */
.qp-section {
  padding: 80px 0;
}

.qp-section--soft {
  background: var(--qp-soft);
}

.qp-section--alt {
  background: var(--soft);
}

.qp-section--map {
  background:
    radial-gradient(circle at 88% 12%, rgba(13, 101, 45, 0.08), transparent 36%),
    linear-gradient(180deg, #f4f8f5 0%, #ffffff 100%);
}

.qp-section-header {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.qp-section-header .eyebrow {
  color: var(--qp-deep);
}

.qp-section-header h2 {
  font-size: clamp(28px, 3.4vw, 38px);
  margin-bottom: 12px;
}

.qp-section-header p {
  color: var(--muted);
  font-size: 17px;
}

.qp-section-header--left {
  margin-left: 0;
  text-align: left;
}

/* ---------- Benefit cards ---------- */
.qp-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.qp-card-grid--6 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qp-card-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qp-card {
  padding: 24px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.qp-card h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qp-deep);
  margin-bottom: 10px;
}

.qp-card p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

.qp-card-num {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--qp);
}

/* ---------- How it works ---------- */
.qp-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 8px;
  align-items: stretch;
}

.qp-flow-step {
  padding: 22px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-align: center;
}

.qp-flow-step h3 {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.qp-flow-step p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.qp-flow-step--hub {
  border-color: var(--qp);
  background: var(--qp-soft);
}

.qp-flow-join {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--qp);
  font-size: 20px;
  font-weight: 700;
}

.qp-arch {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 10px;
  margin: 28px auto 0;
  max-width: 720px;
}

.qp-arch span {
  padding: 8px 14px;
  background: var(--white);
  border: 1px solid var(--qp-line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--qp-deep);
}

.qp-arch i {
  color: var(--qp);
  font-style: normal;
  font-weight: 700;
}

/* ---------- Split / screenshots ---------- */
.qp-split {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.18fr);
  gap: 56px;
  align-items: center;
}

.qp-split--wide {
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.3fr);
}

.qp-split--reverse {
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.92fr);
}

.qp-split--reverse .qp-split-copy {
  order: 2;
}

.qp-copy-list {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.qp-copy-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.45;
}

.qp-copy-list li::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--qp);
  flex-shrink: 0;
}

.qp-steps {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.qp-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
  align-items: start;
}

.qp-steps strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: var(--navy-deep);
}

.qp-steps p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
}

.qp-step-n {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--qp-soft);
  color: var(--qp-deep);
  font-size: 12px;
  font-weight: 800;
}

.qp-shot {
  margin: 0;
  overflow: hidden;
  background: #f4f7f8;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.qp-shot--wide {
  max-width: 1080px;
  margin: 0 auto;
}

.qp-shot img {
  width: 100%;
  height: auto;
  display: block;
}

.qp-shot figcaption {
  padding: 10px 14px 12px;
  font-size: 12px;
  color: var(--muted);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.qp-frame {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.qp-frame-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #f1f5f2;
  border-bottom: 1px solid var(--line);
}

.qp-frame-bar i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #c5d0c8;
}

.qp-frame-bar p {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.qp-frame img {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Tech stack ---------- */
.qp-stack {
  display: grid;
  justify-items: center;
  gap: 0;
  max-width: 420px;
  margin: 0 auto 28px;
}

.qp-stack-node {
  width: min(100%, 280px);
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}

.qp-stack-node--hub {
  border-color: var(--qp);
  background: linear-gradient(180deg, #f4fbf6 0%, #ffffff 100%);
}

.qp-stack-node p:first-child {
  margin: 0 0 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--qp);
}

.qp-stack-node p:last-child {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--navy-deep);
}

.qp-stack-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 26px;
  color: var(--qp);
  font-size: 16px;
  font-weight: 700;
}

.qp-tech-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.qp-tech {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 10px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.qp-tech img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.qp-tech span {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy-deep);
}

/* ---------- Deploy ---------- */
.qp-deploy-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.qp-deploy-card {
  padding: 28px 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.qp-deploy-card h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--qp-deep);
  margin-bottom: 10px;
}

.qp-deploy-card p {
  font-size: 16px;
  color: var(--muted);
  margin-bottom: 16px;
}

.qp-deploy-card ul {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.qp-deploy-card li {
  font-size: 14.5px;
  color: var(--text);
}

.qp-deploy-card .btn-primary,
.qp-price-cta .btn-primary {
  background: var(--qp);
  color: var(--white);
}

.qp-deploy-card .btn-primary:hover,
.qp-deploy-card .btn-primary:focus,
.qp-price-cta .btn-primary:hover,
.qp-price-cta .btn-primary:focus {
  background: var(--qp-deep);
}

.qp-deploy-card .btn-outline,
.qp-price-cta .btn-outline {
  color: var(--qp-deep);
  border-color: var(--qp);
}

.qp-deploy-card .btn-outline:hover,
.qp-deploy-card .btn-outline:focus,
.qp-price-cta .btn-outline:hover,
.qp-price-cta .btn-outline:focus {
  background: var(--qp-soft);
  color: var(--qp-deep);
}

/* ---------- Demo ---------- */
.qp-demo {
  max-width: 1080px;
  margin: 0 auto;
}

.qp-demo-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(240px, 0.8fr);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  color: inherit;
  text-decoration: none;
}

.qp-demo-card:hover,
.qp-demo-card:focus-visible {
  border-color: var(--qp-line);
  box-shadow: var(--shadow-lg);
}

.qp-demo-media {
  position: relative;
  background: #12301c;
  min-height: 240px;
}

.qp-demo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.qp-demo-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 26px 24px 22px;
}

.qp-demo-body h3 {
  font-size: 22px;
}

.qp-demo-body p {
  font-size: 15px;
  color: var(--muted);
}

.qp-demo-tech {
  font-size: 12px;
  font-weight: 700;
  color: var(--qp-deep);
}

.qp-demo-cta {
  margin-top: auto;
  padding-top: 12px;
  font-size: 15px;
  font-weight: 700;
  color: var(--qp);
}

/* ---------- Audience ---------- */
.qp-audience {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

/* ---------- Pricing (no invented prices) ---------- */
.qp-price-cta {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 28px 26px;
  text-align: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.qp-price-cta p {
  margin: 0 0 18px;
  color: var(--muted);
}

.qp-price-cta .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

/* ---------- Atlas relationship ---------- */
.qp-atlas {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 24px 40px;
  align-items: center;
  padding: 28px 32px;
  background: var(--cloud-soft);
  border: 1px solid #d7e4f2;
  border-radius: var(--radius-lg);
}

.qp-atlas .eyebrow {
  color: var(--blue);
}

.qp-atlas h2 {
  font-size: clamp(24px, 3vw, 30px);
  margin-bottom: 10px;
}

.qp-atlas p {
  font-size: 16px;
  color: var(--muted);
  max-width: 42em;
}

/* ---------- Final CTA ---------- */
.qp-cta.cta {
  background:
    radial-gradient(ellipse 60% 50% at 80% 20%, rgba(24, 128, 56, 0.22), transparent 55%),
    linear-gradient(135deg, #0a4f23 0%, #0f4c75 100%);
}

.qp-cta .btn-outline-light:hover,
.qp-cta .btn-outline-light:focus {
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .qp-card-grid,
  .qp-card-grid--6,
  .qp-audience {
    grid-template-columns: 1fr 1fr;
  }

  .qp-split,
  .qp-split--wide,
  .qp-split--reverse,
  .qp-demo-card,
  .qp-atlas {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .qp-split--reverse .qp-split-copy {
    order: 1;
  }

  .qp-atlas .product-cta,
  .qp-atlas .btn {
    justify-self: start;
  }

  .qp-demo-media {
    min-height: 220px;
  }
}

@media (max-width: 900px) {
  .qp-flow {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .qp-flow-join {
    min-height: 28px;
    transform: rotate(90deg);
  }

  .qp-deploy-grid {
    grid-template-columns: 1fr;
  }

  .qp-stage-shot,
  .qp-stage--map .qp-stage-shot {
    max-height: none;
  }
}

@media (max-width: 720px) {
  .qp-hero,
  .qp-section {
    padding: 48px 0;
  }

  .qp-hero h1 {
    font-size: 32px;
  }

  .qp-card-grid,
  .qp-card-grid--6,
  .qp-card-grid--4,
  .qp-audience {
    grid-template-columns: 1fr;
  }

  .qp-hero .hero-actions .btn,
  .qp-cta .btn,
  .qp-price-cta .btn {
    width: 100%;
  }

  .qp-atlas,
  .qp-price-cta {
    padding: 22px 18px;
  }

  .qp-story {
    padding: 14px 12px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .qp-text-link svg,
  .qp-demo-card {
    transition: none;
  }

  .qp-text-link:hover svg,
  .qp-text-link:focus-visible svg {
    transform: none;
  }
}
