/* =====================================================================
   Kinfeed marketing site — global styles
   ===================================================================== */

/* Design tokens are linked from <head> (BaseLayout) before this file. */

@font-face {
  font-family: 'Neopixel';
  src: url('/fonts/neopixel-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Pixel font for blue accent words inside section titles */
.display-xl em,
.display-lg em,
.display-md em,
.hero h1 em,
.manifesto h2 em,
.manifesto-yes em,
.surfaces h2 em,
.surfaces .surface-title em,
.mosaic-band h2 em,
.features h2 em,
.feat-card h4 em,
.how h2 em,
.cta h2 em,
.showcase h3 em,
.voices h2 em,
.founder h2 em,
.faq h2 em,
.faq-page h1 em {
  font-family: 'Neopixel', var(--font-sans);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--kf-ocean);
  position: relative;
  top: -0.02em;
}
.mosaic-band h2 em { color: var(--kf-ocean-300); }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--kf-surface-1);
  color: var(--kf-ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
button { font-family: inherit; }

a { color: inherit; text-decoration: none; }

/* =========== Layout =========== */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

/* =========== Section rhythm =========== */
section { position: relative; }

/* =========== Editorial display type =========== */
.display-xl {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--kf-ink);
  margin: 0;
  text-wrap: balance;
}
.display-lg {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  color: var(--kf-ink);
  margin: 0;
  text-wrap: balance;
}
.display-md {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(32px, 4.5vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  color: var(--kf-ink);
  margin: 0;
  text-wrap: balance;
}
.lede {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--kf-ink-3);
  font-weight: 400;
  text-wrap: pretty;
  max-width: 56ch;
}
.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--kf-ocean);
  display: inline-block;
}
.eyebrow.muted { color: var(--kf-muted); }

/* =========== Buttons =========== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: transform 200ms var(--ease-out), background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.985); }
.btn-primary {
  background: var(--kf-ocean);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 8px 24px rgba(63,160,172,0.3);
}
.btn-primary:hover { background: var(--kf-ocean-600); box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 12px 32px rgba(63,160,172,0.42); }
.btn-ghost {
  background: transparent;
  color: var(--kf-ink);
  border: 1px solid var(--kf-border-strong);
}
.btn-ghost:hover { background: var(--kf-surface-3); }
.btn-dark {
  background: var(--kf-ink);
  color: #fff;
}
.btn-dark:hover { background: #000; }

/* =========== App store badges =========== */
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--kf-ink);
  background-image: url('../assets/grainy/2-5.webp');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 12px 22px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  transition: transform 200ms var(--ease-out), filter 200ms var(--ease-out);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.store-badge::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.75));
  z-index: -1;
}
.store-badge:hover { transform: translateY(-2px); filter: brightness(1.1); }
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge[aria-disabled="true"]:hover { transform: none; filter: none; }
.store-badge[aria-disabled="true"] { opacity: 0.72; cursor: default; }
.btn-soon { opacity: 0.85; }
.btn-soon:hover { opacity: 1; }
.store-badge .sb-top { font-size: 10px; letter-spacing: 0.15em; opacity: 0.7; text-transform: uppercase; }
.store-badge .sb-main { font-size: 17px; font-weight: 600; line-height: 1.1; margin-top: 2px; }

/* =========== Nav =========== */
.nav {
  position: fixed;
  top: 0; inset-inline: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: rgba(255,255,255,0.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: background 250ms var(--ease-out), border-color 250ms var(--ease-out);
}
.nav.scrolled {
  background: rgba(255,255,255,0.92);
  border-bottom-color: var(--kf-border);
}
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.nav-brand-mark { width: 28px; height: 28px; border-radius: 8px; overflow: hidden; flex: 0 0 auto; }
.nav-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.nav-wordmark { height: 28px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--kf-ink-3);
  transition: color 200ms;
}
.nav-links a:hover { color: var(--kf-ocean); }
.nav-links a.active {
  color: var(--kf-ocean);
  font-weight: 600;
}
.nav-cta { display: flex; align-items: center; gap: 12px; }

/* Language switcher in nav */
.nav-lang {
  display: inline-flex;
  align-items: center;
  background: var(--kf-surface-2, #F9FAFB);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.nav-lang-btn {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--kf-ink-3, #374151);
  padding: 5px 12px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 150ms, color 150ms;
  line-height: 1;
}
.nav-lang-btn:hover { color: var(--kf-ocean); }
.nav-lang-btn.on {
  background: var(--kf-surface-1, #fff);
  color: var(--kf-ocean);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav .nav-getapp { display: none; }
  .nav-burger { display: flex; }
  .nav-drawer { display: flex; }
}
@media (max-width: 760px) {
  .nav { padding: 12px 16px; }
  .nav-lang { padding: 2px; }
  /* 44px touch targets */
  .nav-lang-btn { padding: 14px 12px; font-size: 12px; }
}

/* =========== Reveal animations =========== */
[data-reveal] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-words] span.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(40px) rotate(2deg);
  transition: opacity 700ms var(--ease-out), transform 800ms var(--ease-out);
}
[data-reveal-words].in span.word { opacity: 1; transform: translateY(0) rotate(0); }

/* =========== Grain & noise utility =========== */
.noise::after {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px),
    radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
  background-size: 3px 3px, 5px 5px;
  background-position: 0 0, 1px 2px;
  mix-blend-mode: overlay;
  opacity: 0.6;
}

/* =========== HERO =========== */
.hero {
  position: relative;
  padding: 160px 0 60px;
  background:
    radial-gradient(1200px 600px at 80% 0%, rgba(190,227,231,0.55), transparent 70%),
    radial-gradient(900px 600px at 0% 30%, rgba(255,255,255,1), transparent 60%),
    var(--kf-surface-3);
  overflow: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
  min-height: 720px;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 60px; }
  .hero { padding: 130px 0 40px; }
}
.hero-text { position: relative; z-index: 2; }
.hero-eyebrow-row {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 28px;
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--kf-border);
  padding-block: 6px; padding-inline: 8px 14px; border-radius: 999px;
  font-size: 12px; color: var(--kf-ink-3);
  box-shadow: var(--shadow-sm);
}
.hero-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--kf-warning); box-shadow: 0 0 0 4px rgba(245,158,11,0.22); animation: pillPulse 2.4s ease-in-out infinite; }
@keyframes pillPulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(245,158,11,0.22); } 50% { box-shadow: 0 0 0 7px rgba(245,158,11,0.10); } }
.hero-pill b { color: var(--kf-ocean); font-weight: 600; }

.hero-tagline {
  margin-top: 28px;
  font-size: 17px;
  color: var(--kf-ink-3);
  max-width: 50ch;
  text-wrap: pretty;
}
.hero-cta-row {
  margin-top: 36px;
  display: flex; gap: 14px; flex-wrap: wrap; align-items: center;
}
.hero-meta {
  margin-top: 20px;
  display: flex; gap: 22px; font-size: 13px; color: var(--kf-muted);
  flex-wrap: wrap;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 14px; height: 14px; opacity: 0.7; }

/* Hero phone */
.hero-phone-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 720px;
}
.hero-phone-glow {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63,160,172,0.22) 0%, rgba(63,160,172,0) 60%);
  filter: blur(20px);
  animation: pulse 6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.08); opacity: 1; } }

.hero-mosaic-strip {
  position: absolute;
  display: grid;
  grid-template-columns: repeat(4, 88px);
  gap: 8px;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  z-index: 1;
}
.hero-mosaic-strip.top-left { top: 0px; left: 20px; transform: rotate(-6deg); z-index: 12; }
.hero-mosaic-strip.bottom-right { bottom: 50px; right: -60px; transform: rotate(4deg); z-index: 8; }
.hero-mosaic-strip img {
  width: 88px; height: 88px; object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 6px 16px rgba(15,23,42,0.18);
}
@media (max-width: 980px) {
  .hero-mosaic-strip { display: none; }
}

/* Floating chip cards */
.float-chip {
  position: absolute;
  background-color: #fff;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--kf-border);
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
  z-index: 5;
  animation: floaty 7s ease-in-out infinite;
  color: var(--kf-ink);
}
.float-chip .ic {
  width: 36px; height: 36px;
  flex: 0 0 36px;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  background: var(--kf-ocean-50, rgba(63,160,172,0.12));
  color: var(--kf-ocean);
  display: grid; place-items: center;
}
.float-chip .ic svg { width: 18px; height: 18px; }
.float-chip .label { font-weight: 600; color: var(--kf-ink); font-size: 13px; }
.float-chip .sub { color: var(--kf-muted); font-size: 11px; margin-top: 2px; }
.float-chip.fc-1 { top: 18%; left: 6%; animation-delay: -1.5s; }
.float-chip.fc-2 { top: 38%; right: 4%; animation-delay: -3.5s; }
.float-chip.fc-3 { bottom: 32%; left: 4%; animation-delay: -5s; } /* kept above the + button (FAB sits at phone bottom centre) */
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@media (max-width: 980px) { .float-chip { display: none; } }

/* =========== MANIFESTO =========== */
.manifesto {
  background: #fff;
  padding: 160px 0 180px;
  position: relative;
  overflow: clip;
  background-image: radial-gradient(1200px 600px at 100% 0%, rgba(190,227,231,0.45), transparent 60%), radial-gradient(900px 500px at 0% 100%, rgba(255,209,158,0.25), transparent 60%);
}
.manifesto h2 {
  font-size: clamp(36px, 5.5vw, 84px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 700;
  margin: 0;
  color: var(--kf-ink);
}
.manifesto-list {
  margin-top: 60px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.manifesto-row {
  font-size: clamp(28px, 3.4vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.0;
  color: var(--kf-ink);
  display: flex; align-items: center;
  gap: 24px;
  position: relative;
  padding: 22px 0;
  border-bottom: 1px solid var(--kf-border);
  transition: padding-inline-start 400ms var(--ease-out), background 400ms var(--ease-out);
}
.manifesto-row:hover { padding-inline-start: 16px; background: linear-gradient(90deg, rgba(63,160,172,0.05), transparent); }
.manifesto-row .m-icon {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: rgba(220,38,38,0.08);
  color: var(--kf-danger);
  display: grid; place-items: center;
  transition: transform 400ms var(--ease-out);
}
.manifesto-row:hover .m-icon { transform: rotate(-6deg) scale(1.06); }
.manifesto-row .m-icon svg { width: 20px; height: 20px; }
.manifesto-row .strike {
  text-decoration: line-through;
  text-decoration-color: var(--kf-danger);
  text-decoration-thickness: 4px;
  text-underline-offset: 0;
  color: var(--kf-muted-2);
  transition: color 400ms;
  flex: 0 0 auto;
}
.manifesto-row .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--kf-muted);
  letter-spacing: 0;
  font-weight: 500;
  min-width: 32px;
}
.manifesto-row .annot {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 15px;
  color: var(--kf-muted);
  letter-spacing: 0;
  line-height: 1.4;
  margin-inline-start: auto;
  max-width: 36ch;
  text-align: end;
}
@media (max-width: 760px) {
  .manifesto-row .annot { display: none; }
}
.manifesto-yes {
  margin-top: 80px;
  font-size: clamp(28px, 3.6vw, 56px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--kf-ink);
  max-width: 22ch;
  text-wrap: balance;
}

/* =========== Showcase scroll-pin =========== */
.showcase {
  background: var(--kf-surface-3);
  position: relative;
  overflow: visible;
}
.showcase-pin {
  height: 500vh;
  position: relative;
}
.showcase-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  padding: 0 max(32px, calc((100vw - 1240px)/2 + 32px));
  overflow: hidden;
}
.showcase-copy { position: relative; z-index: 1; }
.showcase-phone-wrap { z-index: 1; }

/* Drifting "posts": grainy tiles scattered behind the pinned stage.
   --p (0..1) is set by JS from the pin's scroll progress; each post rises
   400vh * depth over the run, so near posts move fast and far ones crawl. */
.showcase-drift {
  --p: 0;
  position: absolute; inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.showcase-drift::after {
  /* soft scrim so the copy column stays readable */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(243,244,246,.85) 0%, rgba(243,244,246,.55) 30%, rgba(243,244,246,0) 55%);
}
.showcase-drift-post {
  position: absolute;
  left: var(--left); top: var(--top);
  width: var(--w); height: var(--h);
  border-radius: 18px;
  background-size: cover; background-position: center;
  opacity: var(--op);
  transform: translate3d(0, calc(var(--p) * -400vh * var(--depth)), 0) rotate(var(--rot));
  will-change: transform;
  box-shadow: 0 18px 40px -18px rgba(11,18,32,.35);
  filter: blur(calc((1 - var(--depth)) * 2.5px));
  overflow: hidden;
}
/* tiny caption strip so each tile reads as a feed post */
.showcase-drift-cap {
  position: absolute; inset-inline: 0; bottom: 0;
  padding: 8px 10px;
  display: grid; gap: 4px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(6px);
}
.showcase-drift-cap i {
  display: block; height: 4px; border-radius: 2px;
  background: rgba(11,18,32,.18);
}
.showcase-drift-cap i:first-child { width: 42%; background: rgba(11,18,32,.32); }
.showcase-drift-cap i:last-child { width: 72%; }
@media (prefers-reduced-motion: reduce) { .showcase-drift { display: none; } }
.showcase-copy h3 {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.02;
  color: var(--kf-ink);
  margin: 0;
}
.showcase-copy p {
  margin-top: 20px;
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.55;
  color: var(--kf-ink-3);
  max-width: 44ch;
}
.showcase-step-stage { position: relative; min-height: 280px; margin-top: 32px; }
.showcase-step {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s ease, transform .5s ease;
  pointer-events: none;
}
.showcase-step.active {
  position: relative;
  inset: auto;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.showcase-step .step-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--kf-ocean);
  letter-spacing: 0.06em;
  margin-bottom: 18px;
  font-weight: 500;
}
.showcase-bar {
  position: relative;
  margin-top: 48px;
  display: flex;
  gap: 8px;
  width: min(100%, 420px);
}
.showcase-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 6px 0 4px;
  background: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  color: var(--kf-muted);
  text-align: start;
  transition: color .25s ease;
}
.showcase-tab:hover,
.showcase-tab.active { color: var(--kf-ink); }
.showcase-tab.done { color: var(--kf-ocean); }
.showcase-tab:focus-visible { outline: 2px solid var(--kf-ocean); outline-offset: 4px; border-radius: 4px; }
.showcase-tab-track {
  display: block;
  height: 4px;
  border-radius: 2px;
  background: var(--kf-border);
  position: relative;
  overflow: hidden;
  transition: background .25s ease;
}
.showcase-tab:hover .showcase-tab-track { background: var(--kf-border-strong); }
.showcase-tab .fill {
  position: absolute; inset: 0;
  background: var(--kf-ocean);
  transition: width 80ms linear;
}
.showcase-tab-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* "Scroll to explore" cue: sits in the empty space under the copy, bounces gently, disappears on last step. */
.showcase-scroll-cue {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  padding-block: 10px; padding-inline: 18px 16px;
  border: 1px solid var(--kf-border);
  border-radius: 999px;
  background: var(--kf-surface-1);
  color: var(--kf-ink-3);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .35s ease, transform .35s ease, color .2s ease, border-color .2s ease;
}
.showcase-scroll-cue:hover { color: var(--kf-ink); border-color: var(--kf-ocean); }
.showcase-scroll-cue svg { width: 18px; height: 18px; animation: kf-cue-bounce 1.6s ease-in-out infinite; }
.showcase-scroll-cue.hidden { opacity: 0; transform: translateY(6px); pointer-events: none; }
@keyframes kf-cue-bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

.showcase-phone-wrap {
  position: relative;
  display: grid;
  place-items: center;
  height: 88vh;
}
.showcase-phone-stack {
  position: relative;
  width: 320px;
  height: 694px;
}
.showcase-phone-slot {
  position: absolute;
  inset: 0;
  display: flex; justify-content: center;
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  pointer-events: none;
}
.showcase-phone-slot.active { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; z-index: 2; }
.showcase-phone-slot.past { opacity: 0; transform: translateY(-30px) scale(0.94); }
.showcase-phone-slot.future { opacity: 0; transform: translateY(40px) scale(0.96); }
/* Next card peeks out from behind the active one, so the stack reads as "more coming". */
.showcase-phone-slot.next { opacity: 0.45; transform: translateY(56px) scale(0.9); z-index: 1; filter: saturate(0.7); }

/* ================== Phone shell + custom mockups ================== */
.phone-frame {
  position: relative;
  width: 320px; height: 694px;
  border-radius: 48px;
  background: #1a1f29;
  padding: 12px;
  box-shadow:
    0 0 0 2px #2a2f3a inset,
    0 30px 80px rgba(15, 23, 42, 0.28),
    0 8px 24px rgba(15, 23, 42, 0.16);
}
.phone-notch {
  position: absolute;
  top: 22px; left: 50%; transform: translateX(-50%);
  width: 104px; height: 28px;
  background: #000; border-radius: 999px;
  z-index: 10;
}
.phone-screen {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 36px;
  overflow: hidden;
  background: #fff;
  display: flex; flex-direction: column;
}
.ph-status {
  flex: 0 0 auto;
  height: 44px;
  padding: 16px 22px 0;
  display: flex; align-items: flex-start; justify-content: space-between;
  font-size: 13px; font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.ph-time { padding-left: 4px; }
.ph-status-right { display: inline-flex; align-items: center; gap: 5px; }
.ph-batt {
  width: 22px; height: 11px;
  border: 1px solid currentColor; border-radius: 3px;
  position: relative;
  padding: 1px;
}
.ph-batt::after {
  content: "";
  position: absolute; right: -3px; top: 3px;
  width: 2px; height: 5px;
  background: currentColor; border-radius: 0 1px 1px 0;
}
.ph-batt-fill { display: block; width: 80%; height: 100%; border-radius: 1px; }

.app-header {
  flex: 0 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 18px 14px;
  font-size: 17px; font-weight: 700;
  color: var(--kf-ink);
  border-bottom: 1px solid var(--kf-border);
}
.app-header.dark { color: #fff; border-bottom-color: rgba(255,255,255,0.08); }
.app-header-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }

.app-scroll {
  flex: 1 1 auto;
  overflow: hidden;
  padding: 16px 16px 20px;
  display: flex; flex-direction: column; gap: 14px;
  background: #fff;
}
.app-scroll.dark { background: var(--kf-dark-bg, #1F2937); color: #fff; }

.app-h {
  font-size: 22px; font-weight: 700; letter-spacing: -0.02em;
  margin: 4px 0 4px;
  color: inherit;
}

.feed-card {
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 1px 0 var(--kf-border), 0 4px 14px rgba(15,23,42,0.06);
  flex: 0 0 auto;
}
.feed-img {
  width: 100%;
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
}
.feed-meta { padding: 12px 14px 14px; }
.feed-title { font-size: 14px; font-weight: 600; color: var(--kf-ink); margin-bottom: 8px; line-height: 1.3; }
.feed-row { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--kf-muted); }
.feed-name { color: var(--kf-ink); font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 auto; }
.feed-exp { white-space: nowrap; flex: 0 0 auto; }
.feed-av {
  width: 18px; height: 18px; border-radius: 50%;
  background-size: cover; background-position: center;
  flex: 0 0 auto;
}
.feed-av-you { background: var(--kf-ocean-100); color: var(--kf-ocean); display: grid; place-items: center; }
.feed-av-you svg { width: 11px; height: 11px; }
.feed-date::before, .feed-exp::before { content: " · "; }

.fab {
  position: absolute;
  left: 50%; bottom: 32px;
  transform: translateX(-50%);
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--kf-ocean);
  color: #fff;
  border: none;
  display: grid; place-items: center;
  box-shadow: 0 10px 28px rgba(63,160,172,0.5), 0 2px 6px rgba(0,0,0,0.12);
  z-index: 5;
  cursor: pointer;
  transition: box-shadow 200ms var(--ease-out), background 200ms var(--ease-out);
}
.fab:hover { background: var(--kf-ocean-600); box-shadow: 0 14px 36px rgba(63,160,172,0.6); }
.app-scroll.has-fab { padding-bottom: 110px; }

.app-segmented {
  flex: 0 0 auto;
  display: flex;
  background: var(--kf-surface-3);
  margin: 12px 16px 0;
  padding: 3px;
  border-radius: 10px;
  font-size: 12px;
}
.seg-item {
  flex: 1;
  text-align: center;
  padding: 7px 4px;
  border-radius: 8px;
  color: var(--kf-muted);
  font-weight: 500;
}
.seg-item.on {
  background: #fff;
  color: var(--kf-ink);
  box-shadow: 0 1px 2px rgba(15,23,42,0.08);
  font-weight: 600;
}

.date-row {
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--kf-border);
}
.date-when {
  font-size: 11px; font-weight: 600;
  color: var(--kf-ocean);
  letter-spacing: 0.04em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.date-mid { display: flex; align-items: center; gap: 10px; }
.date-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--kf-ocean); color: #fff;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex: 0 0 auto;
}
.date-who { font-size: 14px; font-weight: 600; color: var(--kf-ink); }
.date-ev { font-size: 12px; color: var(--kf-muted); margin-top: 1px; }

.tree-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px;
}
.tree-row .tree-av {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--kf-ocean); color: #fff;
  display: grid; place-items: center;
  font-size: 10px; font-weight: 700;
  flex: 0 0 auto;
}
.tree-info { flex: 1; min-width: 0; }
.tree-name { font-size: 13px; font-weight: 500; color: var(--kf-ink); }
.tree-age { color: var(--kf-muted); font-weight: 400; }
.tree-year { font-size: 11px; color: var(--kf-muted); margin-top: 1px; }

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.stat-cell {
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 14px;
  padding: 14px;
}
.stat-cell.wide { grid-column: 1 / -1; }
.stat-n { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; color: var(--kf-ocean); }
.stat-l { font-size: 11px; color: var(--kf-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Stats hero */
.stats-hero {
  background: linear-gradient(135deg, var(--kf-ocean) 0%, #1a8a85 100%);
  border-radius: 14px;
  padding: 18px 16px;
  color: #fff;
  margin-bottom: 12px;
}
.stats-hero-n { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stats-hero-l { font-size: 13px; font-weight: 600; margin-top: 6px; }
.stats-hero-sub { font-size: 11px; opacity: 0.75; margin-top: 2px; }

/* Stat blocks (chart + list) */
.stat-block {
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 12px;
  padding: 14px;
  margin-top: 10px;
}
.stat-block-h { font-size: 11px; color: var(--kf-muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; margin-bottom: 12px; }

/* Decade bar chart */
.bar-row { display: flex; align-items: flex-end; gap: 6px; height: 80px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; }
.bar-track { width: 100%; height: 100%; background: rgba(34,153,148,0.06); border-radius: 3px; position: relative; display: flex; align-items: flex-end; }
.bar-fill { width: 100%; background: var(--kf-ocean); border-radius: 3px; transition: height .4s ease; }
.bar-lab { font-size: 9px; color: var(--kf-muted); font-weight: 600; }

/* Rank rows */
.rank-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--kf-border); }
.rank-row:first-of-type { border-top: 0; }
.rank-n { width: 14px; font-size: 11px; color: var(--kf-muted); font-weight: 700; }
.rank-av { width: 22px; height: 22px; border-radius: 50%; background-size: cover; background-position: center; flex-shrink: 0; }
.rank-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--kf-ink); }
.rank-v { font-size: 13px; font-weight: 700; color: var(--kf-ocean); font-variant-numeric: tabular-nums; }

.card-block {
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 14px;
  padding: 14px;
}
.card-block.dark { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.card-label { font-size: 11px; color: var(--kf-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.card-input {
  background: var(--kf-surface-3);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px; color: var(--kf-ink);
  margin-bottom: 10px;
}
.card-input.mono { font-family: var(--font-mono, monospace); letter-spacing: 0.06em; font-weight: 600; }
.card-cta {
  background: var(--kf-ocean); color: #fff;
  text-align: center;
  padding: 9px; border-radius: 10px;
  font-size: 13px; font-weight: 600;
}
.card-row-2 { display: flex; gap: 8px; }
.btn-mini {
  flex: 1;
  background: var(--kf-surface-3);
  text-align: center;
  padding: 9px; border-radius: 10px;
  font-size: 12px; font-weight: 600; color: var(--kf-ink);
}
.btn-mini.danger { background: rgba(220,38,38,0.08); color: var(--kf-danger); }
.eyebrow-mini {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--kf-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.card-blurb { font-size: 12px; color: var(--kf-muted); line-height: 1.4; }
.card-blurb-sm { font-size: 11px; color: var(--kf-muted); line-height: 1.35; margin-bottom: 10px; margin-top: -2px; }

/* Admin: card-label inline with badge/meta */
.card-label-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-label-row .card-label { margin-bottom: 0; }
.card-label-meta { font-size: 11px; color: var(--kf-muted); font-weight: 500; }
.badge-pill {
  background: var(--kf-ocean); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  letter-spacing: 0.02em;
}

/* Admin: join-request row */
.req-row { display: flex; align-items: center; gap: 10px; }
.req-av { width: 36px; height: 36px; border-radius: 50%; background-size: cover; background-position: center; flex-shrink: 0; }
.req-info { flex: 1; min-width: 0; }
.req-name { font-size: 13px; font-weight: 600; color: var(--kf-ink); }
.req-sub { font-size: 11px; color: var(--kf-muted); margin-top: 1px; }
.req-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }
.req-actions .btn-mini { padding: 5px 12px; flex: none; font-size: 11px; min-width: 64px; text-align: center; }
.btn-mini.btn-mini-on { background: var(--kf-ocean); color: #fff; }

/* Admin: memories row with stepper */
.mem-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--kf-border); }
.mem-row:first-of-type { border-top: 0; padding-top: 4px; }
.mem-row-l { flex: 1; min-width: 0; }
.mem-row-h { font-size: 13px; font-weight: 600; color: var(--kf-ink); }
.mem-row-s { font-size: 11px; color: var(--kf-muted); margin-top: 1px; }
.stepper {
  display: inline-flex; align-items: center;
  border: 1px solid var(--kf-border); border-radius: 999px;
  background: var(--kf-surface-3);
  overflow: hidden;
}
.step-btn {
  width: 26px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; color: var(--kf-ocean);
  cursor: pointer; user-select: none;
}
.step-val {
  min-width: 30px; text-align: center;
  font-size: 13px; font-weight: 700; color: var(--kf-ink);
  font-variant-numeric: tabular-nums;
  padding: 0 4px;
  border-left: 1px solid var(--kf-border);
  border-right: 1px solid var(--kf-border);
  height: 28px;
  display: inline-flex; align-items: center;
  background: #fff;
}

/* Admin: members list */
.mem-list { display: flex; flex-direction: column; }
.mem-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--kf-border); }
.mem-item:first-child { border-top: 0; padding-top: 4px; }
.mem-av { width: 28px; height: 28px; border-radius: 50%; background-size: cover; background-position: center; flex-shrink: 0; }
.mem-info { flex: 1; min-width: 0; }
.mem-name { font-size: 13px; font-weight: 600; color: var(--kf-ink); }
.mem-role { font-size: 11px; color: var(--kf-muted); margin-top: 1px; }

.profile-hero {
  text-align: center;
  padding: 16px 0 8px;
}
.profile-hero.dark { color: #fff; }
.profile-av {
  width: 78px; height: 78px;
  border-radius: 50%;
  margin: 0 auto 12px;
  background-size: cover; background-position: center;
  border: 3px solid var(--kf-ocean);
}
.profile-name { font-size: 18px; font-weight: 700; }
.profile-edit { font-size: 11px; color: var(--kf-ocean); margin-top: 2px; }
.profile-mail { font-size: 12px; color: var(--kf-muted); margin-top: 6px; }

.row-card {
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 14px;
  padding: 13px 14px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 14px; font-weight: 500;
  color: var(--kf-ink);
}
.row-card.dark { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #fff; }

.toggle-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0;
  font-size: 13px; color: inherit;
}
.toggle {
  width: 36px; height: 22px; border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background 200ms;
  flex: 0 0 auto;
}
.toggle.on { background: var(--kf-ocean); }
.toggle-knob {
  position: absolute; top: 2px; left: 2px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
  transition: transform 200ms;
}
.toggle.on .toggle-knob { transform: translateX(14px); }

.drawer {
  flex: 1; padding: 20px 18px;
  display: flex; flex-direction: column; gap: 6px;
}
.drawer-brand {
  font-size: 22px; font-weight: 700;
  color: var(--kf-ocean);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.drawer-prof {
  display: flex; align-items: center; gap: 10px;
  padding: 10px;
  background: var(--kf-ocean-50, #ecf7f8);
  border-radius: 12px;
  margin-bottom: 14px;
}
.drawer-av {
  width: 36px; height: 36px; border-radius: 50%;
  background-size: cover; background-position: center;
  flex: 0 0 auto;
}
.drawer-name { font-size: 13px; font-weight: 600; color: var(--kf-ink); }
.drawer-mail { font-size: 11px; color: var(--kf-muted); margin-top: 1px; }
.drawer-group {
  font-size: 10px; color: var(--kf-muted);
  text-transform: uppercase; letter-spacing: 0.1em;
  padding: 4px 6px;
  margin-bottom: 6px;
  font-weight: 600;
}
.drawer-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  font-size: 14px; color: var(--kf-ink-3);
  font-weight: 500;
}
.drawer-item.on {
  background: var(--kf-bright, #BEE3E7);
  color: var(--kf-ink);
  font-weight: 600;
}

/* Scramble effect */
.scramble {
  font-family: var(--font-mono, "Courier New", monospace);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--kf-ink);
}

/* Tablet: tighter pinned layout, slightly smaller phone */
@media (max-width: 980px) and (min-width: 761px) {
  .showcase-sticky { gap: 24px; padding: 0 24px; }
  .showcase-phone-wrap .phone-frame { zoom: 0.86; }
}
/* Mobile: horizontal snap rail replaces the scroll-pin */
.showcase-rail-wrap { display: none; }
@media (max-width: 760px) {
  .showcase-pin { display: none; }
  .showcase-rail-wrap { display: block; padding: 72px 0 64px; }
  .showcase-rail-head { padding: 0 20px 20px; }
  .showcase-rail {
    display: flex; gap: 20px;
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    padding: 8px 20px 12px;
    scroll-padding: 0 20px;
    scrollbar-width: none;
  }
  .showcase-rail::-webkit-scrollbar { display: none; }
  .showcase-slide {
    flex: 0 0 min(300px, 84vw);
    scroll-snap-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 18px;
  }
  .showcase-slide-phone { zoom: 0.78; }
  .showcase-slide-copy { text-align: center; padding: 0 6px; }
  .showcase-slide-copy .step-num { font-family: var(--font-mono); font-size: 12px; color: var(--kf-muted); letter-spacing: 0.06em; }
  .showcase-slide-copy h3 { font-size: 26px; line-height: 1.05; letter-spacing: -0.02em; margin: 8px 0 10px; font-weight: 700; }
  .showcase-slide-copy p { font-size: 15px; line-height: 1.5; color: var(--kf-muted); margin: 0; }
  .showcase-rail-dots { display: flex; justify-content: center; gap: 6px; margin-top: 20px; }
  .showcase-rail-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--kf-border-strong); }
}
.app-scroll.dark { background: #1F2937; color: #fff; }
.app-scroll.dark .row-card,
.app-scroll.dark .card-block { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #fff; }
.app-scroll.dark .stat-cell { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); }
.app-scroll.dark .card-input { background: rgba(255,255,255,0.06); color: #fff; }
.app-scroll.dark .toggle { background: rgba(255,255,255,0.18); }
.app-scroll.dark .toggle.on { background: var(--kf-ocean); }
.app-scroll.dark .feed-card { background: rgba(255,255,255,0.04); }
.app-scroll.dark .feed-title { color: #fff; }
.app-scroll.dark .feed-name { color: rgba(255,255,255,0.85); }

/* =========== Surfaces (Mobile / AirPlay / e-INK) =========== */
.surfaces { background: #fff; padding: 160px 0; }
.surface-visual { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-height: 280px; padding-top: 24px; }
.surface-visual-phone { height: 460px; padding-top: 16px; overflow: visible; display: flex; flex-direction: row; align-items: flex-start; justify-content: center; }
.surface-phone-scale { width: 198px; height: 430px; position: relative; }
.surface-phone-scale > * { transform: scale(0.62); transform-origin: top left; }
.surface-visual-tv { width: 100%; }
.surface-visual-eink { width: 100%; }
.surfaces-head { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-bottom: 80px; align-items: end; }
@media (max-width: 760px) { .surfaces-head { grid-template-columns: 1fr; gap: 24px; } }
.surfaces-head h2 {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 0;
}
.surfaces-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  gap: 24px;
  align-items: start; /* TV + e-ink cards end where their content ends, no empty space */
}
@media (max-width: 980px) { .surfaces-grid { grid-template-columns: 1fr; } }
.surface-card {
  position: relative;
  background: #fff;
  border-radius: 28px;
  padding: 32px;
  overflow: clip;
  display: flex; flex-direction: column;
  min-height: 580px;
  border: 1px solid var(--kf-border);
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.surface-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.surface-card.feature { background: var(--kf-ink); color: #fff; border-color: transparent; }
.surface-card.feature .surface-title { color: #fff; }
.surface-card.feature .surface-blurb { color: rgba(255,255,255,0.72); }
.surface-card.feature .eyebrow { color: var(--kf-ocean-300); }
.surface-card.upcoming { background: #fff; }
.surface-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.surface-card .badge {
  flex: 0 0 auto;
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 10px; border-radius: 999px;
  background: var(--kf-ocean-100); color: var(--kf-ocean);
  font-weight: 600;
}
.surface-card.feature .badge { background: rgba(255,255,255,0.1); color: #fff; }
.surface-title {
  font-size: 28px; font-weight: 700; letter-spacing: -0.02em;
  margin: 16px 0 10px;
}
.surface-blurb {
  font-size: 15px; line-height: 1.5; color: var(--kf-ink-3);
}
.surface-visual {
  margin-top: auto;
  position: relative;
  padding-top: 24px;
}
/* TV + e-ink: no phone mock to fill the card, so sit the text right above the visual at the bottom */
.surface-card:not(.feature) { justify-content: flex-end; min-height: 0; }
.surface-card:not(.feature) .surface-visual { margin-top: 0; min-height: 0; }
@media (max-width: 980px) {
  .surface-card { min-height: 0; }
  .surface-visual { min-height: 0; }
}

/* AirPlay TV mock */
.tv-frame {
  width: 100%;
  aspect-ratio: 16/10;
  background: #000;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.tv-frame .tv-img {
  width: 100%; height: 100%;
  background-size: cover; background-position: center;
  transition: opacity 800ms;
}
.tv-airplay-badge {
  position: absolute; top: 12px; right: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  font-size: 11px; letter-spacing: 0.04em; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.18);
  z-index: 2;
}
.tv-airplay-badge svg { width: 13px; height: 13px; }
.tv-stand {
  width: 70%; height: 8px; margin: 6px auto 0;
  background: linear-gradient(180deg, #555, #222);
  border-radius: 0 0 8px 8px;
}
.tv-stand-base { width: 80px; height: 4px; background: #333; margin: 4px auto 0; border-radius: 4px; }
.tv-airplay {
  position: absolute; top: 12px; right: 12px;
  background: rgba(0,0,0,0.6);
  color: #fff; font-size: 11px; padding: 4px 10px;
  border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
  backdrop-filter: blur(8px);
}

/* e-INK frame mock */
.eink-frame {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(180deg, #c8a070 0%, #a08259 100%);
  border-radius: 8px;
  padding: 18px;
  position: relative;
  box-shadow: 0 20px 50px rgba(0,0,0,0.18), inset 0 1px 1px rgba(255,255,255,0.3);
}
.eink-frame::after {
  content: ""; position: absolute; inset: 18px;
  border: 2px solid rgba(0,0,0,0.12);
  pointer-events: none;
}
.eink-screen {
  width: 100%; height: 100%;
  background: #f3eee5;
  filter: grayscale(0.85) contrast(1.05);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}
.eink-screen img { width: 100%; height: 100%; object-fit: cover; }
.eink-meta {
  position: absolute; bottom: 8px; inset-inline: 10px;
  font-family: var(--font-mono);
  font-size: 9px; color: rgba(0,0,0,0.6);
  display: flex; justify-content: space-between;
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* =========== Mosaic feature row =========== */
.mosaic-band {
  background: var(--kf-ink);
  color: #fff;
  padding: 120px 0;
  position: relative;
  overflow: clip;
  margin: 0;
}
.mosaic-band-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr);
  gap: 0;
  opacity: 0.22;
  pointer-events: none;
}
.mosaic-cta-card {
  margin-top: 56px;
  display: flex; align-items: center; gap: 20px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  padding: 24px 28px;
  backdrop-filter: blur(12px);
}
.mosaic-cta-card .mcc-icon {
  width: 56px; height: 56px;
  flex: 0 0 56px;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  background: var(--kf-ocean);
  color: #fff;
  display: grid; place-items: center;
}
.mosaic-cta-card .mcc-icon svg { width: 26px; height: 26px; }
.mosaic-cta-card h4 { color: #fff; font-size: 22px; margin: 0 0 6px; font-weight: 700; letter-spacing: -0.015em; }
.mosaic-cta-card p { color: rgba(255,255,255,0.72); margin: 0; font-size: 15px; line-height: 1.5; }
.mosaic-band-grid img { width: 100%; height: 100%; object-fit: cover; }
.mosaic-band-content { position: relative; z-index: 2; }
.mosaic-band h2 {
  font-size: clamp(44px, 7vw, 104px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.0;
  margin: 0;
  color: #fff;
}
.mosaic-band-stats {
  margin-top: 80px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
@media (max-width: 760px) { .mosaic-band-stats { grid-template-columns: 1fr 1fr; } }
.mosaic-band-stats .stat-block {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 28px 24px;
  border-radius: 18px;
}
.stat-block .num {
  font-size: clamp(40px, 5vw, 72px);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--kf-ocean-300);
  line-height: 1;
}
.stat-block .label {
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* =========== Family features grid =========== */
.features { background: #fff; padding: 160px 0; }
.features-head { text-align: start; margin-bottom: 64px; max-width: 760px; }
.features-head h2 {
  font-size: clamp(40px, 6vw, 88px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin: 16px 0 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  grid-auto-rows: 280px;
}
@media (max-width: 980px) { .features-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: auto; } .feat-card { min-height: 280px; } }
@media (max-width: 600px) { .features-grid { grid-template-columns: 1fr; } }

.feat-card {
  position: relative;
  background: var(--kf-surface-3);
  border-radius: 24px;
  padding: 28px;
  overflow: clip;
  border: 1px solid var(--kf-border);
  display: flex; flex-direction: column;
  transition: transform 400ms var(--ease-out), box-shadow 400ms var(--ease-out);
}
.feat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.feat-card .feat-icon {
  width: 44px; height: 44px;
  flex: 0 0 44px;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #fff; color: var(--kf-ocean);
  display: grid; place-items: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 18px;
  align-self: flex-start;
}
.feat-card .feat-icon svg { width: 22px; height: 22px; }
.feat-card h4 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 8px;
}
.feat-card p {
  font-size: 14.5px; line-height: 1.5; color: var(--kf-ink-3);
  margin: 0;
}
/* "Coming soon" ribbon: 45° across the top-right corner, ends clipped by the card */
.feat-card .feat-badge,
.feat-card.tile .feat-badge,
.feat-card.tile.tile-light .feat-badge {
  position: absolute; top: 26px; inset-inline-end: -52px;
  z-index: 3;
  width: 200px;
  padding: 7px 0;
  text-align: center;
  transform: rotate(45deg);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  font-weight: 700; line-height: 1;
  background: var(--kf-ocean); color: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  text-shadow: none;
  white-space: nowrap;
  pointer-events: none;
}

.feat-card.span-2 { grid-column: span 2; }
.feat-card.span-3 { grid-column: span 3; }
.feat-card.span-4 { grid-column: span 4; }
.feat-card.row-2 { grid-row: span 2; }
@media (max-width: 980px) {
  .feat-card.span-3, .feat-card.span-4 { grid-column: span 2; }
  .feat-card.row-2 { grid-row: auto; }
}
@media (max-width: 600px) {
  .feat-card.span-2, .feat-card.span-3, .feat-card.span-4 { grid-column: 1; }
}

.feat-card.dark { background: var(--kf-ink); color: #fff; border-color: transparent; }
.feat-card.dark h4 { color: #fff; }
.feat-card.dark p { color: rgba(255,255,255,0.72); }
.feat-card.dark .feat-icon { background: rgba(255,255,255,0.06); color: var(--kf-ocean-300); }

.feat-card.tile {
  color: #fff;
  background-size: cover;
  background-position: center;
  border: none;
}
/* Contrast scrim: sits between the grainy image and the content.
   Dark tiles get a darkening wash (heaviest at the top where the text is);
   light tiles get a white wash. Content is lifted above it with z-index. */
.feat-card.tile::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(10, 16, 32, 0.38) 0%, rgba(10, 16, 32, 0.26) 45%, rgba(10, 16, 32, 0.20) 100%);
}
.feat-card.tile > * { position: relative; z-index: 1; }
.feat-card.tile h4, .feat-card.tile p { color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.35), 0 2px 16px rgba(0,0,0,0.35); }
.feat-card.tile p { color: rgba(255,255,255,0.94); }
.feat-card.tile .tree-mock .row { background: rgba(0,0,0,0.14); color: #fff; }
.feat-card.tile .upload-mock { background: rgba(0,0,0,0.16) !important; border-color: rgba(255,255,255,0.14) !important; }
.feat-card.tile .feat-icon {
  background: rgba(255,255,255,0.22);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Light grainy tile variant — dark text on pale gradient */
.feat-card.tile.tile-light {
  color: var(--kf-ink);
  border: 1px solid rgba(15, 23, 42, 0.06);
}
.feat-card.tile.tile-light::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0.34) 50%, rgba(255, 255, 255, 0.26) 100%);
}
.feat-card.tile.tile-light h4 { color: var(--kf-ink); text-shadow: none; }
.feat-card.tile.tile-light p { color: var(--kf-ink-3); text-shadow: none; }
.feat-card.tile.tile-light .feat-icon {
  background: rgba(255, 255, 255, 0.85);
  color: var(--kf-ocean);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* Inline tree mock */
.tree-mock {
  margin-top: auto;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 13px;
}
.tree-mock .row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.04);
  border-radius: 10px;
  color: rgba(255,255,255,0.86);
}
.tree-mock .av {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--kf-ocean-200); color: var(--kf-ocean-700);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
  flex: 0 0 auto;
}
.tree-mock .row.indent { margin-inline-start: 28px; }
.tree-mock .row.indent2 { margin-inline-start: 56px; }
.tree-mock .row.indent3 { margin-inline-start: 84px; }

/* Calendar/dates inline mock */
.dates-mock {
  margin-top: auto;
  display: grid; gap: 8px;
}
.dates-mock .row {
  display: flex; align-items: center; gap: 12px;
  background: #fff; padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--kf-border);
}
.dates-mock .date {
  font-size: 11px; color: var(--kf-ocean); font-weight: 600;
  min-width: 60px;
}
.dates-mock .who { font-size: 13px; font-weight: 600; color: var(--kf-ink); }
.dates-mock .what { font-size: 12px; color: var(--kf-muted); }

/* Inline upload demo */
.upload-mock {
  margin-top: auto;
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex; gap: 12px; align-items: center;
  border: 1px solid var(--kf-border);
}
.upload-mock .thumb {
  width: 60px; height: 60px; border-radius: 12px;
  background-size: cover; background-position: center;
  flex: 0 0 auto;
}
.upload-mock .meta { font-size: 13px; color: var(--kf-ink-3); }
.upload-mock .meta b { display: block; color: var(--kf-ink); margin-bottom: 2px; }
.upload-mock .pop {
  position: absolute; right: -10px; top: -10px;
  background: var(--kf-ocean); color: #fff;
  font-size: 11px; padding: 6px 10px; border-radius: 999px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: bob 3s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

/* =========== How it works =========== */
.how { background: var(--kf-surface-3); padding: 160px 0; text-align: center; }
.how-grid { text-align: start; }

/* Upload modal */
.upload-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.55);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: grid; place-items: center;
  animation: fadeIn 280ms var(--ease-out);
  padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.upload-modal {
  background: #fff;
  border-radius: 28px;
  width: 100%; max-width: 460px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(15,23,42,0.4);
  animation: modalUp 480ms var(--ease-out);
  display: flex; flex-direction: column;
}
@keyframes modalUp { from { opacity: 0; transform: translateY(40px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
.upload-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.upload-close { background: var(--kf-surface-3); border: none; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; cursor: pointer; color: var(--kf-muted); }
.upload-photo {
  margin: 16px 24px 0;
  height: 240px;
  background-size: cover; background-position: center;
  border-radius: 18px;
  position: relative;
  overflow: hidden;
}
.upload-progress { position: absolute; bottom: 16px; inset-inline: 16px; height: 4px; background: rgba(255,255,255,0.3); border-radius: 2px; overflow: hidden; }
.upload-progress-fill { height: 100%; background: var(--kf-ocean); transition: width 700ms var(--ease-out); }
.upload-check { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(63,160,172,0.85); color: #fff; font-weight: 700; font-size: 22px; backdrop-filter: blur(4px); animation: fadeIn 280ms; }
.upload-fields { padding: 20px 24px 8px; display: flex; flex-direction: column; gap: 14px; }
.upload-field label { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--kf-muted); font-weight: 600; display: block; margin-bottom: 6px; }
.upload-input { background: var(--kf-surface-3); padding: 12px 14px; border-radius: 10px; font-size: 14px; color: var(--kf-ink); }
input.upload-input { width: 100%; border: 2px solid transparent; font: inherit; font-size: 14px; outline: none; transition: border-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
input.upload-input:focus { border-color: var(--kf-ocean); box-shadow: 0 0 0 4px rgba(63,160,172,0.18); background: #fff; }
input.upload-input:disabled { opacity: 0.7; }
input.upload-input::placeholder { color: var(--kf-muted-2); }
.upload-field.is-active input.upload-input:not(:focus) { animation: captionNudge 1.6s ease-in-out infinite; }
@keyframes captionNudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(63,160,172,0); } 50% { box-shadow: 0 0 0 5px rgba(63,160,172,0.22); } }
.upload-step { display: flex; align-items: center; gap: 10px; margin: 16px 24px 0; padding: 10px 14px; border-radius: 12px; background: var(--kf-ocean-50); color: var(--kf-ocean-700); font-size: 13px; font-weight: 500; animation: fadeIn 280ms var(--ease-out); }
.upload-step-n { flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; background: var(--kf-ocean); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.upload-submit:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.upload-submit.is-next { animation: submitPulse 1.4s ease-in-out infinite; }
@keyframes submitPulse { 0%, 100% { box-shadow: 0 8px 24px rgba(63,160,172,0.3); } 50% { box-shadow: 0 8px 24px rgba(63,160,172,0.3), 0 0 0 6px rgba(63,160,172,0.2); } }
.upload-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.upload-chips .chip { padding: 8px 14px; border-radius: 999px; font-size: 13px; background: var(--kf-surface-3); color: var(--kf-muted); cursor: pointer; }
.upload-chips .chip.on { background: var(--kf-ocean-100); color: var(--kf-ocean); font-weight: 600; }
.upload-submit { margin: 16px 24px 24px; padding: 14px; background: var(--kf-ocean); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; box-shadow: 0 8px 24px rgba(63,160,172,0.3); }
.upload-submit:hover { background: var(--kf-ocean-600); }
.how-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 24px;
  margin-top: 80px;
  text-align: start;
}
@media (max-width: 760px) { .how-grid { grid-template-columns: 1fr; } }
.how-step {
  background: #fff;
  border: 1px solid var(--kf-border);
  border-radius: 24px;
  padding: 32px;
  position: relative;
  min-height: 280px;
  display: flex; flex-direction: column;
}
.how-step .num {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--kf-ocean);
  font-weight: 600;
  margin-bottom: 18px;
}
.how-step h4 {
  font-size: 22px; font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 10px;
}
.how-step p {
  font-size: 15px; line-height: 1.5; color: var(--kf-ink-3);
}
.how-step .visual {
  margin-top: auto;
  padding-top: 24px;
}
.invite-code {
  display: flex; align-items: center; gap: 8px;
  background: var(--kf-surface-3);
  border: 1px dashed var(--kf-border-strong);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 16px;
  color: var(--kf-ink);
  letter-spacing: 0.04em;
}
.invite-code .copy-btn {
  margin-inline-start: auto;
  background: var(--kf-ocean-100);
  color: var(--kf-ocean);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  font-family: var(--font-sans);
}

/* =========== Final CTA =========== */
.cta {
  position: relative;
  background: var(--kf-ocean);
  color: #fff;
  padding: 140px 0 160px;
  overflow: clip;
  isolation: isolate;
}
.cta::before {
  content: ""; position: absolute; inset: -10%;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,0.18), transparent 30%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.12), transparent 35%);
  pointer-events: none;
}
.cta-content { position: relative; z-index: 2; text-align: center; }
.cta h2 {
  font-size: clamp(44px, 7vw, 112px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 0.98;
  color: #fff;
  margin: 0;
  text-wrap: balance;
}
.cta p {
  margin: 28px auto 0;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.5;
  color: rgba(255,255,255,0.86);
  max-width: 50ch;
  text-wrap: pretty;
}
.cta-row {
  margin-top: 44px;
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.cta .store-badge { background-image: url('../assets/grainy/3-3.webp'); border: none; }
.cta .store-badge::before { background: linear-gradient(135deg, rgba(0,0,0,0.45), rgba(0,0,0,0.65)); }
.cta-tiles {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(3, 1fr);
  opacity: 0.16;
  pointer-events: none;
  mix-blend-mode: overlay;
}
.cta-tiles img { width: 100%; height: 100%; object-fit: cover; }

/* =========== Footer =========== */
.footer {
  background: var(--kf-ink);
  color: rgba(255,255,255,0.72);
  padding: 72px 0 36px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
.footer-brand .footer-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.footer-brand .footer-mark img { width: 32px; height: 32px; border-radius: 8px; }
.footer-brand .footer-mark .footer-wordmark { width: auto; height: 36px; border-radius: 0; }
.footer-brand .footer-mark span { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; color: #fff; }
.footer-brand p { font-size: 14px; line-height: 1.5; max-width: 36ch; }
.footer .footer-social { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-direction: row; align-items: center; gap: 8px; }
.footer .footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.6);
  transition: color 200ms, background 200ms;
}
.footer .footer-social a svg { width: 16px; height: 16px; }
.footer .footer-social a:hover, .footer .footer-social a:focus-visible { color: #fff; background: rgba(255,255,255,0.14); }
.footer h5 {
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 16px;
  font-weight: 600;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a, .footer ul .link-btn { font-size: 14px; transition: color 200ms; }
.footer ul a:hover, .footer ul .link-btn:hover { color: #fff; }
.footer ul .link-btn { appearance: none; background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: start; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  font-size: 13px;
}
.footer-lang {
  display: inline-flex; gap: 4px; align-items: center;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  padding: 4px;
}
.footer-lang button,
.footer-lang a {
  background: transparent; border: none; color: rgba(255,255,255,0.6);
  font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  text-decoration: none; line-height: 1.4;
}
.footer-lang button.on,
.footer-lang a.on { background: var(--kf-ocean); color: #fff; }
.footer-lang a:hover { color: rgba(255,255,255,0.9); }

/* =========== Latest articles (landing, after the download CTA) =========== */
.latest { padding: 112px 0 120px; background: var(--kf-surface-1); border-top: 1px solid var(--kf-border); }
.latest-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 48px; }
.latest-head h2 { font-size: clamp(32px, 4.5vw, 56px); font-weight: 700; letter-spacing: -0.025em; line-height: 1.04; margin: 16px 0 0; color: var(--kf-ink); }
.latest-head h2 em { font-family: 'Neopixel', var(--font-sans); font-style: normal; font-weight: 400; letter-spacing: 0.01em; color: var(--kf-ocean); position: relative; top: -0.02em; }
.latest-head p { margin: 16px 0 0; font-size: 17px; line-height: 1.5; color: var(--kf-ink-3); max-width: 48ch; }
.latest-all { flex: 0 0 auto; }
.latest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.latest-card { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.latest-media { display: block; overflow: hidden; border-radius: 14px; aspect-ratio: 16 / 10; background: var(--kf-surface-3); margin-bottom: 8px; }
.latest-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease-out); }
.latest-card:hover .latest-media img { transform: scale(1.035); }
.latest-media .latest-tile { filter: saturate(0.92); }
.latest-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--kf-muted); text-transform: uppercase; padding-top: 14px; border-top: 1px solid var(--kf-border); }
.latest-meta span[aria-hidden] { color: var(--kf-border-strong); }
.latest-badge { margin-inline-start: auto; font-family: var(--font-sans); text-transform: none; letter-spacing: 0; font-size: 11px; font-weight: 600; color: var(--kf-ocean-700); background: var(--kf-ocean-100); padding: 3px 8px; border-radius: 999px; }
.latest-card h3 { margin: 0; font-size: 21px; line-height: 1.22; letter-spacing: -0.018em; font-weight: 700; text-wrap: balance; }
.latest-card h3 a { transition: color 200ms; }
.latest-card h3 a:hover { color: var(--kf-ocean); }
.latest-card p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--kf-ink-3); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.latest-author { font-size: 13px; font-weight: 600; color: var(--kf-ink-2); margin-top: 4px; }
@media (max-width: 960px) { .latest-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) {
  .latest { padding: 80px 0 88px; }
  .latest-head { flex-direction: column; align-items: flex-start; gap: 20px; margin-bottom: 36px; }
}
@media (max-width: 600px) { .latest-grid { grid-template-columns: 1fr; } }


/* =====================================================================
   2027 layer: nav drawer, hero demo, tilt, magnetic, strike, tree draw,
   TV/e-ink motion, voices, founder, FAQ, scroll-driven reveal,
   reduced motion, dark mode. Appended last so it wins the cascade.
   ===================================================================== */

/* ---------- Nav: burger + drawer ---------- */
.nav { z-index: 1000; }
.nav-burger {
  display: none; width: 44px; height: 44px; margin-inline-start: 2px;
  border: 0; background: transparent; border-radius: 12px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 0;
}
.nav-burger:hover { background: var(--kf-surface-2); }
.nav-burger span { display: block; width: 20px; height: 2px; background: var(--kf-ink); border-radius: 2px; transition: transform 260ms var(--ease-out), opacity 200ms; }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-drawer {
  position: fixed; top: 0; inset-inline-end: 0; bottom: 0; width: min(380px, 88vw);
  background: var(--kf-surface-1); z-index: 990;
  padding: 92px 28px calc(28px + env(safe-area-inset-bottom));
  transform: translateX(104%); transition: transform 420ms var(--ease-out);
  display: none; flex-direction: column; gap: 8px;
  box-shadow: -24px 0 64px rgba(15,23,42,0.18);
  overflow-y: auto;
}
.nav-drawer.open { transform: none; }
.nav-drawer-links { display: flex; flex-direction: column; }
.nav-drawer-links a {
  font-size: 24px; font-weight: 700; letter-spacing: -0.015em; color: var(--kf-ink);
  padding: 16px 0; border-bottom: 1px solid var(--kf-border);
  opacity: 0; transform: translateX(16px); transition: opacity 320ms var(--ease-out), transform 420ms var(--ease-out);
}
.nav-drawer.open .nav-drawer-links a { opacity: 1; transform: none; }
.nav-drawer.open .nav-drawer-links a:nth-child(1) { transition-delay: 60ms; }
.nav-drawer.open .nav-drawer-links a:nth-child(2) { transition-delay: 100ms; }
.nav-drawer.open .nav-drawer-links a:nth-child(3) { transition-delay: 140ms; }
.nav-drawer.open .nav-drawer-links a:nth-child(4) { transition-delay: 180ms; }
.nav-drawer.open .nav-drawer-links a:nth-child(5) { transition-delay: 220ms; }
.nav-drawer.open .nav-drawer-links a:nth-child(6) { transition-delay: 260ms; }
.nav-drawer.open .nav-drawer-links a:nth-child(7) { transition-delay: 300ms; }
.nav-drawer-links a.active { color: var(--kf-ocean); }
.nav-drawer-foot { margin-top: auto; padding-top: 24px; display: flex; flex-direction: column; gap: 14px; }
.nav-drawer-foot .btn { justify-content: center; min-height: 48px; }
.nav-scrim {
  position: fixed; inset: 0; z-index: 980;
  background: rgba(15,23,42,0.35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 300ms;
}
.nav-scrim.open { opacity: 1; pointer-events: auto; }
html.nav-open { overflow: hidden; }
.nav .btn-primary { min-height: 40px; }
@media (max-width: 1200px) { .nav-links { gap: 20px; } }

/* ---------- Buttons: magnetic + soft spring ---------- */
.btn, .store-badge { transition: transform 200ms var(--ease-out), background-color 200ms var(--ease-out), box-shadow 200ms var(--ease-out), translate 420ms cubic-bezier(0.2, 0.8, 0.2, 1); }

/* ---------- Hero: tilt, chips, family phones, demo ---------- */
.hero-phone-stage { perspective: 1400px; display: grid; place-items: center; grid-auto-rows: max-content; align-content: center; }
.hero-chips { display: contents; }
.hero-phone-tilt { position: relative; z-index: 2; }
.hero-phone-tilt .phone-frame {
  transform: rotateX(calc(var(--ty, 0) * -6deg)) rotateY(calc(var(--tx, 0) * 8deg));
  transform-style: preserve-3d;
  transition: transform 500ms var(--ease-out);
}
.float-chip { translate: calc(var(--tx, 0) * 24px) calc(var(--ty, 0) * 24px); transition: translate 600ms var(--ease-out); }
.hero-family { display: flex; gap: 20px; justify-content: center; margin-top: 26px; position: relative; z-index: 2; }
.hero-family-phone { position: relative; width: 54px; height: 54px; }
.hf-av {
  position: absolute; inset: 0; border-radius: 50%;
  background-size: cover; background-position: center;
  border: 2px solid var(--kf-surface-1); box-shadow: var(--shadow-md);
}
.hf-photo {
  position: absolute; right: -8px; bottom: -8px; width: 30px; height: 30px; border-radius: 9px;
  background-size: cover; background-position: center;
  border: 2px solid var(--kf-surface-1); box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(-34px) scale(0.3);
  transition: opacity 320ms var(--ease-out), transform 640ms cubic-bezier(0.2, 1.5, 0.4, 1);
  transition-delay: calc(320ms + var(--i, 0) * 200ms);
}
.hf-ring { position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--kf-ocean); opacity: 0; transform: scale(0.8); }
.hero-family.posted .hf-photo { opacity: 1; transform: none; }
.hero-family.posted .hf-ring { animation: hfRing 1000ms var(--ease-out) forwards; animation-delay: calc(280ms + var(--i, 0) * 200ms); }
@keyframes hfRing { 0% { opacity: 0.9; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.8); } }
.hero-demo-hint { text-align: center; font-size: 13px; color: var(--kf-muted); margin: 14px 0 0; min-height: 20px; transition: color 300ms; }
.hero-family.posted + .hero-demo-hint { color: var(--kf-ocean-700); font-weight: 600; }
.feed-card-new { animation: feedNew 760ms cubic-bezier(0.2, 1, 0.3, 1) both; }
@keyframes feedNew { from { opacity: 0; transform: translateY(-18px) scale(0.96); } to { opacity: 1; transform: none; } }
@media (max-width: 980px) {
  .hero-phone-stage { min-height: 0; }
  .hero-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0 0 22px; order: 3; width: 100%; }
  .float-chip { display: flex; position: static; animation: none; translate: none; }
  .hero-phone-tilt { order: 1; }
  .hero-family { order: 2; margin-top: 20px; }
  .hero-demo-hint { order: 2; margin-bottom: 20px; }
}
@media (max-width: 400px) {
  .hero-phone-tilt .phone-frame, .showcase-slide .phone-frame { zoom: 0.86; }
}

/* ---------- Manifesto: strike-through draws in on scroll ---------- */
.manifesto-row .strike { text-decoration: none; position: relative; }
.manifesto-row .strike::after {
  content: ""; position: absolute; inset-inline: -0.04em; top: 54%; height: 0.09em; min-height: 3px;
  background: var(--kf-danger); border-radius: 2px;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 640ms var(--ease-out) 380ms;
}
.manifesto-row.in .strike::after { transform: scaleX(1); }

/* ---------- Family tree draws itself ---------- */
.tree-row { position: relative; }
.showcase-phone-slot .tree-row { opacity: 0; transform: translateX(-10px); transition: opacity 420ms var(--ease-out), transform 480ms var(--ease-out); transition-delay: calc(120ms + var(--n, 0) * 90ms); }
.showcase-phone-slot.active .tree-row { opacity: 1; transform: none; }
.showcase-phone-slot .tree-row:not([data-ind="0"])::before {
  content: ""; position: absolute; top: -14px; bottom: 50%;
  left: calc(16px + var(--ind, 1) * 22px - 12px); width: 10px;
  border-left: 2px solid var(--kf-ocean-300); border-bottom: 2px solid var(--kf-ocean-300); border-bottom-left-radius: 8px;
  transform: scaleY(0); transform-origin: top; transition: transform 420ms var(--ease-out); transition-delay: calc(160ms + var(--n, 0) * 90ms);
}
.showcase-phone-slot.active .tree-row:not([data-ind="0"])::before { transform: scaleY(1); }
.feat-card .tree-mock .row { opacity: 0; transform: translateX(-10px); transition: opacity 420ms var(--ease-out), transform 480ms var(--ease-out); }
.feat-card.in .tree-mock .row { opacity: 1; transform: none; }
.feat-card.in .tree-mock .row:nth-child(1) { transition-delay: 300ms; }
.feat-card.in .tree-mock .row:nth-child(2) { transition-delay: 400ms; }
.feat-card.in .tree-mock .row:nth-child(3) { transition-delay: 500ms; }
.feat-card.in .tree-mock .row:nth-child(4) { transition-delay: 600ms; }
.feat-card.in .tree-mock .row:nth-child(5) { transition-delay: 700ms; }
.feat-card.in .tree-mock .row:nth-child(6) { transition-delay: 800ms; }

/* ---------- TV: slow slideshow with Ken Burns ---------- */
.tv-frame .tv-img { position: absolute; inset: 0; opacity: 0; animation: tvCycle 24s ease-in-out infinite; animation-delay: calc(var(--n, 0) * 8s); will-change: opacity, transform; }
@keyframes tvCycle {
  0%   { opacity: 0; transform: scale(1.02); }
  5%   { opacity: 1; }
  33%  { opacity: 1; transform: scale(1.14) translate(-1.5%, -1%); }
  38%  { opacity: 0; transform: scale(1.15) translate(-1.5%, -1%); }
  100% { opacity: 0; }
}
/* ---------- e-INK: 20s dwell, refresh flash on change ---------- */
.eink-screen img { position: absolute; inset: 0; animation: einkCycle 40s steps(1, end) infinite; }
.eink-screen img.eink-alt { animation-delay: -20s; }
@keyframes einkCycle { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }
.eink-screen::before {
  content: ""; position: absolute; inset: 0; z-index: 2; background: #111; opacity: 0; pointer-events: none;
  animation: einkRefresh 20s steps(1, end) infinite;
}
@keyframes einkRefresh { 0% { opacity: 1; } 1.5% { opacity: 0; } 2.5% { opacity: 0.7; } 4% { opacity: 0; } 100% { opacity: 0; } }
.eink-meta { z-index: 3; }

/* ---------- Voices ---------- */
.voices { background: var(--kf-surface-1); padding: 140px 0 120px; border-top: 1px solid var(--kf-border); }
.voices-head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.voices-head h2 { font-size: clamp(34px, 4.6vw, 60px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.02; margin: 16px 0 0; }
.voices-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.voice-card {
  margin: 0; display: flex; flex-direction: column; gap: 22px;
  background: var(--kf-surface-2); border: 1px solid var(--kf-border); border-radius: 22px; padding: 28px 26px;
  transition: transform 300ms var(--ease-out), box-shadow 300ms var(--ease-out);
}
.voice-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.voice-card blockquote { margin: 0; font-size: 17px; line-height: 1.5; letter-spacing: -0.005em; color: var(--kf-ink); font-weight: 500; flex: 1; }
/* Quote words: hover lights each word up (0.3s in), then fades back slowly (0.8s out).
   Bold is faked with a text stroke so surrounding words never reflow. */
.voice-word {
  --word-glow: var(--kf-ocean-600, #338A94);
  display: inline-block;
  transition: color 0.8s ease, -webkit-text-stroke-color 0.8s ease, text-shadow 0.8s ease, transform 0.8s ease;
  -webkit-text-stroke: 0.6px transparent;
}
.voice-word:hover {
  color: var(--word-glow);
  -webkit-text-stroke-color: var(--word-glow);
  text-shadow: 0 0 10px rgba(63, 160, 172, 0.55), 0 0 22px rgba(63, 160, 172, 0.3);
  transform: translateY(-2px) scale(1.06);
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@media (prefers-reduced-motion: reduce) {
  .voice-word, .voice-word:hover { transform: none; }
}
.voice-card figcaption { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.voice-card figcaption b { display: block; color: var(--kf-ink); }
.voice-card figcaption span:not(.voice-av) { color: var(--kf-muted); }
.voice-av { width: 76px; height: 76px; flex: 0 0 76px; border-radius: 50%; background-size: cover; background-position: center; }
.voices-note { text-align: center; font-size: 13px; color: var(--kf-muted); margin: 32px 0 0; }
@media (max-width: 980px) { .voices-grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; } }
@media (max-width: 600px) { .voices { padding: 100px 0 90px; } .voices-grid { grid-template-columns: 1fr; } }

/* ---------- Founder / Made in Norway ---------- */
.founder { background: var(--kf-surface-3); padding: 140px 0; }
.founder-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 64px; align-items: center; }
.founder-text h2 { font-size: clamp(36px, 5vw, 68px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.0; margin: 16px 0 28px; }
.founder-text p { font-size: 18px; line-height: 1.6; color: var(--kf-ink-3); margin: 0 0 18px; max-width: 58ch; }
.founder-sig { display: flex; flex-direction: column; gap: 2px; margin: 32px 0 28px; padding-inline-start: 18px; border-inline-start: 3px solid var(--kf-ocean); }
.founder-sig .sig-name { font-family: var(--font-sans); font-style: italic; font-weight: 700; font-size: 20px; color: var(--kf-ink); letter-spacing: -0.01em; }
.founder-sig .sig-sub { font-size: 13px; color: var(--kf-muted); }
.founder-card {
  position: relative; color: #fff; border-radius: 28px; padding: 40px 36px;
  overflow: clip; box-shadow: var(--shadow-lg);
  background: url('/assets/grainy/2-3.webp') center / cover no-repeat var(--kf-ink);
}
.founder-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,16,40,0.18), rgba(8,16,40,0.42));
}
.founder-flags { position: relative; z-index: 1; display: flex; gap: 12px; margin-bottom: 30px; }
.founder-flag { height: 48px; width: auto; display: block; border-radius: 6px; object-fit: cover; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.founder-facts { margin: 0; display: grid; gap: 0; position: relative; z-index: 1; }
.founder-facts > div { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,0.18); }
.founder-facts > div:last-child { border-bottom: 0; }
.founder-facts dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,0.82); margin: 0; }
.founder-facts dd { margin: 0; font-weight: 600; font-size: 15px; text-align: end; text-shadow: 0 1px 10px rgba(0,0,0,0.3); }
@media (max-width: 980px) { .founder-grid { grid-template-columns: 1fr; gap: 40px; } .founder { padding: 110px 0; } }
.founder-side { display: flex; flex-direction: column; gap: 22px; }

/* ---------- Founders photo with name tags (home founder note + about page) ---------- */
.founders-photo { margin: 0; }
.founders-photo-frame {
  position: relative; border-radius: 24px; overflow: hidden;
  box-shadow: var(--shadow-lg); background: var(--kf-surface-3);
  transform: rotate(-1.2deg);
}
.founders-photo-frame img { display: block; width: 100%; height: auto; }
.founders-tag {
  position: absolute; transform: translate(-50%, 0);
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255,255,255,0.94); color: #0F172A;
  font-size: 12px; font-weight: 700; letter-spacing: 0.01em; white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  backdrop-filter: blur(6px);
}
.founders-tag::before {
  content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px;
  background: inherit; transform: translateX(-50%) rotate(45deg); border-radius: 2px;
}
/* Anchor points are % of the photo: Tom Egill (child on lap, left), Terje Otto (right), dad (top left) */
.founders-tag.tag-tom   { left: 31%; top: 70%; }
.founders-tag.tag-terje { left: 68%; top: 63%; }
.founders-tag.tag-dad   { left: 22%; top: 46%; background: rgba(15,23,42,0.85); color: #fff; font-weight: 600; }
.founders-photo figcaption { margin: 16px 6px 0; font-size: 14px; line-height: 1.5; color: var(--kf-muted); font-style: italic; }
.about-founders-photo { padding: 24px 0 0; }
.about-founders-photo .founders-photo { max-width: 720px; margin: 0 auto; }
.about-founders-photo .founders-photo figcaption { text-align: center; }
@media (max-width: 480px) {
  .founders-tag { font-size: 11px; padding: 5px 10px; }
  .founders-photo-frame { border-radius: 18px; }
}

/* ---------- FAQ (teaser + page) ---------- */
.faq { background: var(--kf-surface-1); padding: 140px 0; }
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 64px; align-items: start; }
.faq-head { position: sticky; top: 110px; }
.faq-head h2, .faq-page-head h1 { font-size: clamp(36px, 5vw, 68px); font-weight: 700; letter-spacing: -0.03em; line-height: 1.0; margin: 16px 0 28px; }
.faq-list { display: flex; flex-direction: column; }
.faq-item { border-bottom: 1px solid var(--kf-border); }
.faq-item:first-child { border-top: 1px solid var(--kf-border); }
.faq-item summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; color: var(--kf-ink);
  transition: color 200ms;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--kf-ocean); }
.faq-plus { position: relative; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--kf-border-strong); transition: transform 320ms var(--ease-out), background 200ms, border-color 200ms; }
.faq-plus::before, .faq-plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; translate: -50% -50%; border-radius: 1px; }
.faq-plus::before { width: 12px; height: 2px; }
.faq-plus::after { width: 2px; height: 12px; transition: transform 320ms var(--ease-out); }
.faq-item[open] .faq-plus { transform: rotate(180deg); background: var(--kf-ocean); border-color: var(--kf-ocean); color: #fff; }
.faq-item[open] .faq-plus::after { transform: scaleY(0); }
.faq-a { padding-inline: 0 48px; padding-block: 0 24px; font-size: 16px; line-height: 1.6; color: var(--kf-ink-3); }
.faq-a p { margin: 0; }
.faq-item[open] .faq-a { animation: faqOpen 360ms var(--ease-out); }
@keyframes faqOpen { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (max-width: 980px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } .faq-head { position: static; } .faq { padding: 100px 0; } }
@media (max-width: 600px) { .faq-item summary { font-size: 17px; padding: 18px 0; } .faq-a { padding-inline-end: 24px; } }
.faq-page { padding: 150px 0 120px; min-height: 70vh; }
.faq-page-head { max-width: 760px; margin-bottom: 48px; }
.faq-list-page { max-width: 820px; }
.faq-page-contact { margin: 48px 0 0; }
@media (max-width: 760px) { .faq-page { padding: 120px 0 90px; } }

/* ---------- Scroll-driven reveal (no JS needed where supported) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    [data-reveal] {
      opacity: 1; transform: none; transition: none;
      animation: kfReveal linear both;
      animation-timeline: view();
      animation-range: entry 8% entry 38%;
    }
    @keyframes kfReveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
    /* keep the nav drawer / sticky bits out of it */
    .faq-head[data-reveal] { animation-range: entry 8% entry 30%; }
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .showcase-scroll-cue svg { animation: none; }
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  [data-reveal], [data-reveal-words] span.word { opacity: 1 !important; transform: none !important; animation: none !important; }
  .float-chip, .hero-phone-glow, .fab, .hero-pill .dot, .upload-field.is-active input.upload-input, .upload-submit.is-next { animation: none !important; }
  .tv-frame .tv-img { animation: none !important; opacity: 0; }
  .tv-frame .tv-img:first-child { opacity: 1; }
  .eink-screen::before { animation: none !important; opacity: 0; }
  .eink-screen img { animation: none !important; }
  .eink-screen img.eink-alt { opacity: 0; }
  .hero-phone-tilt .phone-frame { transform: none !important; }
  .float-chip { translate: none !important; }
  .manifesto-row .strike::after { transform: scaleX(1); }
  .showcase-phone-slot .tree-row, .feat-card .tree-mock .row { opacity: 1; transform: none; }
  .showcase-phone-slot .tree-row:not([data-ind="0"])::before { transform: scaleY(1); }
}

:root { color-scheme: light; }

/* Burger/drawer visibility must come after their base rules */
@media (max-width: 980px) {
  .nav-burger { display: flex; }
  .nav-drawer { display: flex; }
}

/* =====================================================================
   RTL (Arabic). Appended last so it wins the cascade over the LTR rules
   above. `--font-sans` / `--lh-body` tokens are overridden once in
   colors_and_type.css and apply everywhere automatically.
   ===================================================================== */

/* Phone / app-screen mockups (FeedMock, AdminMock, etc. in
   KinfeedApp.jsx) render the English app UI — force LTR inside them
   regardless of page direction, so their layout/text stay correct. */
.phone-frame,
.phone-screen {
  direction: ltr;
  text-align: left;
}

/* Long-form reading paragraphs: a little more breathing room for
   Arabic script than the 1.5–1.7 used for Latin body copy. */
[dir="rtl"] .article-body,
[dir="rtl"] .about-prose,
[dir="rtl"] .founder-text p {
  line-height: 1.75;
}

/* Eyebrows / section labels / badges: Arabic has no letter case, and
   the wide tracking used on these breaks connected letterforms. */
[dir="rtl"] .eyebrow,
[dir="rtl"] .showcase-tab-label,
[dir="rtl"] .surface-card .badge,
[dir="rtl"] .eink-meta,
[dir="rtl"] .stat-block .label,
[dir="rtl"] .footer h5,
[dir="rtl"] .store-badge .sb-top,
[dir="rtl"] .feat-card .feat-badge {
  letter-spacing: normal;
  text-transform: none;
}

/* Mobile nav drawer: it's pinned via inset-inline-end (the left edge
   in RTL); the hidden-state transform must push it off-canvas on that
   same side, or it opens on-screen instead of sliding in. */
[dir="rtl"] .nav-drawer {
  transform: translateX(-104%);
}
[dir="rtl"] .nav-drawer-links a {
  transform: translateX(-16px);
}

/* "Coming soon" ribbon: mirror the diagonal so it still reads as a
   corner banner once inset-inline-end moves its anchor to the top-left. */
[dir="rtl"] .feat-card .feat-badge {
  transform: rotate(-45deg);
}

/* Manifesto strike-through: grow from the reading-start edge (right
   in RTL) instead of always starting from the left. */
[dir="rtl"] .manifesto-row .strike::after {
  transform-origin: right center;
}
