/*===============================================*\
|| TerraLoc pricing                               ||
|| ---------------------------------------------- ||
|| A night band with the promises, then the three  ||
|| plans and the comparison on paper. Same shape   ||
|| as tl-contact.css, which is the shape this site ||
|| uses for a page that opens with a statement.    ||
\*===============================================*/

.tl-pricing {
  /* Pinned, like every other TerraLoc surface: a price list reads the same
     whichever face the site is wearing. */
  --tl-paper:        #F3F2EC;
  --tl-paper-deep:   #E9E7DD;
  --tl-panel:        #FAF9F4;
  --tl-white:        #FFFFFF;
  --tl-ink:          #23281F;
  --tl-muted:        #5C6253;
  --tl-dim:          #8B8F80;
  --tl-hairline:     #DFDCCB;
  --tl-accent:       #46603C;
  --tl-accent-ink:   #F3F2EC;
  --tl-accent-hover: #2E4228;
  --tl-cta:          #C86B3F;
  --tl-cta-ink:      #F3F2EC;
  --tl-cta-hover:    #A8512E;
  --tl-cta-rgb:      200, 107, 63;
  --tl-sage:         #9FB08A;
  --tl-night:        #14180F;
  --tl-night-ink:    #C9CDBD;
  --tl-night-line:   #2C3625;
  --tl-night-muted:  #8B937D;
  --tl-night-faint:  #55604A;

  --bs-body-color:      var(--tl-ink);
  --bs-heading-color:   var(--tl-ink);
  --bs-emphasis-color:  var(--tl-ink);
  --bs-secondary-color: var(--tl-muted);
  --bs-border-color:    var(--tl-hairline);
  --bs-link-color:      var(--tl-accent);
  --bs-link-hover-color: var(--tl-accent-hover);

  background: var(--tl-paper);
  color: var(--tl-ink);
}

/* style.css gives every <section> 7.5rem of padding, which would put a band of
   bare paper between the header and this page's night band. */
section.tl-pricing { padding: 0; }

.tl-pricing-wrap { width: min(94%, 1240px); margin: 0 auto; }

/* ---------- the night band ---------- */

.tl-pricing-head {
  position: relative;
  overflow: hidden;
  background: var(--tl-night);
  color: var(--tl-night-ink);
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 6vw, 5rem);
}
.tl-pricing-glow {
  position: absolute;
  inset: 0;
  background: radial-gradient(900px 520px at 78% 10%, rgba(var(--tl-cta-rgb), 0.13), transparent 65%);
  pointer-events: none;
}
.tl-pricing-contours {
  position: absolute;
  left: 0;
  bottom: -14rem;
  width: 46%;
  min-width: 34rem;
  height: 700px;
  opacity: 0.7;
  pointer-events: none;
}
.tl-pricing-head .tl-pricing-wrap { position: relative; z-index: 2; }

.tl-pricing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--tl-sage);
}
.tl-pricing-head h1 {
  margin: 1.5rem 0 0;
  max-width: 20ch;
  font-family: var(--tl-font-display, "Bricolage Grotesque", sans-serif);
  font-size: clamp(2.25rem, 5.2vw, 4rem);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--tl-paper);
}
.tl-pricing-head h1 em { font-style: italic; color: var(--tl-cta); }
.tl-pricing-lede {
  margin: 1.375rem 0 0;
  max-width: 46rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--tl-night-ink);
}

/* The four promises. Each one is a fact about the billing that the code
   actually implements, which is why they are stated flatly. */
.tl-pricing-promises {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.75rem 2.25rem;
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--tl-night-line);
}
.tl-pricing-promise { display: flex; align-items: flex-start; gap: 0.625rem; }
.tl-pricing-promise svg { flex-shrink: 0; margin-top: 0.125rem; color: var(--tl-sage); }
.tl-pricing-promise strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tl-paper);
}
.tl-pricing-promise span {
  display: block;
  margin-top: 0.1875rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--tl-night-muted);
}

/* ---------- the body ---------- */

.tl-pricing-body { padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(3.5rem, 8vw, 6rem); }

/* ---------- the three plans ---------- */

.tl-price-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.tl-price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 2rem 1.75rem;
  border: 1px solid var(--tl-hairline);
  border-radius: 14px;
  background: var(--tl-panel);
}

/* The middle plan is the one most people want, so it is lifted rather than
   coloured in: a price card that shouts reads as a sales page. */
.tl-price-card.is-featured {
  border-color: rgba(var(--tl-cta-rgb), 0.5);
  box-shadow: var(--tl-lift, 0 1px 2px rgba(0,0,0,.05), 0 6px 20px rgba(0,0,0,.08));
}
.tl-price-card.is-current { border-color: var(--tl-accent); }

.tl-price-flag {
  position: absolute;
  top: -0.6875rem;
  left: 1.75rem;
  padding: 0.1875rem 0.625rem;
  border-radius: 999px;
  background: var(--tl-cta);
  color: var(--tl-cta-ink);
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tl-price-name {
  font-family: var(--tl-font-display, "Bricolage Grotesque", sans-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tl-ink);
}
.tl-price-tag {
  margin-top: 0.25rem;
  font-size: 0.9375rem;
  color: var(--tl-muted);
}
.tl-price-amount {
  display: flex;
  align-items: baseline;
  gap: 0.4375rem;
  margin-top: 1.5rem;
}
.tl-price-num {
  font-family: var(--tl-font-display, "Bricolage Grotesque", sans-serif);
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--tl-ink);
}
.tl-price-cur {
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 1rem;
  font-weight: 600;
  color: var(--tl-muted);
}
.tl-price-per {
  margin-top: 0.375rem;
  font-size: 0.8125rem;
  color: var(--tl-dim);
}

.tl-price-points {
  flex: 1 1 auto;
  margin: 1.5rem 0 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--tl-hairline);
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tl-price-points li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--tl-muted);
}
/* The same contour dash the legal and contact pages use for a list mark. */
.tl-price-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6875rem;
  width: 12px;
  height: 2px;
  background: var(--tl-sage);
}

.tl-price-cta {
  display: block;
  width: 100%;
  margin-top: 1.75rem;
  padding: 0.8125rem 1rem;
  border: 0;
  border-radius: 8px;
  background: var(--tl-cta);
  color: var(--tl-cta-ink);
  font-size: 0.9375rem;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}
button.tl-price-cta:hover { background: var(--tl-cta-hover); }
button.tl-price-cta:focus-visible { box-shadow: 0 0 0 3px rgba(var(--tl-cta-rgb), 0.35); }
button.tl-price-cta:disabled { opacity: 0.6; cursor: default; }

/* Not a button: the plan they already hold, and the plans below it. */
.tl-price-cta.is-current {
  background: transparent;
  border: 1px solid var(--tl-accent);
  color: var(--tl-accent);
  cursor: default;
}
.tl-price-cta.is-quiet {
  background: transparent;
  border: 1px solid var(--tl-hairline);
  color: var(--tl-dim);
  cursor: default;
}

/* Where a failed checkout says why. Empty until then. */
/* Under the athlete's own plan: when it renews or ends. Mono, because it is
   a date. */
.tl-price-when {
  display: block;
  margin-top: 0.625rem;
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--tl-dim);
}

/* What a subscription is, once, under the cards. */
.tl-pricing-fine {
  max-width: 46rem;
  margin: 1.5rem auto 0;
  font-size: 0.875rem;
  line-height: 1.55;
  text-align: center;
  color: var(--tl-muted);
}

.tl-pricing-note { display: none; }
.tl-pricing-note.is-shown {
  display: block;
  margin-top: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.9375rem;
}
.tl-pricing-note.is-error {
  background: #F5DCD9;
  color: #7A1D16;
}

/* ---------- section headings ---------- */

.tl-pricing-sec-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--tl-font-mono, ui-monospace, monospace);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--tl-accent);
}
.tl-pricing-sec-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--tl-accent);
}

/* ---------- the comparison ---------- */

.tl-pricing-compare { margin-top: clamp(3rem, 7vw, 5rem); }
.tl-pricing-compare h2 {
  margin: 1rem 0 1.75rem;
  font-family: var(--tl-font-display, "Bricolage Grotesque", sans-serif);
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--tl-ink);
}

/* A table is wide by nature: it scrolls inside its own box rather than
   pushing the page sideways. */
.tl-cmp-wrap {
  overflow-x: auto;
  border: 1px solid var(--tl-hairline);
  border-radius: 14px;
  background: var(--tl-panel);
}
.tl-cmp {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.tl-cmp thead th {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--tl-hairline);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tl-muted);
  text-align: center;
  white-space: nowrap;
}
.tl-cmp thead th:first-child { text-align: left; }
.tl-cmp tbody th {
  padding: 0.875rem 1.25rem;
  font-weight: 500;
  color: var(--tl-ink);
  text-align: left;
}
.tl-cmp tbody td {
  padding: 0.875rem 1.25rem;
  text-align: center;
  color: var(--tl-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.tl-cmp tbody tr + tr th,
.tl-cmp tbody tr + tr td { border-top: 1px solid var(--tl-hairline); }
.tl-cmp tbody tr:hover th,
.tl-cmp tbody tr:hover td { background: var(--tl-paper-deep); }

.tl-cmp-yes { color: var(--tl-accent); font-weight: 700; }
.tl-cmp-no { color: var(--tl-dim); }

/* ---------- the questions ---------- */

.tl-pricing-faq { margin-top: clamp(3rem, 7vw, 5rem); }
.tl-pricing-faq-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem 3rem;
  margin-top: 1.75rem;
}
.tl-pricing-faq-item h3 {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--tl-ink);
}
.tl-pricing-faq-item p {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--tl-muted);
}

/* ---------- responsive ---------- */

@media (max-width: 991.98px) {
  .tl-pricing-promises { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-price-cards { grid-template-columns: minmax(0, 1fr); }
  /* Stacked, the middle card is no longer in the middle, so the lift is the
     only thing still saying which one it is. */
  .tl-price-card.is-featured { order: -1; }
  .tl-pricing-faq-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 575.98px) {
  .tl-pricing-promises { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .tl-price-card { padding: 1.5rem 1.25rem; }
  .tl-price-num { font-size: 2.5rem; }
}
