.kf-page {
  --accent: #8ed6d0;
  --accent-2: #e5a255;
  --water: #173f48;
  --reed: #96a66f;
  --berry: #b7574d;
  background:
    radial-gradient(900px 620px at 82% -4%, rgba(57, 155, 166, 0.22), transparent 65%),
    radial-gradient(780px 500px at 5% 24%, rgba(221, 143, 68, 0.09), transparent 65%),
    var(--bg);
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.kf-page :focus-visible {
  outline: 3px solid #9cecf0;
  outline-offset: 4px;
  border-radius: 5px;
}

.kf-page .fcol h2 {
  font-family: var(--sans);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.kf-nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.kf-nav-links a {
  padding: 8px 13px;
  border-radius: 999px;
  color: var(--soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.kf-nav-links a:hover,
.kf-nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--panel);
}

.kf-hero {
  padding-block: clamp(52px, 8vw, 96px) clamp(72px, 10vw, 132px);
}

.kf-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(420px, 1.22fr);
  gap: clamp(46px, 7vw, 104px);
  align-items: center;
}

.kf-hero h1 {
  margin-top: 14px;
  font-size: clamp(4rem, 8vw, 7.25rem);
  letter-spacing: -0.045em;
}

.kf-tagline {
  margin: 4px 0 0;
  color: var(--accent-2);
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  font-style: italic;
}

.kf-hero .lede {
  max-width: 49ch;
  margin: 26px 0 0;
}

.kf-icon {
  width: 78px;
  height: 78px;
  margin-bottom: 26px;
  border: 1px solid var(--line-2);
  border-radius: 21px;
  box-shadow: var(--shadow);
}

.kf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.kf-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 0.89rem;
}

.kf-status::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-2);
  content: "";
  box-shadow: 0 0 0 5px rgba(239, 167, 93, 0.12);
}

.kf-visual {
  position: relative;
  width: min(100%, 680px);
  margin: 0 auto;
}

.kf-visual::before {
  position: absolute;
  inset: 6% -2% -3% 4%;
  border-radius: 50%;
  background: rgba(42, 141, 151, 0.24);
  filter: blur(48px);
  content: "";
}

.kf-feature-art {
  position: relative;
  width: 100%;
  height: auto;
  border: 1px solid rgba(235, 250, 244, 0.24);
  border-radius: clamp(24px, 4vw, 42px);
  box-shadow: 0 38px 100px rgba(0, 0, 0, 0.58);
}

.kf-visual figcaption {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: end;
  gap: 8px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kf-visual figcaption span + span::before {
  margin-right: 18px;
  color: var(--berry);
  content: "•";
}

.kf-screens { padding-top: clamp(20px, 4vw, 48px); }

.kf-screen-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2.5vw, 28px);
  align-items: start;
}

.kf-screen {
  margin: 0;
  padding: 7px;
  border: 1px solid var(--line-2);
  border-radius: clamp(20px, 3vw, 30px);
  background: linear-gradient(160deg, #26322d, #111512);
  box-shadow: var(--shadow-xl);
}

.kf-screen:nth-child(2) { margin-top: 38px; }
.kf-screen:nth-child(3) { margin-top: 76px; }

.kf-screen img {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: clamp(14px, 2.4vw, 23px);
  object-fit: cover;
}

.kf-screen figcaption {
  padding: 17px 14px 13px;
  color: var(--soft);
  font-size: 0.91rem;
  line-height: 1.5;
}

.habitat-board {
  position: absolute;
  inset: 7%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: hidden;
  border: 1px solid rgba(235, 250, 244, 0.24);
  border-radius: clamp(24px, 6vw, 42px);
  background: #10201d;
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.52), 0 1px 0 rgba(255,255,255,.09) inset;
  transform: rotate(2.5deg);
}

.habitat-cell {
  position: relative;
  display: grid;
  place-items: center;
  border-right: 1px solid rgba(244, 250, 245, 0.12);
  border-bottom: 1px solid rgba(244, 250, 245, 0.12);
}

.habitat-cell:nth-child(5n) { border-right: 0; }
.habitat-cell:nth-child(n + 21) { border-bottom: 0; }
.habitat-cell.h1 { background: rgba(58, 117, 100, 0.3); }
.habitat-cell.h2 { background: rgba(42, 125, 139, 0.29); }
.habitat-cell.h3 { background: rgba(108, 125, 77, 0.28); }
.habitat-cell.h4 { background: rgba(148, 92, 54, 0.25); }
.habitat-cell.h5 { background: rgba(74, 84, 129, 0.27); }

.habitat-cell svg {
  width: 56%;
  height: 56%;
  overflow: visible;
  color: #f0b15f;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.35));
}

.kf-feather {
  position: absolute;
  right: 0;
  bottom: 3%;
  width: 26%;
  height: 42%;
  border-radius: 100% 0 100% 0;
  background: linear-gradient(150deg, #70d0d3, #247f8b 54%, #173d48);
  box-shadow: var(--shadow);
  transform: rotate(19deg);
}

.kf-feather::after {
  position: absolute;
  top: 9%;
  left: 49%;
  width: 2px;
  height: 91%;
  background: rgba(232, 246, 237, 0.58);
  content: "";
  transform: rotate(16deg);
  transform-origin: top;
}

.kf-rule-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 0;
  counter-reset: rule;
}

.kf-rule-grid li {
  min-height: 225px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(155deg, rgba(105, 203, 209, 0.08), var(--panel) 42%);
  list-style: none;
  counter-increment: rule;
}

.kf-rule-grid li::before {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  margin-bottom: 38px;
  border: 1px solid rgba(105, 203, 209, 0.35);
  border-radius: 50%;
  color: var(--accent);
  content: counter(rule, decimal-leading-zero);
  font-family: var(--display);
}

.kf-rule-grid h3 { font-size: 1.25rem; }
.kf-rule-grid p { margin: 10px 0 0; color: var(--muted); }

.kf-modes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.kf-mode {
  position: relative;
  min-height: 220px;
  overflow: hidden;
  padding: clamp(26px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background:
    radial-gradient(420px 240px at 100% 0%, rgba(105, 203, 209, 0.12), transparent 70%),
    var(--panel);
}

.kf-mode::after {
  position: absolute;
  right: -44px;
  bottom: -60px;
  width: 170px;
  height: 170px;
  border: 1px solid rgba(105, 203, 209, 0.15);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 28px rgba(105, 203, 209, 0.03);
}

.kf-mode .eyebrow { color: var(--accent-2); }
.kf-mode h3 { margin-top: 16px; font-size: clamp(1.55rem, 3vw, 2.2rem); }
.kf-mode p { max-width: 45ch; margin: 14px 0 0; color: var(--muted); }

.kf-puzzle {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(700px 540px at 15% 42%, rgba(28, 108, 116, 0.22), transparent 72%),
    linear-gradient(180deg, rgba(13, 24, 21, 0.7), rgba(11, 15, 13, 0.86));
}

.kf-puzzle-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(54px, 10vw, 150px);
  align-items: center;
}

.kf-phone {
  margin: 0;
}

.kf-phone-shell {
  position: relative;
  width: min(100%, 380px);
  margin-inline: auto;
  padding: 9px;
  border: 1px solid rgba(235, 250, 244, 0.2);
  border-radius: clamp(30px, 5vw, 48px);
  background: linear-gradient(155deg, #313b37, #111512 60%);
  box-shadow: 0 44px 100px rgba(0, 0, 0, 0.64);
}

.kf-phone-shell::before {
  position: absolute;
  top: 17px;
  left: 50%;
  z-index: 2;
  width: 28%;
  height: 6px;
  border-radius: 999px;
  background: rgba(9, 15, 13, 0.72);
  content: "";
  transform: translateX(-50%);
}

.kf-phone-shell img {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  border-radius: clamp(23px, 4.2vw, 38px);
  object-fit: cover;
}

.kf-phone figcaption {
  max-width: 34ch;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
  text-align: center;
}

.kf-phone-game {
  width: min(100%, 440px);
  justify-self: center;
  transform: rotate(-1.5deg);
}

.kf-puzzle-copy h2,
.kf-explore-head h2,
.kf-play-rhythm h2 {
  margin-top: 16px;
  font-size: clamp(2.65rem, 5.6vw, 5.25rem);
}

.kf-section-lede {
  max-width: 54ch;
  margin: 26px 0 0;
  color: var(--soft);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  line-height: 1.7;
}

.kf-rule-list {
  display: grid;
  gap: 0;
  margin: 36px 0 0;
  padding: 0;
  counter-reset: rule;
}

.kf-rule-list li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: start;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  list-style: none;
  counter-increment: rule;
}

.kf-rule-list li::before {
  color: var(--accent-2);
  content: counter(rule, decimal-leading-zero);
  font-family: var(--display);
  font-size: 1.05rem;
}

.kf-rule-list h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
}

.kf-rule-list p {
  margin: 5px 0 0;
  color: var(--muted);
}

.kf-explore-head {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(32px, 7vw, 96px);
  align-items: end;
  margin-bottom: clamp(42px, 7vw, 84px);
}

.kf-explore-head > p {
  margin: 0 0 8px;
  color: var(--soft);
  font-size: 1.06rem;
  line-height: 1.7;
}

.kf-explore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
}

.kf-story {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(190px, 1.18fr);
  min-height: 680px;
  overflow: hidden;
  padding: clamp(28px, 4vw, 48px) clamp(20px, 3vw, 36px) 0 clamp(28px, 4vw, 48px);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  background:
    radial-gradient(520px 340px at 80% 8%, rgba(119, 190, 184, 0.16), transparent 72%),
    linear-gradient(165deg, #162a29, #101713 64%);
  box-shadow: var(--shadow);
}

.kf-story-sanctuary {
  background:
    radial-gradient(520px 340px at 80% 8%, rgba(221, 143, 68, 0.13), transparent 72%),
    linear-gradient(165deg, #272519, #101713 64%);
}

.kf-story-copy {
  position: relative;
  z-index: 2;
  align-self: start;
  padding-top: 10px;
}

.kf-story-copy h3 {
  margin-top: 18px;
  font-size: clamp(1.85rem, 3.3vw, 3rem);
}

.kf-story-copy > p:last-child {
  margin: 18px 0 0;
  color: var(--soft);
  line-height: 1.7;
}

.kf-story .kf-phone {
  align-self: end;
  margin-left: -8px;
}

.kf-story .kf-phone-shell {
  width: min(100%, 330px);
  transform: translateY(54px);
}

.kf-story .kf-phone figcaption {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.kf-play-rhythm {
  padding-top: clamp(40px, 6vw, 76px);
}

.kf-play-rhythm-copy {
  margin-bottom: clamp(32px, 5vw, 54px);
}

.kf-rhythm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
}

.kf-rhythm-grid article {
  min-height: 220px;
  padding: 28px 24px 30px;
  border-right: 1px solid var(--line);
}

.kf-rhythm-grid article:last-child { border-right: 0; }

.kf-rhythm-grid span {
  color: var(--accent-2);
  font-family: var(--display);
  font-size: 0.86rem;
}

.kf-rhythm-grid h3 {
  margin-top: 56px;
  font-size: 1.42rem;
}

.kf-rhythm-grid p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.kf-values {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(22px, 5vw, 70px);
  align-items: stretch;
}

.kf-values-copy,
.kf-collection {
  padding: clamp(28px, 5vw, 52px);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}

.kf-values-copy { background: var(--panel); }
.kf-values-copy h2 { margin-top: 15px; font-size: clamp(2rem, 4vw, 3.2rem); }
.kf-values-copy > p { margin: 20px 0 0; color: var(--soft); font-size: 1.08rem; line-height: 1.7; }

.kf-value-list {
  display: grid;
  gap: 18px;
  margin: 30px 0 0;
  padding: 0;
}

.kf-value-list li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  color: var(--soft);
  list-style: none;
}

.kf-value-list li::before { color: var(--accent); content: "✦"; }

.kf-collection {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(420px 300px at 80% 10%, rgba(142, 214, 208, 0.15), transparent 75%),
    linear-gradient(180deg, rgba(17, 59, 65, 0.7), rgba(13, 28, 25, 0.92)),
    var(--panel);
}

.kf-collection-icon {
  width: min(58%, 240px);
  height: auto;
  margin-bottom: 42px;
  border: 1px solid var(--line-2);
  border-radius: 22%;
  box-shadow: var(--shadow);
}

.bird-medallions { display: flex; margin-bottom: 42px; }
.bird-medallions span {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  margin-left: -12px;
  border: 3px solid #143137;
  border-radius: 50%;
  background: #ebaa5a;
  color: #11262a;
}
.bird-medallions span:first-child { margin-left: 0; }
.bird-medallions svg { width: 38px; height: 38px; }
.bird-medallions span:nth-child(2) { background: #7bc7c8; }
.bird-medallions span:nth-child(3) { background: #9eaf75; }
.bird-medallions span:nth-child(4) { background: #d07c55; }
.kf-collection h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.kf-collection p { margin: 15px 0 0; color: var(--soft); line-height: 1.65; }

.kf-cta {
  overflow: hidden;
  background:
    radial-gradient(500px 220px at 50% 0%, rgba(105, 203, 209, 0.2), transparent 70%),
    linear-gradient(180deg, #14231f, #101713);
}

.kf-cta .kf-actions { justify-content: center; }

.kf-article { padding-top: clamp(46px, 7vw, 86px); }
.kf-article .prose h2 { scroll-margin-top: 90px; }
.kf-article .prose h3 {
  margin-top: 1.5em;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 750;
  letter-spacing: 0;
}
.kf-article .prose ul { padding-left: 1.3em; }
.kf-article .prose li + li { margin-top: 0.65em; }
.kf-article .prose code { color: var(--text); }

.notice {
  padding: 20px 22px;
  border: 1px solid rgba(105, 203, 209, 0.28);
  border-radius: var(--r-sm);
  background: rgba(105, 203, 209, 0.07);
}

.help-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 28px 0 38px;
  padding: 0;
}

.help-index li { list-style: none; }
.help-index a {
  display: block;
  height: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
}
.help-index a:hover { border-color: var(--accent); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

@media (max-width: 920px) {
  .kf-hero-grid,
  .kf-puzzle-grid,
  .kf-explore-head,
  .kf-values { grid-template-columns: 1fr; }
  .kf-visual { width: min(88vw, 640px); order: -1; }
  .kf-puzzle-grid { gap: 72px; }
  .kf-phone-game { width: min(78vw, 420px); }
  .kf-explore-head > p { max-width: 56ch; }
  .kf-explore-grid { grid-template-columns: 1fr; }
  .kf-story { min-height: 620px; }
  .kf-rhythm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kf-rhythm-grid article:nth-child(2) { border-right: 0; }
  .kf-rhythm-grid article:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .kf-rule-grid { grid-template-columns: repeat(2, 1fr); }
  .kf-screen-grid { grid-template-columns: repeat(3, minmax(220px, 1fr)); overflow-x: auto; padding: 8px 4px 28px; scroll-snap-type: x mandatory; }
  .kf-screen { scroll-snap-align: center; }
}

@media (max-width: 620px) {
  .brand-name { font-size: 1.05rem; }
  .kf-nav-links a { padding-inline: 8px; font-size: 0.82rem; }
  .kf-nav-links a:nth-child(-n + 2) { display: none; }
  .kf-hero h1 { font-size: clamp(3.4rem, 17vw, 5rem); }
  .kf-visual figcaption { grid-template-columns: repeat(2, auto); justify-content: center; }
  .kf-visual figcaption span:nth-child(3)::before { margin: 0; content: ""; }
  .kf-modes,
  .kf-rule-grid,
  .help-index { grid-template-columns: 1fr; }
  .kf-screen-grid { grid-template-columns: repeat(3, minmax(78vw, 1fr)); }
  .kf-screen:nth-child(2),
  .kf-screen:nth-child(3) { margin-top: 0; }
  .kf-rule-grid li { min-height: 0; }
  .kf-rule-grid li::before { margin-bottom: 24px; }
  .kf-story {
    grid-template-columns: 0.78fr 1.22fr;
    min-height: 570px;
    padding-left: 24px;
  }
  .kf-story-copy > p:last-child { font-size: 0.9rem; }
  .kf-story .kf-phone-shell { transform: translate(8px, 46px); }
  .kf-rhythm-grid { grid-template-columns: 1fr; }
  .kf-rhythm-grid article {
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .kf-rhythm-grid article:nth-child(3) { border-bottom: 1px solid var(--line); }
  .kf-rhythm-grid article:last-child { border-bottom: 0; }
  .kf-rhythm-grid h3 { margin-top: 28px; }
  .kf-actions .btn { flex: 1; justify-content: center; }
}

@media (max-width: 390px) {
  .brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .habitat-board,
  .kf-feather,
  .kf-phone-game { transform: none; }
}
