/* KIWI showcase. Uses KIWI's existing brand palette. */
:root {
  color-scheme: light;
  --paper: #fff;
  --ink: #20291d;
  --muted: #5b6655;
  --green: #4b7d2b;
  --deep-green: #23400f;
  --line: #e1e7dd;
  --pale: #f5f8f0;
  --accent: #d98432;
  --content: 1280px;
  --gutter: 48px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 92px; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, pre:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 3px; }
img { display: block; max-width: 100%; height: auto; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
p { text-wrap: pretty; }
.skip-link { position: absolute; top: -100px; left: 1rem; padding: .7rem 1rem; z-index: 10; background: var(--deep-green); color: #fff; }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Frame */
main > *, footer { width: min(var(--content), calc(100% - 2 * var(--gutter))); margin-inline: auto; }
.site-header { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between; min-height: 68px; padding-inline: max(var(--gutter), calc((100% - var(--content)) / 2)); border-bottom: 1px solid var(--line); background: rgb(255 255 255 / .88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; gap: .65rem; font-size: 1.55rem; font-weight: 750; letter-spacing: -.06em; transition: opacity .2s, visibility .2s; }
.site-header.at-hero .brand { opacity: 0; visibility: hidden; }
.brand img { width: 35px; }
nav { display: flex; align-items: center; gap: 2rem; font-size: .9rem; font-weight: 550; }
nav a { padding: .5rem 0; }
nav a:hover, footer a:hover { color: var(--green); }
footer { display: flex; justify-content: space-between; gap: 1rem; margin-top: 112px; padding-block: 32px 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem; }
footer strong { color: var(--ink); margin-right: 12px; font-size: .95rem; }

/* Type */
.eyebrow { color: var(--green); font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 650; }
h1 { display: inline-flex; align-items: center; gap: .16em; font-size: clamp(3rem, 5vw, 4rem); line-height: 1; font-weight: 720; letter-spacing: -.04em; }
h1 img { width: .92em; height: .92em; }
h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); line-height: 1.12; font-weight: 600; letter-spacing: -.05em; margin-top: 16px; }
h3 { font-size: 1.4rem; line-height: 1.3; letter-spacing: -.03em; font-weight: 580; }
.section { padding-top: 112px; }
.section-lead { max-width: 700px; margin-top: 18px; color: var(--muted); font-size: 1.05rem; }
.section-lead strong { color: var(--ink); font-weight: 650; }
.scene .section-lead { max-width: none; }
.lead-accent { color: var(--green); font-style: normal; font-weight: 620; }
/* When the lead has to wrap, the accent moves down as a whole sentence rather than shedding a word. */
@media (min-width: 700px) { .lead-accent { white-space: nowrap; } }

/* Hero */
.hero { text-align: center; padding: 36px 0 36px; }
.hero-name { margin-top: 10px; font-size: clamp(1.5rem, 2.6vw, 2rem); line-height: 1.2; font-weight: 500; letter-spacing: -.035em; }
.hero-name b { color: var(--green); font-weight: 750; }
.hero-tagline { margin-top: 12px; color: var(--muted); font-size: 1.05rem; }
.hero-tagline strong { margin-right: .35em; color: var(--ink); font-weight: 620; letter-spacing: -.01em; }
.hero-authors { max-width: 920px; margin: 18px auto 0; font-size: .95rem; line-height: 1.7; }
.hero-authors span { white-space: nowrap; }
.hero-authors a { text-decoration: underline; text-decoration-color: #bfcdb4; text-underline-offset: 4px; }
.hero-authors a:hover { color: var(--green); }
.hero-note { margin-top: 2px; color: var(--muted); font-size: .78rem; }
.hero sup { line-height: 0; color: var(--green); font-weight: 650; }
.resource-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .7rem; min-height: 44px; padding: .6rem 1.2rem; border: 1px solid transparent; border-radius: 7px; font-size: .9rem; font-weight: 550; transition: background .15s, border-color .15s; }
.button-primary { color: #fff; background: var(--deep-green); }
.button-primary:not([aria-disabled="true"]):hover { background: #34571c; }
.button-secondary { border-color: #cfd8c8; background: #fff; }
.button-secondary:not([aria-disabled="true"]):hover { background: var(--pale); border-color: #a8b99a; }

/* Full system film */
.hero-film { margin-bottom: 48px; }
.hero-film-stage { position: relative; container-type: inline-size; background: #1a2426; }
.hero-film video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: 0; background: #1a2426; }
/* Center the off-center hardware in the idle poster without shifting the film. */
.hero-film video:not(.is-playing) { object-position: calc(50% + 16.3cqw) 50%; }
.hero-film-play { position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; display: grid; place-items: center; width: 80px; height: 80px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: rgb(0 0 0 / .35); cursor: pointer; transition: transform .2s ease, background .2s ease; }
.hero-film-play[hidden] { display: none; }
.hero-film-play-icon { display: block; width: 48px; height: 48px; }
.hero-film-play:hover { transform: scale(1.05); background: rgb(0 0 0 / .5); }
.hero-film-play:active { transform: scale(.96); }
.hero-film-play:focus-visible { outline: 3px solid #fff; outline-offset: 5px; }
@media (max-width: 600px) {
  .hero-film-play { width: 64px; height: 64px; }
  .hero-film-play-icon { width: 38px; height: 38px; }
}
.hero-film figcaption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 20px; padding-top: 8px; color: var(--muted); font-size: .85rem; }
.hero-film-label { display: inline-flex; align-items: center; gap: 6px; }
.hero-film-label img { width: 12px; height: 12px; }

/* Overview */
/* 5:6:5 columns give the 4:3 videos and the 8:5 convert animation between them the same height. */
.overview-columns { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 5fr); align-items: end; }
.overview-stage h3 { margin-bottom: 14px; font-size: 1.1rem; text-align: center; }
.overview-video { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; border-radius: 8px; border: 1px solid var(--line); background: var(--pale); }
/* The convert animation runs frameless between the two videos: lift its off-white ground to the page white and feather the edges. */
.overview-flow .overview-video { aspect-ratio: 8 / 5; border: 0; border-radius: 0; background: none; filter: brightness(1.09);
  -webkit-mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(transparent, #000 7%, #000 93%, transparent); -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 4%, #000 96%, transparent), linear-gradient(transparent, #000 7%, #000 93%, transparent); mask-composite: intersect; }

/* Scene */
.scene-stage { width: 100%; aspect-ratio: 16 / 9; max-height: 80vh; margin-top: 36px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #f5f4ee; }
.scene-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
.scene-note { margin-top: 20px; color: var(--muted); font-size: .95rem; }
.scene-note strong { color: var(--ink); font-weight: 620; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 72px; padding-block: 44px; border-block: 1px solid var(--line); }
.stat-value { min-height: 80px; font-size: clamp(3.2rem, 5vw, 4.4rem); line-height: 1; font-weight: 650; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.stat-value small { margin-inline: .08em; font-size: .42em; font-weight: 600; letter-spacing: -.02em; color: var(--green); }
.stat-value-text { padding-top: 4px; font-size: clamp(1.7rem, 2.6vw, 2.2rem); line-height: 1.1; letter-spacing: -.04em; }
.stat-value-text small { display: block; margin: 6px 0 0; font-size: .75em; }
.stat-label { max-width: 320px; margin-top: 16px; color: var(--muted); font-size: .97rem; text-wrap: balance; }
.stat-note { margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--accent); }

/* Hardware */
.hardware-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; margin-top: 40px; }
.media-card { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.media-card > video { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; background: #1c2226; }
/* 10:9 gives the viewer the same height as the 16:9 video across the 1.6:1 columns. */
.hardware-viewer { aspect-ratio: 10 / 9; border-bottom: 1px solid var(--line); }
.hardware-viewer iframe { display: block; width: 100%; height: 100%; border: 0; }
.media-card figcaption { padding: 22px 26px 26px; }
.media-card h3 { font-size: 1.2rem; }
.media-card p { margin-top: 8px; color: var(--muted); font-size: .95rem; }
.kit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 36px; }
.config-label { color: var(--green); font-size: .75rem; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.kit-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.kit-tile { display: block; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; color: inherit; font: inherit; text-align: left; }
.kit-tile img { width: 100%; }
.kit-name { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; padding: 10px 12px; font-size: .85rem; font-weight: 580; }
.kit-3d { padding: 1px 7px; border: 1px solid #cfd8c8; border-radius: 99px; font-size: .68rem; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; color: var(--green); }
.kit-3d.is-soon { border-style: dashed; color: var(--muted); font-weight: 550; }
button.kit-tile { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
button.kit-tile:hover { border-color: #a8b99a; }
button.kit-tile[aria-pressed="true"] { border-color: var(--deep-green); box-shadow: 0 0 0 1px var(--deep-green); }
button.kit-tile[aria-pressed="true"] .kit-3d { border-color: var(--deep-green); background: var(--deep-green); color: #fff; }

/* Method */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 34px; margin: 44px 0 28px; }
.step { border-top: 2px solid var(--deep-green); padding-top: 23px; }
.step-number { font-size: .75rem; letter-spacing: .1em; font-weight: 650; color: var(--green); }
.step h3 { margin: 22px 0 17px; }
.step p { color: var(--muted); font-size: .97rem; margin-bottom: 25px; }
.feature-figure { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.figure-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 17px 25px; background: var(--pale); border-bottom: 1px solid var(--line); }
.figure-label { font-size: .9rem; font-weight: 580; }
.figure-context { font-size: .78rem; color: var(--muted); }
.figure-tools { display: flex; align-items: center; gap: 16px; }
.pipeline-playback { padding: 5px 10px; border: 1px solid #cfd8c8; border-radius: 5px; background: #fff; color: var(--deep-green); font: inherit; font-size: .75rem; cursor: pointer; white-space: nowrap; }
.pipeline-playback:hover { background: var(--pale); }
.pipeline-scroll { overflow-x: auto; padding: 24px 24px 80px; }
.pipeline-scroll:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pipeline-diagram { position: relative; min-width: 760px; container-type: inline-size; }
.pipeline-diagram > img { width: 100%; }
/* The moving dots trace the arrows in the original figure, in source-image coordinates. */
.pipeline-flows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.pipeline-flow { fill: none; stroke: #4b7d2b; stroke-width: 5.5; stroke-linecap: round; stroke-dasharray: 6 64; animation: pipeline-flow 2s linear infinite; }
.flow-rear { stroke: #2295e7; }
.flow-front { stroke: #25b56a; }
.flow-scene { stroke: #8571a7; }
.flow-ground { stroke: #d98432; }
.pipeline-diagram.is-paused .pipeline-flow { animation-play-state: paused; }
@keyframes pipeline-flow { to { stroke-dashoffset: -70; } }
@media (prefers-reduced-motion: reduce) {
  .pipeline-diagram:not(.is-playing) .pipeline-flow { animation-play-state: paused; }
}

.pipeline-audio { position: absolute; top: 66.5%; left: 1.5%; width: 16%; min-height: 33.5%; background: #fff; color: #252b2c; font: 1.32cqw/1.22 Arial, sans-serif; }
.pipeline-audio strong, .pipeline-audio span { display: block; }
.pipeline-audio span { margin-top: .22em; color: #717c83; }
.pipeline-waveform { position: relative; width: 100%; aspect-ratio: 16 / 15; overflow: hidden; margin-top: .4em; border-radius: 3px; background: var(--pale); }
.pipeline-waveform video { display: block; width: 100%; height: 100%; object-fit: fill; }
.pipeline-audio .pipeline-imu { margin-top: .7em; }
.pipeline-ground { position: absolute; left: 72.75%; top: 21.45%; width: 25.3%; height: 25.7%; object-fit: cover; background: #fff; }
.pipeline-ground-caption { position: absolute; left: 72.65%; top: 47.5%; width: 25.7%; height: 6.8%; padding-top: .2cqw; background: #f6f5fa; font: 1.32cqw/1.25 Arial, sans-serif; }
.pipeline-ground-caption strong { display: block; color: #6d5c88; }
.pipeline-ground-caption span { display: block; color: #717c83; }
.feature-figure > figcaption { padding: 17px 25px; font-size: .85rem; color: var(--muted); }
.pipeline-mobile-hint { display: none; }

/* Citation */
.bibtex { position: relative; margin-top: 28px; border: 1px solid var(--line); border-radius: 12px; background: var(--pale); }
.bibtex pre { margin: 0; padding: 26px 30px; overflow-x: auto; font: .85rem/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--ink); }
.copy-button { position: absolute; top: 12px; right: 12px; min-height: 34px; padding: 5px 12px; border: 1px solid #cfd8c8; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: .8rem; font-weight: 550; cursor: pointer; }
.contact { margin-top: 18px; color: var(--muted); font-size: .95rem; }
.contact a { color: var(--ink); text-decoration: underline; text-decoration-color: #bfcdb4; text-underline-offset: 4px; }
.contact a:hover { color: var(--green); }
.copy-button:hover { background: var(--pale); border-color: #a8b99a; }

@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  :root { --gutter: 24px; }
  .section { padding-top: 84px; }
  .hardware-row { grid-template-columns: 1fr; }
  .hardware-viewer { aspect-ratio: 4 / 3; }
  .stats { gap: 28px; margin-top: 56px; padding-block: 36px; }
  .kit { grid-template-columns: 1fr; gap: 28px; }
  .steps { gap: 22px; }
}
@media (max-width: 640px) {
  :root { --gutter: 18px; }
  .site-header { min-height: 60px; gap: 20px; }
  .brand { gap: .35rem; font-size: 1.25rem; }
  .brand img { width: 29px; }
  nav { gap: 15px; font-size: .875rem; }
  .hero { padding: 28px 0 28px; }
  h2 { font-size: 2rem; }
  .hero-tagline { font-size: 1rem; }
  .hero-tagline strong { display: block; margin: 0; }
  .resource-links { gap: 10px; margin-top: 24px; }
  .button { font-size: .875rem; padding-inline: 14px; }
  .overview-columns { grid-template-columns: 1fr; gap: 8px; }
  .section { padding-top: 64px; }
  .scene-stage { aspect-ratio: 4 / 5; margin-top: 28px; }
  .hardware-row { margin-top: 28px; }
  .hardware-viewer { aspect-ratio: auto; height: 440px; }
  .media-card figcaption { padding: 18px 18px 22px; }
  .stats { grid-template-columns: 1fr; gap: 32px; margin-top: 44px; }
  .stat-label { max-width: none; }
  .stat-value { min-height: 0; }
  .kit-tiles { gap: 8px; }
  .kit-name { padding: 8px; font-size: .75rem; }
  .steps { grid-template-columns: 1fr; gap: 32px; margin-top: 32px; }
  .step { padding-top: 18px; }
  .step h3 { margin: 14px 0; }
  .step p { margin-bottom: 15px; }
  .figure-heading { padding: 13px 15px; }
  .figure-context { display: none; }
  .pipeline-scroll { padding: 10px 10px 56px; }
  .pipeline-mobile-hint { display: block; margin-top: 5px; }
  .feature-figure figcaption { padding: 13px 15px; font-size: .8rem; }
  .bibtex pre { padding: 56px 18px 20px; font-size: .78rem; }
  footer { align-items: start; margin-top: 72px; font-size: .75rem; padding-block: 27px; }
  footer strong { display: block; margin: 0; }
  footer a { white-space: nowrap; padding-top: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
  .hero-film-play:hover, .hero-film-play:active { transform: none; }
}
