/* ----------------------------------------------------------------------------
   Interval Swim. Design system.
   Shared by the landing and every long form (legal, policy) page.
   No external assets. No font CDNs. System fonts only.
---------------------------------------------------------------------------- */

:root {
  /* Surfaces */
  --surface: #ffffff;
  --surface-tint: #f4f4f2;

  /* Ink */
  --text: #0b0e1a;
  --text-secondary: #5a5e6b;
  /* Brand spec is #8b8f9b but that fails WCAG 2.2 AA (3.2:1). Darkened to
     #6e7280 (4.9:1) while staying in the same hue family. */
  --text-muted: #6e7280;

  /* Lines */
  --border: #e5e5e2;

  /* Brand */
  --accent: #1e40af;
  --accent-bright: #2563eb;
  --wave: #94deff;

  /* Type */
  --font-sans:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
  --font-mono:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  /* Scale */
  --type-display: clamp(2rem, 5vw, 3.25rem);
  --type-h1: clamp(1.75rem, 3vw, 2.25rem);
  --type-h2: 1.125rem;
  --type-body: 1.0625rem;
  --type-small: 0.9375rem;
  --type-tiny: 0.8125rem;

  /* Rhythm */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Geometry */
  --radius-sm: 6px;
  --radius: 10px;
  --content-narrow: 640px;
  --content-default: 880px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0b0e1a;
    --surface-tint: #181c2a;
    --text: #f4f4f2;
    --text-secondary: #9ca0ac;
    --text-muted: #6b6f7b;
    --border: #2a2e3d;
    --accent: #93c5fd;
    --accent-bright: #60a5fa;
  }
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--type-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-feature-settings:
    "kern" 1,
    "liga" 1;
}

img,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Headings */
h1,
h2,
h3 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.015em;
}
h1 {
  font-size: var(--type-h1);
}
h2 {
  font-size: var(--type-h2);
}
h3 {
  font-size: 1rem;
}

p {
  color: var(--text-secondary);
}
strong {
  color: var(--text);
  font-weight: 600;
}

/* Links */
a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 120ms ease;
}
a:hover {
  color: var(--accent-bright);
}

a:focus-visible,
button:focus-visible,
.skip-link:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  display: inline-block;
  padding: 0.5rem 0.75rem;
  margin: 0.5rem;
  background: var(--text);
  color: var(--surface);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--content-default);
  margin: 0 auto;
  padding-left: var(--space-6);
  padding-right: var(--space-6);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.625rem 1.125rem;
  font-family: var(--font-sans);
  font-size: var(--type-body);
  font-weight: 500;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition:
    background 120ms ease,
    color 120ms ease;
}
.btn--primary {
  background: var(--text);
  color: var(--surface);
}
.btn--primary:hover {
  background: var(--accent);
  color: var(--surface);
}

/* -------------------------------------------------------------------------
   Coming soon layout (the landing page).
   Vertically centered. Narrow. Logo + tagline + email. That is it.
------------------------------------------------------------------------- */

.cs {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
}
.cs__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  max-width: var(--content-narrow);
  margin: 0 auto;
  gap: var(--space-5);
}
.cs__logo {
  width: 120px;
  height: auto;
  margin-bottom: var(--space-2);
}
.cs__wordmark {
  font-family: var(--font-mono);
  font-size: var(--type-tiny);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin: 0;
}
.cs__heading {
  font-size: var(--type-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 18ch;
  margin: var(--space-4) 0 0;
}
.cs__sub {
  margin: 0;
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 30rem;
}
.cs__cta {
  margin-top: var(--space-4);
}
.cs__footer {
  padding: var(--space-8) var(--space-6) var(--space-10);
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: var(--type-small);
}
.cs__footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-3);
}
.cs__footer a {
  color: var(--text-secondary);
  text-decoration: none;
}
.cs__footer a:hover {
  color: var(--text);
  text-decoration: underline;
}
.cs__footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--type-tiny);
}

@media (max-width: 480px) {
  .cs__main {
    padding-top: var(--space-12);
    padding-bottom: var(--space-12);
  }
  .cs__logo {
    width: 96px;
  }
}

/* -------------------------------------------------------------------------
   Sub-page chrome (header + footer for legal / about pages).
------------------------------------------------------------------------- */

.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  padding-top: var(--space-5);
  padding-bottom: var(--space-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
}
.brand:hover {
  color: var(--text);
}
.brand img {
  width: 24px;
  height: auto;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-10) 0 var(--space-12);
  color: var(--text-muted);
  font-size: var(--type-small);
}
.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  margin-bottom: var(--space-4);
}
.site-footer__nav a {
  color: var(--text-secondary);
  text-decoration: none;
}
.site-footer__nav a:hover {
  color: var(--text);
  text-decoration: underline;
}
.site-footer__nav a[aria-current="page"] {
  color: var(--text);
}
.site-footer__copy {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--type-tiny);
}
.site-footer__copy a {
  color: var(--text-secondary);
}

/* -------------------------------------------------------------------------
   Long-form / legal / policy page.
   Use <article class="doc"> for any future legal or policy page.
------------------------------------------------------------------------- */

.doc {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: var(--space-12) var(--space-6) var(--space-16);
  line-height: 1.7;
}
.doc .back {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: var(--type-tiny);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-10);
}
.doc .back:hover {
  color: var(--text);
}
.doc h1 {
  margin-bottom: var(--space-2);
  font-size: clamp(1.5rem, 3vw, 2rem);
}
.doc .effective {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--type-tiny);
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: var(--space-8);
}
.doc h2 {
  margin-top: var(--space-10);
  margin-bottom: var(--space-3);
  font-size: 1.125rem;
}
.doc p {
  margin-bottom: var(--space-4);
  font-size: 1rem;
  color: var(--text);
}
.doc strong {
  color: var(--text);
}
.doc a {
  color: var(--accent);
}

/* Motion + print */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}

@media print {
  .site-header,
  .site-footer,
  .skip-link,
  .cs__footer {
    display: none;
  }
  body {
    color: #000;
    background: #fff;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
}
