@import url("fonts/ibm-plex-sans.css");

/* Same tokens as the app, so the site and the product do not look like two companies.
   Flat on purpose: no gradient, no glow, no blur. The most recognisable machine-made page is a
   tinted gradient behind a centred heading over a big rounded box, and this is the opposite of
   that. Text is left-aligned; only genuinely short things are centred. */
:root {
  --bg: 220 20% 94%;
  --surface: 0 0% 100%;
  --fg: 222 22% 18%;
  --muted: 220 12% 38%;
  --subtle: 220 10% 52%;
  --border: 220 14% 80%;
  --accent: 221 73% 45%;
  --accent-fg: 0 0% 100%;
  --accent-soft: 219 87% 94%;
  --header: 222 35% 12%;
  --header-fg: 220 22% 92%;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: 222 35% 10%;
    --surface: 222 28% 13%;
    --fg: 220 16% 92%;
    --muted: 220 11% 72%;
    --subtle: 220 10% 55%;
    --border: 222 15% 25%;
    --accent: 220 82% 65%;
    --accent-fg: 222 35% 10%;
    --accent-soft: 219 56% 19%;
    --header: 222 40% 8%;
    --header-fg: 220 22% 92%;
  }
}

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

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

body {
  margin: 0;
  background: hsl(var(--bg));
  color: hsl(var(--fg));
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 62rem;
  margin: 0 auto;
  padding-inline: 20px;
}

/* Text column. Long lines are the fastest way to make a page tiring to read. */
.prose { max-width: 38rem; }

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

.site-head {
  background: hsl(var(--header));
  color: hsl(var(--header-fg));
}
.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 56px;
  flex-wrap: wrap;
}
.wordmark {
  font-weight: 700;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  font-size: 15px;
  color: hsl(var(--header-fg));
  text-decoration: none;
  margin-right: auto;
}
.site-head nav {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 8px;
}
.site-head nav a {
  color: hsl(var(--header-fg) / 0.78);
  text-decoration: none;
  font-size: 14px;
}
.site-head nav a:hover,
.site-head nav a[aria-current="page"] { color: hsl(var(--header-fg)); }

/* Type -------------------------------------------------------------------- */

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; margin: 0 0 12px; }
h1 { font-size: clamp(2rem, 1.4rem + 2.8vw, 3.25rem); font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 1.55rem; font-weight: 600; margin-top: 52px; }
h3 { font-size: 1rem; font-weight: 600; margin-top: 28px; }
p { margin: 0 0 16px; }
.lead { font-size: 1.2rem; line-height: 1.55; color: hsl(var(--muted)); }
.small { font-size: 0.875rem; color: hsl(var(--muted)); }

a { color: hsl(var(--accent)); text-decoration-thickness: 1px; text-underline-offset: 2px; }

main { padding-block: 56px 72px; }

ul { margin: 0 0 16px; padding-left: 1.25rem; }
li { margin-bottom: 6px; }

hr {
  border: 0;
  border-top: 1px solid hsl(var(--border));
  margin: 56px 0;
}

/* Controls ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding-inline: 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: hsl(var(--accent));
  color: hsl(var(--accent-fg));
  font: inherit;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-plain {
  background: transparent;
  color: hsl(var(--accent));
  border-color: hsl(var(--border));
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 24px; }

/* Cards and tables -------------------------------------------------------- */

.panel {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 20px 22px;
}

.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 20px;
  margin-top: 24px;
}
.cols h3 { margin-top: 0; }
.cols p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin-bottom: 16px; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
}
th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid hsl(var(--border));
  vertical-align: top;
}
thead th {
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--muted));
}
tbody tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }

/* Form -------------------------------------------------------------------- */

form { max-width: 34rem; }
.field { margin-bottom: 18px; }
label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 5px; }
input, textarea, select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  color: hsl(var(--fg));
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 6px;
  padding: 9px 11px;
}
input, select { height: 40px; }
textarea { min-height: 7rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible, .btn:focus-visible {
  outline: 2px solid hsl(var(--accent));
  outline-offset: 2px;
}
.hint { font-size: 13px; color: hsl(var(--subtle)); margin-top: 5px; }

/* Never rendered to a person. A bot fills it in and gives itself away. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.site-foot {
  border-top: 1px solid hsl(var(--border));
  padding-block: 28px 40px;
  font-size: 14px;
  color: hsl(var(--muted));
}
.site-foot .wrap { display: flex; gap: 32px; flex-wrap: wrap; justify-content: space-between; }
.site-foot a { color: hsl(var(--muted)); }
.site-foot p { margin: 0 0 4px; }

/* Language switch ---------------------------------------------------------- */

.lang-switch {
  border: 1px solid hsl(var(--header-fg) / 0.25);
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: hsl(var(--header-fg) / 0.78);
  text-decoration: none;
}
.lang-switch:hover {
  color: hsl(var(--header-fg));
  border-color: hsl(var(--header-fg) / 0.5);
}

/* Price calculator --------------------------------------------------------- */

.calc {
  background: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: 8px;
  padding: 20px 22px;
  margin: 24px 0 16px;
  max-width: 34rem;
}
.calc label { font-size: 15px; }
.calc-row { display: flex; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.calc-input { flex: 0 0 8rem; }
.calc-input input { margin: 0; }
.calc-out { flex: 1 1 12rem; }
.calc-price {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.calc-note { font-size: 13px; color: hsl(var(--subtle)); margin-top: 2px; }

/* Footer is three columns once there is room, stacked before that. */
.site-foot .wrap {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 24px 32px;
}


/* The price, directly under the headline. It is the strongest thing on the site and it was
   two thirds of the way down the page. */
.price-line {
  font-size: 1.05rem;
  font-weight: 600;
  color: hsl(var(--accent));
  margin: 0 0 4px;
}

/* The first section on a page carries more weight than the ones after it, so the eye has a
   place to land after the headline instead of meeting a uniform column. */
main > .prose:first-of-type > h2:first-of-type { margin-top: 40px; }
