/* topozy.app. One stylesheet, system fonts, no script. The colours are the app icon's (app/assets/brand/): the sunrise
   sky, the slate of the peak, the red of the map's trails. The site is served with a Content-Security-Policy that
   allows this file and the site's own pictures, and nothing else: no inline style anywhere in the pages. */

:root {
  --ink: #2c3740;
  --slate: #4b5d6c;
  --muted: #56626b;
  --paper: #fffdf9;
  --tint: #f8f2e8;
  --line: #e6dccd;
  --sky-top: #f6c99c;
  --sky-mid: #f8e6cf;
  --sky-low: #f6f1e6;
  --sun: #f19a4f;
  --trail: #e3241c;
  --trail-ink: #b81d15;
  --ok: #2c7a4b;
  --radius: 14px;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

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

img {
  height: auto;
}

a {
  color: var(--trail-ink);
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--trail);
}

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

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.2rem, 5.4vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  font-weight: 800;
}

h3 {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0;
}

p {
  margin: 0;
}

p + p,
ul + p,
p + ul,
.table + p,
p + .table,
dl + p {
  margin-top: 0.9em;
}

.wrap {
  width: min(100% - 2.5rem, 70rem);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -999rem;
  top: 0.75rem;
  z-index: 10;
  background: #fff;
  color: var(--ink);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 700;
}

.skip:focus {
  left: 0.75rem;
}

/* The top bar */

.top {
  background: var(--sky-top);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.8rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand img,
.foot-brand img {
  border-radius: 22%;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.top-nav a {
  color: var(--ink);
  text-decoration: none;
}

.top-nav a:hover,
.top-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--trail);
}

/* The language menu: the page's language in a pill and, opened, the other languages under it (a <details>: no script).
   Twenty-four of them, so in two columns read downwards, the app's order: one column was taller than a phone's screen. */

.lang-menu {
  position: relative;
}

.lang-menu summary {
  padding: 0.3rem 0.8rem;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  cursor: pointer;
  list-style: none;
}

.lang-menu summary::-webkit-details-marker {
  display: none;
}

.lang-menu summary::after {
  content: "";
  display: inline-block;
  width: 0.38em;
  height: 0.38em;
  margin-left: 0.5em;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-0.2em) rotate(45deg);
}

.lang-menu[open] summary::after {
  transform: translateY(0.05em) rotate(225deg);
}

.lang-menu summary:hover,
.lang-menu[open] summary {
  background: var(--ink);
  color: #fff;
}

.lang-menu ul {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 10;
  width: 20rem;
  max-width: calc(100vw - 2rem);
  columns: 2;
  column-gap: 0;
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(44, 55, 64, 0.16);
}

.lang-menu li {
  break-inside: avoid;
}

.lang-menu li a {
  display: block;
  padding: 0.45rem 1rem;
}

.lang-menu li a:hover {
  background: var(--tint);
  text-decoration: none;
}

/* Korean breaks lines between words, never inside one; Japanese and Chinese break between characters, as written. */

:lang(ko) {
  word-break: keep-all;
}

/* The hero: the icon's sky, the first picture in front of its sun, far ridges along the bottom */

.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 58%, var(--sky-low) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: clamp(5rem, 13vw, 10rem);
  background: url("/assets/ridge.svg") center bottom / max(100%, 60rem) 100% no-repeat;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(1.5rem, 4vw, 3rem) clamp(3.5rem, 8vw, 6rem);
}

.soon {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero h1 {
  margin-top: 1.1rem;
}

.lead {
  font-size: clamp(1.15rem, 2vw, 1.35rem);
  line-height: 1.5;
  margin-top: 1.1rem;
  max-width: 34rem;
}

.status {
  margin-top: 1.1rem;
  color: var(--slate);
  font-size: 1rem;
  max-width: 34rem;
}

/* A phone screen: the app's own screen, cut below the status bar */

.phone {
  position: relative;
  margin: 0;
  isolation: isolate;
}

.phone img {
  width: 100%;
  max-width: 19rem;
  margin-inline: auto;
  border: 0.42rem solid var(--ink);
  border-radius: 1.9rem;
  background: var(--ink);
  box-shadow: 0 1.6rem 2.6rem -1.4rem rgb(44 55 64 / 0.55);
}

.phone figcaption {
  max-width: 19rem;
  margin: 0.8rem auto 0;
  text-align: center;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--muted);
}

.hero .phone::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 3%;
  width: min(118%, 26rem);
  aspect-ratio: 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--sun);
  opacity: 0.85;
}

.hero .phone figcaption {
  color: var(--slate);
}

/* Sections */

.band {
  padding-block: clamp(3rem, 7vw, 5.5rem);
}

.tinted {
  background: var(--tint);
}

.band h2::after {
  content: "";
  display: block;
  width: 4.2rem;
  margin-top: 0.7rem;
  border-top: 4px dashed var(--trail);
}

.intro {
  max-width: 46rem;
}

.intro h2,
.band > .wrap > h2 {
  margin-bottom: 1.2rem;
}

.phones {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem 1.75rem;
  margin-top: 2.5rem;
}

.phones .phone img {
  max-width: 17rem;
}

/*
 * On wide screens, six columns with two to a picture, so that a last row of two pictures is centred under the three
 * above it (five pictures since the winter one was taken out, 2026-11-22). Narrower screens scroll them sideways.
 */
@media (min-width: 62.01rem) {
  .phones {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .phones > .phone {
    grid-column: span 2;
  }

  .phones > .phone:nth-child(3n + 1):nth-last-child(2) {
    grid-column: 2 / span 2;
  }

  .phones > .phone:nth-child(3n + 1):last-child {
    grid-column: 3 / span 2;
  }
}

.credits {
  font-size: 0.85rem;
  color: var(--muted);
}

.credits a {
  color: inherit;
}

.center {
  text-align: center;
  margin-top: 1.75rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.tools {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
}

.tool,
.plan {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
}

.tool .icon {
  width: 2.6rem;
  height: 2.6rem;
  padding: 0.55rem;
  border-radius: 50%;
  background: #fdecea;
  color: var(--trail-ink);
}

.tool h3 {
  margin-top: 0.9rem;
}

.tool p {
  margin-top: 0.4rem;
  color: var(--muted);
  font-size: 0.98rem;
}

.note {
  margin-top: 1.4rem;
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 46rem;
}

.plans {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 1.1rem;
  align-items: start;
}

.plan h3 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.plan p {
  margin-top: 0.7rem;
}

.plan-main {
  border: 2px solid var(--trail);
}

.amount strong {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}

.ticks {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.ticks li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.ticks .icon {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.22rem;
  color: var(--ok);
}

.trio {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}

.trio h2 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.more {
  font-weight: 700;
}

/* The pages of text: legal notice, privacy policy, data licences */

.text {
  max-width: 48rem;
  padding-block: clamp(2rem, 5vw, 3.5rem) clamp(3rem, 7vw, 5rem);
  overflow-wrap: break-word;
}

.text h1 {
  font-size: clamp(2rem, 4.6vw, 2.9rem);
  margin-bottom: 1.1rem;
}

.text .lead {
  max-width: none;
}

.text h2 {
  font-size: clamp(1.3rem, 2.6vw, 1.6rem);
  margin-top: 2.4rem;
  margin-bottom: 0.8rem;
}

.text h3 {
  margin-top: 1.6rem;
  margin-bottom: 0.5rem;
}

.text ul {
  margin: 0.9em 0 0;
  padding-left: 1.3rem;
}

.text li + li {
  margin-top: 0.45em;
}

.text a {
  overflow-wrap: anywhere;
}

code {
  font: 0.9em ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  background: var(--tint);
  padding: 0.1em 0.35em;
  border-radius: 0.3em;
  overflow-wrap: anywhere;
}

.table {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  line-height: 1.5;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

th {
  background: var(--tint);
  font-weight: 700;
}

td:first-child {
  min-width: 8.5rem;
}

.facts {
  display: grid;
  grid-template-columns: minmax(8rem, 13rem) minmax(0, 1fr);
  gap: 0.45rem 1.25rem;
  margin: 0.9em 0 0;
}

.facts dt {
  color: var(--muted);
}

.facts dd {
  margin: 0;
}

.credit-lines {
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--muted);
}

/* A point the owner has still to decide: only in a draft build (build.ts --release refuses to build with one) */

mark.open {
  background: #ffe27a;
  color: #3b2f00;
  padding: 0 0.2em;
  border-radius: 0.25em;
}

.draft {
  margin-block: 1.25rem 0;
  padding: 0.8rem 1rem;
  border: 1px solid #e3c24a;
  border-radius: 10px;
  background: #fff4c7;
  font-weight: 600;
  font-size: 0.98rem;
}

.missing {
  padding-block: clamp(3rem, 10vw, 7rem);
}

.missing p {
  margin-top: 1rem;
}

/* The footer */

.foot {
  background: var(--ink);
  color: #d9e1e6;
  font-size: 0.95rem;
  padding-block: 2.75rem 1.5rem;
}

.foot a {
  color: #fff;
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.3fr;
  gap: 2rem;
}

.foot-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}

.foot-title {
  font-weight: 700;
  color: #fff;
}

.foot-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.foot .credits {
  color: #b9c5cd;
  margin-top: 0.5rem;
}

.legal-line {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.16);
  font-size: 0.82rem;
  color: #b9c5cd;
}

/* Narrower screens */

@media (max-width: 62rem) {
  .phones {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(68vw, 16.5rem);
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin-inline: -1.25rem;
    padding: 0.25rem 1.25rem 1.5rem;
  }

  .phones .phone {
    scroll-snap-align: center;
  }

  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 48rem) {
  .hero-grid,
  .split,
  .plans,
  .trio,
  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-grid {
    gap: 2.25rem;
  }

  .hero .phone img,
  .split .phone img {
    max-width: 16.5rem;
  }

  .trio {
    gap: 2.25rem;
  }
}

@media (max-width: 36rem) {
  .top-nav .top-link {
    display: none;
  }

  .tools {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.1rem;
  }

  .facts dd {
    margin-bottom: 0.7rem;
  }

  th,
  td {
    padding: 0.55rem 0.5rem;
  }

  td:first-child {
    min-width: 6.5rem;
  }
}
