/*
 * Palette follows the Helium Voucher web app (vms-ui light theme) so the site and the app read as
 * one product. The wordmark is the light-on-transparent variant, so anything it sits on has to be
 * the dark surface.
 */

/* Self-hosted so the site has no third-party dependency at request time. Only 400 and 600 are
   shipped; do not use other weights without adding the matching file. */
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/poppins-400.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/poppins-600.woff2') format('woff2');
}

:root {
  --dark: #0f1923;
  --dark-soft: #17242f;
  --background: #edf3f7;
  --surface: #ffffff;
  --primary: #00897b;
  --primary-dark: #00695f;
  --green: #7ac143;
  --ink: #16222c;
  --ink-muted: #566873;
  --border: rgba(15, 25, 35, 0.12);
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 25, 35, 0.06), 0 8px 24px rgba(15, 25, 35, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

/* Column layout so the footer sits at the bottom of short pages such as the 404. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family:
    'Poppins',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    'Helvetica Neue',
    Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 1.75rem;
}

h3 {
  font-size: 1.125rem;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.wrap--narrow {
  max-width: 720px;
}

/* Header ------------------------------------------------------------------ */

.site-header {
  background: var(--dark);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 88px;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand img {
  display: block;
  width: 180px;
  height: auto;
}

/* Buttons ----------------------------------------------------------------- */

.button {
  display: inline-block;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.button--primary {
  background: var(--primary);
  color: #ffffff;
}

.button--primary:hover,
.button--primary:focus-visible {
  background: var(--primary-dark);
}

.button--outline {
  border-color: var(--primary);
  color: var(--primary);
}

.button--outline:hover,
.button--outline:focus-visible {
  background: var(--primary);
  color: #ffffff;
}

.button--large {
  padding: 15px 32px;
  font-size: 1.05rem;
}

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

.hero {
  background: var(--dark);
  color: #ffffff;
}

.hero__inner {
  padding-top: 40px;
  padding-bottom: 88px;
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 0.4em;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow--dark {
  color: var(--primary);
}

.lede {
  margin: 0 auto 36px;
  max-width: 660px;
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.82);
}

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

.section {
  padding: 72px 0;
}

.section--muted {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.prose {
  max-width: 660px;
  margin: 0 0 28px;
  color: var(--ink-muted);
}

.prose--small {
  margin-top: 32px;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.subhead {
  margin: 48px 0 0;
  font-size: 1.25rem;
}

/* Features ---------------------------------------------------------------- */

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.feature h3 {
  margin-bottom: 0.4em;
}

.feature h3::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  margin-bottom: 14px;
  background: var(--green);
  border-radius: 2px;
}

.feature p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* Audience choices -------------------------------------------------------- */

.choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

/* Flex row so the card stretches to the tallest in the row and the cue can sit on its baseline. */
.choices > li {
  display: flex;
}

.choice {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

.choice:hover,
.choice:focus-visible {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.choice h2,
.choice h3 {
  margin-bottom: 0.4em;
  font-size: 1.25rem;
}

.choice p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* Pushed to the bottom so the cue lines up across cards with different amounts of text. */
.choice__cue {
  margin-top: auto;
  padding-top: 20px;
  color: var(--primary);
  font-size: 0.95rem;
  font-weight: 600;
}

.choice__cue::after {
  content: ' →';
}

/* Market strip ------------------------------------------------------------ */

.markets {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.market {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 10px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.95rem;
}

.market img {
  flex: none;
  width: 24px;
  height: 18px;
  border: 1px solid var(--border);
  border-radius: 2px;
}

/* Instance list ----------------------------------------------------------- */

.instances {
  display: grid;
  gap: 16px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.instance {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

/* Auto margin rather than space-between, so the badge stays hard right whether or not the card
   has a flag before the text. */
.instance .badge {
  margin-left: auto;
}

.instance__flag {
  flex: none;
  width: 32px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 3px;
}

a.instance {
  box-shadow: var(--shadow);
  transition:
    border-color 0.15s ease,
    transform 0.15s ease;
}

a.instance:hover,
a.instance:focus-visible {
  border-color: var(--primary);
  transform: translateY(-1px);
}

.instance--soon {
  background: transparent;
  border-style: dashed;
  color: var(--ink-muted);
  opacity: 0.65;
}

.instance__body {
  display: block;
}

.instance__name {
  display: block;
  font-size: 1.15rem;
  font-weight: 600;
}

.instance__host {
  display: block;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.badge {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(15, 25, 35, 0.07);
  color: var(--ink-muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--test {
  background: rgba(0, 137, 123, 0.12);
  color: var(--primary-dark);
}

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

.site-footer {
  background: var(--dark-soft);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.site-footer__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 28px;
}

.site-footer p {
  margin: 0;
}

.site-footer p + p {
  margin-left: auto;
}

.site-footer a {
  color: var(--green);
}

.site-footer__mark {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

/* Focus ------------------------------------------------------------------- */

a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* Narrow viewports -------------------------------------------------------- */

@media (max-width: 720px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .hero__inner {
    padding-bottom: 64px;
    text-align: left;
  }

  .lede {
    margin-inline: 0;
  }

  .section {
    padding: 48px 0;
  }

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

  .instance {
    align-items: flex-start;
    flex-direction: column;
  }

  /* Stacked card: the badge sits under the text, so the auto margin would push it off to the right. */
  .instance .badge {
    margin-left: 0;
  }

  .site-footer p + p {
    margin-left: 0;
    flex-basis: 100%;
  }
}
