/* Leanks marketing site. Colours, radii and spacing come from css/tokens.css, which is copied from the app
   (scripts/sync-from-app.sh), so the site follows the app's palette and the visitor's accent choice. */

@font-face { font-family: "Manrope"; src: url("../assets/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"); font-weight: 200 800; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body { font-size: 16px; line-height: 1.6; }
button, input { font-family: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); border: 1px solid var(--border-strong); padding: 8px 12px; border-radius: var(--radius-sm); }
.skip:focus { top: 8px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-xs); }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: color-mix(in oklab, var(--bg) 86%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 60px; }
.logo { display: block; height: 22px; }
.logo img { height: 22px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: 12px; }
.nav a { text-decoration: none; color: var(--text-dim); font-size: 14px; font-weight: 500; padding: 6px 10px; border-radius: var(--radius-sm); }
.nav a:hover { color: var(--text); background: var(--hover); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: var(--radius-sm); cursor: pointer; }
.icon-btn:hover { border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-light, .theme-dark { display: none; }
:root[data-theme="light"] .theme-light { display: block; }
:root[data-theme="dark"] .theme-dark { display: block; }
.logo-dark, :root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--text-faint); }
.btn-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-lg { height: 46px; padding: 0 24px; font-size: 15px; }
.btn-sm { height: 36px; padding: 0 14px; }

/* accent popover */
.pop { position: relative; }
.pop-panel { position: absolute; right: 0; top: 44px; width: 232px; padding: 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.pop-panel[hidden] { display: none; }
.pop-title { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 10px; }
.swatches { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.swatch { width: 100%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border-strong); cursor: pointer; padding: 0; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--text); }
.modes { display: flex; gap: 4px; margin-top: 14px; padding: 3px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.modes button { flex: 1; height: 28px; border: 0; background: none; font: inherit; font-size: 12px; font-weight: 600; color: var(--text-dim); border-radius: var(--radius-xs); cursor: pointer; }
.modes button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* sections */
section { padding: 88px 0; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 12px; }
.h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; max-width: 18ch; }
.lead { font-size: 18px; color: var(--text-dim); margin-top: 14px; max-width: 52ch; }
.center { text-align: center; }
.center .h2, .center .lead { margin-inline: auto; }

.chip { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: var(--radius-pill); background: var(--accent-bg); border: 1px solid var(--accent-border); font-size: 12px; font-weight: 600; }
.chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }

/* hero */
.hero { padding: 72px 0 40px; background: radial-gradient(900px 420px at 50% -80px, var(--accent-bg), transparent 70%); }
.hero-copy { text-align: center; }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); line-height: 1.05; letter-spacing: -.03em; font-weight: 800; max-width: 24ch; margin: 22px auto 0; }
.hero h1 em { font-style: normal; color: var(--text-dim); }
.hero .lead { margin: 20px auto 0; }
.cta-row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 13px; color: var(--text-dim); }
.hero-shot { margin-top: 56px; }

/* browser frame */
.frame { border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--bg); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); }
.frame-bar span { margin-left: 10px; font-size: 12px; color: var(--text-dim); }
.shot { width: 100%; height: auto; aspect-ratio: 1440 / 900; }
.shot-dark, :root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }

/* showcase */
.showcase { background: color-mix(in oklab, var(--bg) 70%, var(--surface)); border-block: 1px solid var(--border); }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; max-width: 880px; margin: 40px auto 36px; padding: 6px; border-radius: 22px; background: color-mix(in oklab, var(--text) 5%, transparent); }
.tab { display: flex; align-items: center; justify-content: center; gap: 12px; height: 72px; padding: 0 16px; border: 0; background: transparent; border-radius: 17px; font: inherit; font-size: 18px; font-weight: 600; color: var(--text-dim); cursor: pointer; transition: color 0.12s, background 0.12s, box-shadow 0.12s; }
.tab svg { width: 24px; height: 24px; flex-shrink: 0; }
.tab:hover { color: var(--text); background: color-mix(in oklab, var(--text) 6%, transparent); }
.tab[aria-selected="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab[aria-selected="true"] svg { color: var(--accent); }
.panel { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.panel[hidden] { display: none; }
.panel h3 { font-size: 26px; line-height: 1.2; letter-spacing: -.01em; }
.panel p { color: var(--text-dim); margin-top: 10px; }
.points { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.points li { display: flex; gap: 10px; font-size: 15px; }
.points li::before { content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; background: var(--accent-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M5 9.5l2.5 2.5L13 6.5' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat; border: 1px solid var(--accent-border); }
.views { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.view { height: 32px; padding: 0 14px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-pill); font: inherit; font-size: 13px; font-weight: 600; color: var(--text-dim); cursor: pointer; }
.view[aria-pressed="true"] { color: var(--text); border-color: var(--text-faint); background: var(--bg); }
.view-img[hidden] { display: none; }
.showcase-note { text-align: center; margin-top: 36px; color: var(--text-dim); font-size: 14px; }

/* feature cards */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 44px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.card .ic { width: 38px; height: 38px; display: grid; place-items: center; border-radius: var(--radius-sm); background: var(--accent-bg); border: 1px solid var(--accent-border); margin-bottom: 16px; }
.card .ic svg { width: 20px; height: 20px; }
.card h3 { font-size: 16px; font-weight: 700; }
.card p { margin-top: 6px; font-size: 14px; color: var(--text-dim); }

/* split blocks */
.split > *, .panel > * { min-width: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.code { background: oklch(0.19 0.01 220); color: oklch(0.95 0.005 220); border-radius: var(--radius-lg); padding: 22px 24px; font: 13px/1.7 ui-monospace, "SF Mono", Menlo, monospace; overflow-x: auto; border: 1px solid oklch(0.3 0.01 220); }
.code b { font-weight: 400; color: oklch(0.75 0.1 152); }
.code span { color: oklch(0.7 0.01 220); }
.facts { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.facts li { font-size: 15px; position: relative; padding-left: 26px; }
.facts li::before { content: "→"; position: absolute; left: 0; color: var(--text-faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips span { padding: 6px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; }

/* faq, book */
details { border-top: 1px solid var(--border); padding: 18px 0; }
details:last-of-type { border-bottom: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::after { content: "+"; color: var(--text-dim); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--text-dim); margin-top: 10px; max-width: 70ch; }
.faq { max-width: 760px; margin: 40px auto 0; }
.book { text-align: center; }
.book-box { background: var(--surface); border: 1px solid var(--border); border-radius: calc(var(--radius-lg) + 6px); padding: 56px 24px; background-image: radial-gradient(600px 220px at 50% 0, var(--accent-bg), transparent 75%); }
.notify { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.notify input { height: 46px; width: min(320px, 100%); padding: 0 14px; font: inherit; font-size: 15px; background: var(--bg); color: var(--text); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); }
.notify-note { margin-top: 2px; font-size: 13px; color: var(--text-dim); }
.notify-msg { margin-top: 12px; font-size: 14px; color: var(--text-dim); min-height: 22px; }
.hp { position: absolute; left: -9999px; }

footer { border-top: 1px solid var(--border); padding: 40px 0 56px; font-size: 14px; color: var(--text-dim); }
footer .wrap { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
footer a { text-decoration: none; margin-right: 18px; }
footer a:hover { color: var(--text); }

/* docs */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding: 40px 0 80px; align-items: start; }
.side { position: sticky; top: 80px; max-height: calc(100vh - 100px); overflow: auto; font-size: 14px; }
.side h4 { margin: 18px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }
.side h4:first-child { margin-top: 0; }
.side a { display: block; padding: 5px 10px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text-dim); }
.side a:hover { background: var(--hover); color: var(--text); }
.side a[aria-current="page"] { background: var(--accent-bg); color: var(--text); font-weight: 600; }
.md { max-width: 760px; }
.md h1 { font-size: 34px; letter-spacing: -.02em; line-height: 1.2; margin-bottom: 18px; }
.md h2 { font-size: 22px; margin: 36px 0 10px; letter-spacing: -.01em; }
.md h3 { font-size: 17px; margin: 26px 0 8px; }
.md p, .md li { color: var(--text); }
.md p { margin: 12px 0; }
.md a { color: var(--text); text-underline-offset: 3px; }
.md code { font: 13px ui-monospace, "SF Mono", Menlo, monospace; background: var(--accent-bg); padding: 2px 6px; border-radius: var(--radius-xs); }
.md pre { background: oklch(0.19 0.01 220); color: oklch(0.95 0.005 220); padding: 16px 18px; border-radius: var(--radius); overflow-x: auto; line-height: 1.6; }
.md pre code { background: none; padding: 0; color: inherit; }
.md table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.md th, .md td { border-bottom: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.md blockquote { margin: 14px 0; padding: 2px 16px; border-left: 3px solid var(--accent-border); color: var(--text-dim); }
.md img { border-radius: var(--radius); border: 1px solid var(--border); }
.docs-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 24px; }
.docs-index a { display: block; padding: 16px 18px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); text-decoration: none; font-weight: 600; }
.docs-index a small { display: block; font-weight: 400; color: var(--text-dim); margin-top: 2px; }
.docs-index a:hover { border-color: var(--border-strong); }

@media (max-width: 900px) {
  section { padding: 64px 0; }
  .nav { display: none; }
  .panel, .split { grid-template-columns: 1fr; gap: 28px; }
  .grid { grid-template-columns: 1fr 1fr; }
  .docs { grid-template-columns: 1fr; gap: 20px; }
  .side { position: static; max-height: none; }
}
@media (max-width: 560px) {
  .grid, .docs-index { grid-template-columns: 1fr; }
  .tabs { grid-template-columns: repeat(2, 1fr); border-radius: 20px; }
  .tab { height: 60px; font-size: 16px; gap: 10px; }
  .top-end .btn-sm { display: none; }
}

/* showcase button: larger, with air above it, centred under the points */
.panel-cta { margin-top: 44px; text-align: center; }
.panel-cta .btn { min-width: 240px; height: 54px; font-size: 16px; padding: 0 30px; }
.ti { flex: none; }

/* the smaller section switch of the reports */
.tabs-sm { max-width: 620px; padding: 5px; border-radius: 16px; margin: 32px auto 30px; }
.tabs-sm .tab { height: 46px; font-size: 15px; gap: 9px; border-radius: 12px; padding: 0 10px; }
.tabs-sm .tab svg { width: 19px; height: 19px; }
.grid[hidden] { display: none; }
#reports .grid { margin-top: 0; }

/* "Everything around it": bigger chips with icons, coloured by section */
.s-web { --c: oklch(0.6 0.15 150); } .s-lnk { --c: oklch(0.58 0.17 300); } .s-pix { --c: oklch(0.72 0.19 50); } .s-pod { --c: oklch(0.62 0.18 350); } .s-g { --c: oklch(0.58 0.17 255); }
.chips-lg { justify-content: center; gap: 12px; margin: 34px auto 0; max-width: 940px; }
.chips-lg span { display: inline-flex; align-items: center; gap: 10px; padding: 11px 18px 11px 14px; font-size: 15px;
  border-color: color-mix(in oklab, var(--c) 30%, var(--border)); background: color-mix(in oklab, var(--c) 7%, var(--surface)); }
.chips-lg .ti { width: 20px; height: 20px; color: var(--c); }
.legend { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-top: 22px; font-size: 13px; color: var(--text-dim); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }

/* the notify field and its button share one height */
.notify input, .notify .btn { height: 46px; }
.foot-copy { display: grid; gap: 4px; }
footer .foot-copy a { margin: 0; }
.book .lead { margin-inline: auto; }
footer .foot-copy a { text-decoration: underline; text-underline-offset: 3px; color: var(--text); }

/* ---- motion ---- (all of it is switched off by the reduced-motion rule at the top of this file) */
:root { --ease: cubic-bezier(.2, .7, .2, 1); --spring: cubic-bezier(.34, 1.4, .5, 1); }
@keyframes rise { from { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 22px)); } }
@keyframes shot-in { from { opacity: 0; transform: perspective(1400px) translateY(64px) rotateX(9deg) scale(.95); } to { opacity: 1; transform: perspective(1400px) translateY(0) rotateX(0) scale(1); } }
@keyframes drift { from { transform: translate(-90px, 0) scale(1); } to { transform: translate(90px, 24px) scale(1.18); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--amber) 55%, transparent); } 70%, 100% { box-shadow: 0 0 0 8px transparent; } }
@keyframes pop { 0% { transform: scale(.7) rotate(-10deg); } 60% { transform: scale(1.18) rotate(3deg); } 100% { transform: none; } }
@keyframes grow { from { opacity: 0; transform: scale(.94); } }
@keyframes fade-down { from { opacity: 0; transform: translateY(-6px); } }

/* hero: the copy rises one line after another, then the screenshot tilts up into place */
.hero { position: relative; overflow-x: clip; }
.hero > .wrap { position: relative; z-index: 1; }
.hero::after { content: ""; position: absolute; left: 50%; top: -140px; width: 760px; height: 420px; margin-left: -380px; border-radius: 50%; background: radial-gradient(closest-side, var(--accent-bg), transparent); filter: blur(34px); pointer-events: none; animation: drift 14s ease-in-out infinite alternate; }
.hero-copy > * { animation: rise .85s var(--ease) backwards; }
.hero-copy > :nth-child(1) { animation-delay: .05s; } .hero-copy > :nth-child(2) { animation-delay: .15s; } .hero-copy > :nth-child(3) { animation-delay: .27s; }
.hero-copy > :nth-child(4) { animation-delay: .39s; } .hero-copy > :nth-child(5) { animation-delay: .5s; }
.hero-shot { animation: shot-in 1.1s var(--ease) .45s backwards; transform-origin: 50% 0; }
.chip i { animation: pulse 2.2s ease-out infinite; }

/* scroll-in (the script adds .reveal, then .in when the block is on screen) */
.reveal:not(.in) { opacity: 0; transform: translate(var(--dx, 0), var(--dy, 22px)); }
.reveal.in { animation: rise .75s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 70ms); }

/* tabs: a pill slides to the selected tab */
.tabs { position: relative; }
.tab { position: relative; z-index: 1; }
.tab-ind { position: absolute; left: 0; top: 0; z-index: 0; background: var(--surface); box-shadow: var(--shadow); pointer-events: none; }
.tabs.ready .tab-ind { transition: transform .45s var(--spring), width .45s var(--ease), height .45s var(--ease); }
.has-ind .tab[aria-selected="true"], .has-ind .tab[aria-selected="true"]:hover { background: transparent; box-shadow: none; }
.tab[aria-selected="true"] svg { animation: pop .5s var(--spring); }
.tab svg { transition: color .2s; }
.view { transition: color .15s, background .15s, border-color .15s, transform .15s; }
.view:hover { transform: translateY(-1px); }
.view-img.swap { animation: grow .5s var(--ease); }
/* switching tabs: fade in and grow a little from the centre, instead of rising */
.switching .reveal.in { animation: grow .5s var(--ease) backwards; animation-delay: calc(var(--i, 0) * 50ms); transform-origin: 50% 40%; }

/* small touches */
.top { transition: box-shadow .25s; }
.top.scrolled { box-shadow: 0 8px 28px -14px rgb(0 0 0 / .28); }
.btn { transition: transform .18s var(--ease), box-shadow .18s, filter .18s, border-color .18s; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary:hover { box-shadow: 0 8px 22px -8px color-mix(in oklab, var(--accent) 70%, transparent); }
.card { transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); }
.card .ic { transition: transform .3s var(--spring); }
.card:hover .ic { transform: scale(1.1) rotate(-4deg); }
.chips span { transition: transform .2s var(--ease), border-color .2s; }
.chips span:hover { transform: translateY(-2px); }
details[open] > p { animation: fade-down .35s var(--ease); }
summary::after { transition: transform .25s var(--ease); }
details[open] summary::after { transform: rotate(180deg); }

/* the Creixems mark before the studio name in the footer credit */
footer .foot-copy a.credit { display: inline-block; padding-left: 22px; background: url("../assets/img/creixems-mark.svg") 2px center / 16px auto no-repeat; }
:root[data-theme="dark"] footer .foot-copy a.credit { background-image: url("../assets/img/creixems-mark-white.svg"); }
