/*
 * trayceapp.com. Colours, type, corners and spacing are the app's Dawn look (docs/design.md
 * sections 3, 5 and 6; docs/design-system/tokens.json), light and dark. Every text pair is at
 * least 4.5:1 in both schemes (services/site/README.md, "Checks"). No script, no third-party file.
 */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-800.woff2') format('woff2');
}

/* Dawn light (tokens.json color.dawn.light.roles). */
:root {
  color-scheme: light dark;
  --bg: #f3f6fd;
  --surface: #ffffff;
  --text: #10163a;
  --muted: #515977;
  --accent: #4451cd;
  --accent-container: #dadcf5;
  --container-high: #f4f5fc;
  --secondary-container: #f6e0d6;
  --track: #e3e7f6;

  /* Corners (tokens.json shape.corner) and spacing (space). */
  --corner-large: 16px;
  --corner-extra-large: 28px;
  --corner-hero: 48px;
  --margin: 1rem;
  --card-padding: 1.25rem;
  --hero-padding: 1.5rem;
  --group-gap: 1.5rem;
}

/* Dawn dark (tokens.json color.dawn.dark.roles). */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101133;
    --surface: #191c40;
    --text: #f0f3fc;
    --muted: #a7b0cb;
    --accent: #9eb3ff;
    --accent-container: #343a66;
    --container-high: #22274d;
    --secondary-container: #403a52;
    --track: #282c53;
  }
}

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

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

/* bodyLarge: 17 / 24, weight 500, tracking 0.15. */
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    'Plus Jakarta Sans',
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.5;
  letter-spacing: 0.009em;
}

.wrap {
  width: 100%;
  max-width: 44rem;
  margin: 0 auto;
  padding-left: var(--margin);
  padding-right: var(--margin);
}

/* headlineLarge 32 / 40, displaySmall 36 / 44, titleLarge 22 / 28, titleMedium 16 / 24. */
h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: 0;
  margin: 0;
}

h1 {
  font-size: 2rem;
  line-height: 1.25;
}

h2 {
  font-size: 1.375rem;
  line-height: 1.27;
  font-weight: 700;
  margin-top: 2rem;
}

h3 {
  font-size: 1rem;
  line-height: 1.5;
  font-weight: 700;
  margin-top: 1.25rem;
}

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

ul,
ol {
  padding-left: 1.5rem;
}

li + li {
  margin-top: 0.5rem;
}

strong {
  font-weight: 800;
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;
}

a:hover {
  text-decoration-thickness: 3px;
}

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

/* Skip link: hidden until it has the keyboard's focus. */
.skip {
  position: absolute;
  left: var(--margin);
  top: -10rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-radius: var(--corner-large);
  z-index: 1;
}

.skip:focus {
  top: 0.5rem;
}

/* Header: the mark and name, then the pages. Every link is at least 48 px tall (design.md 10). */
.site-header {
  padding: 0.75rem 0;
}

.header-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1rem;
}

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

.brand img {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
}

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

.nav li + li {
  margin-top: 0;
}

.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 0 0.875rem;
  border-radius: 999px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.007em;
  text-decoration: none;
}

.nav a:hover {
  background: var(--container-high);
}

/* The page you are on: a tonal fill and an underline, never the fill alone (design.md 10). */
.nav a[aria-current='page'] {
  background: var(--accent-container);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

main {
  padding-top: 1rem;
  padding-bottom: 3rem;
}

/* Cards: the app's Surface (28 dp corners, 20 dp padding); the home hero takes 48 dp. */
.card {
  background: var(--surface);
  border-radius: var(--corner-extra-large);
  padding: var(--card-padding);
  margin-top: var(--group-gap);
}

.card > h2:first-child {
  margin-top: 0;
}

.hero {
  border-radius: var(--corner-hero);
  padding: var(--hero-padding);
  margin-top: 0.5rem;
}

.hero img {
  display: block;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1rem;
  margin-bottom: 1.25rem;
}

/* displaySmall for the home title. */
.hero h1 {
  font-size: 2.25rem;
  line-height: 1.22;
}

/* headlineSmall: the one emphasised line under it. */
.lead {
  font-size: 1.5rem;
  line-height: 1.33;
  font-weight: 700;
  margin-top: 0.5rem;
}

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

/* The draft notice on the privacy page, in the secondary container (never a meaning colour). */
.draft {
  background: var(--secondary-container);
  border-radius: var(--corner-large);
  padding: 1rem 1.25rem;
  margin-top: 1.25rem;
}

.draft p {
  margin-top: 0.25rem;
}

.draft p:first-child {
  margin-top: 0;
}

.email {
  font-weight: 700;
}

.site-footer {
  border-top: 1px solid var(--track);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.43;
  letter-spacing: 0.018em;
}

.site-footer .nav {
  margin-top: 0.5rem;
}

.site-footer .nav a {
  padding-left: 0;
  margin-right: 1rem;
  color: var(--accent);
  text-decoration: underline;
}

@media (min-width: 40rem) {
  :root {
    --margin: 1.5rem;
    --card-padding: 1.75rem;
    --hero-padding: 2.5rem;
  }

  h1 {
    font-size: 2.25rem;
    line-height: 1.22;
  }

  .hero h1 {
    font-size: 2.8125rem;
    line-height: 1.16;
  }
}
