/* ============================================================================
   Storefront pages — hero, catalog, product, cart, checkout, confirmation, auth.
   ========================================================================= */

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

.hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.hero__inner {
  padding-block: 64px 30px;
  display: grid; grid-template-columns: 1.02fr .98fr; gap: 52px; align-items: center;
}
.hero__kicker {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 18px;
}
.hero__headline {
  font-size: 52px; line-height: 1.06; letter-spacing: -.025em;
  margin: 0 0 18px; max-width: 20ch; text-wrap: pretty;
}
.hero__body { margin: 0; font-size: 17px; line-height: 1.6; color: var(--on-dark-2); max-width: 52ch; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.hero__actions { display: flex; gap: 12px; margin-top: 30px; align-items: center; flex-wrap: wrap; }
.hero__from { font-family: var(--font-mono); font-size: 13px; color: var(--muted-4); margin-left: 4px; }

.hero__media {
  position: relative; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 10;
  background: #12293A; border: 1px solid var(--line-dark);
}
.hero__media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top left; display: block;
}
.hero__scrim {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(10, 26, 38, .34), rgba(10, 26, 38, 0) 55%);
}

.hero__tabs {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 1px solid var(--line-dark); padding-bottom: 44px;
}
.hero__tab {
  cursor: pointer; padding: 18px 18px 0 0; border-top: 2px solid var(--line-dark);
  margin-top: -1px; text-align: left; background: none; color: inherit;
}
.hero__tab.is-active { border-top-color: var(--blue); }
.hero__tab-num {
  display: block;
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-3); margin-bottom: 5px;
}
.hero__tab-name {
  display: block;
  font-family: var(--font-display); font-weight: 700; font-size: 15.5px; color: var(--on-dark);
}
.hero__tab.is-active .hero__tab-name { color: #fff; }
.hero__tab-cat { display: block; font-size: 12.5px; color: var(--muted-3); margin-top: 3px; }

/* Slides are stacked; only the active one is in flow. */
.hero__slide[hidden] { display: none; }

/* ------------------------------------------------------------------ catalog */

.catalog { padding-block: 56px 80px; }
.catalog__head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 24px; gap: 16px; flex-wrap: wrap;
}
.catalog__title { font-size: 26px; letter-spacing: -.02em; }
.catalog__meta { font-size: 13.5px; color: var(--muted-2); }
.catalog__grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.product-card { display: flex; flex-direction: column; gap: 18px; }
.product-card:hover { border-color: var(--blue); }
.product-card__head { display: flex; align-items: flex-start; gap: 14px; }
.product-card__icon { width: 42px; height: 42px; flex: none; border-radius: 10px; object-fit: cover; display: block; }
.product-card__name { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: -.015em; margin-top: 3px; }
.product-card__price { text-align: right; }
.product-card__price-from { font-size: 11.5px; color: var(--muted-2); }
.product-card__price-value { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
.product-card__blurb { margin: 0; font-size: 15px; line-height: 1.55; color: var(--muted); }
.product-card__tags { display: flex; flex-wrap: wrap; gap: 7px; }
.product-card__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.buying-grid {
  margin-top: 44px; padding: 30px 32px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px;
}
.buying-grid__title { font-family: var(--font-display); font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.buying-grid__body { font-size: 14px; color: var(--muted); line-height: 1.55; }

/* ------------------------------------------------------------------ product */

.product { padding-block: 26px 80px; }
.product__layout { display: grid; grid-template-columns: 1.45fr .95fr; gap: 40px; align-items: start; }

/* Physical goods: gallery beside the configurator rather than a full-width hero above it. Even
   halves, because on a wide screen the image was running the whole column width and pushing the
   thing you actually buy with below the fold. */
.product__buy { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; margin-bottom: 34px; }
.product__gallery { position: sticky; top: calc(var(--header-h) + 20px); }
.product__gallery-main { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.product__gallery-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.product__gallery-thumb {
  padding: 0; width: 78px; height: 60px; overflow: hidden; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--card);
}
.product__gallery-thumb.is-active { border-color: var(--blue); }
.product__gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.product__head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.product__icon { width: 52px; height: 52px; flex: none; border-radius: 12px; object-fit: cover; display: block; }
.product__eyebrow {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted-2);
}
.product__name { font-size: 38px; letter-spacing: -.025em; margin: 4px 0 0; }
.product__long { margin: 0 0 26px; font-size: 17px; line-height: 1.6; color: var(--muted); max-width: 62ch; }
.product__links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.product__links .btn { font-size: 14px; padding: 10px 16px; }

.section-title { font-size: 22px; letter-spacing: -.02em; margin: 0 0 16px; }
.section-title--spaced { margin-top: 38px; }

.edition-list { display: grid; gap: 12px; }
/* Each row is a link so the whole card is clickable, but it must read as a
   selectable panel rather than a hyperlink — hence the explicit ink colour. */
.edition {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 20px 22px; cursor: pointer; width: 100%; text-align: left;
  display: grid; grid-template-columns: 22px 1fr auto; gap: 16px; align-items: start;
  color: var(--ink);
}
.edition:hover { color: var(--ink); border-color: var(--blue); }
.edition.is-selected { border-color: var(--blue); }
.edition__name-row { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.edition__name { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.edition__blurb { font-size: 14.5px; color: var(--muted); margin-top: 5px; }
.edition__features { display: flex; flex-wrap: wrap; gap: 5px 18px; margin-top: 11px; }
.edition__feature { font-size: 13.5px; color: var(--muted); }
.edition__price { text-align: right; }
.edition__price-value { font-family: var(--font-display); font-weight: 700; font-size: 22px; }
.edition__price-unit { font-size: 12px; color: var(--muted-2); }

.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 18px 20px; }
.feature-card__title { font-weight: 600; font-size: 15px; margin-bottom: 5px; }
.feature-card__body { font-size: 14px; color: var(--muted); line-height: 1.5; }

.upgrade-banner {
  margin-top: 34px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 22px 24px;
  display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.upgrade-banner__title { font-weight: 600; font-size: 15.5px; margin-bottom: 4px; }
.upgrade-banner__body { font-size: 14px; color: var(--muted); }

/* ------------------------------------------------------------------ configurator */

.configurator { position: sticky; top: calc(var(--header-h) + 33px); }
.configurator__label { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; }
.configurator__edition { font-size: 15px; font-weight: 600; margin-bottom: 20px; }
.configurator__terms { display: grid; gap: 8px; margin-bottom: 20px; }
.term__label { font-weight: 600; font-size: 14.5px; }
.term__note { font-size: 12.5px; color: var(--muted-2); }
.term__price { font-family: var(--font-display); font-weight: 700; font-size: 15px; }

.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.stepper__btn {
  width: 38px; height: 38px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  display: grid; place-items: center; cursor: pointer; font-size: 18px; font-weight: 600;
  background: var(--card); flex: none;
}
.stepper__btn:hover { border-color: var(--ink); }
.stepper__input {
  flex: 1; min-width: 0; height: 38px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 0 12px; text-align: center; font-weight: 600;
}

/* .maint-toggle itself lives in store.css — the admin's refund dialog uses it too. */
.configurator .maint-toggle { margin-bottom: 18px; }

.totals { border-top: 1px solid var(--line); padding-top: 16px; display: grid; gap: 8px; font-size: 14px; }
.totals__row { display: flex; justify-content: space-between; gap: 12px; }
.totals__row--muted span:first-child { color: var(--muted); }
.totals__row--credit { color: var(--link); font-weight: 600; }
.totals__grand { display: flex; justify-content: space-between; align-items: baseline; margin-top: 6px; }
.totals__grand-value { font-family: var(--font-display); font-weight: 700; font-size: 26px; }
.totals__fine { font-size: 12.5px; color: var(--muted-2); }

/* ------------------------------------------------------------------ cart */

.page-title { font-size: 32px; letter-spacing: -.025em; margin: 0 0 26px; }
.cart-layout { display: grid; grid-template-columns: 1.5fr .8fr; gap: 28px; align-items: start; }
.cart-lines { display: grid; gap: 14px; }

.cart-line { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 22px 24px; }
.cart-line__head { display: flex; gap: 16px; align-items: flex-start; }
.cart-line__icon { width: 40px; height: 40px; flex: none; border-radius: 10px; object-fit: cover; display: block; }
.cart-line__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.cart-line__sku { font-family: var(--font-mono); font-size: 12px; color: var(--muted-2); margin-top: 4px; }
.cart-line__term { font-size: 14px; color: var(--muted); margin-top: 8px; }
.cart-line__amount { text-align: right; }
.cart-line__total { font-family: var(--font-display); font-weight: 700; font-size: 19px; }
.cart-line__unit { font-size: 12.5px; color: var(--muted-2); }
.cart-line__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2); flex-wrap: wrap;
}
.cart-line__seats { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.seat-btn {
  width: 32px; height: 32px; border: 1px solid var(--line); border-radius: 7px;
  display: grid; place-items: center; cursor: pointer; font-weight: 600; background: var(--card);
}
.seat-count { min-width: 34px; text-align: center; font-weight: 600; }

.cart-note {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px 20px; font-size: 14px; color: var(--muted); line-height: 1.55;
}
.summary { position: sticky; top: calc(var(--header-h) + 33px); }
.summary__rows { display: grid; gap: 9px; font-size: 14px; }
.summary__total {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px;
}
.summary__total-value { font-family: var(--font-display); font-weight: 700; font-size: 25px; }
/* While the destination change is being re-priced. Dimmed rather than emptied: a total that
   vanishes for a moment reads as an error, and the old figure is still the honest one until the
   new one arrives. */
#summary-body.is-updating { opacity: .55; transition: opacity .12s ease; }

.empty-state { text-align: center; padding: 56px 24px; }
.empty-state__title { font-family: var(--font-display); font-weight: 700; font-size: 20px; margin-bottom: 8px; }
.empty-state__body { font-size: 15px; color: var(--muted); margin-bottom: 20px; }

/* ------------------------------------------------------------------ checkout */

.checkout { padding-block: 38px 80px; }
.checkout__forms { display: grid; gap: 16px; }
.pay-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.pay-tab {
  border: 1px solid var(--line); background: var(--card); border-radius: 9px;
  padding: 12px 10px; text-align: center; cursor: pointer; font-weight: 600; font-size: 13.5px;
}
.pay-tab.is-selected { border-color: var(--blue); background: var(--blue-tint); }

.card-grid { display: grid; grid-template-columns: 1fr 110px 100px; gap: 12px; }
.card-grid > .span-3 { grid-column: span 3; }

/* Stripe Elements render an iframe; this box matches the design's input chrome. */
.stripe-field {
  height: 42px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 12px; background: var(--card);
}
.stripe-field--focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(46, 134, 222, .14); }
.stripe-field--invalid { border-color: var(--red-line); }
.stripe-mount { min-height: 42px; }

.pay-note {
  background: var(--page); border: 1px solid var(--line-4); border-radius: 10px;
  padding: 18px; font-size: 14px; color: var(--muted); line-height: 1.55;
}
/* Per-product renewal choice at checkout. The whole row is the label, so the target is the
   product and its terms rather than a 13px box beside them. */
.renew {
  display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
  border: 1px solid var(--line-4); border-radius: 10px; padding: 14px 16px;
}
.renew + .renew { margin-top: 10px; }
.renew:hover { border-color: var(--line-2); }
.renew input { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; cursor: pointer; }
.renew__body { display: block; }
.renew__name { display: block; font-size: 14px; font-weight: 600; margin-bottom: 3px; }
/* The amount and cadence sit with the consent, not in a footnote — this is the sentence someone
   is agreeing to, and it should be legible rather than fine print. */
.renew__terms { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; }

.credit-row { display: flex; gap: 10px; }
.credit-row .input { flex: 1; }
.summary__lines { display: grid; gap: 11px; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.summary__line { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.summary__fine { font-size: 12px; color: var(--muted-2); margin-top: 10px; line-height: 1.5; }

/* ------------------------------------------------------------------ confirmation */

.confirm { padding-block: 48px 80px; animation: ssRise .4s ease both; }
.confirm__title { font-size: 34px; letter-spacing: -.025em; margin: 0 0 12px; }
.confirm__body { margin: 0 0 30px; font-size: 16.5px; color: var(--muted); line-height: 1.6; max-width: 62ch; }
.confirm__lines { display: grid; gap: 14px; }
.order-line { background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 22px 24px; }
.order-line__head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.order-line__title { font-family: var(--font-display); font-weight: 700; font-size: 18px; }
.order-line__meta { font-size: 13.5px; color: var(--muted-2); margin-top: 4px; }
.key-chip {
  margin-top: 16px; background: var(--ink); border-radius: 10px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.key-chip__value { font-family: var(--font-mono); font-size: 15px; color: var(--blue); letter-spacing: .04em; word-break: break-all; }
.key-chip__copy {
  font-size: 12.5px; font-weight: 600; color: var(--on-dark-2); cursor: pointer;
  border: 1px solid var(--line-dark-3); padding: 6px 12px; border-radius: 6px; background: none; flex: none;
}
.key-chip__copy:hover { color: #fff; border-color: var(--on-dark); }

/* ------------------------------------------------------------------ auth */

.auth { padding-block: 52px 90px; display: grid; grid-template-columns: 1fr .9fr; gap: 44px; align-items: start; }
.auth__card { padding: 32px; }
.auth__tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.auth__tab {
  font-family: var(--font-display); font-weight: 700; font-size: 16px;
  padding: 9px 15px; border-radius: var(--radius-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
}
.auth__tab.is-active { border-color: var(--blue); background: var(--blue-tint); }
.auth__title { font-size: 27px; letter-spacing: -.02em; margin: 0 0 8px; }
.auth__blurb { margin: 0 0 24px; font-size: 15px; color: var(--muted); line-height: 1.55; }
.auth__divider { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; }
.auth__divider-line { height: 1px; background: var(--line-2); flex: 1; }
.auth__divider-text { font-size: 12.5px; color: var(--muted-2); }
.auth__sso { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth__sso .btn { padding: 12px; font-size: 14px; }
.auth__fine { font-size: 12px; color: var(--muted-2); margin-top: 18px; line-height: 1.5; }

.auth__aside { background: var(--ink); color: var(--on-dark-2); border-radius: var(--radius-card); padding: 30px; }
.auth__aside-kicker {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: .15em;
  text-transform: uppercase; color: var(--blue); margin-bottom: 14px;
}
.auth__aside-title { font-family: var(--font-display); font-weight: 700; font-size: 20px; color: #fff; margin-bottom: 16px; line-height: 1.3; }
.auth__aside-list { display: grid; gap: 14px; font-size: 14px; line-height: 1.5; }
.auth__aside-list > div { border-top: 1px solid var(--line-dark); padding-top: 13px; }

/* ------------------------------------------------------------------ quote */

.quote { padding-block: 48px 90px; }
.quote__title { font-size: 32px; letter-spacing: -.025em; margin: 0 0 10px; }
.quote__blurb { margin: 0 0 26px; font-size: 16px; color: var(--muted); line-height: 1.6; }
.quote__form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.quote__form > .span-2 { grid-column: span 2; }

/* ------------------------------------------------------------------ account */

.account { padding-block: 38px 80px; }
.account__grid { display: grid; gap: 14px; }
.license-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
}

/* ------------------------------------------------------------------ mobile bar */

/* Sticky action bar that replaces the sticky sidebar below the layout breakpoint. */
.action-bar { display: none; }

@media (max-width: 900px) {
  .action-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; align-items: center; gap: 14px;
    background: var(--card); border-top: 1px solid var(--line);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -8px 24px rgba(10, 26, 38, .08);
  }
  .action-bar__total { flex: 1; min-width: 0; }
  .action-bar__label { font-size: 12px; color: var(--muted-2); }
  .action-bar__value { font-family: var(--font-display); font-weight: 700; font-size: 20px; }
  .action-bar .btn { flex: none; padding: 13px 20px; font-size: 15px; }

  /* Keep the last card clear of the fixed bar. */
  .has-action-bar { padding-bottom: 96px; }
}

/* --------------------------------------------------------------- issuing */
/* Shown while fulfilment runs on the queue. Indeterminate on purpose: the work is a handful of
   external calls with no meaningful percentage, and a fake percentage that stalls at 90% is worse
   than an honest sweep. */
.issuing { margin-bottom: 16px; }
.issuing__row { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.issuing__label { font-weight: 600; font-size: 15px; }
.issuing__note { font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 10px; }

.issuing__spinner {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 2px solid var(--blue-line); border-top-color: var(--blue);
  animation: issuingSpin .8s linear infinite;
}

.issuing__track {
  height: 5px; border-radius: 3px; background: var(--blue-tint); overflow: hidden;
}
.issuing__bar {
  height: 100%; width: 38%; border-radius: 3px; background: var(--blue);
  animation: issuingSweep 1.4s ease-in-out infinite;
}

/* Settled state: the animation stops so a finished page doesn't keep implying work in progress. */
.issuing--done .issuing__spinner { animation: none; border-top-color: var(--blue-line); }
.issuing--done .issuing__bar { animation: none; width: 100%; background: var(--muted-4); }

@keyframes issuingSpin { to { transform: rotate(360deg); } }
@keyframes issuingSweep {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(320%); }
}

@media (prefers-reduced-motion: reduce) {
  .issuing__spinner, .issuing__bar { animation: none; }
  .issuing__bar { width: 100%; opacity: .6; }
}

/* Promo code entry. Sits under the totals on both the cart and checkout — one control, one
   stylesheet, so the two pages cannot drift apart visually either. */
.promo { margin-top: 14px; }
.promo__form { display: flex; gap: 8px; }
.promo__input {
  flex: 1; min-width: 0; padding: 9px 11px; font-size: 14px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff;
  text-transform: uppercase;
}
.promo__input::placeholder { text-transform: none; }
.promo__apply {
  padding: 9px 16px; font-size: 14px; font-weight: 600; white-space: nowrap;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer;
}
.promo__apply:hover { border-color: var(--accent); color: var(--accent); }
.promo__applied {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; font-size: 13.5px; border-radius: 9px;
  background: #EAF6EF; border: 1px solid #BFE3CE; color: #0F7B4A;
}
.promo__note { opacity: .75; }
.promo__remove {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-size: 12.5px; color: #0F7B4A; text-decoration: underline;
}
.promo__error { margin-top: 6px; font-size: 12.5px; color: #8A3B3B; }
