/* Iris website. Sizes in rem so every page follows the visitor's font size; no web fonts, nothing from other sites. */

:root {
  --bg: #ffffff;
  --surface: #f4f6fb;
  --text: #1f2a44;
  --muted: #4a5672;
  --border: #d5dbe8;
  --link: #2f4ac0;
  --brand: #3b5bdb;
  --brand-text: #ffffff;
  --hero-from: #2f4ac0;
  --hero-to: #0b6f80;
  --focus: #f59f00;
  --ok-bg: #e7f5ec;
  --ok-text: #1d5b33;
  --warn-bg: #fdeeee;
  --warn-text: #8a1c1c;
  --shadow: 0 1px 2px rgb(16 24 40 / 6%), 0 0.5rem 1.5rem rgb(16 24 40 / 8%);
  --radius: 0.75rem;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1420;
    --surface: #171e2e;
    --text: #e6e9f2;
    --muted: #aab3c8;
    --border: #2c3650;
    --link: #a9bcff;
    --brand: #4865e0;
    --ok-bg: #12301d;
    --ok-text: #b9e6c8;
    --warn-bg: #3a1616;
    --warn-text: #ffc2c2;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 0.5rem 1.5rem rgb(0 0 0 / 35%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0f1420;
  --surface: #171e2e;
  --text: #e6e9f2;
  --muted: #aab3c8;
  --border: #2c3650;
  --link: #a9bcff;
  --brand: #4865e0;
  --ok-bg: #12301d;
  --ok-text: #b9e6c8;
  --warn-bg: #3a1616;
  --warn-text: #ffc2c2;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 0.5rem 1.5rem rgb(0 0 0 / 35%);
  color-scheme: dark;
}

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

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

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

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

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

:focus-visible {
  outline: 0.1875rem solid var(--focus);
  outline-offset: 0.1875rem;
  border-radius: 0.25rem;
}

h1,
h2,
h3 {
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

.wrap {
  width: 100%;
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 1.5rem;
  }
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -10rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--bg);
  color: var(--text);
  border: 0.125rem solid var(--focus);
  border-radius: 0.5rem;
}

.skip:focus {
  top: 1rem;
}

/* Header and navigation */

.site-header {
  border-bottom: 1px solid var(--border);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 700;
  text-decoration: none;
}

.brand img {
  width: 2.25rem;
  height: 2.25rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  display: inline-block;
  padding: 0.375rem 0;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 0.15em;
}

/* Buttons */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.625rem 1.25rem;
  border: 0.125rem solid transparent;
  border-radius: 999px;
  background: var(--brand);
  color: var(--brand-text);
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  filter: brightness(1.08);
}

.button.light {
  background: #ffffff;
  color: #1f2a44;
}

.button.outline {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}

/* Not a link yet: a label, so it shouldn't look pressable. */
.button.pending {
  border: 0.125rem dashed currentColor;
  background: transparent;
  color: inherit;
  cursor: default;
  filter: none;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

/* Home */

.hero {
  background: linear-gradient(135deg, var(--hero-from), var(--hero-to));
  color: #ffffff;
}

.hero .wrap {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

@media (min-width: 56rem) {
  .hero .wrap {
    grid-template-columns: 1.1fr 1fr;
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }
}

.hero a:not(.button) {
  color: #ffffff;
}

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.92;
}

.lead {
  font-size: 1.1875rem;
  max-width: 36rem;
}

.hero .note {
  margin: 1rem 0 0;
  font-size: 0.9375rem;
  opacity: 0.92;
}

.hero-shot {
  margin: 0;
}

.hero-shot img,
.shots img {
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section {
  padding: 3rem 0;
}

.section.alt {
  background: var(--surface);
}

.section-intro {
  max-width: 40rem;
  margin-bottom: 2rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.card {
  padding: 1.25rem 1.25rem 0.5rem;
  border: 1px solid var(--border);
  border-top: 0.25rem solid var(--brand);
  border-radius: var(--radius);
  background: var(--bg);
}

.card p {
  color: var(--muted);
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.shots figure {
  margin: 0;
}

.shots figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.split {
  display: grid;
  gap: 2rem;
}

@media (min-width: 48rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }
}

.callout {
  padding: 1.25rem 1.25rem 0.25rem;
  border-inline-start: 0.25rem solid var(--brand);
  border-start-start-radius: 0;
  border-end-start-radius: 0;
  border-start-end-radius: var(--radius);
  border-end-end-radius: var(--radius);
  background: var(--surface);
}

/* Text pages: help, legal, forms */

.page {
  padding: 2.5rem 0 3.5rem;
}

.prose {
  max-width: 46rem;
}

.prose h2 {
  margin-top: 2.25rem;
}

.prose h3 {
  margin-top: 1.5rem;
}

.prose li {
  margin-bottom: 0.375rem;
}

.meta {
  color: var(--muted);
}

.toc {
  margin: 1.5rem 0 2rem;
  padding: 1rem 1.25rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.toc h2 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.toc ul {
  columns: 2 14rem;
}

kbd {
  display: inline-block;
  padding: 0 0.375rem;
  border: 1px solid var(--border);
  border-bottom-width: 0.125rem;
  border-radius: 0.3rem;
  background: var(--surface);
  font: inherit;
  font-size: 0.9375em;
  white-space: nowrap;
}

.table-wrap {
  margin: 0 0 1.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9688rem;
}

th,
td {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--border);
  text-align: start;
  vertical-align: top;
}

th {
  background: var(--surface);
}

/* On narrow screens a table's rows become cards, each cell labelled with its column. */
@media (max-width: 40rem) {
  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    margin-bottom: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
  }

  td {
    border: 0;
    border-top: 1px solid var(--border);
  }

  td:first-child {
    border-top: 0;
  }

  td[data-label]::before {
    content: attr(data-label);
    display: block;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 600;
  }
}

.licence-text {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  font: 0.9375rem/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Forms */

.form {
  max-width: 40rem;
}

.field {
  margin: 0 0 1.25rem;
}

.field label,
legend {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

.hint {
  display: block;
  margin: -0.125rem 0 0.5rem;
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 400;
}

input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--muted);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

[aria-invalid="true"] {
  border-color: var(--warn-text);
  box-shadow: 0 0 0 0.0625rem var(--warn-text);
}

fieldset {
  margin: 0 0 1.25rem;
  padding: 0;
  border: 0;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  margin: 0 0 0.5rem;
  font-weight: 400;
}

.choice input {
  flex: none;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0.2rem 0 0;
}

.optional {
  color: var(--muted);
  font-weight: 400;
}

.notice {
  margin: 1.5rem 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.status {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
}

.status:empty {
  display: none;
}

.status.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.status.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.status ul {
  margin: 0.5rem 0 0;
}

.status a {
  color: inherit;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-footer .wrap {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

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

/* Languages: the header link jumps to the list in the footer, where each language is named in itself. */
.language-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

.language-link svg {
  flex: none;
}

.languages {
  margin: 1.5rem 0;
}

.languages h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.languages ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.languages a {
  display: inline-block;
  padding: 0.375rem 0;
}

.languages a[aria-current] {
  font-weight: 700;
  text-decoration: none;
}

.languages:target h2,
.languages:focus h2 {
  outline: 0.125rem solid var(--focus);
  outline-offset: 0.25rem;
}

.translation-note {
  margin: 0 0 1.5rem;
}

/* Long addresses such as chrome://settings/content/microphone break rather than push the page wider than a phone. */
code {
  overflow-wrap: anywhere;
}
