/* ============================================
   AcuGIS unified pricing
   Extends home.css tokens, buttons, footer, type
   ============================================ */

:root {
  --qgis-publisher: #0d652d;
  --qgis-publisher-soft: #eef6f0;
  --field-survey: #0f766e;
  --field-survey-soft: #e7f5f3;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.price-product-btn:focus-visible,
.price-deploy-btn:focus-visible,
.price-learn:focus-visible,
.price-details summary:focus-visible,
.price-faq summary:focus-visible,
.price-plan:focus-within,
.price-mobile-bar a:focus-visible {
  outline: 3px solid rgba(21, 101, 192, 0.4);
  outline-offset: 2px;
}

/* ---------- Hero ---------- */
.price-hero {
  padding: 40px 0 32px;
  background:
    radial-gradient(ellipse 70% 80% at 88% 0%, rgba(25, 118, 210, 0.1), transparent 58%),
    linear-gradient(180deg, #f0f6fc 0%, var(--bg) 100%);
}

.price-hero h1 {
  font-size: clamp(32px, 4.2vw, 44px);
  margin-bottom: 10px;
  max-width: 14em;
}

.price-hero-body {
  font-size: 17px;
  color: var(--muted);
  max-width: 38em;
  margin-bottom: 22px;
}

.price-hero .hero-actions {
  margin-bottom: 0;
}

/* ---------- Steps ---------- */
.price-steps {
  padding: 8px 0 28px;
}

.price-step-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.price-step-list li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
}

.price-step-num {
  grid-row: 1 / span 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cloud-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.price-step-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}

.price-step-copy {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Configurator ---------- */
.price-configure {
  padding: 40px 0 56px;
}

.price-section-header {
  margin-bottom: 28px;
}

.price-section-header h2 {
  font-size: clamp(26px, 3.2vw, 34px);
  margin-bottom: 8px;
}

.price-section-header p {
  color: var(--muted);
  max-width: 40em;
}

.price-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.95fr) minmax(280px, 1fr);
  gap: 28px;
  align-items: start;
}

/* ---------- Deployment ---------- */
.price-deploy {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.price-deploy-label {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 12px;
}

.price-deploy-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.price-deploy-btn {
  min-height: 48px;
  padding: 10px 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.price-deploy-btn.is-active {
  border-color: var(--blue);
  background: var(--cloud-soft);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--blue);
}

.price-deploy-note {
  display: none;
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
}

.price-deploy-defs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-top: 14px;
}

.price-deploy-defs dt {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 4px;
}

.price-deploy-defs dd {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- Product groups ---------- */
.price-group {
  margin-bottom: 28px;
}

.price-group h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.price-product {
  --accent: var(--blue);
  --soft: var(--cloud-soft);
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.price-product[data-accent="qgis-publisher"] { --accent: var(--qgis-publisher); --soft: var(--qgis-publisher-soft); }
.price-product[data-accent="field-survey"] { --accent: var(--field-survey); --soft: var(--field-survey-soft); }
.price-product[data-accent="geosync"] { --accent: var(--geosync); --soft: var(--geosync-soft); }
.price-product[data-accent="report-server"] { --accent: var(--report); --soft: var(--report-soft); }
.price-product[data-accent="agent"] { --accent: var(--agent); --soft: var(--agent-soft); }
.price-product[data-accent="geosiem"] { --accent: var(--geosiem); --soft: var(--geosiem-soft); }

.price-product.is-selected {
  border-color: var(--accent);
  background: var(--soft);
  box-shadow: 0 0 0 1px var(--accent);
}

.price-product.is-unavailable:not(.is-selected) {
  background: #fafafa;
}

.price-product-btn {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px 14px;
  width: 100%;
  padding: 16px 16px 12px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  background: none;
  border: 0;
  box-shadow: none;
  appearance: none;
}

.price-product-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
}

.price-product-body {
  min-width: 0;
}

.price-product-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.price-product-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy-deep);
}

.price-product-amount {
  flex-shrink: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}

.price-product-desc {
  display: block;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.45;
  margin-bottom: 6px;
}

.price-product-includes {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(13, 101, 45, 0.1);
  color: var(--qgis-publisher);
  font-size: 12px;
  font-weight: 700;
}

.price-product-tags {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--muted);
}

.price-product-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  align-self: start;
}

.price-check {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  position: relative;
}

.price-check::after {
  content: "+";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1;
}

.price-product.is-selected .price-check {
  background: var(--accent);
  border-color: var(--accent);
}

.price-product.is-selected .price-check::after {
  content: "";
  width: 7px;
  height: 12px;
  margin: 4px auto 0;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}

.price-selected-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  opacity: 0;
}

.price-product.is-selected .price-selected-label {
  opacity: 1;
}

.price-product-extra {
  padding: 0 16px 8px 70px;
}

.price-learn {
  display: inline-flex;
  margin: 0 16px 14px 70px;
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
}

.price-learn:hover,
.price-learn:focus-visible {
  text-decoration: underline;
}

.price-plans {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.price-plan {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
}

.price-plan.is-checked,
.price-plan:has(input:checked) {
  border-color: var(--geosync);
  background: var(--geosync-soft);
}

.price-plan input {
  margin-top: 4px;
}

.price-plan strong {
  display: inline-block;
  margin-right: 6px;
}

.price-plan small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.price-details {
  margin-bottom: 8px;
}

.price-details summary {
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.price-details p {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Summary ---------- */
.price-summary {
  position: sticky;
  top: calc(var(--header-height) + 16px);
  padding: 22px 22px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.price-summary h2 {
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}

.price-summary-empty {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
  margin-bottom: 6px;
}

.price-summary p {
  font-size: 14.5px;
  color: var(--muted);
}

.price-summary-deploy {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--navy) !important;
  margin-bottom: 12px !important;
}

.price-summary-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.price-summary-list li {
  display: flex;
  gap: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--navy-deep);
}

.price-summary-check {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--ok-bg);
  position: relative;
}

.price-summary-check::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border-right: 2px solid var(--ok);
  border-bottom: 2px solid var(--ok);
  transform: rotate(45deg);
}

.price-summary-note {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

.price-summary-total {
  font-size: 26px !important;
  font-weight: 800 !important;
  letter-spacing: -0.03em;
  color: var(--navy-deep) !important;
  margin: 0 0 16px !important;
  line-height: 1.2;
}

.price-summary .btn {
  width: 100%;
}

.price-summary .btn.is-disabled {
  pointer-events: none;
  opacity: 0.55;
}

.price-upsell {
  margin: 0 0 16px;
  padding: 14px;
  border-radius: 10px;
  background: var(--cloud-soft);
  border: 1px solid #d7e4f4;
}

.price-upsell-eyebrow {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue) !important;
  margin-bottom: 4px !important;
}

.price-upsell-title {
  font-size: 15px !important;
  font-weight: 800 !important;
  color: var(--navy-deep) !important;
  margin-bottom: 6px !important;
}

.price-upsell p {
  margin-bottom: 6px;
}

.price-upsell-save {
  font-weight: 700 !important;
  color: var(--ok) !important;
}

.price-upsell .btn {
  margin-top: 8px;
}

.price-tax {
  margin-top: 24px;
  font-size: 13.5px;
  color: var(--muted);
  max-width: 48em;
}

/* ---------- Complete platform ---------- */
.price-or {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto 8px;
  padding: 0 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.price-or::before,
.price-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.price-platform {
  padding: 48px 0 64px;
  background: var(--soft);
}

.price-platform.is-highlighted {
  box-shadow: inset 0 0 0 2px var(--blue);
}

.price-platform h2 {
  font-size: clamp(28px, 3.6vw, 40px);
  margin-bottom: 10px;
}

.price-platform-lead {
  font-size: 17px;
  color: var(--muted);
  max-width: 38em;
  margin-bottom: 32px;
}

.price-platform-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr);
  gap: 28px;
  align-items: start;
}

.price-platform-includes {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.price-platform-includes h3 {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
}

.price-platform-includes li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 0 8px 22px;
  position: relative;
  font-size: 15px;
  color: var(--navy-deep);
}

.price-platform-includes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ok-bg);
  box-shadow: inset 0 0 0 2px var(--ok);
}

.price-platform-includes span {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.price-platform-caps {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
}

.price-platform-offers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.price-platform-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.price-platform-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 8px;
}

.price-platform-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-deep);
  margin-bottom: 8px;
}

.price-platform-card > p {
  color: var(--muted);
  font-size: 14.5px;
  margin-bottom: 14px;
}

.price-platform-card ul {
  margin-bottom: 20px;
}

.price-platform-card li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  font-size: 14.5px;
}

.price-platform-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--blue);
}

.price-platform-card .btn {
  width: 100%;
  margin-top: auto;
}

/* ---------- FAQ ---------- */
.price-faq {
  padding: 56px 0;
}

.price-faq-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.price-faq details {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  padding: 4px 18px;
}

.price-faq summary {
  cursor: pointer;
  min-height: 52px;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 700;
  color: var(--navy-deep);
}

.price-faq details p {
  padding-bottom: 16px;
  color: var(--muted);
  font-size: 15px;
}

/* ---------- Mobile bar ---------- */
.price-mobile-bar {
  display: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .price-layout,
  .price-platform-grid,
  .price-platform-offers,
  .price-deploy-defs,
  .price-step-list {
    grid-template-columns: 1fr;
  }

  .price-summary {
    position: static;
  }

  .price-product-extra,
  .price-learn {
    margin-left: 16px;
    padding-left: 0;
  }

  .price-mobile-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: var(--white);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
  }

  html:has(.price-mobile-bar:not([hidden])) {
    padding-bottom: 76px;
  }

  .price-mobile-bar.is-summary-visible,
  .price-mobile-bar[hidden] {
    display: none;
  }

  .price-mobile-bar p {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    font-weight: 700;
    color: var(--navy-deep);
  }

  .price-mobile-bar [data-mobile-total] {
    font-size: 15px;
  }

  .price-mobile-bar .btn {
    min-height: 44px;
    padding: 0 16px;
    flex-shrink: 0;
  }
}

@media (max-width: 720px) {
  .price-hero {
    padding: 28px 0 24px;
  }

  .price-product-btn {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .price-product-action {
    grid-column: 2;
    flex-direction: row;
    justify-content: flex-start;
  }

  .price-product-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .price-product-amount {
    white-space: normal;
  }

  .price-hero .hero-actions .btn,
  .price-platform-card .btn {
    width: 100%;
  }

  .price-deploy-toggle {
    grid-template-columns: 1fr;
  }

  .price-deploy-note {
    display: block;
  }

  .price-deploy-defs {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .price-product,
  .price-deploy-btn {
    transition: none;
  }
}
