/* Resilient support site.
   Colours, type and radii follow the app's theme (src/theme in the app repo):
   dark only, warm means loud, cool means quiet. */

@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Sans";
  src: url("fonts/DMSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;

  --ground: #0b1517;
  --glow: #16292d;
  --surface: #132529;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --fill: rgba(255, 255, 255, 0.06);

  --text: #f1f4ee;
  --dim: #aac1c4;
  --muted: #86a4a8;

  --ember: #f3ad67;
  --teal: #59cabb;
  --violet: #a596e8;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:
    "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;

  --gutter: 22px;
  --column: 560px;
  --radius-card: 22px;
  --radius-button: 19px;
  --radius-small: 11px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ground);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--dim);
  background:
    radial-gradient(520px 300px at 0 190px, rgba(243, 173, 103, 0.07), transparent 70%),
    radial-gradient(1100px 560px at 50% -140px, var(--glow), transparent 72%)
      var(--ground);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: calc(var(--column) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- brand and wave ---------- */

header {
  padding-top: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-small);
  border: 1px solid var(--line-strong);
}

.brand span {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 1;
}

.wave {
  display: block;
  width: 100%;
  height: 132px;
  margin-top: 14px;
}

/* ---------- text ---------- */

main {
  padding-top: 22px;
}

.over {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
}

h1,
h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  color: var(--text);
}

h1 {
  margin-top: 10px;
  font-size: 44px;
  line-height: 1.1;
}

h2 {
  margin-top: 40px;
  font-size: 26px;
  line-height: 1.2;
}

p,
ul {
  margin: 12px 0 0;
}

.caption {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- support page ---------- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  margin-top: 26px;
  padding: 12px 16px;
  border-radius: var(--radius-button);
  background: var(--ember);
  color: var(--ground);
  font-size: 16px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition:
    opacity 0.15s,
    transform 0.15s;
}

.btn:hover {
  opacity: 0.92;
}

.btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.btn + .caption {
  margin-top: 14px;
  text-align: center;
}

.section {
  margin-top: 44px;
}

.card {
  display: grid;
  gap: 11px;
  margin-top: 11px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
}

.link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  text-decoration: none;
}

.link:hover .link-name {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.link-text {
  flex: 1;
  display: grid;
  gap: 2px;
}

.link-name {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.link svg {
  flex: none;
  color: var(--violet);
}

/* ---------- privacy policy ---------- */

.policy h1 + .caption {
  margin-top: 10px;
}

.policy ul {
  padding-left: 20px;
}

.policy li + li {
  margin-top: 8px;
}

.policy li::marker {
  color: var(--muted);
}

.policy a,
footer a {
  color: var(--teal);
  text-underline-offset: 3px;
}

/* ---------- footer ---------- */

footer {
  padding-top: 48px;
  padding-bottom: 40px;
}

@media (max-width: 520px) {
  .wave {
    height: 96px;
  }

  h1 {
    font-size: 36px;
  }

  h2 {
    font-size: 24px;
  }
}

@media print {
  :root {
    --text: #000;
    --dim: #222;
    --muted: #555;
    --teal: #000;
  }

  html,
  body {
    background: #fff;
  }

  .wave {
    display: none;
  }
}
