/* KEYFALL uses the shared KMC tokens, width, typography, navigation and footer.
   All page styling is scoped; original game imagery is distinct from diagrams. */
.kf-page { background: #020e16; --kf-line: #123b4e; }
.kf-page .kf-top { position: relative; isolation: isolate; }
.kf-page:not(.kf-enhanced) .kf-demo-status, .kf-page:not(.kf-enhanced) .language-toggle { display: none; }
/* This star image is not tileable. Fade it before its shortest rendered edge. */
.kf-page .kf-top::before { content: ''; position: absolute; z-index: -2; inset: 0 0 auto; height: 860px; pointer-events: none; background: radial-gradient(ellipse at 77% 39%,#064a7180,transparent 48%),linear-gradient(180deg,#02080d18,#020e16 300px),url('/assets/stars.webp') top center / max(100%,1440px) auto no-repeat; opacity: .65; }
.kf-page .site-header { z-index: 10; }
.kf-page .kf-hero { display: grid; grid-template-columns: 54% 46%; align-items: center; min-height: 638px; gap: 0; padding-block: 20px 36px; }
.kf-page .kf-hero-copy { position: relative; z-index: 1; padding-block: 30px 200px; }
.kf-page .kf-wordmark { margin: 0 0 26px; color: #eff7fa; font-size: clamp(28px,3.3vw,46px); line-height: 1; letter-spacing: .28em; font-weight: 500; }
.kf-page .kf-wordmark::first-letter { color: var(--accent); }
.kf-page h1 { font-size: clamp(43px,5vw,72px); font-weight: 700; line-height: 1.06; letter-spacing: -.045em; }
.kf-page h1 > span, .kf-page h1 > strong { display: block; white-space: nowrap; }
.kf-page h1 strong { font: inherit; color: var(--accent); }
.kf-page .kf-lead { max-width: 40ch; margin: 21px 0 25px; font-size: clamp(17px,1.5vw,21px); line-height: 1.5; color: #ecf3f7; }
.kf-page .kf-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.kf-page .kf-status { display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; min-height: 36px; border: 1px solid #24404e; border-radius: 999px; background: #071822; font-size: 14px; color: #d2dee6; }
.kf-page .kf-status > span:first-child { width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.kf-page .kf-follow { min-height: 44px; display: inline-flex; align-items: center; gap: 14px; font-size: 15px; color: var(--accent); }
.kf-page .kf-follow:hover { color: #bcf9ff; }
.kf-page .kf-device-preview { position: relative; display: grid; justify-items: center; width: 100%; max-width: 390px; margin: 0 auto; padding: 0 20px; }
.kf-page .kf-device-preview::before { content: ''; position: absolute; z-index: -1; inset: 15% 0 5%; border-radius: 50%; background: radial-gradient(ellipse,#00517d66,transparent 66%); pointer-events: none; }
.kf-page .kf-gameplay-shot { display: block; width: 280px; max-width: 100%; overflow: hidden; border-radius: 12px; outline: 1px solid #396070; box-shadow: 0 18px 44px #0009; }
.kf-page .kf-gameplay-shot img { width: 100%; aspect-ratio: 707 / 1536; object-fit: contain; }
.kf-page figcaption { margin-top: 12px; color: #a9becb; font-size: 12px; line-height: 1.5; text-align: center; }
.kf-page .kf-bordered { border-top: 1px solid var(--kf-line); }
.kf-page .kf-eyebrow { margin: 0 0 16px; font-size: clamp(11px,1vw,14px); font-weight: 600; line-height: 1.5; letter-spacing: .20em; color: var(--accent); }
.kf-page .kf-section-top { display: flex; align-items: center; justify-content: space-between; gap: 12px 28px; }
.kf-page .kf-section-top .kf-eyebrow { margin: 0; }
.kf-page .kf-skip-demo { display: inline-flex; align-items: center; min-height: 44px; color: #a5b9c7; font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.kf-page .kf-caption { color: #95afbf; font-size: 12px; line-height: 1.5; margin: 0; }
.kf-page .kf-demo { padding-block: 23px 24px; }
.kf-page .kf-demo-focus { margin-top: 17px; border: 1px solid transparent; border-radius: 8px; outline-offset: 6px; }
.kf-page .kf-demo-focus.is-active { border-color: #186079; background: #061d284d; }
.kf-page .kf-demo-focus.is-error { border-color: #ef7272; box-shadow: 0 0 0 1px #ef7272; }
.kf-page .kf-steps { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 50px; list-style: none; margin: 0; padding: 0; }
.kf-page .kf-step { position: relative; min-width: 0; padding: 8px 0 17px; }
.kf-page .kf-step:not(:last-child)::after { content: '›'; position: absolute; right: -30px; top: 58px; color: #187693; font-size: 30px; font-weight: 300; }
.kf-page .kf-step-visual { display: flex; align-items: center; gap: 18px; height: 94px; }
.kf-page .kf-step-number { flex: 0 0 30px; align-self: center; font-size: 24px; font-weight: 700; color: var(--accent); }
.kf-page .kf-word { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 145px; border: 1px solid #0ca4d0; border-radius: 5px; background: #042032; box-shadow: 0 0 16px #00b5e51f; color: #eaf5fb; font-size: 25px; font-weight: 500; letter-spacing: .025em; transition: opacity .25s,transform .25s; }
.kf-page .kf-word .is-entered { color: var(--accent); }
.kf-page .is-complete .kf-word { opacity: .25; transform: translateY(12px); }
.kf-page .kf-keys { display: flex; gap: 5px; }
.kf-page .kf-keys kbd { display: grid; place-items: center; width: clamp(29px,2.7vw,38px); height: 43px; border: 1px solid #46606e; border-bottom-width: 3px; border-radius: 5px; background: #0b141c; color: #e8f0f5; font: 19px/1 Arial,Helvetica,sans-serif; transition: background .15s,color .15s; }
.kf-page .kf-keys .is-entered { color: #00151c; border-color: #43d7ed; background: var(--accent); }
.kf-page .kf-core { margin: 0; width: 100%; max-width: 280px; overflow: hidden; border: 1px solid #315c6d; border-radius: 7px; background: #141d22; box-shadow: 0 2px 8px #0017201a; }
.kf-page .kf-core img { display: block; width: 100%; aspect-ratio: 1260 / 440; object-fit: contain; }
.kf-page .kf-core.is-hit { animation: kf-core-hit .55s ease-out; }
@keyframes kf-core-hit { 50% { filter: brightness(1.4); transform: scale(1.025); } }
.kf-page .kf-schema-label { display: block; margin: 3px 0 7px; font-size: 11px; color: #8ca5b4; }
.kf-page .kf-step h3 { margin: 0 0 6px; font-size: clamp(16px,1.4vw,20px); line-height: 1.25; }
.kf-page .kf-step p { margin: 0; max-width: 25ch; font-size: 15px; line-height: 1.5; color: #bdcdda; }
.kf-page .kf-demo-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 10px; }
.kf-page .kf-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--accent); border-radius: 7px; background: var(--accent); color: #00151e; font-weight: 600; font-size: 14px; cursor: pointer; }
.kf-page .kf-button:hover:not(:disabled) { background: #76e6f4; border-color: #76e6f4; }
.kf-page .kf-button-subtle { background: #072131; color: #d2f4fb; border-color: #22637c; }
.kf-page .kf-button-subtle:hover:not(:disabled) { background: #113b50; color: #fff; }
.kf-page .kf-reset { min-height: 44px; border: 0; background: transparent; color: #a6becd; font-size: 13px; padding: 10px 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.kf-page .kf-demo-status { margin: 12px 0 0; min-height: 38px; max-width: 90ch; color: #a9c1d1; font-size: 13px; line-height: 1.45; }
.kf-page .kf-display { background: radial-gradient(ellipse at 72% 50%,#06344857,transparent 56%); }
.kf-page .kf-display-grid { display: grid; grid-template-columns: 53% 47%; align-items: center; gap: 0; padding-block: 40px; }
.kf-page .kf-display-copy { padding-block: 26px; }
.kf-page h2:not(.sr-only) { margin: 0; font-size: clamp(33px,3.5vw,50px); line-height: 1.08; letter-spacing: -.035em; }
.kf-page .kf-display h2 span, .kf-page .kf-description span { display: block; }
.kf-page .kf-description { margin: 18px 0 23px; max-width: 40ch; font-size: 17px; line-height: 1.5; color: #e0e9ee; }
.kf-page .kf-tabs { display: flex; width: fit-content; max-width: 100%; border: 1px solid #1c5770; border-radius: 8px; background: #031722; }
.kf-page .kf-tabs button { min-height: 46px; padding: 11px 22px; border: 0; border-radius: 7px; background: transparent; color: #c0d3df; font-size: 14px; line-height: 1.3; cursor: pointer; }
.kf-page .kf-tabs [aria-selected='true'] { color: #001720; background: var(--accent); }
.kf-page .kf-comparison-disclaimer { max-width: 45ch; font-size: 12px; line-height: 1.5; color: #a3bac9; margin: 13px 0 21px; }
.kf-page .kf-compatibility { padding-left: 14px; border-left: 2px solid #2486a1; color: #d3e0e8; font-size: 14px; line-height: 1.5; margin: 0; }
.kf-page .kf-comparison-panel { width: 100%; min-width: 0; outline-offset: 6px; border-radius: 8px; }
.kf-page .kf-comparison-figure { margin: 0 auto; width: 260px; max-width: 100%; }
.kf-page .kf-screen-frame { position: relative; border-radius: 10px; overflow: hidden; outline: 1px solid #305265; }
.kf-page .kf-screen-frame > img { width: 100%; aspect-ratio: 707 / 1536; object-fit: contain; }
.kf-page .kf-screen-overlay { position: absolute; inset: auto 0 0; min-height: 37%; display: grid; align-content: center; justify-items: center; gap: 8px; padding: 20px 10px; border-top: 1px solid #68808e; background: #1a2834f7; text-align: center; color: #d6e3eb; }
.kf-page .kf-screen-overlay strong { font-size: 14px; }
.kf-page .kf-screen-overlay > span { font-size: 11px; line-height: 1.4; }
.kf-page .kf-neutral-keyboard { display: grid; grid-template-columns: repeat(6,1fr); gap: 5px; width: 100%; margin-bottom: 5px; }
.kf-page .kf-neutral-keyboard span { height: 20px; border: 1px solid #627482; border-radius: 3px; background: #374550; }
.kf-page .kf-features { padding-block: 28px 32px; }
.kf-page .kf-feature-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 24px; }
.kf-page .kf-feature { min-width: 0; overflow: hidden; border: 1px solid #195068; border-radius: 9px; background: #03121c; transition: transform .2s,border-color .2s; }
.kf-page .kf-feature:hover { transform: translateY(-2px); border-color: #277794; }
.kf-page .kf-feature-visual { display: grid; place-items: center; height: clamp(135px,12.5vw,175px); background: #030b12; }
.kf-page .kf-feature--text { position: relative; display: flex; align-items: flex-end; min-height: calc(clamp(135px,12.5vw,175px) + 100px); background: linear-gradient(160deg,#0b304120,#03121c 70%); }
.kf-page .kf-feature--text .kf-feature-copy { padding-block: 26px; }
.kf-page .kf-feature .kf-feature-stage { position: absolute; top: 26px; left: 20px; color: #24d7e9; font-size: 11px; font-weight: 700; letter-spacing: .18em; }
.kf-page .kf-nora { isolation: isolate; }
/* Fade only the original artwork's outer matte; the complete luminous ring
   stays inside the fully opaque center. Keep the same treatment in both themes. */
.kf-page .kf-nora img { width: auto; height: calc(100% - 18px); max-height: 150px; aspect-ratio: 318 / 326; object-fit: contain; mix-blend-mode: screen; -webkit-mask-image: radial-gradient(ellipse closest-side at center, #000 92%, transparent 100%); mask-image: radial-gradient(ellipse closest-side at center, #000 92%, transparent 100%); }
.kf-page .kf-feature-copy { padding: 16px 20px 21px; }
.kf-page .kf-feature h3 { margin: 0 0 8px; font-size: clamp(18px,1.5vw,21px); line-height: 1.25; letter-spacing: -.02em; }
.kf-page .kf-feature p { margin: 0; max-width: 29ch; color: #b5cad8; font-size: 15px; line-height: 1.45; }
.kf-page .kf-updates { padding-block: 34px 37px; background: radial-gradient(ellipse at 45% 140%,#05578566,transparent 70%),#04131e; }
.kf-page .kf-updates .kf-eyebrow { font-size: 11px; margin-bottom: 10px; }
.kf-page .kf-updates h2 { font-size: clamp(26px,2.5vw,35px); }
.kf-page .kf-updates-copy { margin: 11px 0 0; max-width: 65ch; color: #b5cad8; font-size: 15px; line-height: 1.5; }
.kf-page .kf-footer { background: #020d15; }
.kf-page .site-footer { min-height: 108px; border: 0; gap: 28px; }
.kf-page .footer-brand { width: 166px; }
.kf-page .copyright { display: grid; gap: 5px; font-size: 12px; line-height: 1.5; order: 0; }
.kf-page .footer-links { gap: 32px; font-size: 13px; }
.kf-page .footer-links a { min-width: 44px; }
@media (max-width: 1100px) and (min-width: 901px) {
  .kf-page .kf-hero { grid-template-columns: 55% 45%; }
  .kf-page h1 { font-size: 4.4vw; }
  .kf-page .kf-steps { gap: 32px; }
  .kf-page .kf-step:not(:last-child)::after { right: -21px; }
  .kf-page .kf-step-visual { gap: 10px; }
  .kf-page .kf-keys { gap: 3px; }
  .kf-page .kf-step-number { flex-basis: 25px; font-size: 21px; }
  .kf-page .kf-tabs button { padding-inline: 16px; }
}
@media (max-width: 900px) {
  .kf-page .kf-hero { grid-template-columns: 1fr; padding-block: 25px 34px; }
  .kf-page .kf-hero-copy { padding-block: 0 28px; }
  .kf-page h1 { font-size: clamp(42px,7vw,62px); }
  .kf-page .kf-wordmark { font-size: 35px; margin-bottom: 24px; }
  .kf-page .kf-lead { font-size: 19px; max-width: none; }
  .kf-page .kf-gameplay-shot { width: 240px; }
  .kf-page .kf-demo { padding-block: 22px; }
  .kf-page .kf-steps { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: min(79vw,350px); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 3px; padding: 7px 3px 16px; gap: 22px; scrollbar-width: thin; scrollbar-color: #346477 #041421; }
  .kf-page .kf-step { scroll-snap-align: start; border-right: 1px solid #143444; padding-right: 20px; }
  .kf-page .kf-step:last-child { border-right: 0; }
  .kf-page .kf-step::after { display: none; }
  .kf-page .kf-step-visual { height: 104px; }
  .kf-page .kf-keys kbd { width: 36px; }
  .kf-page .kf-step h3 { font-size: 19px; }
  .kf-page .kf-step p { font-size: 16px; }
  .kf-page .kf-core { max-width: 225px; }
  .kf-page .kf-display-grid { grid-template-columns: 1fr; gap: 27px; padding-block: 30px; }
  .kf-page .kf-display-copy { padding-block: 0; }
  .kf-page h2:not(.sr-only) { font-size: clamp(34px,5vw,45px); }
  .kf-page .kf-description { max-width: none; }
  .kf-page .kf-comparison-disclaimer { max-width: 55ch; }
  .kf-page .kf-feature-grid { gap: 16px; }
  .kf-page .kf-feature-copy { padding-inline: 15px; }
  .kf-page .kf-feature h3 { font-size: 17px; }
  .kf-page .kf-feature p { font-size: 14px; }
  .kf-page .kf-updates h2 { font-size: 32px; }
  .kf-page .site-footer { flex-wrap: wrap; gap: 16px 24px; }
  .kf-page .footer-links { margin-left: 0; }
}
@media (max-width: 720px) {
  .kf-page:not(.kf-enhanced) .site-menu-toggle { display: none; }
  .kf-page:not(.kf-enhanced) .site-header { flex-wrap: wrap; gap: 0 16px; padding-block: 10px; }
  .kf-page:not(.kf-enhanced) .site-header > .navigation { position: static; display: flex; flex-direction: row; flex-wrap: wrap; gap: 14px; width: auto; padding: 0; background: none; border: 0; box-shadow: none; }
  .kf-page:not(.kf-enhanced) .site-header > .navigation a { width: auto; padding: 0; }
  .kf-page:not(.kf-enhanced) .language-toggle { display: none; }
  .kf-page .kf-section-top { align-items: flex-start; flex-direction: column; gap: 0; }
  .kf-page .kf-skip-demo { min-height: 36px; }
  .kf-page .kf-feature-grid { grid-template-columns: 1fr; gap: 17px; }
  .kf-page .kf-feature-visual { height: 175px; }
  .kf-page .kf-feature--text { min-height: 190px; }
  .kf-page .kf-feature h3 { font-size: 20px; }
  .kf-page .kf-feature p { font-size: 16px; }
  .kf-page .kf-feature-copy { padding: 17px 20px 23px; }
  .kf-page .kf-updates { padding-block: 29px; }
  .kf-page .kf-updates h2 { font-size: 30px; }
  .kf-page .site-footer { padding-block: 26px; }
  .kf-page .footer-brand { width: 148px; }
  .kf-page .copyright { flex-basis: 100%; }
  .kf-page .footer-links { flex-basis: 100%; gap: 30px; }
}
@media (max-width: 480px) {
  .kf-page { --gutter: max(22px,env(safe-area-inset-left),env(safe-area-inset-right)); }
  .kf-page .kf-hero { padding-top: 21px; }
  .kf-page h1 { font-size: clamp(32px,8.8vw,42px); letter-spacing: -.04em; }
  .kf-page .kf-wordmark { font-size: 28px; margin-bottom: 24px; }
  .kf-page .kf-lead { font-size: 16px; margin-block: 18px 17px; max-width: 32ch; }
  .kf-page .kf-hero-actions { gap: 5px 14px; }
  .kf-page .kf-status { font-size: 12px; padding: 7px 10px; }
  .kf-page .kf-follow { font-size: 13px; gap: 9px; }
  .kf-page .kf-device-preview { padding: 8px 0 0; }
  .kf-page .kf-gameplay-shot { width: 210px; }
  .kf-page .kf-eyebrow { font-size: 10px; letter-spacing: .18em; }
  .kf-page .kf-steps { grid-auto-columns: 79vw; gap: 18px; }
  .kf-page .kf-step-visual { gap: 12px; }
  .kf-page .kf-step-number { flex-basis: 24px; font-size: 21px; }
  .kf-page .kf-keys kbd { width: 32px; height: 40px; font-size: 18px; }
  .kf-page .kf-step h3 { font-size: 18px; }
  .kf-page .kf-step p { font-size: 15px; }
  .kf-page .kf-demo-status { min-height: 58px; font-size: 12px; }
  .kf-page .kf-reset { padding-inline: 8px; }
  .kf-page .kf-display-grid { padding-block: 29px; }
  .kf-page h2:not(.sr-only) { font-size: 33px; }
  .kf-page .kf-description { font-size: 16px; }
  .kf-page .kf-tabs { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .kf-page .kf-tabs button { font-size: 12px; padding-inline: 10px; }
  .kf-page .kf-comparison-figure { width: 230px; }
  .kf-page .kf-updates h2 { font-size: 27px; }
  .kf-page .kf-updates-copy { font-size: 14px; }
  .kf-page .kf-footer { padding-bottom: env(safe-area-inset-bottom); }
}
@media (prefers-reduced-motion: reduce) {
  html.kf-document { scroll-behavior: auto; }
  .kf-page *, .kf-page *::before, .kf-page *::after { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .kf-page .is-complete .kf-word { transform: none; opacity: .6; }
  .kf-page .kf-feature:hover { transform: none; }
}
