/* CanvasPM visual design system.
   Palette and type are Paul's brand values; every text/background pairing
   below was checked against WCAG AA contrast (guide Section 5/9) before
   being assigned a role -- the light blues test at ~2:1 on white and are
   used for decoration/dark-bg text only, never as light-bg text color. */

:root {
  color-scheme: light;

  /* Brand palette, as supplied */
  --color-navy: #17274b;        /* main dark */
  --color-navy-deep: #192545;   /* darkest side color -- dark-section bg */
  --color-blue-steel: #3e5a84;  /* 7.0:1 on white -- safe as secondary text */
  --color-blue-pale: #b3c7d5;   /* main light -- decorative / dark-bg text */
  --color-blue-mist: #a3bcd2;
  --color-blue-sky: #77a5c8;
  --color-blue-fog: #9cb5c8;
  --color-blue-cloud: #b2c5d3;
  --color-red: #c33c54;         /* accent -- 5.1:1 with white either direction */
  --color-white: #ffffff;

  /* Semantic tokens -- components read these, not the raw brand names */
  --ink: var(--color-navy);
  --paper: var(--color-white);
  --muted: var(--color-blue-steel);
  --line: var(--color-blue-cloud);
  --accent: var(--color-red);
  --accent-ink: var(--color-white);
  --surface-tint: #eef2f6;      /* pale neutral derived from the palette, for card/band fills */

  /* Lovelo Black is a licensed commercial face pending webfont files +
     confirmed web-embedding rights -- falls back to a bold system stack
     until then. Swap the family list, not the var name, once it lands. */
  --font-heading: "Lovelo Black", "Arial Black", "Helvetica Neue", sans-serif;
  --font-body: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}

h1, h2, h3, h4, .logo__text {
  font-family: var(--font-heading);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.15;
}

a { color: var(--color-red); }
a:hover { color: var(--color-navy); }

:focus-visible {
  outline: 3px solid var(--color-red);
  outline-offset: 2px;
}

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

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.5em 1em;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  padding: 0.75rem 1.5rem;
  background: var(--paper);
}
.site-header__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  color: var(--ink);
}
.logo__mark { display: block; width: 2.25rem; height: 2.25rem; }
.logo__text { font-size: 1.05rem; letter-spacing: 0.06em; }

.btn {
  display: inline-block;
  padding: 0.5em 1em;
  border-radius: 0.35em;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--accent);
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn--talk, .btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn--talk:hover, .btn--primary:hover {
  background: var(--color-navy);
  border-color: var(--color-navy);
  color: var(--color-white);
}
.btn--secondary {
  background: transparent;
  color: var(--accent);
}
.btn--secondary:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.primary-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  padding: 0.5rem 0 0;
  margin: 0;
}
.primary-nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.primary-nav a:hover { color: var(--accent); }
.primary-nav .has-children { position: relative; }
.primary-nav .sub-nav {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0.5rem;
  list-style: none;
  min-width: 12rem;
  z-index: 10;
}
.primary-nav .has-children:hover .sub-nav,
.primary-nav .has-children:focus-within .sub-nav {
  display: block;
}

/* Main content */
main { max-width: 60rem; margin: 0 auto; padding: 2rem 1.5rem; }

.hero { margin-bottom: 2rem; padding-bottom: 1.5rem; }
.hero h1 { font-size: 2rem; margin-bottom: 0.25em; }
.dek { color: var(--muted); font-size: 1.15rem; }

/* The one signature ornamental element (guide Section 5): a Mondrian-style
   color-block rule under every page's hero, echoing the logo grid. Applied
   once here via ::after so every layout gets it automatically -- no page
   template has to remember to include it (guide Section 10 duplicate-
   component warning). */
.hero::after {
  content: "";
  display: block;
  height: 8px;
  margin-top: 1.25rem;
  background: linear-gradient(
    to right,
    var(--color-navy) 0 42%,
    var(--color-red) 42% 55%,
    var(--color-blue-steel) 55% 80%,
    var(--color-blue-cloud) 80% 100%
  );
}

.section { margin: 2.5rem 0; }
.section--credibility { border-top: 1px solid var(--line); padding-top: 2rem; }

.card-grid {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}
.card-grid li {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  padding: 1rem;
}
.card-grid a { font-weight: 600; text-decoration: none; }
.badge {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.1em 0.6em;
}

.attribution-box {
  background: var(--surface-tint);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { text-align: left; padding: 0.5em 0.75em; border-bottom: 1px solid var(--line); }

.cta-band {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--surface-tint);
  border-radius: 0.5rem;
  text-align: center;
}
.cta-band__headline { font-family: var(--font-heading); letter-spacing: 0.02em; margin-bottom: 0.75rem; }
.cta-band .btn { margin: 0 0.4rem; }

.email-gate, .contact-form {
  display: grid;
  gap: 0.5rem;
  max-width: 24rem;
}
.email-gate input, .contact-form input, .contact-form textarea {
  padding: 0.5em;
  border: 1px solid var(--line);
  border-radius: 0.3em;
  font-family: var(--font-body);
}

/* Footer -- a deliberately dark section, on the brand's darkest navy, with
   its own fixed contract for text/links/buttons/borders (guide Section 5:
   "handle dark sections as one reusable contract, not per-component
   patches"). Every color used here was checked against --color-navy-deep
   specifically, not assumed from the light-mode pairings above. */
.site-footer {
  background: var(--color-navy-deep);
  color: var(--color-white);
  border-top: 1px solid var(--color-navy-deep);
  padding: 2rem 1.5rem;
  margin-top: 3rem;
  display: grid;
  gap: 1rem;
}
.site-footer .logo { color: var(--color-white); }
.site-footer a { color: var(--color-blue-pale); }
.site-footer a:hover { color: var(--color-white); }
.site-footer nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0;
  margin: 0.25rem 0;
}
.footer-subscribe { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: end; }
.footer-subscribe label { display: block; font-size: 0.85rem; color: var(--color-blue-mist); }
.footer-subscribe input {
  padding: 0.5em;
  border: 1px solid var(--color-blue-steel);
  border-radius: 0.3em;
  background: var(--color-white);
  color: var(--ink);
  font-family: var(--font-body);
}
.footer-subscribe button {
  padding: 0.5em 1em;
  border-radius: 0.35em;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  cursor: pointer;
}
.social { list-style: none; display: flex; gap: 1rem; padding: 0; }
