/* caspyr.app. Colors, type, and contrast follow "Design direction" in the
   app's CLAUDE.md: light only, navy on cream, red only for the one call to
   action on a page (never small red text, never red on navy). */

@font-face {
  font-family: 'DM Serif Display';
  src: url('/fonts/DMSerifDisplay_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_400Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/Inter_600SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --cream: #fceea8;
  --tint: #fefbe9; /* page background */
  --surface: #fdf6cf; /* cards */
  --border: #e6e1c4;
  --navy: #293f76; /* headings and body text: 9.3-9.8 on the tints */
  --muted: #58688f; /* secondary text, on the tints only (5.1+) */
  --red: #d62e2f; /* buttons only; the label is the tint (4.7) */
  --cream-quiet: rgba(252, 238, 168, 0.8); /* secondary text on navy */
  --display: 'DM Serif Display', Georgia, 'Times New Roman', serif;
  --body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --radius: 1.25rem;
}

*,
*::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(--tint);
  color: var(--navy);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

main {
  flex: 1;
}

main:focus {
  outline: none;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  margin: 0 0 0.5em;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 6vw, 3.5rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 600;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p,
ul,
ol {
  margin: 0 0 1em;
}

p,
li {
  text-wrap: pretty;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

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

strong {
  font-weight: 600;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Skip link: hidden until focused. */
.skip-link {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--navy);
  color: var(--cream);
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
}

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

.skip-link:focus-visible {
  outline-color: var(--cream);
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--tint);
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-block: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
}

.wordmark {
  font-family: var(--display);
  font-size: 1.85rem;
  line-height: 1;
  letter-spacing: -0.01em;
  padding-bottom: 0.12em;
}

.site-nav ul,
.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
}

.site-nav a {
  display: inline-block;
  padding-block: 0.4rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current='page'] {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.35em;
}

/* Plain pages: Support, the legal pages, 404 */
.page {
  width: 100%;
  max-width: calc(44rem + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}

.page-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.page-head h1 {
  margin-bottom: 0.3em;
}

.page-head .effective {
  margin: 0;
  color: var(--muted);
}

.page .lead {
  font-size: 1.2rem;
  margin-bottom: 2rem;
}

.page h2 {
  margin-top: 2.25rem;
}

.page h3 {
  margin-top: 1.75rem;
}

.prose ul,
.prose ol,
.page ul,
.page ol {
  padding-left: 1.4rem;
}

.page li + li {
  margin-top: 0.35em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.5em;
  font-size: 0.95rem;
  display: block;
  overflow-x: auto;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
}

.prose th {
  background: var(--surface);
  font-weight: 600;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 4vw, 1.75rem);
}

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

.card > :last-child {
  margin-bottom: 0;
}

.email {
  font-weight: 600;
}

/* The one red call to action on a page. */
.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border-radius: 999px;
  background: var(--red);
  color: var(--tint);
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.3;
  text-decoration: none;
}

.button:hover {
  background: #bf2627;
}

.button:focus-visible {
  outline-color: var(--navy);
}

/* Home: the photo hero. Cream text sits on a navy fade that is at least 80%
   navy behind every line, so it passes AA even over the bright sunbeams. */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(86vh, 52rem);
  min-height: min(86svh, 52rem);
  overflow: hidden;
  background: var(--navy);
  color: var(--cream);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(41, 63, 118, 0.1) 0%,
    rgba(41, 63, 118, 0.2) 35%,
    rgba(41, 63, 118, 0.55) 60%,
    rgba(41, 63, 118, 0.94) 100%
  );
}

.hero-text {
  position: relative;
  width: 100%;
  padding-block: 9rem clamp(2.5rem, 6vw, 4rem);
  background: linear-gradient(
    to bottom,
    rgba(41, 63, 118, 0) 0,
    rgba(41, 63, 118, 0.8) 8rem,
    rgba(41, 63, 118, 0.94) 100%
  );
}

.hero-text .wrap > * {
  max-width: 40rem;
}

.kicker {
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1 {
  font-size: clamp(2.6rem, 8vw, 5rem);
  line-height: 1.02;
  margin-bottom: 0.4em;
}

.hero .lead {
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--cream-quiet);
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
}

/* Home: sections */
.section {
  padding-block: clamp(3.5rem, 9vw, 6rem);
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head h2,
.band h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.1;
}

.section-head p {
  font-size: 1.15rem;
}

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.step-number {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--display);
  font-size: 2.6rem;
  line-height: 1;
}

.split {
  display: grid;
  gap: 2rem 3rem;
  align-items: start;
}

.split > * {
  max-width: 40rem;
}

.tiers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.tiers li {
  padding: 0.35rem 0.9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
}

.who {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}

.who strong {
  display: block;
  font-family: var(--display);
  font-weight: 400;
  font-size: 2.2rem;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

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

/* A head-to-head in miniature: navy is you, red is your rival (on cream). */
.duel {
  display: grid;
  gap: 0.5rem;
  margin: 1.25rem 0 0;
}

.duel-row {
  display: grid;
  grid-template-columns: 3.75rem 1fr;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.duel-bar {
  display: block;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--border);
  overflow: hidden;
}

.duel-bar::after {
  content: '';
  display: block;
  height: 100%;
  border-radius: inherit;
}

.duel-you::after {
  width: 84%;
  background: var(--navy);
}

.duel-rival::after {
  width: 66%;
  background: var(--red);
}

/* Navy band: cream on navy (8.6:1). No red here, ever. */
.band {
  background: var(--navy);
  color: var(--cream);
  padding-block: clamp(3.5rem, 9vw, 6rem);
}

.band p {
  max-width: 40rem;
  font-size: 1.1rem;
}

.band .quiet {
  color: var(--cream-quiet);
}

.band :focus-visible {
  outline-color: var(--cream);
}

.band-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.75rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  font-weight: 600;
}

.soon {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.soon h2 {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 5vw, 2.9rem);
  line-height: 1.1;
}

.soon-mark {
  width: 4.5rem;
  height: 4.5rem;
}

/* Footer: navy, cream text. */
.site-footer {
  background: var(--navy);
  color: var(--cream);
  font-size: 0.95rem;
}

.site-footer :focus-visible {
  outline-color: var(--cream);
}

.footer-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  padding-block: 3rem 2.5rem;
}

.footer-inner p {
  margin-bottom: 0.75rem;
}

.footer-wordmark {
  font-family: var(--display);
  font-size: 1.75rem;
  line-height: 1;
}

.footer-about p:not(.footer-wordmark),
.footer-contact p,
.footer-legal p {
  color: var(--cream-quiet);
}

.footer-contact a,
.footer-legal a {
  color: var(--cream);
}

.footer-contact a {
  font-weight: 600;
}

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

.footer-nav a {
  font-weight: 600;
}

/* 404 */
.not-found .actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-top: 2rem;
}

@media (min-width: 48rem) {
  .split {
    grid-template-columns: 1fr 1fr;
  }

  .soon {
    grid-template-columns: auto 1fr;
    gap: 2.5rem;
  }

  .soon-mark {
    width: 5.5rem;
    height: 5.5rem;
  }
}

/* Wide screens: the text sits on the left, so the fade leans left too and
   the path on the right stays visible. Behind the text (never past 66% of
   the width at 64rem, 58% at 1280 px) the fade is still at least 80% navy. */
@media (min-width: 64rem) {
  .hero::before {
    background: linear-gradient(
      to bottom,
      rgba(41, 63, 118, 0.05) 0%,
      rgba(41, 63, 118, 0.15) 40%,
      rgba(41, 63, 118, 0.4) 100%
    );
  }

  .hero-text {
    isolation: isolate;
    background: none;
  }

  .hero-text::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
      to right,
      rgba(41, 63, 118, 0.94) 0%,
      rgba(41, 63, 118, 0.9) 60%,
      rgba(41, 63, 118, 0.4) 100%
    );
    mask-image: linear-gradient(to bottom, transparent 0, #000 8rem);
  }
}

@media (max-width: 26rem) {
  .header-inner {
    justify-content: center;
  }

  .site-nav ul {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

@media print {
  .site-header nav,
  .skip-link,
  .hero-photo {
    display: none;
  }

  .hero,
  .band,
  .site-footer {
    background: none;
    color: var(--navy);
  }

  .hero::before,
  .hero-text {
    background: none;
  }
}
