/* Tupana: the public page of tupana.pe.
   The page is one cloth. Night of the puna at the top and at the bottom, the
   sun of the symbol, the turquoise of its lagoons and the red of the woven
   bands; in between, fields of undyed cream parted by stepped edges, as a
   manta is parted by its bands. The middle follows the light or dark setting
   of the phone; the night sections are always night.

   Everything is counted on a loom: warp-faced surfaces (threads running up),
   stepped corners, rhombuses for marks, the eye border under each title.
   Colours after natural dyes: q'olle yellow, cochineal red, indigo night. */

:root {
  --noche: #001123;
  --noche-2: #001934;
  --noche-3: #082645;
  --noche-4: #10314f;
  --inti: #ffc400;
  --qocha: #02cfcb;
  --puka: #e0465a;
  --nieve: #e4f7f7;

  --page: #fbf7ef;
  --surface: #ffffff;
  --raised: #f4ede0;
  --ink: #001934;
  --muted: #4a596c;
  --line: #e3d9c6;
  --link: #007d85;
  --accent-ink: #9b233a;
  --thread: #eda800;
  --warp: rgba(0, 25, 52, 0.035);

  --gutter: 16px;
  --max: 1120px;
  /* The typeface of the Tupana wordmark and of both apps. */
  --display: "Plus Jakarta Sans", "Avenir Next", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  /* A corner counted in two steps, and a rhombus counted in three. */
  --s1: 6px;
  --s2: 12px;
  --stepped: polygon(0 var(--s2), var(--s1) var(--s2), var(--s1) var(--s1), var(--s2) var(--s1), var(--s2) 0,
    calc(100% - var(--s2)) 0, calc(100% - var(--s2)) var(--s1), calc(100% - var(--s1)) var(--s1),
    calc(100% - var(--s1)) var(--s2), 100% var(--s2), 100% calc(100% - var(--s2)),
    calc(100% - var(--s1)) calc(100% - var(--s2)), calc(100% - var(--s1)) calc(100% - var(--s1)),
    calc(100% - var(--s2)) calc(100% - var(--s1)), calc(100% - var(--s2)) 100%, var(--s2) 100%,
    var(--s2) calc(100% - var(--s1)), var(--s1) calc(100% - var(--s1)), var(--s1) calc(100% - var(--s2)),
    0 calc(100% - var(--s2)));
  --rhombus: polygon(50% 0, 66% 0, 66% 17%, 83% 17%, 83% 34%, 100% 34%, 100% 66%, 83% 66%, 83% 83%,
    66% 83%, 66% 100%, 34% 100%, 34% 83%, 17% 83%, 17% 66%, 0 66%, 0 34%, 17% 34%, 17% 17%, 34% 17%, 34% 0);
  --peak: polygon(0 100%, 0 75%, 12.5% 75%, 12.5% 50%, 25% 50%, 25% 25%, 37.5% 25%, 37.5% 0, 62.5% 0,
    62.5% 25%, 75% 25%, 75% 50%, 87.5% 50%, 87.5% 75%, 100% 75%, 100% 100%);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #001123;
    --surface: #082645;
    --raised: #06203c;
    --ink: #f3f8fc;
    --muted: #bacadb;
    --line: #29445d;
    --link: #02cfcb;
    --accent-ink: #ffb6c4;
    --thread: #ffc400;
    --warp: rgba(255, 255, 255, 0.03);
  }
}

:root[data-theme="dark"] {
  --page: #001123;
  --surface: #082645;
  --raised: #06203c;
  --ink: #f3f8fc;
  --muted: #bacadb;
  --line: #29445d;
  --link: #02cfcb;
  --accent-ink: #ffb6c4;
  --thread: #ffc400;
  --warp: rgba(255, 255, 255, 0.03);
}

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

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  margin: 0;
  /* Warp-faced cloth: fine threads running up. */
  background: var(--page) repeating-linear-gradient(90deg, var(--warp) 0 1px, transparent 1px 4px);
  color: var(--ink);
  font: 500 17px/1.6 var(--display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--link);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--inti);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  font-family: var(--display);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

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

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--inti);
  color: var(--noche);
  padding: 8px 14px;
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  left: 8px;
}

/* ---------- Night ----------
   Wherever the cloth is night, the same words are read in its colours. */

.night {
  --ink: #f3f8fc;
  --muted: #bacadb;
  --line: #29445d;
  --surface: rgba(228, 247, 247, 0.07);
  --link: #02cfcb;
  --accent-ink: #ffb6c4;
  --thread: #ffc400;
  position: relative;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    radial-gradient(1200px 520px at 78% 18%, rgba(255, 196, 0, 0.13), transparent 60%),
    /* Mayu, the river of stars, crossing the sky. */
    linear-gradient(118deg, transparent 24%, rgba(2, 207, 203, 0.05) 40%, rgba(228, 247, 247, 0.05) 47%, transparent 62%),
    linear-gradient(180deg, var(--noche) 0%, var(--noche-2) 46%, var(--noche-3) 100%);
  color: var(--ink);
  overflow: hidden;
  isolation: isolate;
}

.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.stars path {
  fill: #f3f8fc;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

/* The Loraypu mark with the name beside it, as TupanaBrand draws it in the apps. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font: 700 22px/1 var(--display);
  letter-spacing: -0.01em;
}

.brand img {
  width: 36px;
  height: 36px;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 15px;
}

.top nav a {
  color: #d6e3ee;
  text-decoration: none;
}

.top nav a:hover {
  color: #ffffff;
}

.top nav .nav-links {
  display: none;
  gap: 24px;
}

.button {
  --s1: 4px;
  --s2: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  font: 700 16px/1.2 var(--display);
  text-decoration: none;
  border: 0;
  clip-path: var(--stepped);
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.button:hover {
  transform: translateY(-2px);
}

/* The clipped corners would cut an outer focus ring: draw it inside. */
.button:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 3px var(--noche);
}

.button-sun {
  background: var(--inti);
  color: var(--noche);
}

.button-sun:hover {
  background: #ffd23d;
}

/* A stepped button cannot keep a thin outline at its corners: it is filled. */
.button-ghost {
  background: #1b3a5e;
  color: #f3f8fc;
}

.button-ghost:hover {
  background: #0b5c6e;
}

.button-ghost:focus-visible {
  box-shadow: inset 0 0 0 3px var(--inti);
}

.button-small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 15px;
}

.top nav .button {
  color: var(--noche);
}

/* ---------- Hero ---------- */

.hero {
  padding-top: 32px;
  padding-bottom: 8px;
}

.eyebrow,
.kicker {
  margin: 0 0 14px;
  font: 700 13px/1.3 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--qocha);
}

.kicker {
  color: var(--accent-ink);
}

/* Small stepped rhombuses instead of lines and dots. */
.eyebrow::before,
.kicker::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 10px;
  vertical-align: -1px;
  background: var(--inti);
  clip-path: var(--rhombus);
}

.kicker::before {
  background: var(--puka);
}

.hero h1 {
  /* One line down to a 320 px phone: the word is the brand. */
  font-size: clamp(1.7rem, 9.6vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.hero h1 .meaning {
  display: block;
  margin-top: 12px;
  font-size: clamp(1.25rem, 3.4vw, 2.1rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--inti);
}

.hero .lead {
  max-width: 37rem;
  margin: 24px 0 0;
  font-size: 1.12rem;
  color: #d6e3ee;
}

.hero .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.soon {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: 6px 20px;
  /* Solid: the mountains pass behind it on a wide screen. */
  background: #10294a;
  font-family: var(--display);
  line-height: 1.2;
  clip-path: var(--stepped);
}

.soon small {
  font-size: 12px;
  color: #bacadb;
}

.soon strong {
  font-size: 16px;
  font-weight: 700;
}

.landscape {
  width: 100%;
  /* Cropped at the sides on a phone, so the meeting stays large. */
  height: clamp(210px, 34vw, 440px);
  margin-top: 8px;
}

/* The landscape is counted on a loom: no smoothing on its steps. */
.woven {
  shape-rendering: crispEdges;
}

.landscape text {
  font: 700 16px var(--display);
}

.landscape .tu {
  fill: #7fe6e3;
}

.landscape .aliado {
  fill: #ffd95c;
}

.landscape .dicho {
  font-size: 13px;
  fill: #001934;
}

/* ---------- The woven bands ---------- */

/* Ñawi awapa: the eye border that finishes an Andean cloth. */
.tejido {
  height: 30px;
  background: url("awapa.svg") repeat-x center / 24px 30px;
  image-rendering: pixelated;
}

/* A band of pallay: a loraypu in each repeat, between red rhombuses. */
.tejido-tall {
  height: 48px;
  background: url("pallay.svg") repeat-x center / 48px 48px;
}

/* Where two fields of the cloth meet, the upper one steps down into the
   lower one, as the edge of a terrace: --from is the colour that steps in. */
.edge-top,
.edge-bottom {
  position: relative;
}

.edge-top::before,
.edge-bottom::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 16px;
  -webkit-mask: url("escalera.svg") repeat-x 50% 0 / 32px 16px;
  mask: url("escalera.svg") repeat-x 50% 0 / 32px 16px;
  pointer-events: none;
}

.edge-top::before {
  top: -1px;
  background: var(--from, var(--page));
}

.edge-bottom::after {
  bottom: -1px;
  background: var(--to, var(--page));
  transform: scaleY(-1);
}

.from-raised {
  --from: var(--raised);
}

.to-raised {
  --to: var(--raised);
}

/* The selvedge: on a wide screen the cloth shows its border on both sides. */
body::before,
body::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  background: url("awapa-vertical.svg") repeat-y center top / 10px 8px;
  image-rendering: pixelated;
  pointer-events: none;
  z-index: 6;
  display: none;
}

body::before {
  left: 0;
}

body::after {
  right: 0;
}

/* ---------- Sections ---------- */

section {
  padding: 76px 0;
}

.sand {
  background: var(--raised) repeating-linear-gradient(90deg, var(--warp) 0 1px, transparent 1px 4px);
}

.section-head {
  max-width: 42rem;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* The eye border under every section title. */
.section-head h2::after {
  content: "";
  display: block;
  width: 120px;
  height: 15px;
  margin-top: 18px;
  background: url("awapa.svg") repeat-x left / 12px 15px;
  image-rendering: pixelated;
}

.section-head p:not(.kicker) {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

/* ---------- The vision ---------- */

.vision-grid {
  display: grid;
  gap: 4px 64px;
}

.vision .section-head {
  margin-bottom: 28px;
}

.vision h2 {
  font-size: clamp(2.4rem, 7.4vw, 4.4rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.vision h2 em {
  font-style: normal;
  color: var(--accent-ink);
}

.manifesto p {
  margin: 0;
}

.manifesto .big {
  font: 600 clamp(1.3rem, 2.5vw, 1.7rem) / 1.38 var(--display);
  letter-spacing: -0.015em;
}

.manifesto p + p {
  margin-top: 20px;
  color: var(--muted);
  font-size: 1.08rem;
}

/* Three threads of the same cloth, parted by a line of stitches. */
.pillars {
  list-style: none;
  margin: 52px 0 0;
  padding: 0;
  display: grid;
}

.pillars li {
  padding: 30px 0;
  border-top: 2px dashed var(--line);
}

.pillars li:last-child {
  padding-bottom: 0;
}

.pillars h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.pillars p {
  margin: 10px 0 0;
  color: var(--muted);
}

.glyph {
  position: relative;
  display: block;
  width: 44px;
  height: 44px;
  margin-bottom: 20px;
}

.glyph::before,
.glyph::after {
  content: "";
  position: absolute;
  clip-path: var(--rhombus);
}

/* Four ways out from where you stand: you, turquoise, at the centre. */
.glyph-ways::before {
  inset: 0;
  background: var(--inti);
  clip-path: path("M18 0h8v4h4v4h-4v6h-8v-6h-4v-4h4zM18 44h8v-4h4v-4h-4v-6h-8v6h-4v4h4zM0 18v8h4v4h4v-4h6v-8h-6v-4h-4v4zM44 18v8h-4v4h-4v-4h-6v-8h6v-4h4v4z");
}

.glyph-ways::after {
  inset: 16px;
  background: var(--qocha);
  clip-path: none;
}

/* Two that meet: the partner, yellow; the passenger, turquoise. */
.glyph-pair {
  width: 70px;
}

.glyph-pair::before,
.glyph-pair::after {
  top: 0;
  width: 44px;
  height: 44px;
}

.glyph-pair::before {
  left: 0;
  background: var(--inti);
}

.glyph-pair::after {
  right: 0;
  background: var(--qocha);
  opacity: 0.88;
}

/* A mountain counted in steps, with its sun. */
.glyph-peak {
  width: 58px;
}

.glyph-peak::before {
  inset: 8px 0 0;
  background: var(--puka);
  clip-path: var(--peak);
}

.glyph-peak::after {
  top: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background: var(--inti);
}

/* ---------- Figures: a belt across the cloth ---------- */

.cifras {
  padding: 58px 0 60px;
}

.cifras ul {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px 20px;
}

.cifras strong {
  display: block;
  font: 800 clamp(2.1rem, 9vw, 3.6rem) / 1 var(--display);
  letter-spacing: -0.035em;
  color: var(--inti);
  white-space: nowrap;
}

.cifras li:last-child strong {
  color: var(--qocha);
}

.cifras span {
  display: block;
  max-width: 15rem;
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.45;
  color: var(--muted);
}

/* ---------- Steps: three knots on one thread ---------- */

.steps {
  position: relative;
  display: grid;
  gap: 36px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* On a phone the thread runs down, from each knot to the next. */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 26px;
  top: 50px;
  bottom: -38px;
  width: 3px;
  margin-left: -1.5px;
  background: repeating-linear-gradient(180deg, var(--thread) 0 10px, transparent 10px 17px);
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 52px 1fr;
  column-gap: 20px;
}

.step-mark {
  grid-row: span 2;
  width: 52px;
  height: 52px;
}

.step h3 {
  padding-top: 4px;
  font-size: 1.4rem;
  font-weight: 700;
}

.step p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* ---------- Riders and partners ---------- */

.cards {
  display: grid;
  gap: 20px;
}

.card {
  position: relative;
  padding: 36px 28px 34px;
  background: var(--surface);
  clip-path: var(--stepped);
}

/* A line of stitches along the hem of each piece. */
.card::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px dashed var(--line);
  pointer-events: none;
}

.card-night {
  --line: rgba(255, 196, 0, 0.3);
  --muted: #bacadb;
  background:
    radial-gradient(420px 220px at 100% 0%, rgba(2, 207, 203, 0.2), transparent 70%),
    var(--noche-2);
  color: #f3f8fc;
}

.card .who {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.card .who img {
  width: 56px;
  height: 56px;
}

.card h3 {
  font-size: 1.65rem;
  font-weight: 800;
}

.card .tagline {
  margin: 4px 0 0;
  color: var(--muted);
}

.ticks {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 13px;
}

.ticks li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  align-items: start;
}

.ticks li::before {
  content: "";
  width: 13px;
  height: 13px;
  margin-top: 7px;
  background: var(--qocha);
  clip-path: var(--rhombus);
}

.card-night .ticks li::before {
  background: var(--inti);
}

.ticks strong {
  font-weight: 700;
}

.card .button {
  position: relative;
  z-index: 1;
  margin-top: 28px;
}

.card-night .note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--muted);
}

.fine {
  margin: 20px 0 0;
  font-size: 15px;
  color: var(--muted);
}

/* ---------- The first stretch: Espinar ---------- */

.tramo {
  padding-top: 92px;
  padding-bottom: 92px;
}

.province {
  display: grid;
  gap: 32px;
  align-items: center;
}

.tramo .lema {
  margin: 22px 0 0;
  font: 700 1.25rem/1.35 var(--display);
  letter-spacing: -0.01em;
  color: var(--inti);
}

.places {
  --s1: 3px;
  --s2: 6px;
  list-style: none;
  margin: 26px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.places li {
  padding: 6px 14px;
  background: var(--surface);
  font-size: 15px;
  font-weight: 600;
  clip-path: var(--stepped);
}

.province-map {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  background: radial-gradient(closest-side, rgba(2, 207, 203, 0.16), transparent);
}

/* The threads of the network, yellow as in the mark: all joined to all. */
.province-map .route {
  fill: none;
  stroke: var(--inti);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-dasharray: 1 6;
  opacity: 0.7;
}

/* Threads that leave the province: where the cloth goes on. */
.province-map .beyond {
  fill: none;
  stroke: var(--inti);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 9 8;
}

/* Each place a stepped rhombus with its eye, as in pallay, and all the same
   size: none of them is the centre. */
.province-map .town,
.province-map .town-eye {
  shape-rendering: crispEdges;
}

.province-map .town {
  fill: var(--qocha);
}

.province-map .town-eye {
  fill: var(--noche-2);
}

/* A dark edge keeps the names readable over the threads. */
.province-map text {
  font: 700 19px var(--display);
  fill: #e4f7f7;
  paint-order: stroke;
  stroke: var(--noche-2);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.province-map .sub {
  font: 500 14px var(--display);
  fill: #9fb3c6;
}

@media (max-width: 719px) {
  .province-map text {
    font-size: 24px;
  }

  .province-map .sub {
    font-size: 18px;
    transform: translateY(7px);
  }
}

/* ---------- Trust ---------- */

.trust {
  display: grid;
  gap: 20px;
}

.trust article {
  position: relative;
  padding: 28px 24px 28px 46px;
  background: var(--surface);
  clip-path: var(--stepped);
}

/* Each one hangs from a strip of the eye border. */
.trust article::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 20px;
  background: url("awapa-vertical.svg") repeat-y center top / 20px 16px;
  image-rendering: pixelated;
}

.trust h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.trust p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* ---------- The word ---------- */

/* The closing word over a faint cloth of loraypu. */
.word {
  padding: 92px 0 84px;
  text-align: center;
  background:
    linear-gradient(rgba(0, 17, 35, 0.9), rgba(0, 17, 35, 0.94)),
    url("pallay.svg") center / 96px 96px;
  image-rendering: pixelated;
}

.word .symbol {
  width: 132px;
  height: 132px;
  margin: 0 auto 26px;
  image-rendering: auto;
}

.word blockquote {
  margin: 0 auto;
  max-width: 44rem;
}

.word blockquote .q {
  margin: 0;
  max-width: none;
  font: 800 clamp(1.7rem, 9.6vw, 4.8rem) / 1.05 var(--display);
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.word .q span {
  color: var(--qocha);
}

.word p {
  margin: 20px auto 0;
  max-width: 35rem;
  font-size: 1.12rem;
  color: #d6e3ee;
}

.word .logo-meaning {
  margin-top: 24px;
  font-size: 15px;
  color: var(--qocha);
}

.join {
  margin-top: 64px;
}

.join h2 {
  font-size: clamp(1.7rem, 4.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.join .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}

/* ---------- Footer ---------- */

.foot {
  padding: 52px 0 40px;
  color: #bacadb;
  font-size: 15px;
}

.foot a {
  color: #e4f7f7;
}

.foot-grid {
  display: grid;
  gap: 30px;
}

.foot-brand .brand img {
  width: 32px;
  height: 32px;
}

.foot-brand p {
  margin: 14px 0 0;
  max-width: 22rem;
}

.foot h2 {
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--qocha);
}

.foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
}

.legal {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 2px dashed var(--noche-4);
  font-size: 13px;
  display: grid;
  gap: 4px;
}

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  :root {
    --gutter: 28px;
  }

  .top nav .nav-links {
    display: flex;
  }

  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .pillars li,
  .pillars li:last-child {
    padding: 6px 30px 8px;
    border-top: 0;
    border-left: 2px dashed var(--line);
  }

  .pillars li:first-child {
    padding-left: 0;
    border-left: 0;
  }

  .cifras ul {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }

  .cifras strong {
    font-size: clamp(2.1rem, 4.6vw, 3.6rem);
  }

  /* The thread now runs across, through the three knots and on. */
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
  }

  .steps::before {
    content: "";
    position: absolute;
    left: 26px;
    right: 0;
    top: 26px;
    height: 3px;
    margin-top: -1.5px;
    background: repeating-linear-gradient(90deg, var(--thread) 0 10px, transparent 10px 17px);
    -webkit-mask: linear-gradient(90deg, #000 82%, transparent);
    mask: linear-gradient(90deg, #000 82%, transparent);
  }

  .step:not(:last-child)::before {
    content: none;
  }

  .step {
    display: block;
  }

  .step h3 {
    padding-top: 24px;
  }

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

  .card {
    padding: 46px 40px 42px;
  }

  .trust {
    grid-template-columns: repeat(3, 1fr);
  }

  .foot-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr;
  }
}

@media (min-width: 960px) {
  section {
    padding: 112px 0;
  }

  .cifras {
    padding: 72px 0 74px;
  }

  .tramo {
    padding: 128px 0;
  }

  .hero {
    padding-top: 60px;
  }

  .hero .lead {
    font-size: 1.22rem;
  }

  /* The mountains rise behind the end of the text, so the meeting shows
     on the first screen. */
  .landscape {
    position: relative;
    z-index: -1;
    margin-top: -130px;
  }

  .vision-grid {
    grid-template-columns: 5fr 6fr;
    align-items: start;
  }

  .vision .section-head {
    margin-bottom: 0;
  }

  .manifesto {
    padding-top: 34px;
  }

  .pillars {
    margin-top: 76px;
  }

  .province {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }
}

@media (min-width: 1180px) {
  body::before,
  body::after {
    display: block;
  }
}

/* ---------- Movement ---------- */

@media (prefers-reduced-motion: no-preference) {
  /* Stitches move along their thread, as if being sewn. */
  .stitch {
    animation: sew 2.4s linear infinite;
  }

  /* The partner drives to the passenger and both go on to the plaza: the
     still picture of their meeting is for those who asked for no movement. */
  .quieto {
    display: none;
  }

  .stars .twinkle {
    animation: twinkle 4s ease-in-out infinite alternate;
  }

  .stars .twinkle:nth-child(3n) {
    animation-delay: 1.3s;
  }

  .stars .twinkle:nth-child(3n + 1) {
    animation-delay: 2.4s;
  }

  .province-map .beyond {
    animation: sew 3.4s linear infinite;
  }

  .lluvia {
    animation: rain 0.55s linear infinite;
  }

  /* Each piece rises into place as it enters the screen, where the browser
     can tie an animation to the scroll; elsewhere it is simply there. */
  @supports (animation-timeline: view()) {
    .section-head,
    .manifesto,
    .pillars li,
    .cifras li,
    .step,
    .card,
    .trust article,
    .province-map,
    .join {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 38%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .vivo {
    display: none;
  }
}

@keyframes sew {
  to {
    stroke-dashoffset: -34;
  }
}

@keyframes rain {
  to {
    stroke-dashoffset: -15;
  }
}

@keyframes twinkle {
  from {
    opacity: 0.25;
  }

  to {
    opacity: 0.9;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
}
