/* Kindred Spirit website. One stylesheet, system fonts only (nothing loaded from another site), light and dark
   from the visitor's system setting. Colours are checked for WCAG AA contrast in both themes. */

:root {
  --bg: #fbf8f1;
  --bg-soft: #f3eee2;
  --surface: #ffffff;
  --ink: #1f2a22;
  --muted: #56655a;
  --line: #e4dccb;
  --accent: #2b7539;
  --accent-ink: #ffffff;
  --accent-soft: #e2f4dd;
  --slime: #6fd36f;
  --cheek: #f59fb2;
  --sky: #d9edfb;
  --code-bg: #f1ece0;
  --shadow: 0 1px 2px rgb(40 50 30 / 0.06), 0 8px 24px rgb(40 50 30 / 0.08);
  --radius: 18px;
  --radius-small: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", Quicksand, Nunito, "Varela Round",
    system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121a16;
    --bg-soft: #18221d;
    --surface: #1b2620;
    --ink: #eef3ec;
    --muted: #a9b8ad;
    --line: #2c3a32;
    --accent: #8ee39a;
    --accent-ink: #0f2112;
    --accent-soft: #1f3526;
    --sky: #1a2a35;
    --code-bg: #0f1612;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 10px 28px rgb(0 0 0 / 0.35);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--font);
  overflow-wrap: break-word;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { text-decoration-thickness: 0.14em; }

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

h1, h2, h3, h4 { font-family: var(--font-round); line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 0.6rem; }
h2 { font-size: clamp(1.45rem, 3.2vw, 1.9rem); margin: 2.4rem 0 0.8rem; }
h3 { font-size: 1.2rem; margin: 1.8rem 0 0.5rem; }
p, ul, ol, table, pre, figure { margin: 0 0 1rem; }
li + li { margin-top: 0.3rem; }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }
code { background: var(--code-bg); padding: 0.1em 0.35em; border-radius: 6px; overflow-wrap: anywhere; }
pre code { overflow-wrap: normal; }
pre {
  background: var(--code-bg);
  padding: 1rem 1.1rem;
  border-radius: var(--radius-small);
  overflow-x: auto;
  line-height: 1.5;
  border: 1px solid var(--line);
}
pre code { background: none; padding: 0; font-size: 0.875rem; }
kbd {
  border: 1px solid var(--line);
  border-bottom-width: 3px;
  border-radius: 6px;
  padding: 0.05em 0.4em;
  background: var(--surface);
}

.wrap { max-width: 72rem; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2rem); }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--accent); color: var(--accent-ink); padding: 0.6rem 1rem; border-radius: var(--radius-small);
}
.skip-link:focus { top: 1rem; }
main:focus { outline: none; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap; padding-block: 0.8rem; }
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-round); font-weight: 750; font-size: 1.2rem; color: var(--ink); text-decoration: none;
}
.brand img { display: block; }
.site-nav ul { display: flex; gap: 0.2rem; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav li + li { margin: 0; }
.site-nav a {
  display: block; padding: 0.45rem 0.8rem; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 550;
}
.site-nav a:hover { background: var(--bg-soft); }
.site-nav a[aria-current="page"] { background: var(--accent-soft); color: var(--ink); }
@media (max-width: 40rem) {
  .header-inner { padding-block: 0.6rem 0.4rem; }
  .site-nav { width: 100%; }
  .site-nav ul { margin-inline: -0.55rem; row-gap: 0.1rem; }
  .site-nav a { padding: 0.35rem 0.55rem; white-space: nowrap; }
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 2.9rem; padding: 0.6rem 1.25rem; border-radius: 999px;
  font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  border: 2px solid var(--accent); background: transparent; color: var(--ink);
}
.btn:hover { background: var(--accent-soft); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.08); }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

/* Home: hero */
.hero {
  background:
    radial-gradient(60rem 26rem at 85% -10%, var(--sky), transparent 70%),
    radial-gradient(40rem 20rem at -10% 110%, var(--accent-soft), transparent 70%);
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; align-items: center; gap: 2rem; padding-block: clamp(2.5rem, 7vw, 5rem); }
.hero h1 { font-size: clamp(2.3rem, 6.5vw, 4rem); margin-bottom: 1rem; }
.hero .lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 36rem; }
.hero .facts { color: var(--muted); font-size: 0.95rem; }
.hero-pip { justify-self: center; width: min(19rem, 70vw); }
.pip-art { display: block; width: 100%; overflow: visible; }
.pip-body { animation: bob 3.6s ease-in-out infinite; transform-origin: 60px 110px; }
.pip-shadow { animation: shadow 3.6s ease-in-out infinite; transform-origin: 60px 116px; }
.pip-eyes { animation: blink 5.2s infinite; transform-origin: 60px 62px; }
@keyframes bob { 0%, 100% { transform: translateY(0) scale(1, 1); } 45% { transform: translateY(-7px) scale(0.98, 1.03); } 90% { transform: translateY(1px) scale(1.04, 0.96); } }
@keyframes shadow { 0%, 100% { transform: scale(1); opacity: 0.35; } 45% { transform: scale(0.82); opacity: 0.22; } }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(0.1); } }
@media (prefers-reduced-motion: reduce) {
  .pip-body, .pip-shadow, .pip-eyes { animation: none; }
}
.speech {
  position: relative; display: inline-block; background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 14px; padding: 0.45rem 0.85rem; box-shadow: var(--shadow);
  font-family: var(--font-round); font-weight: 600; margin: 0 0 0.75rem;
}
.speech::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 14px; height: 14px; margin-left: -7px;
  background: var(--surface); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); transform: rotate(45deg);
}
.hero-pip figure { margin: 0; text-align: center; }
@media (max-width: 48rem) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-pip { order: -1; width: min(8.5rem, 40vw); }
  .hero-pip .speech { white-space: nowrap; font-size: 0.9rem; }
  .hero-inner { gap: 1rem; padding-top: 1.5rem; }
}

/* Sections */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section h2 { margin-top: 0; }
.section-intro { color: var(--muted); max-width: 44rem; font-size: 1.1rem; }

/* Video */
.video { margin: 1.5rem 0 0; }
.video-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  background: #1d2a22; box-shadow: var(--shadow);
}
.video-frame > img, .video-frame > video, .video-frame > iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video-frame > video { object-fit: contain; background: #000; }
.video-play {
  position: absolute; inset: 0; display: flex; align-items: flex-end; justify-content: center;
  border: 0; padding: 0 0 clamp(1rem, 6%, 2.5rem); background: rgb(10 20 14 / 0.15); cursor: pointer; color: #fff; text-decoration: none; font: inherit;
}
.video-play:hover { background: rgb(10 20 14 / 0.3); }
.video-play-badge {
  display: inline-flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.4rem 0.8rem 1.1rem; border-radius: 999px;
  background: rgb(255 255 255 / 0.95); color: #1f2a22; font-weight: 700; font-size: 1.05rem; box-shadow: 0 6px 20px rgb(0 0 0 / 0.3);
}
.video-play-badge svg { width: 1.6rem; height: 1.6rem; }
.video figcaption { color: var(--muted); font-size: 0.95rem; margin-top: 0.7rem; }

/* Feature cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(16.5rem, 1fr)); gap: 1.25rem; padding: 0; list-style: none; }
.cards > li { margin: 0; }
.card {
  height: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card img, .card video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg-soft); }
.card-body { padding: 1rem 1.15rem 1.2rem; }
.card h3 { margin: 0 0 0.35rem; }
.card p { margin: 0; color: var(--muted); }
.card .say { margin-top: 0.7rem; font-family: var(--font-round); font-weight: 600; color: var(--ink); }

.card .card-cmd { margin-top: 0.7rem; }
.say::before { content: "“"; color: var(--accent); }
.say::after { content: "”"; color: var(--accent); }

.pill-list { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; }
.pill-list li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.85rem; font-family: var(--font-round); font-weight: 600; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
@media (max-width: 48rem) { .split { grid-template-columns: 1fr; } }
.split-media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split-media video, .split-media img { display: block; width: 100%; }

.promise-list { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.promise-list li { margin: 0; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.promise-list strong { display: block; font-family: var(--font-round); font-size: 1.08rem; margin-bottom: 0.2rem; }

/* Prose pages */
.prose { max-width: 46rem; padding-block: clamp(2rem, 5vw, 3.5rem); }
.prose h2 { padding-top: 0.4rem; }
.prose .lede { font-size: 1.15rem; color: var(--muted); }
.prose table { display: block; overflow-x: auto; border-collapse: collapse; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--line); }
.prose th { font-family: var(--font-round); background: var(--bg-soft); }
.prose img { border-radius: var(--radius-small); }
.page-head { padding-top: clamp(2rem, 5vw, 3.5rem); }

.note {
  border-left: 5px solid var(--slime); background: var(--accent-soft); padding: 0.85rem 1.1rem;
  border-radius: 0 var(--radius-small) var(--radius-small) 0; margin: 1.25rem 0;
}
.note > :last-child { margin-bottom: 0; }
.note-title { font-family: var(--font-round); font-weight: 700; margin-bottom: 0.25rem; }

.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 2.8rem; margin-bottom: 1.1rem; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0.05rem; width: 2rem; height: 2rem; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-family: var(--font-round);
}

.link-cards { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.link-cards li { margin: 0; }
.link-cards a {
  display: block; height: 100%; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--ink); box-shadow: var(--shadow);
}
.link-cards a:hover { border-color: var(--accent); }
.link-cards strong { display: block; font-family: var(--font-round); font-size: 1.12rem; color: var(--accent); margin-bottom: 0.25rem; }
.link-cards span { color: var(--muted); }

/* Guides */
.guide-layout { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; }
.guide-nav { padding-top: clamp(2rem, 5vw, 3.5rem); }
.guide-nav ol { list-style: none; padding: 0; margin: 0; position: sticky; top: 1rem; }
.guide-nav li + li { margin-top: 0.15rem; }
.guide-nav a { display: block; padding: 0.45rem 0.75rem; border-radius: var(--radius-small); color: var(--ink); text-decoration: none; }
.guide-nav a:hover { background: var(--bg-soft); }
.guide-nav a[aria-current="page"] { background: var(--accent-soft); font-weight: 650; }
.guide-nav-title { font-family: var(--font-round); font-weight: 700; margin: 0 0 0.5rem; }
.guide-nav-title a { padding-left: 0.75rem; color: var(--muted); }
@media (max-width: 56rem) {
  .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .guide-nav { padding-top: 1.25rem; }
  .guide-nav ol { position: static; display: flex; gap: 0.35rem; overflow-x: auto; padding-bottom: 0.4rem; }
  .guide-nav li + li { margin: 0; }
  .guide-nav a { white-space: nowrap; border: 1px solid var(--line); border-radius: 999px; padding: 0.35rem 0.8rem; }
  .guide-nav-title { display: none; }
}
.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.pager a { display: flex; flex-direction: column; text-decoration: none; font-family: var(--font-round); font-weight: 700; }
.pager span { font-family: var(--font); font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.pager-next { text-align: right; margin-left: auto; }

/* Footer */
main > .wrap.prose:last-child, main > .guide-layout { padding-bottom: 2rem; }
.site-footer { border-top: 1px solid var(--line); background: var(--bg-soft); font-size: 0.95rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 1.5rem 3rem; padding-block: 2.2rem 1.5rem; }
.footer-brand { display: flex; align-items: center; gap: 0.5rem; font-family: var(--font-round); font-weight: 750; font-size: 1.1rem; margin-bottom: 0.4rem; }
.footer-about p { color: var(--muted); max-width: 30rem; }
.footer-links { display: flex; gap: 2.5rem; flex-wrap: wrap; }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li + li { margin-top: 0.35rem; }
.footer-links a, .link-button { color: var(--ink); }
.mojang-notice { grid-column: 1 / -1; color: var(--muted); font-size: 0.8rem; letter-spacing: 0.02em; border-top: 1px solid var(--line); padding-top: 1rem; margin: 0; }
@media (max-width: 48rem) { .footer-inner { grid-template-columns: 1fr; } }

.link-button {
  background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer;
}

/* Cookie choice */
.consent {
  position: fixed; z-index: 20; left: 50%; bottom: 1rem; transform: translateX(-50%);
  width: min(38rem, calc(100% - 2rem)); background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 12px 40px rgb(0 0 0 / 0.22);
  padding: 1.1rem 1.25rem 1.2rem; font-size: 0.97rem;
}
.consent h2 { font-size: 1.15rem; margin: 0 0 0.35rem; }
.consent p { margin: 0 0 0.8rem; color: var(--muted); }
.consent .btn-row { margin: 0.4rem 0 0; }
.consent .btn { flex: 1 1 10rem; min-height: 2.7rem; }
.consent-state { font-size: 0.9rem; }
@media print { .consent, .site-nav, .skip-link { display: none; } }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
