/* www.kinhero.app (kh3). Plain HTML and CSS: no JavaScript, no analytics,
   nothing loaded from other sites. Nunito is self-hosted (SIL OFL 1.1, see
   fonts/OFL.txt), subset to Latin, weights 400-800.

   Contrast rules (kinhero-site-plan.md, finding 5):
   - navy on cream for body text and links (~13.5:1)
   - deep coral on cream only for the "Hero" half of the wordmark and
     headings 24px+ (or 19px bold)
   - coral is never text on cream: button fills with navy text only
   - teal and yellow are decoration only
   - dark mode: navy background, cream text, coral headings and links */

@font-face {
  font-family: "Nunito";
  src: url("/assets/fonts/nunito-latin-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1f2a44;
  --cream: #fff8ef;
  --coral: #ff7a59;
  --coral-deep: #e4572e;
  --teal: #2bb3c0;
  --yellow: #ffc845;

  --bg: var(--cream);
  --text: var(--navy);
  --heading: var(--coral-deep);
  --link: var(--navy);
  --kin: var(--navy);
  --hero: var(--coral-deep);
  --line: #e9dccb;
  --panel: #ffffff;
  --button-bg: var(--coral);
  --button-text: var(--navy);
  --focus: var(--navy);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--navy);
    --text: var(--cream);
    --heading: var(--coral);
    --link: var(--coral);
    --kin: var(--cream);
    --hero: var(--coral);
    --line: #34415f;
    --panel: #26324f;
    --button-bg: var(--coral);
    --button-text: var(--navy);
    --focus: var(--cream);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 44rem; /* about 68 characters per line at 18px */
  margin: 0 auto;
  padding: 0 16px;
}

/* Skip link: hidden until focused. */
.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 10px 16px;
  background: var(--panel);
  color: var(--text);
  border: 2px solid var(--focus);
  border-radius: 8px;
}

.skip:focus {
  top: 16px;
}

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

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

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 20px 0 8px;
}

.brand {
  display: inline-block;
  text-decoration: none;
  min-height: 44px;
}

.wordmark {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.wordmark .kin {
  color: var(--kin);
}

.wordmark .hero {
  color: var(--hero);
}

.tagline {
  display: block;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.site-nav li {
  margin: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 700;
  text-decoration: none;
  color: var(--text);
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-decoration-color: var(--coral);
  text-underline-offset: 0.3em;
}

/* Main */

main {
  padding: 32px 0 48px;
}

h1,
h2,
h3 {
  color: var(--heading);
  font-weight: 800;
  line-height: 1.25;
}

h1 {
  margin: 0 0 12px;
  font-size: 36px;
}

h2 {
  margin: 40px 0 12px;
  font-size: 26px;
  scroll-margin-top: 16px;
}

/* Sub-headings below 24px stay in the body colour (contrast rule). */
h3 {
  margin: 24px 0 8px;
  font-size: 20px;
  color: var(--text);
}

p,
ul,
ol,
table,
blockquote {
  margin: 0 0 16px;
}

ul,
ol {
  padding-left: 1.4em;
}

li {
  margin: 0 0 6px;
}

/* Lists of standalone links: 44px tap targets. */
.link-list li {
  margin: 0;
}

.link-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.meta {
  font-weight: 700;
  margin-bottom: 24px;
}

.lead {
  font-size: 21px;
}

/* Home */

.hero-block {
  position: relative;
  padding: 8px 0 8px;
}

/* Small abstract decoration: CSS shapes only, no images. */
.dots {
  display: flex;
  gap: 10px;
  margin: 0 0 20px;
}

.dots span {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
}

.dots span:nth-child(1) {
  background: var(--coral);
}

.dots span:nth-child(2) {
  background: var(--yellow);
}

.dots span:nth-child(3) {
  background: var(--teal);
}

.hero-title {
  font-size: 44px;
  margin-bottom: 4px;
}

.hero-title .kin {
  color: var(--kin);
}

.hero-title .hero {
  color: var(--hero);
}

.hero-sub {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px 24px;
  border-radius: 12px;
  background: var(--button-bg);
  color: var(--button-text);
  font-weight: 800;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

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

.card {
  margin: 0 0 16px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--teal);
  border-radius: 12px;
}

.card.yellow {
  border-left-color: var(--yellow);
}

.card.coral {
  border-left-color: var(--coral);
}

.card h2 {
  margin-top: 0;
}

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

/* Tables (Privacy section 6) */

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 17px;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  font-weight: 800;
}

/* Text opt-in */

blockquote {
  padding: 16px 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 6px solid var(--yellow);
  border-radius: 12px;
}

blockquote p:last-child {
  margin-bottom: 0;
}

.reply {
  font-weight: 700;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 24px 0 32px;
  font-size: 16px;
}

.site-footer p {
  margin: 0 0 8px;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
