/* ==========================================================================
   Crestseal. Single stylesheet.
   Structure: fonts, tokens, reset, layout, type, components, dark mode.
   No colour value appears outside the token blocks below.
   ========================================================================== */

/* ==========================================================================
   1. Fonts. Self hosted, Latin subset, three weights, swap.
   The monospace face uses the system mono stack, which the design
   specification permits, so no fourth font file is downloaded.
   ========================================================================== */

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================================================================
   2. Tokens. Eleven colour values, plus one derived value for text sitting
   on the primary fill.
   ========================================================================== */

:root {
  --primary: #0E5C5A;
  --ink: #093E3D;
  --mid: #1D908D;          /* Hairlines only. Never text. Currently unused. */
  --tint-200: #D2E4E4;
  --tint-100: #EEF4F4;
  --tint-50: #F7FAFA;
  --text: #111417;
  --body-grey: #4A5157;
  --muted-grey: #767E85;
  --hairline: #E3E6E8;
  --page: #FFFFFF;
  --on-primary: #FFFFFF;

  --prose: 620px;
  --shell: 1080px;
  --header-h: 60px;
  --section-y: 72px;
  --pad-x: 24px;

  --face: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --size-display: 30px;
  --size-heading: 23px;
  --size-subhead: 18px;
  --size-body: 17px;
  --size-small: 14px;

  color-scheme: light;
}

@media (min-width: 720px) {
  :root {
    --header-h: 72px;
    --section-y: 104px;
    --size-display: 44px;
    --size-heading: 28px;
    --size-subhead: 19px;
  }
}

/* ==========================================================================
   3. Reset and base
   ========================================================================== */

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--face);
  font-size: var(--size-body);
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  -webkit-text-size-adjust: 100%;
}

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

img, svg { max-width: 100%; }

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 120ms linear;
}

a:hover { color: var(--ink); text-decoration: underline; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

::selection { background: var(--tint-200); color: var(--text); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--page);
  color: var(--primary);
  padding: 12px 16px;
  border: 1px solid var(--hairline);
}

.skip-link:focus {
  left: 0;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.wrap {
  max-width: var(--shell);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

.prose { max-width: var(--prose); }

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  scroll-margin-top: var(--header-h);
}

.section-alt { background: var(--tint-50); }

/* ==========================================================================
   5. Type
   ========================================================================== */

h1, h2, h3 {
  margin: 0 0 0.5em;
  color: var(--text);
  text-wrap: pretty;
}

h1 {
  font-size: var(--size-display);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.6em;
}

h2 {
  font-size: var(--size-heading);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.8em;
}

h3 {
  font-size: var(--size-subhead);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 0.2em;
}

.terms,
.framing,
.signature,
.footer-note,
.disclosure {
  color: var(--body-grey);
}

.terms,
.footer-note {
  font-size: var(--size-small);
  line-height: 1.5;
}

.action { margin-top: 1.5em; margin-bottom: 0.75em; }

/* ==========================================================================
   6. Header
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--page);
  border-bottom: 1px solid var(--hairline);
}

.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.lockup {
  display: inline-flex;
  align-items: center;
  color: var(--primary);
  text-decoration: none;
  min-height: 44px;
}

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

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 4px;
  font-size: var(--size-body);
}

/* ==========================================================================
   7. Buttons
   ========================================================================== */

.button {
  display: inline-block;
  background: var(--primary);
  color: var(--on-primary);
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 14px 24px;
  font-family: inherit;
  font-size: var(--size-body);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms linear, border-color 120ms linear;
}

.button:hover,
.button:focus {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-primary);
  text-decoration: none;
}

/* ==========================================================================
   9. The self-check block
   ========================================================================== */

.selfcheck {
  background: var(--tint-50);
  padding: 24px;
  margin: 1.75rem 0;
}

.section-alt .selfcheck { background: var(--page); }

.selfcheck__q {
  font-family: var(--mono);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 1.25em;
}

.selfcheck__q:last-child { margin-bottom: 0; }

/* ==========================================================================
   10. Prices
   ========================================================================== */

.tier {
  padding: 1.5rem;
  background: var(--tint-50);
  border: 1px solid var(--muted-grey);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.tier:last-of-type { margin-bottom: 0; }

.tier__name {
  margin-bottom: 0.15em;
  font-size: var(--size-subhead);
  font-weight: 600;
}

.tier__start {
  font-size: var(--size-small);
  line-height: 1.5;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.15em;
}

.tier__price {
  font-size: var(--size-subhead);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5em;
}

.tier__copy {
  margin-bottom: 0;
  color: var(--body-grey);
}

.disclosure {
  padding: 1.25rem 1.5rem;
  background: var(--tint-50);
  border: 1px solid var(--muted-grey);
  border-radius: 6px;
  margin: 0 0 1rem;
  color: var(--body-grey);
  font-size: var(--size-small);
  line-height: 1.6;
}

/* ==========================================================================
   11. Plain lists
   ========================================================================== */

.plainlist {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}

.plainlist li {
  margin-bottom: 0.75em;
}

.plainlist li:last-child { margin-bottom: 0; }

/* ==========================================================================
   12. Form
   ========================================================================== */

form { margin-top: 1.75rem; }

.field { margin-bottom: 1.25rem; }

.field label {
  display: block;
  font-size: var(--size-small);
  line-height: 1.5;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.field input,
.field textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 12px;
  font-family: inherit;
  font-size: var(--size-body);
  line-height: 1.5;
  color: var(--text);
  background: var(--page);
  border: 1px solid var(--muted-grey);
  border-radius: 4px;
}

.field textarea { resize: vertical; }

.field input:focus,
.field textarea:focus {
  border-color: var(--primary);
  border-width: 2px;
  padding: 11px;
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: var(--text);
  border-width: 2px;
  padding: 11px;
}

.field__error {
  margin: 0.4rem 0 0;
  font-size: var(--size-small);
  line-height: 1.5;
  font-weight: 700;
  color: var(--text);
}

.field__error:empty { display: none; }

.form-status {
  margin: 0.75rem 0 0;
  color: var(--text);
}

.form-status:empty { display: none; }

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.confirmation {
  margin-top: 1.75rem;
  color: var(--text);
}

/* ==========================================================================
   13. Footer
   ========================================================================== */

.site-footer {
  background: var(--page);
  border-top: 1px solid var(--hairline);
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

.signature { margin-bottom: 0.75em; }

.footer-links { margin-bottom: 0.75em; }

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  margin-right: 20px;
}

.footer-links a:last-child { margin-right: 0; }

.footer-note { margin-bottom: 0.5em; }

.footer-note:last-child { margin-bottom: 0; }

/* ==========================================================================
   14. Reduced motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

