Skip to content

armgit / kokon

Public Imported from GitHub
0

Edit photos by describing the change, on your own GPU. A free, open-source alternative to Nano Banana and ChatGPT image editing: photos stay on your computer, no daily limit. One installer for Windows, Mac and Linux sets up the best open model (Qwen-Image 2.1). MCP server for AI agents.

47.0 KB
Raw Blame
:root {
  --bg: #070707;
  --bg-2: #0d0d0d;
  --card: rgba(255, 255, 255, 0.035);
  --card-hi: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.08);
  --line-hi: rgba(255, 255, 255, 0.14);
  --text: #f2f1ed;
  --text-2: rgba(242, 241, 237, 0.66);
  --text-3: rgba(242, 241, 237, 0.42);
  --paper: #f7f6f2;
  --ink: #0d0d0d;
  --radius: 22px;
  --max: 1200px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.wrap { width: min(var(--max), calc(100% - 32px)); margin: 0 auto; }
@media (min-width: 720px) { .wrap { width: min(var(--max), calc(100% - 64px)); } }

/* Grain + light */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: 0.035; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 102; transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(7, 7, 7, 0.72); backdrop-filter: saturate(1.4) blur(18px); -webkit-backdrop-filter: saturate(1.4) blur(18px); border-color: var(--line); }
.nav .wrap { height: 64px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 640; font-size: 19px; letter-spacing: -0.03em; }
.logo svg { width: 22px; height: 22px; }
.nav-links { display: none; font-size: 14.5px; color: var(--text-2); }
.nav-links ul { list-style: none; margin: 0; padding: 0; }
.nav-links > ul { display: flex; align-items: center; gap: 6px; }
.nav-links .top, .dd > button { display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; border-radius: 999px; white-space: nowrap; transition: color 0.2s, background 0.2s; }
.nav-links .top:hover, .dd > button:hover, .dd.open > button { color: var(--text); background: var(--card-hi); }
.caret { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s; }
.dd { position: relative; }
.dd.open .caret { transform: rotate(180deg); }
.dd-panel { position: absolute; top: 100%; left: -8px; padding-top: 10px; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.18s, transform 0.18s, visibility 0.18s; }
.dd-panel ul { width: 300px; padding: 8px; border-radius: 18px; background: #121212; box-shadow: 0 0 0 1px var(--line-hi), 0 24px 70px rgba(0, 0, 0, 0.6); }
.dd.open .dd-panel { opacity: 1; visibility: visible; transform: none; }
@media (hover: hover) and (min-width: 900px) { .dd:hover .dd-panel, .dd:focus-within .dd-panel { opacity: 1; visibility: visible; transform: none; } }
.dd-panel a { display: block; padding: 10px 12px; border-radius: 12px; transition: background 0.15s; }
.dd-panel a:hover, .dd-panel a:focus-visible { background: var(--card-hi); }
.dd-panel b { display: flex; align-items: center; gap: 8px; color: var(--text); font-weight: 560; font-size: 14.5px; }
.dd-panel a > span { display: block; margin-top: 2px; font-size: 13px; color: var(--text-3); white-space: normal; }
.dd-panel a[aria-current="page"] { background: rgba(255, 255, 255, 0.05); }
.new { font-size: 10.5px; font-weight: 650; letter-spacing: 0.03em; text-transform: uppercase; padding: 1px 6px; border-radius: 6px; background: var(--paper); color: var(--ink); }
.nav-more { display: none; }
.nav .spacer { flex: 1; }
.gh { display: none; align-items: center; gap: 8px; font-size: 14px; color: var(--text-2); }
.gh:hover { color: var(--text); }
.kofi { display: none; align-items: center; gap: 7px; font-size: 14px; color: var(--text-2); }
.kofi:hover { color: var(--text); }
.kofi svg, .kofi-btn svg { width: 16px; height: 16px; fill: #ff5e5b; flex: none; }
.nav .kofi-btn { display: none; }
.burger { display: inline-flex; align-items: center; gap: 9px; height: 38px; padding: 0 15px 0 13px; border-radius: 999px; background: var(--card-hi); box-shadow: inset 0 0 0 1px var(--line-hi); font-size: 14.5px; font-weight: 560; letter-spacing: -0.01em; transition: background 0.2s; }
.burger:hover, .menu-open .burger { background: rgba(255, 255, 255, 0.1); }
.burger .bars { position: relative; width: 16px; height: 10px; }
.burger .bars span { position: absolute; left: 0; width: 16px; height: 1.6px; border-radius: 2px; background: var(--text); transition: transform 0.25s, top 0.25s, width 0.25s; }
.burger .bars span:first-child { top: 0; }
.burger .bars span:last-child { top: 8.4px; width: 11px; }
.menu-open .burger .bars span:first-child { top: 4.2px; transform: rotate(45deg); }
.menu-open .burger .bars span:last-child { top: 4.2px; width: 16px; transform: rotate(-45deg); }
@media (min-width: 900px) { .nav-links, .gh, .kofi { display: flex; } .burger { display: none; } }
@media (max-width: 899px) {
  .nav .wrap { gap: 12px; }
  .nav .btn[data-dl-auto] { display: none; }
  .nav.menu-open { background: var(--bg); border-color: var(--line); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .nav-links { position: fixed; top: 64px; left: 0; right: 0; height: calc(100dvh - 64px); overflow-y: auto; overscroll-behavior: contain; padding: 8px 16px calc(32px + env(safe-area-inset-bottom)); background: var(--bg); }
  .nav.menu-open .nav-links { display: block; }
  .nav-links > ul { display: block; }
  .dd > button { height: auto; padding: 22px 4px 6px; background: none !important; color: var(--text-3); font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; pointer-events: none; }
  .dd > button .caret { display: none; }
  .dd-panel { position: static; padding: 0; opacity: 1; visibility: visible; transform: none; transition: none; }
  .dd-panel ul { width: auto; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .dd-panel a { padding: 11px 4px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .dd-panel b { font-size: 17px; }
  .nav-links .top { display: flex; height: auto; margin-top: 18px; padding: 14px 4px; border-radius: 0; font-size: 17px; font-weight: 560; color: var(--text); background: none; border-bottom: 1px solid var(--line); }
  .nav-more { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 24px 4px 0; font-size: 15px; }
  .nav-more a:hover { color: var(--text); }
  .nav .kofi-btn { display: flex; width: 100%; margin-top: 22px; background: #ff5e5b; color: #fff; }
  .nav .kofi-btn svg { fill: #fff; }
}
html.menu-lock, html.menu-lock body { overflow: hidden; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 48px; padding: 0 22px; border-radius: 999px; font-weight: 560; font-size: 15.5px; letter-spacing: -0.01em; transition: transform 0.2s, background 0.2s, box-shadow 0.2s; white-space: nowrap; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.primary { background: var(--paper); color: var(--ink); box-shadow: 0 0 0 1px rgba(255,255,255,0.2), 0 10px 40px rgba(247,246,242,0.12); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(255,255,255,0.3), 0 14px 50px rgba(247,246,242,0.2); }
.btn.ghost { background: var(--card-hi); box-shadow: inset 0 0 0 1px var(--line-hi); }
.btn.ghost:hover { background: rgba(255,255,255,0.1); }
.btn.yt { background: var(--card-hi); box-shadow: inset 0 0 0 1px var(--line-hi); }
.btn.yt svg { fill: #e5484d; }
.btn.yt:hover { background: rgba(255,255,255,0.1); }
.btn.small { height: 38px; padding: 0 16px; font-size: 14px; }
.btn .tag { font-size: 11.5px; font-weight: 600; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,0.1); color: var(--text-2); letter-spacing: 0.02em; }

/* Hero */
.hero { position: relative; padding: 148px 0 40px; text-align: center; overflow-x: clip; }
.hero::before { content: ""; position: absolute; left: 50%; top: -240px; width: 1400px; height: 900px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(247,246,242,0.09) 0%, rgba(247,246,242,0) 60%); pointer-events: none; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; color: var(--text-2); }
.eyebrow b { font-weight: 600; color: var(--ink); background: var(--paper); padding: 3px 9px; border-radius: 999px; font-size: 12px; }
.eyebrow > span { white-space: nowrap; }
@media (max-width: 479px) { .eyebrow .eb-long { display: none; } }
h1 { font-size: clamp(44px, 8.4vw, 104px); line-height: 1; letter-spacing: -0.045em; font-weight: 680; margin: 26px auto 0; max-width: 11.5em; }
h1 .soft { color: var(--text-3); }
.lede { font-size: clamp(17px, 2vw, 21px); color: var(--text-2); max-width: 36em; margin: 26px auto 0; letter-spacing: -0.012em; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 36px; }
.fine { margin-top: 18px; font-size: 13.5px; color: var(--text-3); }

.showreel { position: relative; margin: 72px auto 0; max-width: 1120px; }
.showreel .frame { position: relative; z-index: 101; /* above the page grain (body::before): a translucent layer over a playing video greys it in Chrome */ border-radius: 22px; overflow: hidden; background: #000 url("kokon-poster.jpg?v=3") center / cover; box-shadow: 0 0 0 1px var(--line-hi), 0 60px 160px rgba(0,0,0,0.75), 0 0 120px rgba(247,246,242,0.06); aspect-ratio: 16 / 9; }
.showreel video { width: 100%; height: 100%; object-fit: cover; }
.reel-link { margin: 18px 0 0; text-align: center; font-size: 14px; }
.reel-link a { color: var(--text-3); text-decoration: underline; text-underline-offset: 3px; }
.reel-link a:hover { color: var(--text); }
.showreel .glow { position: absolute; inset: 8% 4% -6%; background: radial-gradient(ellipse at center, rgba(255,214,140,0.16), transparent 65%); filter: blur(40px); z-index: -1; }
.sound { position: absolute; right: 18px; bottom: 18px; height: 44px; padding: 0 18px; border-radius: 999px; background: rgba(0,0,0,0.6); backdrop-filter: blur(10px); font-size: 15px; font-weight: 600; cursor: pointer; color: #fff; display: inline-flex; align-items: center; gap: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.15); }

/* Runs on */
.runs { padding: 64px 0 24px; text-align: center; }
.runs p { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 22px; }
.runs ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 44px; }
.runs li { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-weight: 560; font-size: 17px; letter-spacing: -0.01em; }
.runs svg { width: 24px; height: 24px; fill: currentColor; }

/* Sections */
section { position: relative; }
.sec { padding: 120px 0 0; }
.kicker { font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); margin: 0 0 16px; }
h2 { font-size: clamp(36px, 5.6vw, 68px); line-height: 1.04; letter-spacing: -0.042em; font-weight: 670; margin: 0; max-width: 14em; }
.sec-lede { font-size: 19px; color: var(--text-2); max-width: 34em; margin: 20px 0 0; letter-spacing: -0.01em; }
.center { text-align: center; }
.center h2, .center .sec-lede { margin-left: auto; margin-right: auto; }

/* Compare */
.studio { margin-top: 48px; border-radius: 28px; background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.015)); box-shadow: inset 0 0 0 1px var(--line); padding: 14px; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; background: rgba(0,0,0,0.35); border-radius: 16px; width: max-content; max-width: 100%; margin: 0 auto 14px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { height: 38px; padding: 0 16px; border-radius: 12px; font-size: 14.5px; font-weight: 520; color: var(--text-2); white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tab:hover { color: var(--text); }
.tab.on { background: var(--paper); color: var(--ink); }
.cmp { position: relative; border-radius: 16px; overflow: hidden; background: #000; user-select: none; touch-action: pan-y; cursor: ew-resize; aspect-ratio: 16 / 9; }
.cmp img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.cmp .before { clip-path: inset(0 calc(100% - var(--split, 50%)) 0 0); }
.cmp .handle { position: absolute; top: 0; bottom: 0; left: var(--split, 50%); width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.25), 0 0 24px rgba(255,255,255,0.4); pointer-events: none; }
.cmp .handle span { position: absolute; top: 50%; left: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,0.45); display: grid; place-items: center; color: #111; }
.cmp .lbl { position: absolute; top: 14px; padding: 4px 10px; border-radius: 8px; font-size: 12.5px; color: #fff; background: rgba(0,0,0,0.55); backdrop-filter: blur(8px); pointer-events: none; }
.cmp .lbl.l { left: 14px; } .cmp .lbl.r { right: 14px; }
.cmp .bg-blur { position: absolute; inset: -40px; width: calc(100% + 80px); height: calc(100% + 80px); object-fit: cover; filter: blur(40px) brightness(0.35) saturate(1.2); transform: scale(1.1); }
.promptbar { margin-top: 14px; display: flex; align-items: center; gap: 14px; padding: 14px 14px 14px 20px; border-radius: 18px; background: #1a1a1a; box-shadow: inset 0 0 0 1px var(--line); }
.promptbar .mode { flex: none; font-size: 12.5px; font-weight: 560; padding: 4px 10px; border-radius: 8px; background: rgba(255,255,255,0.08); color: var(--text-2); }
.promptbar .txt { flex: 1; min-width: 0; font-size: 16px; color: var(--text); letter-spacing: -0.01em; }
.promptbar .send { flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--paper); color: var(--ink); display: grid; place-items: center; }
.honest { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--text-3); }

/* Bento */
.bento { margin-top: 56px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .bento { grid-template-columns: repeat(6, 1fr); } .b-wide { grid-column: span 4; } .b-mid { grid-column: span 3; } .b-small { grid-column: span 2; } }
.card { position: relative; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018)); box-shadow: inset 0 0 0 1px var(--line); padding: 30px; overflow: hidden; min-height: 280px; display: flex; flex-direction: column; }
.card h3 { margin: 0; font-size: 24px; letter-spacing: -0.035em; font-weight: 640; line-height: 1.15; }
.card p { margin: 10px 0 0; color: var(--text-2); font-size: 15.5px; max-width: 30em; }
.card .vis { margin-top: auto; padding-top: 26px; }
.icon { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,0.07); display: grid; place-items: center; margin-bottom: 20px; box-shadow: inset 0 0 0 1px var(--line); }
.icon svg { width: 20px; height: 20px; stroke: var(--text); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mask-demo { position: relative; border-radius: 14px; overflow: hidden; aspect-ratio: 16 / 9; }
.mask-demo img { width: 100%; height: 100%; object-fit: cover; }
.mask-demo svg { position: absolute; inset: 0; width: 100%; height: 100%; mix-blend-mode: difference; opacity: 0.75; }
.mask-demo .path { stroke-dasharray: 3000; stroke-dashoffset: 3000; transition: stroke-dashoffset 2.6s cubic-bezier(0.65, 0, 0.35, 1); }
.mask-demo.in .path { stroke-dashoffset: 0; }
.mask-demo .after { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s 2.8s; }
.mask-demo.in .after { opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; border-radius: 999px; font-size: 13.5px; background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.chip.on { background: var(--paper); color: var(--ink); box-shadow: none; font-weight: 560; }
.timeline { display: flex; align-items: center; gap: 0; }
.timeline .t { width: 64px; height: 64px; border-radius: 14px; overflow: hidden; flex: none; outline: 2px solid transparent; outline-offset: 3px; }
.timeline .t.sel { outline-color: var(--text); }
.timeline .t img { width: 100%; height: 100%; object-fit: cover; }
.timeline .j { width: 22px; height: 2px; background: var(--line-hi); flex: none; }
.timeline .lbls { display: flex; gap: 0; margin-top: 10px; font-size: 12px; color: var(--text-3); }
.big-num { font-size: 64px; font-weight: 680; letter-spacing: -0.05em; line-height: 1; }
.big-num small { font-size: 20px; font-weight: 520; color: var(--text-2); letter-spacing: -0.01em; margin-left: 6px; }

/* Agent */
.split { display: grid; gap: 48px; align-items: center; grid-template-columns: 1fr; }
.split > * { min-width: 0; } /* long commands scroll inside their box instead of widening the page */
@media (min-width: 980px) { .split { grid-template-columns: 1fr 1.12fr; gap: 72px; } }
.term { border-radius: 18px; background: #0c0c0c; box-shadow: 0 0 0 1px var(--line-hi), 0 40px 120px rgba(0,0,0,0.6); overflow: hidden; font-family: var(--mono); font-size: 13.5px; line-height: 1.7; }
.term-head { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px; background: #151515; font-family: var(--font); font-size: 12.5px; color: var(--text-3); }
.term-head i { width: 11px; height: 11px; border-radius: 50%; background: #333; }
.term-body { padding: 20px 22px 22px; color: #cfcfcf; overflow-x: auto; }
.term-body .c { color: #6f6f6f; }
.term-body .w { color: #f2f2f2; }
.term-body .d { color: #9a9a9a; }
.term-body img { margin-top: 14px; border-radius: 10px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.tools code { font-family: var(--mono); font-size: 13px; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.06); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); }
.copy { margin-top: 26px; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-radius: 14px; background: #0f0f0f; box-shadow: inset 0 0 0 1px var(--line); font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.copy code { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.copy button { flex: none; height: 32px; padding: 0 12px; border-radius: 9px; background: rgba(255,255,255,0.08); font-family: var(--font); font-size: 13px; color: var(--text); }
.copy button:hover { background: rgba(255,255,255,0.14); }

/* Requirements */
.req { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .req { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1180px) { .req { grid-template-columns: 1fr 1fr 1fr; } }
.req .card { min-height: 0; }
.req h3 { display: flex; align-items: center; gap: 12px; }
.req h3 svg { width: 26px; height: 26px; fill: var(--text); }
.rows { margin-top: 18px; }
.row { display: flex; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.row span:first-child { color: var(--text-3); }
.row span:last-child { text-align: right; color: var(--text); }
.beta { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 5px; background: rgba(255,255,255,0.1); color: var(--text-2); margin-left: 6px; vertical-align: 1px; }

/* Privacy */
.privacy { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .privacy { grid-template-columns: repeat(3, 1fr); } }
.privacy .card { min-height: 0; }
.voices { margin-top: 48px; display: grid; gap: 16px; grid-template-columns: 1fr; text-align: left; }
@media (min-width: 900px) { .voices { grid-template-columns: repeat(3, 1fr); } }
.voices .card { min-height: 0; margin: 0; }
.voices blockquote { margin: 0; font-size: 17px; line-height: 1.5; color: var(--text); letter-spacing: -0.01em; }
.voices figcaption { margin-top: auto; padding-top: 18px; font-size: 13.5px; color: var(--text-3); }
.voices figcaption a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* FAQ */
.faq { margin-top: 40px; max-width: 860px; }
details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }
summary { list-style: none; cursor: pointer; padding: 22px 0; font-size: 19px; font-weight: 560; letter-spacing: -0.02em; display: flex; justify-content: space-between; gap: 20px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 26px; line-height: 1; color: var(--text-3); transition: transform 0.25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: -6px 0 22px; color: var(--text-2); max-width: 44em; }
details p:has(+ .mac-steps) { margin-bottom: 12px; }
/* Mac "Open Anyway" steps with screenshots (FAQ and setup guide) */
.mac-steps { margin: 0 0 24px; padding-left: 1.4em; color: var(--text-2); max-width: 44em; }
.mac-steps li { margin: 0 0 16px; padding-left: 4px; }
.mac-steps img { display: block; margin-top: 12px; max-width: 100%; height: auto; }
.mac-steps img.dialog { width: 230px; }
.mac-steps img.settings { width: 520px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }

/* Maker */
.maker { display: inline-flex; align-items: center; gap: 14px; margin-top: 56px; padding: 10px 22px 10px 10px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; transition: background 0.2s; }
.maker:hover { background: var(--card-hi); }
.maker-photo { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,0.12); }
.maker b { display: block; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
.maker small { display: block; color: var(--text-2); font-size: 13.5px; }
footer .me { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
footer .me:hover { color: var(--text); }

/* Final */
.final { padding: 160px 0 120px; text-align: center; position: relative; overflow-x: clip; }
.final::before { content: ""; position: absolute; left: 50%; top: 40px; width: 1100px; height: 600px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(247,246,242,0.08), transparent 60%); pointer-events: none; }
.final .mark { width: 64px; height: 64px; margin: 0 auto 30px; }
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; font-size: 14px; color: var(--text-3); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 18px 30px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 22px; flex-wrap: wrap; }
footer a:hover { color: var(--text); }
.legal { width: 100%; font-size: 12.5px; color: var(--text-3); opacity: 0.8; }

/* Star request, shown once after a download starts */
.star-ask { width: min(440px, calc(100% - 32px)); padding: 0; border: 0; border-radius: var(--radius); background: var(--bg-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-hi), 0 30px 90px rgba(0,0,0,0.6); text-align: center; }
.star-ask[open] { animation: star-ask-in 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.star-ask::backdrop { background: rgba(0,0,0,0.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.star-ask > div { padding: 34px 26px 28px; }
.star-ask .mark { width: 34px; height: 34px; margin: 0 auto 18px; }
.star-ask h2 { font-size: 23px; line-height: 1.2; letter-spacing: -0.025em; max-width: none; margin-bottom: 10px; }
.star-ask p { margin: 0; font-size: 15.5px; color: var(--text-2); }
.star-ask .ctas { margin-top: 26px; gap: 10px; }
@keyframes star-ask-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@media (prefers-reduced-motion: reduce) { .star-ask[open] { animation: none; } }

/* Reveal */
.rv { opacity: 0; transform: translateY(28px); transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.rv.in { opacity: 1; transform: none; }
.rv.d1 { transition-delay: 0.08s; } .rv.d2 { transition-delay: 0.16s; } .rv.d3 { transition-delay: 0.24s; }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1; transform: none; transition: none; } html { scroll-behavior: auto; } .mask-demo .path { transition: none; stroke-dashoffset: 0; } .mask-demo .after { transition: none; } }

/* Steps + comparison */
.step { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); color: var(--ink); font-weight: 650; font-size: 15px; margin-bottom: 18px; }
.table-wrap { margin-top: 44px; overflow-x: auto; border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--line); background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.012)); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 720px; font-size: 15px; }
.cmp-table th, .cmp-table td { padding: 16px 20px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
.cmp-table thead th { border-top: 0; font-size: 15px; font-weight: 600; color: var(--text-2); }
.cmp-table thead th span { font-weight: 450; font-size: 13px; color: var(--text-3); }
.cmp-table td:first-child { color: var(--text-2); width: 30%; }
.cmp-table td { color: var(--text-3); }
.cmp-table .us { color: var(--text); font-weight: 560; background: rgba(255,255,255,0.035); }
.cmp-table.wide { min-width: 900px; font-size: 14.5px; }
.cmp-table.wide td:first-child { width: 20%; }
.cmp-table.wide th, .cmp-table.wide td { padding: 14px 16px; }
.cmp-table thead .us { color: var(--paper); }

/* Article pages (guides) */
.article { padding: 120px 0 40px; }
.wrap.narrow { width: min(780px, calc(100% - 32px)); }
.crumbs { font-size: 14px; color: var(--text-3); margin-bottom: 22px; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 6px; }
.article h1 { font-size: clamp(36px, 5.4vw, 58px); letter-spacing: -0.04em; line-height: 1.06; margin: 0; max-width: none; }
.article h2 { font-size: clamp(26px, 3.2vw, 34px); letter-spacing: -0.03em; line-height: 1.15; margin: 64px 0 0; max-width: none; }
.article h2[id] { scroll-margin-top: 96px; } /* below the fixed nav when opened from a link */
.article h3 { font-size: 18px; letter-spacing: -0.015em; margin: 28px 0 0; font-weight: 600; }
.article p, .article li { color: var(--text-2); font-size: 17px; }
.article p { margin: 16px 0 0; }
.article strong { color: var(--text); font-weight: 600; }
.article a:not(.btn) { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255,255,255,0.3); }
.article a:not(.btn):hover { text-decoration-color: var(--text); }
.article ul, .article ol { margin: 16px 0 0; padding-left: 22px; }
.article li { margin: 8px 0; }
.article .table-wrap { margin-top: 24px; }
.article .cmp-table { min-width: 560px; }
.lede-left { font-size: 20px !important; margin-top: 22px !important; letter-spacing: -0.01em; }
.article figure { margin: 44px 0 0; }
.article figure img { border-radius: 16px; box-shadow: 0 0 0 1px var(--line-hi), 0 40px 120px rgba(0,0,0,0.6); width: 100%; height: auto; }
.article figcaption { margin-top: 12px; font-size: 14px; color: var(--text-3); text-align: center; }
.article .term { margin-top: 40px; }
.article code { font-family: var(--mono); font-size: 0.88em; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,0.07); color: var(--text); }
.article p code, .article li code { overflow-wrap: anywhere; }
.article pre { margin: 14px 0 0; padding: 16px 18px; border-radius: 14px; background: #0f0f0f; box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; }
.article pre code { padding: 0; background: none; font-size: 13.5px; line-height: 1.6; color: #d6d6d6; }
.note { font-size: 15px !important; color: var(--text-3) !important; }
.article .pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 40px 0 0; }
.article .pair figure { margin: 0; }
.article .pair figure img { box-shadow: 0 0 0 1px var(--line-hi), 0 20px 60px rgba(0,0,0,0.5); }
.article .fact-list { list-style: none; padding-left: 0; }
.article .fact-list li { padding: 10px 0; border-top: 1px solid var(--line); margin: 0; }
@media (max-width: 640px) { .article .pair { grid-template-columns: 1fr; } }
.cta-box { margin: 72px 0 40px; padding: 36px; border-radius: var(--radius); background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)); box-shadow: inset 0 0 0 1px var(--line); }
.cta-box h2 { margin: 0 !important; }

/* Other devices: the computer with the GPU, a laptop and a phone (frames in devices.css) */
.scene-box { position: relative; margin-top: 56px; height: 650px; }
.scene { position: absolute; top: 0; left: 50%; width: 1160px; height: 650px; transform: translateX(-50%) scale(var(--s, 1)); transform-origin: top center; }
.scene-box.narrow .scene { width: 720px; height: 720px; }
.scene > *, .scene > .device { position: absolute; }
.scene .links { inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.links path { fill: none; stroke: rgba(255, 214, 140, 0.55); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 2 12; animation: flow 1.6s linear infinite; }
.links .halo { stroke: rgba(255, 214, 140, 0.08); stroke-width: 14; stroke-dasharray: none; animation: none; }
@keyframes flow { to { stroke-dashoffset: -28; } }
.scene .net { padding: 9px 16px; border-radius: 999px; background: rgba(20, 20, 20, 0.85); box-shadow: inset 0 0 0 1px var(--line-hi), 0 10px 30px rgba(0,0,0,0.5); font-size: 15px; color: var(--text-2); white-space: nowrap; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.scene .net b { color: var(--text); font-weight: 600; }
.scene-box .only-narrow, .scene-box.narrow .only-wide { display: none; }
.scene-box.narrow .only-narrow { display: block; }

/* The computer with the GPU */
.pc { width: 220px; height: 430px; border-radius: 20px; background: linear-gradient(160deg, #2a2a2e, #141416 60%); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.13), inset 0 1px 0 rgba(255,255,255,0.18), 0 50px 90px rgba(0,0,0,0.7); }
.pc .glass { position: absolute; inset: 14px 14px 70px; border-radius: 12px; overflow: hidden; background: radial-gradient(ellipse at 50% 62%, rgba(255,214,140,0.22), transparent 60%), linear-gradient(135deg, #18181b, #0c0c0e); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1); }
.pc .glass::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, rgba(255,255,255,0.09) 0 22%, transparent 22% 60%, rgba(255,255,255,0.04) 60% 64%, transparent 64%); }
.pc .board { position: absolute; left: 14px; right: 14px; top: 14px; height: 140px; border-radius: 8px; background: #141416; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.06); }
.pc .board::before, .pc .board::after { content: ""; position: absolute; top: 22px; width: 8px; height: 96px; border-radius: 3px; background: linear-gradient(#2c2c30, #1f1f22); box-shadow: 14px 0 0 #232326; }
.pc .board::before { right: 40px; } .pc .board::after { display: none; }
.pc .fan { position: absolute; border-radius: 50%; background: radial-gradient(circle, #2a2a2e 0 16%, transparent 17%), repeating-conic-gradient(from 0deg, #3a3a40 0 14deg, #1a1a1d 14deg 40deg); box-shadow: inset 0 0 0 3px #232326, 0 0 0 4px #18181b; animation: spin 2.4s linear infinite; }
.pc .fan.cpu { width: 64px; height: 64px; left: 30px; top: 40px; }
.pc .gpu { position: absolute; left: 10px; right: 10px; top: 190px; height: 76px; border-radius: 9px; background: linear-gradient(180deg, #26262a, #18181b); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.12), 0 0 50px rgba(255,214,140,0.28); }
.pc .gpu::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, transparent, #ffd68c, transparent); box-shadow: 0 0 18px #ffd68c; }
.pc .gpu { display: flex; align-items: center; justify-content: center; gap: 9px; }
.pc .gpu .fan { position: relative; flex: none; width: 46px; height: 46px; }
.pc .gpu .fan:nth-child(2) { animation-duration: 2.1s; } .pc .gpu .fan:nth-child(3) { animation-duration: 2.7s; }
.pc .front { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.pc .front svg { width: 22px; height: 22px; color: rgba(242,241,237,0.55); }
.pc .front i { width: 12px; height: 12px; border-radius: 50%; background: #ffd68c; box-shadow: 0 0 10px #ffd68c, 0 0 0 4px rgba(255,255,255,0.06); }
@keyframes spin { to { transform: rotate(360deg); } }

/* What the screens show */
.scene .dv-phone .device-screen { background: #f4f4f4; }
.dv-phone .status { position: absolute; top: 0; left: 0; right: 0; height: 54px; display: flex; align-items: center; justify-content: space-between; padding: 6px 30px 0 46px; color: #000; font: 600 17px/1 -apple-system, "SF Pro Text", var(--font); letter-spacing: -0.01em; }
.dv-phone .status svg { height: 13px; width: auto; fill: #000; }
.dv-phone .status .icons { display: flex; gap: 6px; align-items: center; }
.dv-phone .device-screen img { position: absolute; top: 54px; left: 0; width: 390px; height: auto; }
.dv-phone .device-screen::after { content: ""; position: absolute; left: 50%; bottom: 8px; width: 134px; height: 5px; margin-left: -67px; border-radius: 3px; background: #111; }
.scene .dv-mac .device-screen { background: #f4f4f4; }
.dv-mac .bar { height: 22px; display: flex; align-items: center; gap: 5px; padding: 0 8px; background: #e9e9eb; border-bottom: 1px solid #d6d6d8; }
.dv-mac .bar i { width: 7px; height: 7px; border-radius: 50%; background: #ff5f57; } .dv-mac .bar i:nth-child(2) { background: #febc2e; } .dv-mac .bar i:nth-child(3) { background: #28c840; }
.dv-mac .bar span { margin-left: 14px; padding: 2px 22px 2px 10px; border-radius: 5px; background: #fff; font: 500 8.5px/1.2 -apple-system, var(--font); color: #444; box-shadow: 0 0 0 0.5px #d0d0d2; }
.dv-mac .device-screen img { width: 100%; height: calc(100% - 22px); object-fit: cover; object-position: top; }
.scene .device { filter: drop-shadow(0 40px 60px rgba(0,0,0,0.55)); }
.devices-captions { margin-top: 28px; display: grid; gap: 10px 24px; grid-template-columns: 1fr; text-align: center; font-size: 14.5px; color: var(--text-3); }
@media (min-width: 720px) { .devices-captions { grid-template-columns: repeat(3, 1fr); } }
.devices-captions b { display: block; color: var(--text); font-weight: 600; font-size: 15.5px; }
@media (prefers-reduced-motion: reduce) { .links path, .pc .fan { animation: none; } }
.card p code { font-family: var(--mono); font-size: 0.86em; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,0.07); color: var(--text); white-space: nowrap; }
.scene.phones { width: 604px; height: 573px; }
.article figure .scene-box img { border-radius: 0; box-shadow: none; }
.sec.devices-top { padding-top: 96px; }

/* ---------- Hero (0.12): the first screen says what Kokon is; behind it, before/after pairs made by Kokon,
   tilted and scrolling as in the launch film's opening. The videos follow right below. ---------- */
.hero { padding-top: 0; }
.hero-top { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 96px 0 56px; }
/* Above the page grain (body::before, z-index 100), like the video frame: in Chrome a translucent layer over
   composited content (the 3D wall promotes it) greys it. The nav (102) stays on top. */
.hero .wrap { position: relative; z-index: 101; }
.hero-top h1 { text-shadow: 0 4px 40px rgba(0,0,0,0.7); }
.hero-top .fine { color: var(--text-2); text-shadow: 0 2px 12px rgba(0,0,0,0.9); }
.hero-top .ctas .btn.ghost { background: rgba(16,16,16,0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.2); }
.hero-top .ctas .btn.ghost:hover { background: rgba(32,32,32,0.92); }
.hero-top .eyebrow { background: rgba(12,12,12,0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.wall { position: absolute; z-index: 0; left: 0; right: 0; top: 0; height: calc(100svh + 140px); overflow: hidden; pointer-events: none; perspective: 1800px; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
/* Dark only behind the words, so the pictures keep their colour around them. */
.wall::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse 46% 34% at 50% 46%, rgba(7,7,7,0.86) 0%, rgba(7,7,7,0.6) 55%, rgba(7,7,7,0.04) 100%); }
.wall-plane { position: absolute; left: 50%; top: 40%; display: flex; flex-direction: column; gap: 22px; transform: translate(-50%, -50%) rotateX(22deg) rotateZ(-9deg); }
.wall-row { display: flex; gap: 22px; width: max-content; animation: wall-l 120s linear infinite; will-change: transform; }
.wall-row.r { animation-name: wall-r; }
@keyframes wall-l { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes wall-r { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.wall-tile { position: relative; flex: none; width: 360px; aspect-ratio: 3 / 2; border-radius: 16px; overflow: hidden; background: #111; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.wall-tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The wipe from before to after: the after's box slides in while its picture slides back (transforms only). */
.wall-tile .aw { position: absolute; inset: 0; overflow: hidden; transform: translateX(100%); animation: wipe-box 10s cubic-bezier(0.65, 0, 0.35, 1) infinite; animation-delay: var(--d); }
.wall-tile .aw img { transform: translateX(-100%); animation: wipe-img 10s cubic-bezier(0.65, 0, 0.35, 1) infinite; animation-delay: var(--d); }
.wall-tile .aw::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; z-index: 1; background: #fff; box-shadow: 0 0 12px rgba(255,255,255,0.8); }
@keyframes wipe-box { 0%, 20% { transform: translateX(100%); } 32%, 82% { transform: translateX(0); } 94%, 100% { transform: translateX(100%); } }
@keyframes wipe-img { 0%, 20% { transform: translateX(-100%); } 32%, 82% { transform: translateX(0); } 94%, 100% { transform: translateX(-100%); } }
.wall-tile .chip { position: absolute; left: 10px; bottom: 10px; z-index: 2; max-width: calc(100% - 20px); padding: 5px 11px; border-radius: 999px; background: rgba(0,0,0,0.62); font-size: 13px; color: #f2f1ed; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14); }
.hero .showreel { margin-top: 0; }
@media (max-width: 719px) { .wall-tile { width: 230px; } .wall-tile .chip { font-size: 11px; } .wall-plane, .wall-row { gap: 14px; } .wall::after { background: radial-gradient(ellipse 70% 34% at 50% 46%, rgba(7,7,7,0.86) 0%, rgba(7,7,7,0.6) 55%, rgba(7,7,7,0.2) 100%); } }
@media (prefers-reduced-motion: reduce) { .wall-row, .wall-tile .aw, .wall-tile .aw img { animation: none; } .wall-tile:nth-child(even) .aw, .wall-tile:nth-child(even) .aw img { transform: none; } }

/* ---------- Video carousel: the launch film (local file), then YouTube videos loaded only on click ---------- */
.showreel .slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 0.45s, visibility 0s 0.45s; }
.showreel .slide.on { opacity: 1; visibility: visible; transition: opacity 0.45s; }
.showreel .slide iframe { width: 100%; height: 100%; border: 0; display: block; }
.yt-facade { position: absolute; inset: 0; width: 100%; height: 100%; background: #000 center / cover no-repeat; display: grid; place-items: center; }
.yt-facade .play { width: 84px; height: 84px; border-radius: 50%; background: rgba(0,0,0,0.62); backdrop-filter: blur(8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.22); display: grid; place-items: center; transition: transform 0.2s, background 0.2s; }
.yt-facade .play::before { content: ""; margin-left: 6px; border-left: 26px solid #fff; border-top: 16px solid transparent; border-bottom: 16px solid transparent; }
.yt-facade:hover .play { transform: scale(1.06); background: rgba(229,72,77,0.85); }
.yt-facade .yt-note { position: absolute; left: 18px; bottom: 16px; font-size: 13px; color: rgba(255,255,255,0.78); background: rgba(0,0,0,0.55); padding: 6px 12px; border-radius: 999px; }
/* Above the video frame (z-index 101): its big dark shadow fell over the tabs and greyed them. */
.vtabs { position: relative; z-index: 102; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
/* The video shown has a light border and brighter text; a line fills along its bottom while it plays. */
.vtab { position: relative; overflow: hidden; display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: left; transition: background 0.2s, box-shadow 0.2s; }
.vtab:hover { background: var(--card-hi); }
.vtab.on { background: var(--card-hi); box-shadow: inset 0 0 0 1.5px rgba(247,246,242,0.7); }
.vtab.on b { color: #fff; }
.vtab .bar { position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--paper); opacity: 0; }
.vtab.on .bar { opacity: 0.8; }
.vtab img { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 9px; flex: none; }
.vtab b { display: block; font-size: 14.5px; font-weight: 600; letter-spacing: -0.01em; }
.vtab span { display: block; font-size: 12.5px; color: var(--text-3); margin-top: 2px; }
@media (max-width: 719px) { .vtabs { grid-template-columns: 1fr; gap: 8px; } .vtab img { width: 76px; } }

/* ---------- 0.12: the Layers lab demo (the Halloween poster from the 0.12 video, its real layers) ---------- */
.layers-demo { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 22px; max-width: 900px; margin: 56px auto 0; text-align: left; }
.ld-stage { position: relative; perspective: 1600px; }
.ld-scene { position: relative; aspect-ratio: 1; border-radius: 18px; transform-style: preserve-3d; transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1); box-shadow: 0 0 0 1px var(--line-hi), 0 40px 120px rgba(0,0,0,0.6); touch-action: none; user-select: none; -webkit-user-select: none; }
/* Clipped only while flat: clip-path flattens the 3D stack, so it comes back when the layers have landed. */
.ld-scene.clip { clip-path: inset(0 round 18px); }
.ld-scene.open { box-shadow: none; transform: rotateX(54deg) rotateZ(-32deg) scale(0.74); }
/* Each layer always 1 px above the one below: coplanar layers flicker in 3D (z-fighting), and no easing overshoots below 0. */
.ld-layer { position: absolute; pointer-events: none; transform: translateZ(calc(var(--z) * 1px)); transition: transform 1.1s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s, filter 0.2s; }
.ld-layer.bg, .ld-photo { left: 0; top: 0; width: 100%; height: 100%; border-radius: 18px; }
/* Lifting: the top layers first. Landing: one after the other from the bottom. */
.ld-scene.open .ld-layer { transform: translateZ(calc(var(--z) * 56px)); transition-delay: calc((5 - var(--z)) * 60ms); transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1); }
.ld-scene.landing .ld-layer { transition-delay: calc(var(--z) * 120ms); }
.ld-scene.open .ld-layer.bg { box-shadow: 0 0 0 1px rgba(255,255,255,0.25); }
.ld-photo { position: absolute; transition: opacity 0.5s; z-index: 10; }
.ld-scene.split .ld-photo { opacity: 0; pointer-events: none; }
.ld-layer.hidden { opacity: 0; }
.ld-layer.sel { filter: drop-shadow(0 0 1.5px #fff) drop-shadow(0 0 1.5px #fff) drop-shadow(0 6px 18px rgba(0,0,0,0.5)); }
.ld-scene.split.ready { cursor: grab; }
.ld-scene.dragging { cursor: grabbing; }
/* A soft light passes over the picture when the layers have landed. */
.ld-flash { position: absolute; inset: 0; z-index: 15; border-radius: 18px; pointer-events: none; opacity: 0; background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,0.28) 50%, transparent 70%) -100% 0 / 200% 100% no-repeat; }
.ld-flash.on { animation: ld-flash 0.9s ease-out; }
@keyframes ld-flash { 0% { opacity: 1; background-position: 120% 0; } 100% { opacity: 1; background-position: -120% 0; } }
.ld-go { position: absolute; left: 50%; bottom: 22px; z-index: 20; transform: translateX(-50%); box-shadow: 0 10px 40px rgba(0,0,0,0.5); }
.ld-hint { position: absolute; left: 50%; bottom: 16px; z-index: 20; transform: translateX(-50%); padding: 7px 14px; border-radius: 999px; background: rgba(0,0,0,0.66); backdrop-filter: blur(8px); font-size: 13.5px; white-space: nowrap; opacity: 0; transition: opacity 0.4s; pointer-events: none; }
.ld-hint.on { opacity: 1; }
/* The right column: the layer list, then Export to PSD, together as tall as the picture. */
.ld-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.ld-panel, .ld-export { border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); padding: 14px; }
.ld-panel { flex: 1; display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow: auto; }
.ld-panel h3, .ld-export h3 { margin: 0 0 6px; font-size: 14px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.ld-panel h3 small { font-weight: 500; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; color: #f2c14e; background: rgba(242,193,78,0.12); padding: 2px 8px; border-radius: 999px; }
.ld-rows { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ld-row { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.ld-row.sel { background: var(--card-hi); color: var(--text); }
.ld-row img { width: 34px; height: 34px; object-fit: contain; border-radius: 6px; background: repeating-conic-gradient(#222 0 25%, #2c2c2c 0 50%) 0 0 / 10px 10px; flex: none; }
.ld-row span { flex: 1; }
.ld-eye { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: var(--text-3); }
.ld-eye:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.ld-eye svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ld-panel .ld-empty { font-size: 13.5px; color: var(--text-3); padding: 6px 8px; }
.ld-panel .ld-reset { margin-top: auto; align-self: flex-start; }
.ld-export p { margin: 0 0 12px; font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.ld-export .btn { width: 100%; }
.ld-export .btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.layers-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
@media (max-width: 819px) { .layers-demo { grid-template-columns: 1fr; } .ld-panel { overflow: visible; } .ld-rows { flex-direction: row; flex-wrap: wrap; } .ld-row { padding: 4px 6px; } .ld-row img { width: 28px; height: 28px; } }
@media (prefers-reduced-motion: reduce) { .ld-scene, .ld-layer { transition: none; } .ld-flash.on { animation: none; } }