/* Bagmutskiy — pricing hub (fullbleed + Global Shell) */

/*
 * Standalone baseline formerly supplied implicitly by Astra/Elementor.
 * Without it UA `body { margin: 8px }` insets the whole document, opens an
 * 8px gap under #gs-header, and leaves form controls on content-box.
 * Same contract as landing-men / landing-dating — price-scoped, not shell.css.
 */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: #f4f2ee;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: #f4f2ee;
  color: #1a1916;
}

/* Legacy theme-shell selectors kept inert for rollback/parity; fullbleed ignores them. */
.bagmutskiy-terms .entry-header,
.bagmutskiy-terms-main .entry-header {
  display: none;
}

body.bagmutskiy-terms,
body.bagmutskiy-terms #page,
body.bagmutskiy-terms #content,
body.bagmutskiy-terms #primary,
body.bagmutskiy-terms .site-main,
body.bagmutskiy-terms .ast-container {
  background: #f4f2ee;
}

html:has(body.bagmutskiy-terms) {
  overflow-x: visible;
}

body.bagmutskiy-terms {
  overflow-x: visible;
}

body.bagmutskiy-terms footer,
body.bagmutskiy-terms #colophon {
  overflow-x: clip;
}

.visually-hidden,
.form-bait {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.bagmutskiy-terms #primary,
.bagmutskiy-terms-main {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.price {
  --paper: #f4f2ee;
  --paper-2: #ece9e3;
  --paper-3: #fffdf8;
  --ink: var(--bag-ink, #16130f);
  --muted: #5c5a55;
  --line: #d9d4cb;
  --accent: #1a3a32;
  /* Soft fallback when Global Shell is absent (Astra/legacy hosts). */
  --header-offset: 7.5rem;
  --wrap: 72rem;
  background: var(--paper);
  color: var(--ink);
  font-family: "Graphik", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  padding: 0 0 4.5rem;
}

/* Live shell contract: track --gs-admin-bar as the absolute ≤600px bar
   scrolls away. Do not freeze a one-shot pixel measurement. */
html.gs-has-shell .price {
  --header-offset: inherit;
}

.price :where(h1, h2, h3, p, ul, ol, dl, figure) {
  margin: 0;
}

.price a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.price a:hover {
  color: #12291f;
  text-decoration: underline;
}

.price :focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Large non-control regions: avoid persistent full-block tap flash on touch.
   Links/buttons keep UA tap highlight / :focus-visible above. */
.price-family,
.price-card,
.price-hero,
.price-block {
  -webkit-tap-highlight-color: transparent;
}
.price a,
.price button,
.price summary,
.price input,
.price select,
.price textarea,
.price [data-pack] {
  -webkit-tap-highlight-color: rgba(26, 58, 50, 0.18);
}

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

.price-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.6rem;
}

.price-hero {
  padding: 1.75rem 0 1.25rem;
}

.price-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 7.5rem;
  gap: 1.25rem;
  align-items: end;
  margin-bottom: 1.5rem;
}

.price h1 {
  font-size: clamp(1.7rem, 4.2vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.price-lead {
  margin-top: 0.7rem;
  color: var(--muted);
  max-width: 36rem;
}

.price-hero-photo {
  margin: 0;
}

.price-hero-photo img,
.price-family-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: var(--paper-2);
}

.price-index {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.price-index a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.9rem 1rem;
  background: var(--paper-3);
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--ink);
  min-height: 44px;
}

.price-index a:hover {
  border-color: var(--ink);
}

.price-index-label {
  font-weight: 600;
}

.price-index-sum {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  white-space: nowrap;
}

.price-index-sum span {
  white-space: nowrap;
}

.price-nav {
  position: sticky;
  top: var(--header-offset);
  z-index: 4;
  background: color-mix(in srgb, var(--paper) 92%, white);
  border-block: 1px solid var(--line);
}

.price-nav-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.price-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  text-decoration: none;
  color: var(--muted);
  font-weight: 600;
}

.price-nav a[aria-current="true"] {
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--ink);
}

.price-family,
.price-block {
  /* GS sticky (#gs-header → --header-offset) + sticky .price-nav (often 2 rows on mobile). */
  scroll-margin-top: calc(var(--header-offset) + 7.25rem);
}

.price-family {
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--line);
}

.price-family-head {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
  margin-bottom: 1.4rem;
}

.price-family-photo-wide img {
  aspect-ratio: 3 / 2;
}

.price h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  letter-spacing: -0.02em;
}

.price-family-lead,
.price-note {
  margin-top: 0.45rem;
  color: var(--muted);
}

.price-cards {
  display: grid;
  gap: 0.75rem;
}

.price-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-3);
  border: 1px solid var(--line);
  padding: 1.05rem 1rem 1.1rem;
}

.price-card-focus {
  border-color: var(--ink);
}

.price-card.is-picked {
  background: #f7f6f1;
}

.price-card-name {
  font-weight: 600;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.price-chip {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 0.12rem 0.4rem;
  font-weight: 600;
}

.price-card-sum {
  margin-top: 0.35rem;
  font-size: clamp(1.55rem, 3.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.price-card-time {
  margin-top: 0.2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.price-card-time + .price-card-sum {
  margin-top: 0.25rem;
}

.price-card-math {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
}

.price-card-math li {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.28rem 0;
  border-top: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.price-card-math li:last-child {
  padding-bottom: 0;
}

.price-card-fit,
.price-card-out {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.price-card-out {
  color: var(--ink);
}

.price-card-act {
  margin-top: auto;
  padding-top: 0.9rem;
}

.price-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55rem 1rem;
  background: var(--ink);
  color: #f7f4ee !important;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--ink);
  cursor: pointer;
  font: inherit;
}

.price a.price-btn,
.price a.price-btn:hover {
  text-decoration: none;
}

.price-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.price-btn-quiet {
  background: transparent;
  color: var(--ink) !important;
}

.price-btn-quiet:hover {
  background: var(--ink);
  color: #f7f4ee !important;
}

.price-shared,
.price-extras {
  margin-top: 1.4rem;
}

.price h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.price-shared ul,
.price-extras ul {
  padding-left: 1.1rem;
  color: var(--muted);
}

.price-shared li + li,
.price-extras li + li {
  margin-top: 0.28rem;
}

.price-routes {
  margin-top: 1.1rem;
  font-size: 0.95rem;
  color: var(--muted);
}

.price-block {
  padding: 2.2rem 0 0.4rem;
}

.price-facts {
  display: grid;
  gap: 0.7rem;
  margin-top: 1rem;
}

.price-facts div {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 0.6rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}

.price-facts dt {
  font-weight: 600;
}

.price-facts dd {
  color: var(--muted);
}

.price-faq {
  margin-top: 1rem;
}

.price-faq details {
  border-bottom: 1px solid var(--line);
}

.price-faq summary {
  cursor: pointer;
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  padding: 0.7rem 0;
  list-style: none;
}

.price-faq summary::-webkit-details-marker {
  display: none;
}

.price-faq details p {
  padding: 0 0 0.9rem;
  color: var(--muted);
  max-width: 40rem;
}

.price-bridge p {
  margin-top: 0.5rem;
  max-width: 40rem;
  color: var(--muted);
}

.price-book {
  max-width: 36rem;
  padding-bottom: 1rem;
}

.price-form {
  margin-top: 1.1rem;
}

.price-form-pick {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.75rem;
  background: var(--paper-2);
}

.price-form-pick[hidden] {
  display: none;
}

.price-fields {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.price-fields label span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.price-fields input,
.price-fields select {
  width: 100%;
  min-height: 44px;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--line);
  background: var(--paper-3);
  font: inherit;
  color: var(--ink);
}

.price-form .price-btn {
  width: 100%;
}

.price-form-status {
  margin-top: 0.7rem;
}

.price-form-status[data-state="ok"] {
  color: var(--accent);
}

.price-form-status[data-state="err"] {
  color: #8a1f11;
}

.price-direct {
  margin-top: 1rem;
}

.price-form.is-sending {
  opacity: 0.7;
  pointer-events: none;
}

@media (min-width: 700px) {
  .price-index {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .price-index a {
    flex-direction: column;
    align-items: flex-start;
    min-height: 6.2rem;
  }

  .price-index-sum {
    text-align: left;
    align-items: flex-start;
  }

  .price-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .price-fields {
    grid-template-columns: 1fr 1fr;
  }

  .price-fields label:last-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 900px) {
  .price-hero-grid {
    grid-template-columns: minmax(0, 1fr) 11rem;
  }

  .price-family-head {
    grid-template-columns: 8.5rem minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  .price-hero-grid {
    grid-template-columns: minmax(0, 1fr) 5.5rem;
  }

  .price-family-head {
    grid-template-columns: 4.8rem minmax(0, 1fr);
  }

  .price-facts div {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

/* Text-only family heads (no thumb): skip the photo column. */
.price-family-head:not(:has(> .price-family-photo)) {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 360px) {
  .price-card-sum {
    font-size: 1.45rem;
  }
}

@media (max-height: 430px) and (min-width: 700px) {
  .price-hero-photo {
    display: none;
  }

  .price-hero-grid {
    grid-template-columns: 1fr;
    margin-bottom: 0.8rem;
  }

  .price-hero {
    padding: 1rem 0 0.5rem;
  }

  .price-index a {
    min-height: 0;
    padding: 0.65rem 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .price * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
