/* The Ukiy site. Colours, type, shape and motion come from tokens.css; only layout
   lives here. One light page. Crisp lines and flat surfaces; real product shots; one
   easing curve; text always sits on a solid ground. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; background: var(--uk-ground); color: var(--uk-ink); font: 400 var(--uk-t-16)/1.6 var(--uk-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
::selection { background: var(--uk-select); }
a { color: inherit; text-underline-offset: 3px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
:focus-visible { outline: 2px solid var(--uk-accent); outline-offset: 3px; border-radius: var(--uk-radius-small); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 14px; border-radius: var(--uk-radius-small); background: var(--uk-popover); }
.skip:focus { left: 8px; }
code, pre { font-family: var(--uk-mono); }

.wrap { width: min(1240px, 100% - 2 * clamp(20px, 5vw, 72px)); margin-inline: auto; }
.serif { font-family: var(--uk-serif); font-weight: 400; letter-spacing: -.02em; }
section { position: relative; }
.band { padding-block: clamp(72px, 10vw, 136px); border-top: 1px solid var(--uk-rule); }
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; font-size: var(--uk-t-14); color: var(--uk-muted); }
.eyebrow img { width: 26px; height: 26px; }
h2.head { font: 600 clamp(40px, 5.4vw, 76px)/.98 var(--uk-display); letter-spacing: -.05em; }
.lead { margin-top: 24px; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--uk-muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: var(--uk-radius-curve); font: 500 var(--uk-t-14) var(--uk-body); text-decoration: none; transition: filter var(--uk-fast) var(--uk-ease), background var(--uk-fast) var(--uk-ease); }
.btn.primary { background: var(--uk-accent); color: var(--uk-on-accent); }
.btn.primary:hover { filter: brightness(1.12); }
.btn.quiet { color: var(--uk-ink); background: var(--uk-surface); box-shadow: inset 0 0 0 1px var(--uk-rule); }
.btn.quiet:hover { background: var(--uk-popover); }
.btn .ar { transition: transform var(--uk-medium) var(--uk-ease); }
.btn:hover .ar { transform: translateX(3px); }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* header */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 30; height: 64px; border-bottom: 1px solid transparent; transition: background var(--uk-medium) var(--uk-ease), border-color var(--uk-medium) var(--uk-ease); }
.nav.solid { background: var(--uk-chrome); border-color: var(--uk-rule); }
.nav .wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 22px var(--uk-display); letter-spacing: -.03em; }
.brand img { width: 30px; height: 30px; }
.nav ul { display: flex; gap: clamp(18px, 2.6vw, 34px); }
.nav ul a { position: relative; text-decoration: none; font-size: var(--uk-t-14); color: var(--uk-muted); padding-block: 6px; transition: color var(--uk-fast) var(--uk-ease); }
.nav ul a:hover, .nav ul a[aria-current="page"] { color: var(--uk-ink); }
.nav ul a[aria-current="page"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: var(--uk-accent); }

/* overview hero */
.hero { min-height: 100svh; display: flex; overflow: hidden; }
.hero .wrap { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding-top: clamp(112px, 16vh, 168px); }
.hero-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(24px, 5vw, 72px); align-items: start; }
.hero h1 { font: 600 clamp(40px, 5.4vw, 80px)/1 var(--uk-display); letter-spacing: -.05em; }
.hero .actions, .pagehead .actions { margin-top: 36px; }
.nb { white-space: nowrap; }
.hero-mark { width: min(100%, 320px); height: auto; justify-self: end; }
.word { display: flex; margin-left: -.04em; font: 600 clamp(120px, 25vw, 400px)/.8 var(--uk-display); letter-spacing: -.07em; padding-bottom: .08em; user-select: none; }
.word span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .word span { transform: translateY(105%); opacity: 0; }
  .ready .word span { animation: rise 1.2s var(--uk-ease) forwards; animation-delay: calc(var(--i) * 90ms + 150ms); }
}
@keyframes rise { to { transform: none; opacity: 1; } }

/* split: text and a figure */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 8fr) minmax(0, 5fr); }
.split.flip > .text { order: 2; }
.split.top { align-items: start; }
.facts { margin-top: 28px; display: grid; gap: 12px; }
.facts li { padding-left: 24px; position: relative; }
.facts li::before { content: ''; position: absolute; left: 0; top: .78em; width: 12px; height: 1.5px; background: var(--uk-accent); }
.window { border-radius: 12px; overflow: hidden; box-shadow: 0 0 0 1px var(--uk-rule), var(--uk-lift-2); background: var(--uk-surface); }
.window img { width: 100%; height: auto; }
figcaption { margin-top: 12px; color: var(--uk-muted); font-size: var(--uk-t-13); }

.name { max-width: 30ch; font-size: clamp(30px, 4vw, 56px); line-height: 1.1; }
.name em { font-style: italic; }

/* page head */
.pagehead { padding-top: calc(64px + clamp(48px, 7vw, 96px)); padding-bottom: clamp(56px, 8vw, 104px); }
.pagehead h1 { font: 600 clamp(56px, 8vw, 120px)/.92 var(--uk-display); letter-spacing: -.06em; }
.pagehead .sub { margin-top: 20px; font: 400 clamp(24px, 2.8vw, 38px)/1.14 var(--uk-serif); letter-spacing: -.02em; }
.pagehead.short { padding-bottom: clamp(32px, 4vw, 56px); }
.app-icon { width: 64px; height: 64px; margin-bottom: 24px; }
.dl-meta { margin-top: 14px; font-size: var(--uk-t-14); color: var(--uk-muted); }

/* Kozo: what it does */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 3vw, 48px); margin-top: clamp(36px, 5vw, 64px); }
.principles li { border-top: 1px solid var(--uk-rule); padding-top: 20px; }
.principles h3 { font: 600 var(--uk-t-20) var(--uk-display); letter-spacing: -.03em; }
.principles p { margin-top: 10px; color: var(--uk-muted); }
.principles a { color: var(--uk-accent); }

/* tables and code */
.scroll { overflow-x: auto; border-radius: var(--uk-radius-medium); background: var(--uk-surface); box-shadow: var(--uk-lift-1); }
table { width: 100%; border-collapse: collapse; font-size: var(--uk-t-14); line-height: 1.5; }
th { text-align: left; font-weight: 600; background: var(--uk-chrome); white-space: nowrap; }
th, td { padding: 11px 16px; vertical-align: top; }
tbody tr + tr td { border-top: 1px solid var(--uk-rule); }
td:first-child { min-width: 148px; }
td code, p code { font-size: .92em; overflow-wrap: anywhere; }
td a, .doc p a { color: var(--uk-accent); }
.hash { display: block; word-break: break-all; }
details { margin-top: 6px; color: var(--uk-muted); }
summary { cursor: pointer; color: var(--uk-accent); }
pre { margin: 0; padding: 16px 18px; overflow-x: auto; border-radius: var(--uk-radius-medium); background: var(--uk-chrome); font-size: var(--uk-t-13); line-height: 1.6; }

/* the format page */
.spec { display: grid; grid-template-columns: 196px minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; padding-bottom: clamp(72px, 10vw, 136px); }
.toc { position: sticky; top: 88px; display: grid; gap: 2px; padding: 10px; border-radius: var(--uk-radius-medium); background: var(--uk-chrome); font-size: var(--uk-t-14); }
.toc a { padding: 7px 10px; border-radius: var(--uk-radius-small); text-decoration: none; color: var(--uk-muted); transition: background var(--uk-fast) var(--uk-ease), color var(--uk-fast) var(--uk-ease); }
.toc a:hover { background: var(--uk-raised); color: var(--uk-ink); }
.doc section + section { margin-top: clamp(48px, 6vw, 72px); }
.doc h2 { font: 600 clamp(28px, 3vw, 40px)/1.1 var(--uk-display); letter-spacing: -.04em; margin-bottom: 16px; }
.doc p, .doc pre, .doc .scroll { margin-top: 16px; }
.doc h2 + p, .doc h2 + pre { margin-top: 0; }

/* footer */
footer { border-top: 1px solid var(--uk-rule); background: var(--uk-chrome); font-size: var(--uk-t-14); color: var(--uk-muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; padding-block: 28px; }
footer nav { display: flex; gap: 24px; }
footer a { text-decoration: none; }
footer a:hover { color: var(--uk-ink); }

/* reveal */
.rv { opacity: 0; transform: translateY(20px); transition: opacity .8s var(--uk-ease), transform 1s var(--uk-ease); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 960px) {
  .split, .split.flip { grid-template-columns: minmax(0, 1fr); }
  .split.flip > .text { order: 0; }
  .principles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .toc { position: static; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}
@media (max-width: 600px) {
  .hero-top { grid-template-columns: minmax(0, 1fr); }
  .hero-mark { width: 148px; justify-self: start; grid-row: 1; }
  .principles { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}
