/* ==========================================================================
   TPS Prepaid — site stylesheet
   Palette and type follow the tpspayments.com system: pale slate ground,
   deep marine ink panels, amber accent, serif display over humanist sans
   with a mono utility face.
   ========================================================================== */

:root {
  /* Ground and panels */
  --paper:       #F1F4F5;   /* page ground */
  --band:        #E7EEF0;   /* alternating band */
  --card:        #FFFFFF;   /* card fill */
  --ink:         #0C2028;   /* dark panels, headings, primary button */
  --ink-deep:    #081A21;   /* deepest band */
  --ink-lift:    #12303A;   /* closing band */

  /* Line and text */
  --rule:        #D5DEE1;
  --rule-ink:    rgba(232, 240, 242, 0.16);
  --bar:         #C3CDD1;   /* barcode rule */
  --body:        #33474F;
  --muted:       #5E7178;
  --on-ink:      #EAF1F3;
  --on-ink-mut:  #9CB2B9;

  /* Accents */
  --amber:       #E2A33F;   /* on dark: labels, numerals, buttons */
  --amber-ink:   #A8631C;   /* on light: eyebrow text and markers */
  --approve:     #5AAE83;
  --decline:     #D9695E;

  /* Type */
  --display: "Source Serif 4", "Iowan Old Style", "Charter", Georgia, serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas,
          monospace;

  /* Measure and rhythm */
  --wrap: 1120px;
  --gutter: 40px;
  --section: 96px;
  --radius: 6px;
}

/* --------------------------------------------------------------- reset -- */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; }

/* ---------------------------------------------------------- typography -- */

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  margin: 0 0 0.5em;
  letter-spacing: -0.012em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.35rem, 1.5rem + 3.2vw, 3.55rem);
  line-height: 1.08;
  letter-spacing: -0.024em;
}

h2 {
  font-size: clamp(1.65rem, 1.28rem + 1.5vw, 2.2rem);
  line-height: 1.16;
  letter-spacing: -0.018em;
}

h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  letter-spacing: -0.008em;
}

h4 { font-size: 1rem; line-height: 1.4; }

p { margin: 0 0 1.1em; }

p:last-child, ul:last-child, ol:last-child, dl:last-child { margin-bottom: 0; }

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover { color: var(--amber-ink); text-decoration-color: currentColor; }

:focus-visible {
  outline: 2px solid var(--amber-ink);
  outline-offset: 3px;
  border-radius: 2px;
}

strong { font-weight: 600; color: var(--ink); }

.lead {
  font-size: clamp(1.06rem, 1rem + 0.3vw, 1.2rem);
  line-height: 1.6;
  color: var(--body);
}

.measure { max-width: 66ch; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--on-ink);
  padding: 12px 20px;
  text-decoration: none;
}

.skip-link:focus { left: 0; }

/* Eyebrow: mono label preceded by a small amber square. Names the section. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin: 0 0 1.15rem;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  background: currentColor;
}

.eyebrow--dark { color: var(--amber); }

/* Small mono caption, used for the standing detail line under the hero. */
.meta {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}

.meta .sep { color: var(--rule); padding: 0 0.55em; }

/* -------------------------------------------------------------- layout -- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section { padding: var(--section) 0; }

.section--tight { padding: calc(var(--section) * 0.66) 0; }

.section--band { background: var(--band); }

.section--ink { background: var(--ink); color: var(--on-ink-mut); }

.section--ink-lift { background: var(--ink-lift); color: var(--on-ink-mut); }

.section--ink h2,
.section--ink h3,
.section--ink-lift h2,
.section--ink-lift h3 { color: var(--on-ink); }

.section--ink a,
.section--ink-lift a { color: var(--amber); text-decoration-color: var(--rule-ink); }

.section--ink a:hover,
.section--ink-lift a:hover { color: #fff; }

.section-head { margin-bottom: 2.8rem; max-width: 62ch; }

.section-head p:last-child { margin-bottom: 0; }

/* Heading rail on the left, prose on the right. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 60px;
  align-items: start;
}

.split--hero {
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: 64px;
  align-items: center;
}

.stack-tight > * + * { margin-top: 1.5rem; }

/* Barcode rule. A divider drawn from the subject rather than a plain line. */
.barcode {
  height: 42px;
  margin: 0;
  border: 0;
  opacity: 0.6;
  background-image:
    repeating-linear-gradient(90deg, var(--bar) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, var(--bar) 0 2px, transparent 2px 13px),
    repeating-linear-gradient(90deg, var(--bar) 0 1px, transparent 1px 7px),
    repeating-linear-gradient(90deg, var(--bar) 0 3px, transparent 3px 29px);
}

.barcode-band { padding: 26px 0; }

/* --------------------------------------------------------------- cards -- */

/* Gapped white cards. */
.cards {
  display: grid;
  gap: 22px;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}

.card-item {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
}

.card-item .label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin: 0 0 0.95rem;
}

.card-item h3 { margin-bottom: 0.55em; }

.card-item p {
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--body);
}

.card-item .more {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  margin-top: auto;
  padding-top: 1.4rem;
}

a.card-item { text-decoration: none; color: inherit; }

a.card-item:hover { border-color: var(--amber-ink); color: inherit; }

a.card-item:hover .more { color: var(--amber-ink); }

.card-item--invert {
  background: var(--ink);
  border-color: var(--ink);
}

.card-item--invert h3 { color: var(--on-ink); }

.card-item--invert p { color: var(--on-ink-mut); }

.card-item--invert .label { color: var(--amber); }

/* Hairline table of cells, used where the set reads as one block. */
.grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
}

.grid > * {
  background: var(--card);
  padding: 28px 26px;
  margin: 0;
}

.grid h3 { margin-bottom: 0.5em; }

.grid p { font-size: 0.95rem; line-height: 1.55; margin: 0; }

a.cell { text-decoration: none; color: inherit; display: block; }

a.cell:hover { background: var(--band); color: inherit; }

a.cell .more {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.1rem;
}

a.cell:hover .more { color: var(--amber-ink); }

/* Caption pair under a scale of options. */
.scale-caps {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------- rowsets -- */

/* Named rows: serif label, mono qualifier, prose. */
.rowset { margin: 0; }

.rowset > div {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
  gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--rule);
}

.rowset > div:last-child { border-bottom: 1px solid var(--rule); }

.rowset dt { margin: 0; }

.rowset .name {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
}

.rowset .qual {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber-ink);
  margin-top: 5px;
}

.rowset dd { margin: 0; }

.section--ink .rowset > div,
.section--ink-lift .rowset > div { border-top-color: var(--rule-ink); }

.section--ink .rowset > div:last-child,
.section--ink-lift .rowset > div:last-child { border-bottom-color: var(--rule-ink); }

.section--ink .rowset .name,
.section--ink-lift .rowset .name { color: var(--on-ink); }

.section--ink .rowset .qual,
.section--ink-lift .rowset .qual { color: var(--amber); }

/* Contact details. */
.rows { margin: 0; }

.rows > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--rule);
}

.rows > div:last-child { border-bottom: 1px solid var(--rule); }

.rows dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.3em;
}

.rows dd { margin: 0; color: var(--ink); }

/* --------------------------------------------------------------- lists -- */

ul.plain, ol.plain { margin: 0 0 1.1em; padding-left: 1.15em; }
ul.plain li, ol.plain li { margin-bottom: 0.45em; }

/* Amber rule in the margin. */
.marks { list-style: none; margin: 0; padding: 0; }

.marks li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 0.8em;
}

.marks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 15px;
  height: 1px;
  background: var(--amber-ink);
}

.marks li:last-child { margin-bottom: 0; }

.section--ink .marks li::before,
.section--ink-lift .marks li::before { background: var(--amber); }

/* ------------------------------------------------------------- receipt -- */

/* The signature element: one authorization, decided item by item. */
.receipt {
  background: var(--ink);
  border-radius: 8px;
  padding: 26px 28px 24px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--on-ink);
  box-shadow: 0 18px 44px rgba(12, 32, 40, 0.14);
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.72rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--amber);
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rule-ink);
}

.receipt-items { list-style: none; margin: 0; padding: 0; }

.receipt-items li {
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-ink);
}

.receipt-items li:last-child { border-bottom: 0; }

.receipt-line {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.receipt-line .amt { flex: none; }

.receipt-status {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 3px;
  color: var(--approve);
}

.receipt-status--decline { color: var(--decline); }

.receipt-totals {
  margin: 0;
  padding-top: 14px;
  border-top: 1px dashed var(--rule-ink);
}

.receipt-totals .receipt-line {
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--on-ink-mut);
  padding: 5px 0;
}

.receipt-total {
  margin-top: 12px;
  padding-top: 13px;
  border-top: 1px dashed var(--rule-ink);
}

.receipt-total .receipt-line {
  color: var(--amber);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.receipt-note {
  margin: 14px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.6;
  color: var(--on-ink-mut);
}

/* ------------------------------------------------------------- numbers -- */

.stats {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  border-top: 1px solid var(--rule-ink);
  border-bottom: 1px solid var(--rule-ink);
}

.stats > div {
  padding: 30px 28px;
  border-left: 1px solid var(--rule-ink);
}

.stats > div:first-child { border-left: 0; padding-left: 0; }

.stats .figure {
  display: block;
  font-family: var(--display);
  font-size: 2.05rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--amber);
  margin-bottom: 0.5rem;
}

.stats p { font-size: 0.92rem; line-height: 1.5; margin: 0; color: var(--on-ink-mut); }

/* ------------------------------------------------------------- buttons -- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.97rem;
  font-weight: 500;
  padding: 15px 28px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover { background: #16333E; border-color: #16333E; color: #fff; }

.btn--ghost {
  background: var(--card);
  color: var(--ink);
  border-color: var(--rule);
}

.btn--ghost:hover {
  background: var(--card);
  color: var(--amber-ink);
  border-color: var(--amber-ink);
}

.btn--amber {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
}

.btn--amber:hover { background: #EFB55B; border-color: #EFB55B; color: var(--ink); }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 2.3rem;
}

.btn-row + .meta { margin-top: 2.3rem; }

/* Buttons keep their own colours inside dark sections. */
.section--ink a.btn,
.section--ink-lift a.btn {
  color: var(--paper);
  text-decoration: none;
}

.section--ink a.btn:hover,
.section--ink-lift a.btn:hover { color: #fff; }

.section--ink a.btn--amber,
.section--ink-lift a.btn--amber,
.section--ink a.btn--amber:hover,
.section--ink-lift a.btn--amber:hover { color: var(--ink); }

.section--ink a.btn--ghost,
.section--ink-lift a.btn--ghost { color: var(--ink); }

/* -------------------------------------------------------------- header -- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(241, 244, 245, 0.93);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--ink);
}

.wordmark:hover { color: var(--ink); }

.wordmark .mark {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.wordmark .dot {
  width: 8px;
  height: 8px;
  background: var(--amber-ink);
  flex: none;
}

.wordmark .sub {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav { display: flex; align-items: center; gap: 30px; }

.nav a {
  font-size: 0.96rem;
  color: var(--body);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav a:hover { color: var(--ink); border-bottom-color: var(--amber-ink); }

.nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--amber-ink); }

.nav a.btn {
  padding: 13px 24px;
  color: var(--paper);
  border-bottom: 1px solid var(--ink);
}

.nav a.btn:hover { color: #fff; border-bottom-color: #16333E; }

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

.hero { padding: clamp(64px, 7vw, 104px) 0 clamp(52px, 5vw, 76px); }

.hero h1 { max-width: 17ch; }

.hero .split--hero h1 { max-width: none; }

.hero .lead { max-width: 52ch; margin-top: 1.5rem; }

.hero--sub { padding-bottom: clamp(44px, 4.5vw, 64px); }

.hero--sub h1 { max-width: 22ch; }

/* Product sub-navigation. */
.subnav { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); background: var(--band); }

.subnav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin: 0;
  padding: 15px 0;
}

.subnav a {
  font-family: var(--mono);
  font-size: 0.71rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.subnav a:hover { color: var(--amber-ink); }

.subnav a[aria-current="page"] { color: var(--ink); }

/* ---------------------------------------------------------------- form -- */

.form { max-width: 620px; }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.field input,
.field textarea {
  width: 100%;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 12px 14px;
  transition: border-color 0.15s ease;
}

.field input:focus, .field textarea:focus { border-color: var(--ink); }

.field textarea { min-height: 150px; resize: vertical; }

.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.form-note { font-size: 0.9rem; color: var(--muted); margin-top: 1.4rem; }

/* -------------------------------------------------------------- footer -- */

.site-footer {
  background: var(--ink-deep);
  color: var(--on-ink-mut);
  padding: 66px 0 38px;
  font-size: 0.95rem;
}

.site-footer .wordmark { color: var(--on-ink); }

.site-footer .wordmark .dot { background: var(--amber); }

.site-footer .wordmark .sub { color: var(--on-ink-mut); }

.footer-blurb { margin-top: 1.1rem; max-width: 34ch; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 3fr) minmax(0, 3fr);
  gap: 48px;
  padding-bottom: 44px;
}

.site-footer h4 {
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1.1rem;
}

.site-footer ul { list-style: none; margin: 0; padding: 0; }

.site-footer li { margin-bottom: 0.6em; }

.site-footer a { color: var(--on-ink-mut); text-decoration-color: var(--rule-ink); }

.site-footer a:hover { color: #fff; }

.footer-bar {
  border-top: 1px solid var(--rule-ink);
  padding-top: 26px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.85rem;
}

.footer-bar p { margin: 0; }

.footer-bar ul { display: flex; gap: 24px; }

.footer-bar li { margin: 0; }

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

@media (max-width: 1000px) {
  :root { --section: 74px; --gutter: 28px; }

  .split, .split--hero { grid-template-columns: 1fr; gap: 38px; }

  .split--hero { align-items: start; }

  .cards, .grid { --cols: 2; }

  .stats { --cols: 2; }

  .stats > div { border-left: 0; padding-left: 0; }

  .stats > div:nth-child(n+3) { border-top: 1px solid var(--rule-ink); }

  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .site-header .wrap { min-height: 62px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }

  .nav { width: 100%; gap: 18px; }

  .nav a.btn { margin-left: auto; padding: 11px 18px; font-size: 0.9rem; }

  .cards, .grid, .stats { --cols: 1; }

  .stats > div { border-left: 0; padding-left: 0; }

  .stats > div + div { border-top: 1px solid var(--rule-ink); }

  .grid > * { padding: 24px 22px; }

  .receipt { padding: 22px 20px; font-size: 0.78rem; }

  .rowset > div, .rows > div { grid-template-columns: 1fr; gap: 8px; }

  .field-pair { grid-template-columns: 1fr; gap: 0; }

  .footer-grid { grid-template-columns: 1fr; }
}

@media print {
  .site-header, .subnav, .btn-row, .form, .barcode-band { display: none; }
  body { background: #fff; font-size: 11pt; }
  .section--ink, .section--ink-lift, .site-footer, .receipt {
    background: #fff;
    color: #000;
  }
}
