/* SwiftPass — Zafrionet Ltd
   One stylesheet, four pages. Tokens first, then layout, then the two page
   shapes: the landing page and the legal document. */

/* ---------------------------------------------------------------- tokens */

:root {
  --bone: #edede8;
  --bone-deep: #e2e2db;
  --ink: #0e1512;
  --jade: #12564a;
  --jade-light: #1b7b69;
  --pulse: #d8366f;
  --slate: #5a6560;
  --rule: #cfcfc6;

  --measure: 66ch;
  --gutter: clamp(1.25rem, 5vw, 4rem);

  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.4rem);
  --step-4: clamp(2.6rem, 1.6rem + 4.6vw, 5.6rem);
}

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

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

body {
  margin: 0;
  background: var(--bone);
  color: var(--ink);
  font-family: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Archivo', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  font-stretch: 112%;
}

p { margin: 0 0 1em; max-width: var(--measure); }

a {
  color: var(--jade);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover { color: var(--pulse); }

:focus-visible {
  outline: 3px solid var(--pulse);
  outline-offset: 3px;
}

.wrap {
  max-width: 78rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 20;
  background: var(--ink);
  color: var(--bone);
  padding: 0.6rem 1rem;
  border-radius: 2px;
}

/* ------------------------------------------------------------------ nav */

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--rule);
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.mark svg { display: block; }

.nav a:not(.mark) {
  font-size: var(--step--1);
  color: var(--slate);
  text-decoration: none;
}
.nav a:not(.mark):hover { color: var(--ink); }

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

.hero {
  display: grid;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
  padding-block: clamp(3rem, 9vw, 7rem) clamp(3rem, 8vw, 6rem);
}
@media (min-width: 56rem) {
  .hero { grid-template-columns: 1.1fr 0.9fr; }
}

.hero h1 {
  font-size: var(--step-4);
  max-width: 12ch;
}

.hero .lede {
  font-size: var(--step-1);
  color: var(--slate);
  max-width: 34ch;
  margin-top: 1.4rem;
  line-height: 1.45;
}

.hero-meta {
  margin-top: 2rem;
  font-size: var(--step--1);
  color: var(--slate);
  max-width: 38ch;
}

/* The tap. One motion moment on load, then still. */

.tap {
  aspect-ratio: 1;
  width: 100%;
  max-width: 26rem;
  margin-inline: auto;
}
.tap circle[data-ring] {
  /* Matches cy=118 in the SVG, so the signal leaves the chip module rather
     than the middle of the artboard. */
  transform-origin: 50% 59%;
  opacity: 0;
  animation: ping 3.6s cubic-bezier(0.16, 0.8, 0.3, 1) infinite;
}
.tap circle[data-ring='2'] { animation-delay: 1.2s; }
.tap circle[data-ring='3'] { animation-delay: 2.4s; }

@keyframes ping {
  0% { transform: scale(0.28); opacity: 0; }
  14% { opacity: 0.85; }
  100% { transform: scale(1); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .tap circle[data-ring] { animation: none; opacity: 0.3; }
  * { transition: none !important; }
}

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

.section {
  padding-block: clamp(3rem, 8vw, 6rem);
  border-top: 1px solid var(--rule);
}

.section > h2 {
  font-size: var(--step-3);
  max-width: 18ch;
  margin-bottom: 2.5rem;
}

/* Steps. Numbered because this genuinely is a sequence: a person cannot tap
   before they have topped up, and cannot top up before they have a band. */

.steps {
  display: grid;
  gap: 2.5rem;
  counter-reset: step;
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 3rem; }
}

.step { counter-increment: step; }
.step::before {
  content: counter(step);
  display: block;
  font-family: 'Archivo', sans-serif;
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--pulse);
  font-stretch: 125%;
  margin-bottom: 0.6rem;
}
.step h3 { font-size: var(--step-1); margin-bottom: 0.5rem; }
.step p { color: var(--slate); font-size: var(--step--1); margin: 0; }

/* Two-audience split */

.split {
  display: grid;
  gap: 2.5rem;
}
@media (min-width: 52rem) {
  .split { grid-template-columns: 1fr 1fr; gap: 4rem; }
}

.panel h3 {
  font-size: var(--step-2);
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 3px solid var(--jade);
}
.panel ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.panel li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--step--1);
  color: var(--slate);
}
.panel li strong { color: var(--ink); font-weight: 600; }

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

.footer {
  background: var(--ink);
  color: var(--bone);
  padding-block: clamp(2.5rem, 6vw, 4rem);
  margin-top: clamp(3rem, 8vw, 6rem);
}
.footer a { color: var(--bone); }
.footer a:hover { color: var(--pulse); }

.footer-grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.footer h2 {
  font-size: var(--step-1);
  margin-bottom: 0.6rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { padding: 0.3rem 0; font-size: var(--step--1); }
.footer .fine {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(237, 237, 232, 0.18);
  font-size: var(--step--1);
  color: rgba(237, 237, 232, 0.6);
  max-width: none;
}

/* ------------------------------------------------------------- document */

.doc {
  display: grid;
  gap: 3rem;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}
@media (min-width: 62rem) {
  .doc {
    grid-template-columns: 16rem 1fr;
    gap: 5rem;
    align-items: start;
  }
}

.doc-head { grid-column: 1 / -1; }
.doc-head h1 {
  font-size: var(--step-3);
  max-width: 20ch;
}
.doc-head .stamp {
  margin-top: 1rem;
  font-size: var(--step--1);
  color: var(--slate);
}

.toc { font-size: var(--step--1); }
@media (min-width: 62rem) {
  .toc { position: sticky; top: 2rem; }
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: toc;
}
.toc li { counter-increment: toc; }
.toc a {
  display: block;
  padding: 0.4rem 0 0.4rem 2rem;
  position: relative;
  text-decoration: none;
  color: var(--slate);
  border-left: 2px solid var(--rule);
}
.toc a::before {
  content: counter(toc);
  position: absolute;
  left: 0.75rem;
  color: var(--rule);
  font-variant-numeric: tabular-nums;
}
.toc a:hover { color: var(--ink); border-left-color: var(--pulse); }

.prose { counter-reset: sec; }
.prose h2 {
  counter-increment: sec;
  font-size: var(--step-2);
  margin-top: 3rem;
  margin-bottom: 1rem;
  scroll-margin-top: 2rem;
}
.prose h2::before {
  content: counter(sec) '. ';
  color: var(--pulse);
}
.prose > h2:first-child { margin-top: 0; }
.prose h3 {
  font-size: var(--step-1);
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
}
.prose ul { max-width: var(--measure); padding-left: 1.2rem; }
.prose li { margin-bottom: 0.5rem; }
.prose table {
  width: 100%;
  max-width: var(--measure);
  border-collapse: collapse;
  margin: 1.2rem 0 1.6rem;
  font-size: var(--step--1);
}
.prose th,
.prose td {
  text-align: left;
  padding: 0.7rem 0.9rem 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
.prose th {
  font-weight: 600;
  border-bottom-width: 2px;
  border-bottom-color: var(--ink);
}

.callout {
  border-left: 3px solid var(--jade);
  background: var(--bone-deep);
  padding: 1.1rem 1.3rem;
  margin: 1.5rem 0;
  max-width: var(--measure);
}
.callout p:last-child { margin-bottom: 0; }
.callout.warn { border-left-color: var(--pulse); }

.contact-card {
  border: 2px solid var(--ink);
  padding: 1.4rem 1.5rem;
  margin: 2rem 0;
  max-width: var(--measure);
}
.contact-card p:last-child { margin-bottom: 0; }

/* Deletion route, used on the delete-account page. A sequence again. */

.route {
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
  counter-reset: route;
  max-width: var(--measure);
}
.route li {
  counter-increment: route;
  position: relative;
  padding: 0 0 1.4rem 3.2rem;
  border-left: 2px solid var(--rule);
  margin-left: 1rem;
}
.route li:last-child { border-left-color: transparent; padding-bottom: 0; }
.route li::before {
  content: counter(route);
  position: absolute;
  left: -1.05rem;
  top: -0.1rem;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  background: var(--jade);
  color: var(--bone);
  border-radius: 50%;
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
}
.route strong { display: block; font-size: var(--step-0); }
.route span { color: var(--slate); font-size: var(--step--1); }