/* Nekt site. Colours, type and spacing follow the app's design system
   (nekt-app/design/tokens.json): dark is the main look, light follows the
   phone or computer setting. */

@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/Inter-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Poppins";
  src: url("fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: dark light;
  --background: #121212;
  --surface: #1b1c1e;
  --text-primary: #f9fafb;
  --text-secondary: #b3b6bd;
  --text-tertiary: #8a8e96;
  --border: #33353a;
  --surface-raised: #242528;
  --inverse-bg: #f9fafb;
  --inverse-fg: #121212;
  --focus-ring: #f9fafb;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --radius-lg: 16px;
  --content-max: 600px;
}

@media (prefers-color-scheme: light) {
  :root {
    --background: #f9fafb;
    --surface: #ffffff;
    --text-primary: #121212;
    --text-secondary: #4c4f56;
    --text-tertiary: #6a6e76;
    --border: #d3d5da;
    --surface-raised: #f2f3f5;
    --inverse-bg: #121212;
    --inverse-fg: #f9fafb;
    --focus-ring: #121212;
  }
}

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

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

body {
  margin: 0;
  background: var(--background);
  color: var(--text-primary);
  font: 400 17px/1.5 "Inter", system-ui, sans-serif;
}

a {
  color: inherit;
  text-underline-offset: 3px;
}

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

.wrap {
  max-width: calc(var(--content-max) + 2 * var(--space-4));
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Header: the wordmark on the left, like the app's brand header. */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding-top: var(--space-4);
}

.top .logo {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.wordmark {
  display: block;
  height: 24px;
  width: auto;
}

/* Home: one screen, like the app's welcome. The mascot waves above the
   logo, everything centred, the footer at the bottom edge. */
.home {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.welcome {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.welcome .mascot {
  width: 200px;
  height: 200px;
}

.welcome h1 {
  margin: var(--space-4) 0 0;
  line-height: 0;
}

.welcome .wordmark {
  height: 64px;
}

.tagline {
  margin: var(--space-4) 0 0;
  font: 700 24px/1.3 "Poppins", system-ui, sans-serif;
  letter-spacing: -0.2px;
}

.lead {
  margin: var(--space-3) 0 0;
  max-width: 26em;
  color: var(--text-secondary);
}

/* The round dot from the logo marks what is coming. */
.soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-8) 0 0;
  min-height: 36px;
  padding: 0 var(--space-4) 0 var(--space-3);
  background: var(--surface-raised);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
}

.dot {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-primary);
}

.contact {
  margin: var(--space-3) 0 0;
  font-size: 15px;
}

.contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
}

@media (min-width: 840px) {
  .welcome .mascot {
    width: 240px;
    height: 240px;
  }

  .welcome .wordmark {
    height: 88px;
  }

  .tagline {
    font-size: 28px;
  }
}

/* On the home page the footer is a quiet line, no rule above it. */
.home .bottom {
  border-top: 0;
  padding-top: 0;
  text-align: center;
}

/* Documents */
.doc {
  padding: var(--space-8) 0 var(--space-16);
}

.doc h1 {
  margin: 0;
  font: 700 28px/1.2 "Poppins", system-ui, sans-serif;
  letter-spacing: -0.3px;
}

.doc .updated {
  margin: var(--space-2) 0 0;
  color: var(--text-tertiary);
  font-size: 15px;
}

.doc h2 {
  margin: var(--space-12) 0 0;
  font: 700 20px/1.3 "Poppins", system-ui, sans-serif;
}

.doc p,
.doc ul,
.doc ol {
  margin: var(--space-4) 0 0;
}

.doc ul,
.doc ol {
  padding-left: var(--space-6);
}

.doc li + li {
  margin-top: var(--space-2);
}

/* Footer */
.bottom {
  border-top: 1px solid var(--border);
  /* Only top and bottom: the sides come from .wrap. */
  padding-top: var(--space-6);
  padding-bottom: var(--space-8);
  color: var(--text-tertiary);
  font-size: 15px;
}

.bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-6);
}

.bottom nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-secondary);
  text-decoration: none;
}

.bottom nav a:hover {
  text-decoration: underline;
}

.bottom p {
  margin: var(--space-2) 0 0;
}
