/* The Gomuntu home page, in French and English. Every colour, length and radius is a
   token from tokens.css (ADR-0010). The only literals are 0, 1px hairlines, percentages,
   unitless numbers and @media breakpoints. */

/* The phone's bezel is dark in both schemes, so the dark scheme takes the darkest surface. */
:root { --k-site-frame: var(--k-color-content-primary); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --k-site-frame: var(--k-color-surface-sunken); }
}
:root[data-theme="dark"] { --k-site-frame: var(--k-color-surface-sunken); }

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Gomuntu Icons";
  src: url("/assets/fonts/material-icons.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: block;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--k-color-surface-base);
  color: var(--k-color-content-primary);
  font-family: var(--k-font-sans);
  font-size: var(--k-type-body-size);
  font-weight: var(--k-type-body-weight);
  line-height: var(--k-type-body-line);
  -webkit-text-size-adjust: 100%;
}

a {
  color: inherit;
}

p,
h1,
h2 {
  margin: 0;
}

.k-sans {
  font-family: var(--k-font-sans);
  font-weight: 400;
  font-variation-settings: normal;
}

/* Icons: the app's own glyphs, subset to the codepoints the home screen uses. */
.k-icon {
  display: inline-block;
  font-family: "Gomuntu Icons";
  font-size: var(--k-type-body-size);
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  font-variant-ligatures: none;
}

/* Manger and Voiture use the app's own two glyph drawings, painted in the current colour. */
.k-glyph {
  display: inline-block;
  width: var(--k-type-body-size);
  height: var(--k-type-body-size);
  background-color: currentColor;
  -webkit-mask: var(--glyph) center / contain no-repeat;
  mask: var(--glyph) center / contain no-repeat;
}

.k-glyph-manger {
  --glyph: url("/assets/glyphs/manger.svg");
}

.k-glyph-car {
  --glyph: url("/assets/glyphs/car-key.svg");
}

/* The page's top bar: the logo and the language switch. */
.k-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--k-space-3);
  padding: var(--k-space-4);
}

.k-logo {
  display: flex;
  align-items: center;
  gap: var(--k-space-2);
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-title-serif-size);
  line-height: var(--k-type-title-serif-line);
  text-decoration: none;
  color: var(--k-color-content-primary);
}

.k-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--k-space-8);
  height: var(--k-space-8);
  border-radius: var(--k-radius-sm);
  background: var(--k-color-mark-tile);
  color: var(--k-color-on-mark-tile);
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-h3-size);
}

.k-lang {
  padding: var(--k-space-1) var(--k-space-3);
  border: 1px solid var(--k-color-border-subtle);
  border-radius: var(--k-radius-pill);
  background: var(--k-color-surface-raised);
  font-size: var(--k-type-label-size);
  font-weight: var(--k-type-label-weight);
  line-height: var(--k-type-label-line);
}

.k-lang a {
  text-decoration: none;
}

.k-lang a[aria-current="true"] {
  color: var(--k-color-brand-primary);
}

/* The copy beside the phone. On a phone it is kept for screen readers only. */
.k-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.k-stage {
  display: block;
  width: 100%;
}

.k-copy {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.k-h1 {
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-display-xl-size);
  line-height: var(--k-type-display-xl-line);
  margin: 0 0 var(--k-space-4);
  color: var(--k-color-content-primary);
}

.k-accent {
  color: var(--k-color-brand-primary);
}

.k-lead {
  margin: 0 0 var(--k-space-6);
  font-size: var(--k-type-body-lg-size);
  line-height: var(--k-type-body-lg-line);
  color: var(--k-color-content-secondary);
}

.k-scan {
  display: flex;
  align-items: center;
  gap: var(--k-space-4);
}

.k-qrcard {
  flex: none;
  width: calc(var(--k-space-16) * 2);
  padding: var(--k-space-2);
  border-radius: var(--k-radius-lg);
  background: var(--k-color-surface-raised);
}

.k-qrcard img,
.k-sheet-qr img {
  display: block;
  width: 100%;
  height: auto;
}

.k-soon {
  display: flex;
  flex-direction: column;
  gap: var(--k-space-2);
}

.k-scan-line {
  font-size: var(--k-type-body-sm-size);
  color: var(--k-color-content-secondary);
}

.k-soon-line {
  padding: var(--k-space-2) var(--k-space-3);
  border: 1px solid var(--k-color-border-subtle);
  border-radius: var(--k-radius-md);
  background: var(--k-color-surface-raised);
  font-size: var(--k-type-body-sm-size);
  font-weight: 600;
}

.k-pro {
  margin-top: var(--k-space-6);
  font-size: var(--k-type-body-sm-size);
  color: var(--k-color-content-secondary);
}

.k-pro a {
  color: var(--k-color-brand-primary);
  font-weight: 600;
  text-decoration: underline;
}

/* The phone: the traveller app's home screen. On a phone it fills the width. */
.k-phone {
  width: 100%;
}

.k-screen {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--k-color-surface-base);
}

.k-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--k-space-2);
  padding: var(--k-space-2) var(--k-space-3);
  background: var(--k-color-content-primary);
  color: var(--k-color-content-inverse);
  font-size: var(--k-type-caption-size);
}

.k-pill {
  padding: var(--k-space-1) var(--k-space-3);
  border-radius: var(--k-radius-pill);
  background: var(--k-color-brand-accent);
  color: var(--k-color-on-rail-pill);
  font-weight: 600;
  text-decoration: none;
}

.k-band {
  padding: var(--k-space-3) var(--k-space-3) var(--k-space-8);
  background: linear-gradient(var(--k-color-band-top), var(--k-color-band-bottom));
  color: var(--k-color-on-band);
}

.k-band-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--k-space-2);
}

.k-hello {
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-h3-size);
  line-height: var(--k-type-h3-line);
}

.k-city {
  display: inline-flex;
  align-items: center;
  gap: var(--k-space-1);
  padding: var(--k-space-1) var(--k-space-2);
  border-radius: var(--k-radius-pill);
  background: color-mix(in srgb, var(--k-color-on-band) 16%, transparent);
  color: var(--k-color-on-band);
  font-size: var(--k-type-caption-size);
  font-weight: var(--k-type-label-weight);
  text-decoration: none;
}

.k-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: calc(var(--k-space-1) / 2);
  margin-top: var(--k-space-2);
  padding: calc(var(--k-space-1) / 2);
  border-radius: var(--k-radius-md);
  background: color-mix(in srgb, var(--k-color-on-band) 12%, transparent);
}

.k-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--k-space-1) / 2);
  min-width: 0;
  padding: var(--k-space-1) 0;
  border-radius: var(--k-radius-sm);
  color: var(--k-color-on-band);
  font-size: calc(var(--k-type-caption-size) * 0.8);
  font-weight: var(--k-type-label-weight);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
}

.k-tab[aria-current="true"] {
  background: var(--k-color-surface-raised);
  color: var(--k-color-brand-primary);
}

/* The search bar overlaps the band, as in the app. */
.k-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--k-space-2);
  margin: calc(var(--k-space-4) * -1) var(--k-space-3) 0;
  padding: var(--k-space-3) var(--k-space-4);
  border-radius: var(--k-radius-pill);
  background: var(--k-color-surface-raised);
  box-shadow: inset 0 0 0 calc(var(--k-space-1) / 2) var(--k-color-brand-accent);
  color: var(--k-color-content-primary);
  font-size: var(--k-type-body-size);
  font-weight: 600;
  text-decoration: none;
}

.k-list {
  margin: var(--k-space-3);
  border: 1px solid var(--k-color-border-subtle);
  border-radius: var(--k-radius-lg);
  background: var(--k-color-surface-raised);
  overflow: hidden;
}

.k-row {
  display: flex;
  align-items: center;
  gap: var(--k-space-3);
  padding: var(--k-space-2) var(--k-space-3);
  border-bottom: 1px solid var(--k-color-border-subtle);
  color: var(--k-color-content-primary);
  font-size: var(--k-type-body-sm-size);
  line-height: var(--k-type-body-sm-line);
  text-decoration: none;
}

.k-row:last-child {
  border-bottom: 0;
}

.k-row small {
  display: block;
  color: var(--k-color-content-secondary);
  font-size: var(--k-type-caption-size);
}

.k-row-icon {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: var(--k-space-8);
  height: var(--k-space-8);
  border-radius: var(--k-radius-sm);
  background: var(--k-color-surface-sunken);
  color: var(--k-color-brand-primary);
}

.k-h2 {
  margin: var(--k-space-3) var(--k-space-4) var(--k-space-2);
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-h3-size);
  line-height: var(--k-type-h3-line);
}

.k-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--k-space-2) var(--k-space-1);
  padding: 0 var(--k-space-3);
  text-align: center;
}

.k-circle-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--k-space-1);
  min-width: 0;
  color: var(--k-color-content-primary);
  font-size: var(--k-type-caption-size);
  line-height: var(--k-type-caption-line);
  text-decoration: none;
}

.k-circle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--k-space-12);
  height: var(--k-space-12);
  border: 1px solid var(--k-color-border-subtle);
  border-radius: 50%;
  background: var(--k-color-surface-raised);
  color: var(--k-color-brand-primary);
  font-size: var(--k-type-h2-size);
}

.k-circle .k-glyph {
  width: var(--k-type-h2-size);
  height: var(--k-type-h2-size);
}

.k-tag {
  position: absolute;
  top: calc(var(--k-space-2) * -1);
  left: 50%;
  transform: translateX(-50%);
  padding: 0 var(--k-space-2);
  border-radius: var(--k-radius-pill);
  background: var(--k-color-danger);
  color: var(--k-color-on-brand-primary);
  font-size: calc(var(--k-type-caption-size) * 0.8);
  font-weight: var(--k-type-label-weight);
  white-space: nowrap;
}

.k-promo {
  display: block;
  margin: var(--k-space-3);
  padding: var(--k-space-3) var(--k-space-4);
  border-radius: var(--k-radius-lg);
  background: var(--k-color-brand-primary);
  color: var(--k-color-on-brand-primary);
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-h3-size);
  line-height: var(--k-type-h3-line);
  text-decoration: none;
}

.k-bottom {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: var(--k-space-2) 0 var(--k-space-3);
  border-top: 1px solid var(--k-color-border-subtle);
  background: var(--k-color-surface-raised);
}

.k-bottom a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--k-space-1) / 2);
  min-width: 0;
  color: var(--k-color-content-secondary);
  font-size: calc(var(--k-type-caption-size) * 0.9);
  text-align: center;
  text-decoration: none;
}

.k-bottom a[aria-current="true"] {
  color: var(--k-color-brand-primary);
  font-weight: var(--k-type-label-weight);
}

/* The scene: elephants and mountains, below the phone so it is never behind it. */
.k-main > picture {
  display: block;
  width: 100%;
}

.k-scene {
  display: block;
  width: 100%;
  height: auto;
  margin-top: var(--k-space-4);
}

/* The footer: who runs the site. */
.k-foot {
  padding: var(--k-space-6) var(--k-space-4) var(--k-space-8);
  background: var(--k-color-band-bottom);
  color: var(--k-color-on-band);
  font-size: var(--k-type-body-sm-size);
  line-height: var(--k-type-body-sm-line);
}

.k-foot p + p {
  margin-top: var(--k-space-1);
}

/* The sheet: every tap opens it first. It is shown on :target, so it works without script. */
.k-sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: none;
}

.k-sheet:target {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.k-sheet::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--k-color-surface-overlay);
}

.k-sheet-panel {
  position: relative;
  width: 100%;
  max-width: calc(var(--k-space-16) * 6);
  padding: var(--k-space-3) var(--k-space-4) var(--k-space-8);
  border-radius: var(--k-radius-xl) var(--k-radius-xl) 0 0;
  background: var(--k-color-surface-raised);
  color: var(--k-color-content-primary);
  text-align: center;
}

.k-grab {
  display: block;
  width: calc(var(--k-space-8) + var(--k-space-2));
  height: var(--k-space-1);
  margin: 0 auto var(--k-space-3);
  border-radius: var(--k-radius-pill);
  background: var(--k-color-border-strong);
}

.k-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--k-space-12);
  height: var(--k-space-12);
  margin: 0 auto var(--k-space-2);
  border-radius: var(--k-radius-md);
  background: var(--k-color-mark-tile);
  color: var(--k-color-on-mark-tile);
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-h2-size);
}

.k-sheet-title {
  margin: 0 0 var(--k-space-2);
  font-family: var(--k-font-serif);
  font-weight: var(--k-font-serif-weight);
  font-variation-settings: var(--k-font-serif-variation);
  font-size: var(--k-type-h2-size);
  line-height: var(--k-type-h2-line);
}

.k-sheet-title:focus {
  outline: calc(var(--k-space-1) / 2) solid var(--k-color-brand-accent);
}

.k-sheet-line {
  margin: 0 0 var(--k-space-4);
  color: var(--k-color-content-secondary);
  font-size: var(--k-type-body-sm-size);
}

.k-sheet-open {
  display: block;
  padding: var(--k-space-3);
  border-radius: var(--k-radius-pill);
  background: var(--k-color-brand-primary);
  color: var(--k-color-on-brand-primary);
  font-size: var(--k-type-body-size);
  font-weight: 600;
  text-decoration: none;
}

.k-sheet-open[aria-disabled="true"] {
  background: var(--k-color-surface-sunken);
  color: var(--k-color-content-secondary);
}

.k-sheet-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--k-space-2);
}

.k-sheet-qr img {
  width: calc(var(--k-space-16) * 2);
}

.k-sheet-qr p {
  color: var(--k-color-content-secondary);
  font-size: var(--k-type-body-sm-size);
}

.k-sheet-later {
  display: block;
  margin-top: var(--k-space-3);
  color: var(--k-color-content-secondary);
  font-size: var(--k-type-body-sm-size);
}

/* A wide screen: the laptop layout, the phone framed beside the copy. */
@media (min-width: 960px) {
  body {
    background: linear-gradient(var(--k-color-brand-accent-soft), var(--k-color-surface-sunken) 70%);
  }

  .k-top {
    padding: var(--k-space-4) var(--k-space-16);
  }

  .k-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--k-space-16);
    padding: var(--k-space-8) var(--k-space-16) 0;
  }

  .k-copy {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip-path: none;
    white-space: normal;
    max-width: calc(var(--k-space-16) * 7);
  }

  .k-h1 {
    font-size: var(--k-type-display-xl-size);
  }

  .k-phone {
    flex: none;
    width: auto;
  }

  .k-main > picture {
    width: 100%;
  }

  .k-screen {
    width: calc(var(--k-space-16) * 4.5);
    margin-top: var(--k-space-12);
    border: calc(var(--k-space-2)) solid var(--k-site-frame);
    border-radius: var(--k-space-8);
    box-shadow: 0 var(--k-space-4) var(--k-space-12) color-mix(in srgb, var(--k-site-frame) 28%, transparent);
  }

  .k-scene {
    margin-top: var(--k-space-8);
  }

  .k-foot {
    width: 100%;
    padding: var(--k-space-6) var(--k-space-16);
  }

  .k-sheet:target {
    align-items: center;
  }

  .k-sheet-panel {
    border-radius: var(--k-radius-xl);
  }
}
