@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: "Inter";
  src: url("/fonts/Inter-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

/* ── Tokens (§3) ── */
.site {
  /* Colour, light (§3.1) */
  --brand: #05abd0;
  --surface: #faf6f0;
  --surface-container-low: #f4f0ea;
  --surface-container: #f0ebe3;
  --surface-container-high: #e8e2d9;
  --outline-variant: #e0d9d0;
  --outline: #b0a89e;
  --ink: #1c1917;
  --ink-muted: #6b635b;
  --ink-faint: rgb(28 25 23 / 0.38);
  --primary: #007c99;
  --on-primary: #ffffff;
  --primary-container: #d5f1f8;
  --on-primary-container: #00485a;

  /* Spacing (§3.3) */
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 20px;
  --space-2xl: 24px;
  --space-3xl: 32px;
  --space-4xl: 40px;
  --gutter: var(--space-xl);

  /* Shape (§3.4) */
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 999px;

  /* Motion (§3.7) */
  --duration-fast: 150ms;
  --duration-slow: 400ms;
  --curve-fast: ease-out;
  --curve-slow: cubic-bezier(0.215, 0.61, 0.355, 1); /* easeOutCubic */

  --max-content-width: 560px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
    sans-serif;
}

/* Dark: the system setting, unless ?theme= asks for a light theme */
@media (prefers-color-scheme: dark) {
  html:not([class$="-light"]) .site {
    --surface: #0f0f0f;
    --surface-container-low: #151515;
    --surface-container: #1a1a1a;
    --surface-container-high: #222222;
    --outline-variant: #2a2a2a;
    --outline: #444444;
    --ink: #f5f5f5;
    --ink-muted: #a3a3a3;
    --ink-faint: rgb(245 245 245 / 0.38);
    --primary: #05abd0;
    --on-primary: #00161c;
    --primary-container: #0a3440;
    --on-primary-container: #a8e9f7;
  }
}

html[class$="-dark"] .site {
  --surface: #0f0f0f;
  --surface-container-low: #151515;
  --surface-container: #1a1a1a;
  --surface-container-high: #222222;
  --outline-variant: #2a2a2a;
  --outline: #444444;
  --ink: #f5f5f5;
  --ink-muted: #a3a3a3;
  --ink-faint: rgb(245 245 245 / 0.38);
  --primary: #05abd0;
  --on-primary: #00161c;
  --primary-container: #0a3440;
  --on-primary-container: #a8e9f7;
}

/* ── Base ── */
html:has(.site) {
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  html:not([class$="-light"]):has(.site) {
    color-scheme: dark;
  }
}
html[class$="-dark"]:has(.site) {
  color-scheme: dark;
}

body.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: none;
}

.site a {
  color: var(--primary);
  text-decoration: none;
}

.site a:hover {
  text-decoration: underline;
}

.site a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--space-xs);
}

/* ── Status / auth page: the coming soon screen (§4.6, §4.7) ── */
.landing {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--space-4xl) var(--gutter) var(--space-2xl);
  text-align: center;
}

/* Wordmark: displayMedium 48 / 1.0, 700, −1.0, in primary like the links */
.wordmark {
  font-size: 48px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -1px;
  color: var(--primary);
}

/* bodyLarge, ink-muted */
.coming-soon {
  margin-top: var(--space-md);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
}

/* ── Footer: compact text buttons, like the login screen ── */
.site .site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-xs) var(--space-sm);
  padding: var(--space-lg) var(--gutter);
  padding-bottom: max(var(--space-lg), env(safe-area-inset-bottom));
}

.site .site-footer a {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 var(--space-md);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--curve-fast);
}

.site .site-footer a:hover {
  background: var(--surface-container-high);
}

/* ── Detail page: the imprint (§4.2) ── */
.site .site-page {
  flex: 1;
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: var(--space-lg) var(--gutter) var(--space-3xl);
}

.site .back-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  height: 40px;
  margin: 0 0 var(--space-lg) calc(-1 * var(--space-md));
  padding: 0 var(--space-md);
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  transition: background-color var(--duration-fast) var(--curve-fast);
}

.site .back-link:hover {
  background: var(--surface-container-high);
  text-decoration: none;
}

.site .back-link svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Page title: headlineSmall 24 / 1.2, 800, −0.4 */
.site .site-page h1 {
  margin: 0 0 var(--space-sm);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--ink);
}

/* Card title: titleMedium 16 / 1.3, 700 */
.site .site-page h2 {
  margin: var(--space-2xl) 0 var(--space-sm);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--ink);
}

.site .site-page h3 {
  margin: var(--space-lg) 0 var(--space-xs);
  font-size: 15px;
  line-height: 1.3;
  font-weight: 600;
  color: var(--ink);
}

.site .site-page p,
.site .site-page li {
  margin: 0 0 var(--space-md);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink-muted);
}

.site .site-page ul,
.site .site-page ol {
  margin: 0 0 var(--space-md);
  padding-left: var(--space-2xl);
}

.site .site-page strong {
  font-weight: 600;
  color: var(--ink);
}

/* "Last updated": caption, ink-faint */
.site .site-page h1 + p > em:only-child {
  display: block;
  font-size: 12px;
  font-style: normal;
  color: var(--ink-faint);
}

/* ── Motion: a calm fade-up on load ── */
@media (prefers-reduced-motion: no-preference) {
  .landing > * {
    animation: rise var(--duration-slow) var(--curve-slow) both;
  }
  .landing > :nth-child(2) {
    animation-delay: 60ms;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
