/* =========================================================
   GlobeWarn — pricing.css  (r3)

   The page carries a short section at the very bottom: a line and a button.
   Everything about paying lives in the pop-up.

   The pop-up is measured against svh, not vh. On a phone, vh counts the
   space hidden behind the browser chrome, so a frame sized in vh pushes its
   own button off the screen. svh is what you can actually see. Safe-area
   insets are honoured on all four sides for notches and home bars.

   Colours come from theme.css; the section adds no sixth palette.
   Type floor: 0.84rem = 14.3 px at the 17 px root.
   ========================================================= */

#pricing {
  box-sizing: border-box;
  width: 100%;
  max-width: var(--wrap, 72rem);
  margin: 2.6rem auto 1.4rem;
  padding: 0 var(--gutter, 1rem);
  scroll-margin-top: calc(var(--bar-total, 5.5rem) + 14px);
  overflow-wrap: anywhere;
}

#pricing *,
#pricing *::before,
#pricing *::after { box-sizing: border-box; }

#pricing h2 {
  font-size: 1.18rem;
  letter-spacing: 0.01em;
  margin: 0 0 0.35rem;
}

#pricing .pricing-note {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-dim, #55606d);
  margin: 0 0 1rem;
  max-width: 62ch;
}

.pricing-open {
  font: inherit;
  font-size: 0.95rem;
  padding: 0.62rem 1.15rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong, #8c99a8);
  background: var(--panel, #fff);
  color: inherit;
  cursor: pointer;
}

.pricing-open:hover { border-color: var(--accent, #D9480F); }

.pricing-open:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 2px;
}

.plan-ahead {
  margin: 1.15rem 0 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--line, #c9d2dc);
  border-radius: 10px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-dim, #55606d);
}

.plan-ahead strong { color: inherit; font-weight: 600; }

/* --- the pop-up ---------------------------------------------------------- */

body.gw-modal-open { overflow: hidden; }

.gw-modal-back {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1rem, env(safe-area-inset-top))
           max(1rem, env(safe-area-inset-right))
           max(1rem, env(safe-area-inset-bottom))
           max(1rem, env(safe-area-inset-left));
  background: rgba(12, 18, 26, 0.55);
  animation: gw-fade 0.14s ease-out;
}

.gw-modal {
  box-sizing: border-box;
  width: min(58rem, 100%);
  max-height: min(88svh, 100%);
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line-strong, #8c99a8);
  border-radius: 12px;
  background: var(--panel, #fff);
  color: inherit;
  box-shadow: 0 14px 40px rgba(12, 18, 26, 0.28);
  overflow: hidden;
}

.gw-modal * { box-sizing: border-box; }

/* Phone: the frame meets the bottom edge, where the thumb already is, and
   takes the full width. Nothing is left hanging off any side. */
@media (max-width: 40rem) {
  .gw-modal-back { align-items: flex-end; padding: 0; }
  .gw-modal {
    width: 100%;
    max-width: 100%;
    max-height: 92svh;
    border-radius: 12px 12px 0 0;
    border-bottom: 0;
  }
  .gw-modal-body { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom)); }
}

/* Short screens, mostly a phone held sideways: give the frame the height. */
@media (max-height: 30rem) {
  .gw-modal-back { align-items: stretch; padding: 0; }
  .gw-modal { max-height: 100svh; border-radius: 0; }
}

.gw-modal-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.85rem 0.7rem 1.1rem;
  border-bottom: 1px solid var(--line, #c9d2dc);
}

.gw-modal-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-dim, #55606d);
}

.gw-modal-back-btn,
.gw-modal-close {
  flex: 0 0 auto;
  font: inherit;
  border-radius: 8px;
  border: 1px solid var(--line, #c9d2dc);
  background: var(--panel, #fff);
  color: inherit;
  cursor: pointer;
}

.gw-modal-back-btn {
  font-size: 0.86rem;
  padding: 0.4rem 0.65rem;
}

.gw-modal-close {
  width: 2.2rem;
  height: 2.2rem;
  font-size: 1.25rem;
  line-height: 1;
}

.gw-modal-back-btn:hover,
.gw-modal-close:hover { border-color: var(--accent, #D9480F); }

.gw-modal-back-btn:focus-visible,
.gw-modal-close:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 2px;
}

.gw-modal-body {
  padding: 1rem 1.1rem 1.2rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

/* --- the three options inside the pop-up --------------------------------- */

.plan-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

@media (max-width: 44rem) {
  .plan-grid { grid-template-columns: 1fr; }
}

.plan {
  min-width: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line, #c9d2dc);
  border-radius: 10px;
  background: var(--bg, #fff);
  padding: 0.95rem 1rem 1rem;
}

.plan--anchor { border-color: var(--line-strong, #8c99a8); }

.plan-name {
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--text-dim, #55606d);
  margin: 0 0 0.45rem;
}

.plan-price,
.gw-modal-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.15rem;
}

.gw-modal-price { margin-bottom: 0.6rem; }

.plan-amount {
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}

.plan-cycle {
  font-size: 0.92rem;
  color: var(--text-dim, #55606d);
}

.plan-tax {
  font-size: 0.86rem;
  color: var(--text-dim, #55606d);
  margin: 0 0 0.8rem;
}

.plan-for {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.7rem;
}

.plan-list {
  list-style: none;
  margin: 0 0 1.05rem;
  padding: 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.plan-list li { padding-left: 1.05rem; position: relative; }

.plan-list li::before {
  content: "";
  position: absolute;
  left: 0.15rem;
  top: 0.62em;
  width: 0.34rem;
  height: 0.34rem;
  border-radius: 50%;
  background: var(--line-strong, #8c99a8);
}

.plan-cta { margin-top: auto; }

.plan-button {
  display: inline-block;
  width: 100%;
  text-align: center;
  font: inherit;
  font-size: 0.95rem;
  padding: 0.62rem 0.9rem;
  border-radius: 8px;
  border: 1px solid var(--line-strong, #8c99a8);
  background: var(--panel, #fff);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.plan-button:hover { border-color: var(--accent, #D9480F); }

/* The one press that leads to a checkout carries the weight of the card, so
   there is no doubt which control is the one. */
.plan-button--go {
  border-color: var(--accent, #D9480F);
  background: var(--accent, #D9480F);
  color: var(--accent-ink, #fff);
  font-weight: 600;
}

.plan-button--go:hover { filter: brightness(1.06); }

.plan-note {
  margin: 0.55rem 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft, #55606d);
}

.plan-button:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 2px;
}

/* --- the chosen option --------------------------------------------------- */

.gw-modal-note {
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0 0 1rem;
  max-width: 60ch;
}

.gw-modal-action { min-height: 2.6rem; max-width: 26rem; }

.gw-modal-fine {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--text-dim, #55606d);
  margin: 1rem 0 0;
  max-width: 62ch;
}

.paypal-slot { max-width: 100%; overflow: hidden; }
.paypal-slot iframe { max-width: 100% !important; }

.waitlist { display: flex; flex-wrap: wrap; gap: 0.45rem; }

.waitlist input {
  flex: 1 1 11rem;
  min-width: 0;
  font: inherit;
  font-size: 1rem;              /* 16 px stops iOS zooming on focus */
  padding: 0.6rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line, #c9d2dc);
  background: var(--bg, #fff);
  color: inherit;
}

.waitlist input:focus-visible {
  outline: 2px solid var(--accent, #D9480F);
  outline-offset: 1px;
}

.waitlist .plan-button { flex: 1 1 11rem; width: auto; }

@keyframes gw-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .gw-modal-back { animation: none; }
}
