/* Bravo: shared foundation.
   The world is the international code of signals: five flag colours, ink
   outlines, sailcloth ground. Flags are sharp-cornered objects; controls
   carry a small radius. Depth comes from colour fields, never shadows. */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-ext-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url(/fonts/archivo-latin-wdth-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #0b1d3f;
  --ink-soft: #45536f;
  --sail: #f1f4f8;
  --paper: #fff;
  --blue: #1450c4;
  --blue-deep: #0f3f9e;
  --red: #dc2430;
  --yellow: #ffd012;
  --line: rgb(11 29 63 / 0.16);
  --on-blue-soft: #cfdcf8;
  --on-ink-soft: #b3bfd6;
  --on-yellow-soft: #4d4410;

  --flag-blue: var(--blue);
  --flag-red: var(--red);
  --flag-yellow: var(--yellow);
  --flag-line: var(--ink);

  /* Surface tone, switched per screen with data-tone. */
  --bg: var(--sail);
  --fg: var(--ink);
  --fg-soft: var(--ink-soft);
  --rule: var(--line);
  --focus: var(--blue);

  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 4px;
}

[data-tone='blue'] {
  --bg: var(--blue);
  --fg: #fff;
  --fg-soft: var(--on-blue-soft);
  --rule: rgb(255 255 255 / 0.28);
  --focus: var(--yellow);
  --flag-line: #071530;
}
[data-tone='ink'] {
  --bg: var(--ink);
  --fg: #fff;
  --fg-soft: var(--on-ink-soft);
  --rule: rgb(255 255 255 / 0.22);
  --focus: var(--yellow);
  --flag-line: #fff;
}
[data-tone='yellow'] {
  --bg: var(--yellow);
  --fg: var(--ink);
  --fg-soft: var(--on-yellow-soft);
  --rule: rgb(11 29 63 / 0.3);
  --focus: var(--ink);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
}

::selection {
  background: var(--yellow);
  color: var(--ink);
}

h1,
h2,
h3,
p,
ol,
ul,
figure {
  margin: 0;
  padding: 0;
}
ol,
ul {
  list-style: none;
}
h1,
h2,
h3 {
  font-weight: 750;
  line-height: 1.05;
  text-wrap: balance;
}
img,
svg {
  display: block;
  max-width: 100%;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
  margin: 0;
}
button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1.5px;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
[hidden] {
  display: none !important;
}

.num {
  font-stretch: 78%;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

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

/* ---- flags ---------------------------------------------------------------- */

.flag-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chip {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  font-stretch: 80%;
  font-weight: 800;
  line-height: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: inherit;
}
.brand-flags {
  display: flex;
  gap: 0.18em;
}
.brand-flags .flag-svg {
  width: 1.3em;
  height: 0.975em;
}
.brand-name {
  font-stretch: 84%;
  font-weight: 800;
  font-size: 1.25em;
  letter-spacing: -0.01em;
  line-height: 1;
}

.av {
  display: inline-block;
  flex: none;
  width: 1.5em;
  height: 1.5em;
  vertical-align: middle;
}
.av-svg {
  width: 100%;
  height: 100%;
}

/* ---- controls ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 2.75em;
  padding: 0.55em 1.15em;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-stretch: 90%;
  font-weight: 700;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn .icon {
  width: 1.15em;
  height: 1.15em;
  flex: none;
}
.btn:hover {
  background: var(--blue);
  border-color: var(--blue);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled,
.btn[aria-disabled='true'] {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--ink);
  border-color: var(--ink);
}
.btn--quiet {
  background: transparent;
  color: var(--ink);
}
.btn--quiet:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}
.btn--quiet:disabled {
  background: transparent;
  color: var(--ink);
}
.btn--bare {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
  padding-inline: 0.6em;
}
.btn--bare:hover {
  background: rgb(11 29 63 / 0.08);
  border-color: transparent;
  color: var(--ink);
}
.btn--bare:disabled,
[data-tone] .btn--bare:disabled {
  background: transparent;
  border-color: transparent;
}
.btn--danger:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}
.btn--icon {
  width: 2.75em;
  padding: 0;
}

/* On blue and ink grounds the loud button is yellow. */
[data-tone='blue'] .btn,
[data-tone='ink'] .btn {
  background: var(--yellow);
  border-color: var(--yellow);
  color: var(--ink);
}
[data-tone='blue'] .btn:hover,
[data-tone='ink'] .btn:hover {
  background: #fff;
  border-color: #fff;
}
[data-tone='blue'] .btn--quiet,
[data-tone='ink'] .btn--quiet,
[data-tone='blue'] .btn--bare,
[data-tone='ink'] .btn--bare {
  background: transparent;
  color: #fff;
}
[data-tone='blue'] .btn--quiet,
[data-tone='ink'] .btn--quiet {
  border-color: rgb(255 255 255 / 0.7);
}
[data-tone='blue'] .btn--bare,
[data-tone='ink'] .btn--bare {
  border-color: transparent;
}
[data-tone='blue'] .btn--quiet:hover,
[data-tone='ink'] .btn--quiet:hover {
  background: #fff;
  border-color: #fff;
  color: var(--ink);
}
[data-tone='blue'] .btn--bare:hover,
[data-tone='ink'] .btn--bare:hover {
  background: rgb(255 255 255 / 0.14);
  color: #fff;
}
[data-tone='yellow'] .btn:hover {
  background: var(--blue-deep);
  border-color: var(--blue-deep);
}

.field {
  display: block;
  width: 100%;
  padding: 0.6em 0.75em;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.3;
}
.field::placeholder {
  color: #5b6884;
  opacity: 1;
}
.field:focus-visible {
  outline-offset: 0;
  border-color: var(--blue);
}

.lang {
  color: var(--fg-soft);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  padding: 0.4em 0;
}
.lang:hover {
  color: var(--fg);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
  }
}
