/* Radii Mail home site (apps/site). Values from docs/design-tokens.json / design-system sections 3-5. No web fonts,
   no external requests, no inline styles (the vhost's CSP is style-src 'self'). */

:root {
  color-scheme: light dark;
  --surface-canvas: #f4f7fa;
  --surface-base: #ffffff;
  --surface-hover: #eef2f6;
  --border-subtle: #dbe3ea;
  --border-strong: #708397;
  --text-primary: #101c28;
  --text-secondary: #475869;
  --text-link: #0052dc;
  --brand-fill: #005bf9;
  --brand-fill-hover: #004fe0;
  --brand-fill-active: #0043c8;
  --brand-on-fill: #ffffff;
  --brand-soft: #e6eefd;
  --focus-ring: #0052dc;
  --plate: transparent;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --radius-md: 8px;
  --duration-fast: 120ms;
  --easing: cubic-bezier(0.2, 0, 0, 1);
  --wrap: 68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface-canvas: #0d151e;
    --surface-base: #131d28;
    --surface-hover: #1c2836;
    --border-subtle: #273646;
    --border-strong: #6f8498;
    --text-primary: #e6edf4;
    --text-secondary: #aebdcb;
    --text-link: #8ab2ff;
    --brand-fill: #7aa7ff;
    --brand-fill-hover: #94b9ff;
    --brand-fill-active: #b0cbff;
    --brand-on-fill: #06131e;
    --brand-soft: #172c52;
    --focus-ring: #8ab2ff;
    /* brand/README.md: the navy wordmark sits on a light plate in dark mode. */
    --plate: #ffffff;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-canvas);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
p {
  margin: 0;
}

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

a:focus-visible,
.button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

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

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.75rem 1rem;
  background: var(--surface-base);
  color: var(--text-primary);
  border: 2px solid var(--focus-ring);
  border-radius: var(--radius-md);
}

.skip-link:focus {
  top: 1rem;
}

/* Header: the wordmark at 32 px with at least 8 px clear space (brand/README.md). */
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5rem;
}

.brand {
  display: inline-flex;
  margin-left: calc(-0.25rem - 4px);
  padding: 0.25rem;
  border-radius: var(--radius-md);
}

.brand__plate {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-md);
  background: var(--plate);
}

.brand__logo {
  display: block;
  width: auto;
  height: 32px;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-weight: 500;
  text-decoration: none;
}

.site-nav__link:hover {
  background: var(--surface-hover);
}

/* Hero: the one idea of the page. */
.hero {
  padding: 3.5rem 0 4rem;
}

@media (min-width: 48rem) {
  .hero {
    padding: 6rem 0 6.5rem;
  }
}

.hero--compact {
  padding: 3.5rem 0 5rem;
}

.hero__title {
  max-width: 14ch;
  font-size: clamp(2.5rem, 7vw + 0.5rem, 4.75rem);
  font-weight: 650;
  line-height: 1.04;
  letter-spacing: -0.025em;
}

.hero__title--small {
  font-size: clamp(2rem, 4vw + 0.75rem, 3rem);
}

.hero__lede {
  max-width: 36rem;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
  line-height: 1.55;
}

.address {
  color: var(--text-primary);
  font-weight: 600;
  white-space: nowrap;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.375rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--easing), border-color var(--duration-fast) var(--easing);
}

.button--primary {
  background: var(--brand-fill);
  color: var(--brand-on-fill);
}

.button--primary:hover {
  background: var(--brand-fill-hover);
}

.button--primary:active {
  background: var(--brand-fill-active);
}

.button--secondary {
  border-color: var(--border-strong);
  background: transparent;
  color: var(--text-primary);
}

.button--secondary:hover {
  background: var(--surface-hover);
}

@media (max-width: 30rem) {
  .actions .button {
    flex: 1 1 100%;
  }
}

/* Three points: type and rules, not cards. */
.points {
  padding: 3.5rem 0;
  background: var(--surface-base);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.points__list {
  display: grid;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 48rem) {
  .points {
    padding: 4.5rem 0;
  }

  .points__list {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.point {
  padding-top: 1.25rem;
  border-top: 2px solid var(--text-primary);
}

.point__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.point__text {
  margin-top: 0.5rem;
  color: var(--text-secondary);
}

.business {
  padding: 3.5rem 0 4rem;
}

.business__inner {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 48rem) {
  .business {
    padding: 4.5rem 0 5rem;
  }

  .business__inner {
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    align-items: baseline;
  }
}

.business__title {
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.3;
}

.business__text {
  max-width: 40rem;
  color: var(--text-secondary);
  font-size: 1.0625rem;
}

.site-footer {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.site-footer__bar {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
  line-height: 1.75rem;
}

@media (min-width: 48rem) {
  .site-footer__bar {
    flex-direction: row;
    align-items: baseline;
    gap: 2rem;
  }

  .site-footer__copy {
    margin-right: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (forced-colors: active) {
  .button,
  .site-nav__link {
    border: 1px solid ButtonText;
  }

  .point {
    border-top-color: CanvasText;
  }
}
