/* Teppa website. Colours come from tokens.css only. Mobile first: most visitors arrive by
   scanning a QR with their phone camera. */

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

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--surface);
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 0.5rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.125rem); }
h3 { font-size: 1.125rem; font-weight: 600; letter-spacing: 0; }
p { margin: 0 0 1rem; }
a { color: var(--brand); }

.amount,
.num {
  font-variant-numeric: tabular-nums;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}
.narrow {
  max-width: 480px;
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.center { text-align: center; }

/* ---------- header and footer ---------- */

.bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}
/* Clear space around the logo: at least the height of its "e" on every side. */
.logo-link {
  display: inline-block;
  padding: 14px 0;
  line-height: 0;
}
.logo {
  width: 120px; /* never below 96px */
  height: auto;
}
.bar nav {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.bar nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 999px;
}
.bar nav a:hover,
.bar nav a:focus-visible {
  background: var(--soft-brand);
  color: var(--brand-deep);
}

.foot {
  margin-top: 64px;
  padding: 32px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.foot-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
  justify-content: space-between;
}
.sandbox-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--soft-brand);
  color: var(--brand-deep);
  font-weight: 600;
}

/* ---------- buttons and chips ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 1.0625rem;
  text-decoration: none;
  cursor: pointer;
  background: var(--brand);
  color: var(--surface);
}
.btn:hover { background: color-mix(in srgb, var(--brand) 88%, var(--ink)); }
.btn:focus-visible,
.chip:focus-within,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
.btn.block { width: 100%; }
.btn.slim { min-height: 38px; padding: 0 14px; font-size: 0.9375rem; }
.btn.accent {
  background: var(--accent);
  color: var(--brand-deep); /* purple on yellow: fine. Never yellow on white. */
}
.btn.accent:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.ghost {
  background: transparent;
  color: var(--brand);
  box-shadow: inset 0 0 0 2px var(--brand);
}
.btn.ghost:hover { background: var(--soft-brand); }
.btn.on-dark {
  background: transparent;
  color: var(--surface);
  box-shadow: inset 0 0 0 2px var(--surface);
}
.btn.on-dark:hover { background: color-mix(in srgb, var(--surface) 12%, transparent); }

.pill {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  background: var(--accent);
  color: var(--brand-deep);
}
.pill.soft {
  background: var(--soft-brand);
}

/* ---------- forms ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px 20px;
}
.page {
  padding-top: 32px;
}
.page > h1 { font-size: clamp(1.75rem, 5vw, 2.5rem); }

.field {
  display: block;
  margin-bottom: 20px;
}
.field > span,
fieldset > legend {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  padding: 0;
}
.field small,
fieldset small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
}
input[type="text"],
input[type="tel"],
select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font: inherit;
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
}
input.big {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
  min-width: 0;
}

/* Radio choices drawn as chips or tiles; the native input stays for keyboard and AT. */
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: 8px 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  font-weight: 600;
}
.chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.chip:has(input:checked) {
  border-color: var(--brand);
  background: var(--soft-brand);
  color: var(--brand-deep);
}
.chip .sub {
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--muted);
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.error {
  border-left: 4px solid var(--danger);
  background: color-mix(in srgb, var(--danger) 7%, var(--surface));
  color: var(--danger);
  padding: 12px 14px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 600;
}

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

.payee {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.payee-mark {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--soft-brand);
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 1.375rem;
}
.payee h1 {
  font-size: 1.5rem;
  margin: 0;
}
.due {
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  margin: 4px 0 24px;
}

.status {
  text-align: center;
  padding: 32px 20px;
}
.status .big-amount {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.1;
  margin: 8px 0;
}
.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 50%;
  border: 5px solid var(--soft-brand);
  border-top-color: var(--brand);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .spinner { animation: none; }
}
.tick {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 1.75rem;
}
.tick.no {
  background: color-mix(in srgb, var(--danger) 10%, var(--surface));
  color: var(--danger);
}
.receipt {
  margin: 20px 0 0;
  text-align: left;
  border-top: 1px dashed var(--line);
}
.receipt div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--line);
}
.receipt dt { color: var(--muted); }
.receipt dd { margin: 0; font-weight: 600; text-align: right; }

.upsell {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--brand-deep);
  color: var(--surface);
}
.upsell strong { color: var(--accent); }

.code {
  display: inline-block;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 8px 16px;
  border-radius: 12px;
  background: var(--accent);
  color: var(--brand-deep);
}

/* ---------- sandbox payment page ---------- */

.sandbox-card {
  border: 2px dashed var(--brand);
}
.fake-card {
  border-radius: 16px;
  padding: 20px;
  margin: 16px 0 24px;
  color: var(--surface);
  background: linear-gradient(135deg, var(--brand-deep), var(--brand));
  font-variant-numeric: tabular-nums;
}
.fake-card .digits {
  font-size: 1.375rem;
  letter-spacing: 0.08em;
  margin: 24px 0 8px;
}

/* ---------- sent vouchers ---------- */

.voucher-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.voucher-row {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 18px;
}
.voucher-row header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}
.meter {
  display: block;
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: var(--wash);
  overflow: hidden;
  margin: 10px 0 6px;
}
.meter .spent { fill: var(--brand); }
.meter .left { fill: var(--accent); }
.meter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  font-size: 0.875rem;
  color: var(--muted);
}
.key {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: baseline;
}
.key.spent { background: var(--brand); }
.key.left { background: var(--accent); }

/* ---------- landing ---------- */

.hero {
  background: var(--brand-deep);
  color: var(--surface);
  overflow: hidden;
}
.hero .bar {
  background: transparent;
  border-bottom-color: color-mix(in srgb, var(--surface) 14%, transparent);
}
.hero .bar nav a { color: var(--surface); }
.hero .bar nav a:hover,
.hero .bar nav a:focus-visible {
  background: color-mix(in srgb, var(--surface) 12%, transparent);
  color: var(--surface);
}
.hero-inner {
  display: grid;
  gap: 40px;
  align-items: center;
  padding-top: 48px;
  padding-bottom: 64px;
}
.hero .eyebrow {
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
}
.hero p.lead {
  font-size: 1.1875rem;
  color: color-mix(in srgb, var(--surface) 86%, var(--brand-deep));
  max-width: 34em;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* A phone showing change landing: drawn in CSS, no screenshots. */
.phone {
  justify-self: center;
  width: min(300px, 86vw);
  border-radius: 36px;
  padding: 14px;
  background: var(--ink);
  box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--ink) 70%, transparent);
}
.phone-screen {
  border-radius: 26px;
  background: var(--surface);
  color: var(--ink);
  padding: 22px 18px 26px;
}
.phone-screen .label { color: var(--muted); font-size: 0.875rem; margin: 18px 0 0; }
.phone-screen .balance { font-size: 2.25rem; font-weight: 800; margin: 0 0 14px; }
.landed {
  border-radius: 16px;
  padding: 14px 16px;
  background: var(--accent);
  color: var(--brand-deep);
  font-weight: 800;
  font-size: 1.125rem;
}
.landed span {
  display: block;
  font-weight: 400;
  font-size: 0.875rem;
}
.phone-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}
.phone-row:last-child { border-bottom: 0; }

.section {
  padding: 64px 0 0;
}
.section-head {
  max-width: 40em;
  margin-bottom: 28px;
}
.steps {
  display: grid;
  gap: 16px;
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}
.steps li {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 20px;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  margin-bottom: 14px;
  background: var(--brand);
  color: var(--surface);
  font-weight: 800;
}
.places {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.place {
  border-radius: 20px;
  padding: 20px;
  background: var(--soft-brand);
  color: var(--brand-deep);
}
.place p { margin: 0; }
.band {
  margin-top: 64px;
  padding: 48px 0;
  background: var(--accent);
  color: var(--brand-deep);
}
.band-inner {
  display: grid;
  gap: 28px;
  align-items: center;
}
.band .btn { background: var(--brand-deep); color: var(--surface); }
.band ul {
  margin: 0 0 8px;
  padding-left: 1.2em;
}
.split {
  display: grid;
  gap: 24px;
}
.panel {
  border-radius: 20px;
  padding: 28px 24px;
  border: 1px solid var(--line);
}
.panel.dark {
  background: var(--brand-deep);
  color: var(--surface);
  border-color: var(--brand-deep);
}
.panel.dark .muted { color: color-mix(in srgb, var(--surface) 78%, var(--brand-deep)); }

@media (min-width: 760px) {
  .hero-inner { grid-template-columns: 1.15fr 0.85fr; padding-top: 64px; padding-bottom: 88px; }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .band-inner { grid-template-columns: 1.3fr 0.7fr; }
  .split { grid-template-columns: 1fr 1fr; }
  .card { padding: 32px 28px; }
}

.flush { margin: 0; }
.gap-above { margin-top: 20px; }
.gap-below { margin-bottom: 20px; }

@media (max-width: 479px) {
  .wide-only { display: none; }
}
