/* Keel public homepage. Same Oxblood tokens as the portal and the legal pages. */
:root {
  --bg: #f4f1ec; --panel: #fffdf9; --line: #e0d9ce; --text: #1c1714; --text-2: #4f453e; --muted: #6f645b;
  --accent: #7a1f2b; --accent-ink: #fffdf9; --soft: #efe6e3;
  --sans: 'Albert Sans', ui-sans-serif, -apple-system, 'Segoe UI', system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) { --bg: #161210; --panel: #201a17; --line: #33291f; --text: #efe9e1; --text-2: #c4b8ab; --muted: #9a8d81; --accent: #d0707c; --accent-ink: #1c1714; --soft: #2a1f1d; color-scheme: dark; }
}
:root[data-theme='dark'] { --bg: #161210; --panel: #201a17; --line: #33291f; --text: #efe9e1; --text-2: #c4b8ab; --muted: #9a8d81; --accent: #d0707c; --accent-ink: #1c1714; --soft: #2a1f1d; color-scheme: dark; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.top, main, footer { max-width: 68rem; margin: 0 auto; padding-inline: 1rem; }
@media (min-width: 640px) { .top, main, footer { padding-inline: 1.5rem; } }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding-block: 1.1rem; }
.brand { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.3rem; letter-spacing: -.02em; }
.brand svg { width: 30px; height: 30px; }
.brand path { fill: none; stroke: currentColor; stroke-width: 8; stroke-linecap: round; }
.brand .wl { stroke-width: 2.5; opacity: .4; }
.brand .kb { stroke: var(--accent); }
.top nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; font-size: .95rem; }
.top nav a:not(.btn) { color: var(--text-2); text-decoration: none; }
.top nav a:not(.btn):hover { color: var(--text); }
@media (max-width: 560px) { .top nav a[href^="#"] { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 1.3rem; border-radius: 999px; background: var(--text); color: var(--bg); font-weight: 600; text-decoration: none; border: 1px solid var(--text); }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { min-height: 38px; padding: 0 1rem; font-size: .92rem; }
.btn-ghost { background: color-mix(in srgb, var(--panel) 75%, transparent); color: var(--text); border-color: var(--line); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.btn-ghost:hover { background: var(--panel); color: var(--text); border-color: var(--text-2); }

/* the hero stage: header + hero over the 3D sea */
.stage { position: relative; isolation: isolate; overflow: hidden; min-height: min(100svh, 56rem); display: flex; flex-direction: column;
  background: radial-gradient(120% 70% at 70% 100%, var(--soft) 0%, transparent 60%), var(--bg); }
.stage::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, transparent, var(--bg)); }
#sea { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; display: block; }
.stage > .top { position: relative; width: 100%; }
.hero { position: relative; width: 100%; max-width: 68rem; margin: 0 auto; padding-inline: 1rem;
  padding-block: clamp(2.5rem, 9vw, 7rem) clamp(3rem, 14vw, 12rem); }
@media (min-width: 640px) { .hero { padding-inline: 1.5rem; } }
.hero > * { max-width: 46rem; }
/* a soft calm behind the copy so the sea never competes with the words */
.hero::before { content: ""; position: absolute; z-index: -1; inset: -10% 20% -10% -20%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--bg) 92%, transparent) 30%, transparent 100%); }
@media (max-width: 700px) { .hero::before { inset: -10% -30% 25% -30%; } }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 2.2rem 0 0; }
.chips li { font-size: .85rem; color: var(--text-2); padding: .35rem .8rem; border-radius: 999px; border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.num { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: .9rem; }
.grid article { transition: border-color .2s, transform .2s; }
.grid article:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); transform: translateY(-2px); }
/* scroll reveals, only when motion is welcome and the script ran */
.anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.anim .reveal.in { opacity: 1; transform: none; }
.anim .grid .reveal:nth-child(2) { transition-delay: .06s; } .anim .grid .reveal:nth-child(3) { transition-delay: .12s; }
.anim .grid .reveal:nth-child(5) { transition-delay: .06s; } .anim .grid .reveal:nth-child(6) { transition-delay: .12s; }
.eyebrow { margin: 0 0 1rem; color: var(--accent); font-weight: 600; font-size: .9rem; letter-spacing: .06em; text-transform: uppercase; }
h1 { margin: 0; font-weight: 800; font-size: clamp(2.4rem, 7vw, 4.4rem); line-height: 1.02; letter-spacing: -.04em; text-wrap: balance; }
.lede { margin: 1.4rem 0 0; color: var(--text-2); font-size: clamp(1.05rem, 2.2vw, 1.25rem); max-width: 40rem; }
.cta { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 2rem; }

section { padding-block: clamp(2rem, 5vw, 3.5rem); }
h2 { margin: 0 0 1.4rem; font-weight: 700; font-size: clamp(1.5rem, 3.5vw, 2.1rem); letter-spacing: -.03em; line-height: 1.15; }
h3, .grid h4 { margin: 0 0 .4rem; font-weight: 700; font-size: 1.08rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; }
section > p { color: var(--text-2); max-width: 46rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.grid article { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 1.3rem 1.3rem 1.1rem; }
.grid p { color: var(--text-2); font-size: .98rem; margin: 0; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: clamp(1.4rem, 4vw, 2.4rem); margin-block: 1rem; }
.uses { margin: 0 0 1.4rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.uses > div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--line); }
.uses dt { font-weight: 700; }
.accts { display: grid; gap: 1rem; margin-top: 1.6rem; }
.acct { background: var(--bg); border: 1px solid var(--line); border-radius: 14px; padding: 1.2rem 1.4rem; scroll-margin-top: 5rem; }
.acct > h3 { margin: 0 0 .7rem; font-size: 1.2rem; color: var(--accent); }
.acct > p { margin: 0; color: var(--text-2); }
.acct .uses { margin: 0; border-top: 0; }
.acct .uses > div:last-child { border-bottom: 0; padding-bottom: 0; }
.acct .acct-note { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .95rem; }
.uses dd { margin: 0; color: var(--text-2); }
@media (max-width: 560px) { .uses > div { grid-template-columns: 1fr; gap: .2rem; } }

.points { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; max-width: 46rem; }
.points li { color: var(--text-2); padding-left: 1.2rem; position: relative; }
.points li::before { content: ""; position: absolute; left: 0; top: .7em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.points b { color: var(--text); }

footer { display: flex; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-block: 2rem 3rem; margin-top: 2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
footer > div { max-width: 34rem; }
footer b { color: var(--text-2); }
footer nav { display: flex; gap: .4rem 1.1rem; flex-wrap: wrap; }
footer nav a { color: var(--text-2); text-decoration: none; }
footer nav a:hover { color: var(--text); text-decoration: underline; }
footer nav a.quiet { color: var(--muted); }

/* "Preview" next to a capability that is off by default */
.tag { display: inline-block; vertical-align: .15em; margin-left: .35rem; padding: .1rem .5rem; border-radius: 999px; font-size: .7rem; font-weight: 600; letter-spacing: .03em; color: var(--accent); background: var(--soft); }

/* a look inside: a screen and a few words, alternating sides */
.feature { display: grid; gap: 1.2rem 2.5rem; align-items: center; margin-top: 2.2rem; }
@media (min-width: 860px) {
  .feature { grid-template-columns: 2fr 3fr; }
  .feature.flip { grid-template-columns: 3fr 2fr; }
  .feature.flip .copy { order: 2; }
}
.feature .copy p { color: var(--text-2); margin: 0; }
.feature h3 { font-size: 1.3rem; letter-spacing: -.02em; margin-bottom: .6rem; }
.shot { margin: 0; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel);
  box-shadow: 0 1px 2px rgb(28 23 20 / .05), 0 18px 40px -18px rgb(28 23 20 / .28); }
.shot img, .phone img { display: block; width: 100%; height: auto; }

/* the apps: the Mac app's window, then three phones, each beside its copy */
.app-panel { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 960px) { .app-panel { grid-template-columns: 5fr 6fr; } }
.app-panel .cta { margin-top: 0; margin-bottom: .9rem; align-items: center; }
.app-panel .fine { color: var(--muted); font-size: .88rem; margin: 0; max-width: 38rem; }
.shot.mac { border-radius: 12px; }
.app-copy .points { margin-bottom: 1.2rem; }
.soon { color: var(--muted); font-size: .92rem; margin: 0; }
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; align-items: start; }
.phone { margin: 0; border-radius: 26px; overflow: hidden; border: 6px solid var(--text); background: var(--text);
  box-shadow: 0 18px 36px -18px rgb(28 23 20 / .45); }
.phones .phone:nth-child(2) { transform: translateY(1.6rem); }
@media (max-width: 560px) { .phone { border-width: 4px; border-radius: 18px; } }

/* for organisations: two or three across */
.grid.two { grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); }

/* "New" next to a capability that just shipped */
.tag.new { color: var(--accent-ink); background: var(--accent); }

/* what Keel does, in three groups */
h3.group { margin: 2.4rem 0 1rem; font-size: .82rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
#hWhat + h3.group { margin-top: 0; }

/* your own Keel: the words beside the boxes */
.split { display: grid; gap: 2rem 3rem; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 5fr 6fr; } }
.split .points { margin-top: 1.4rem; }
.split .eyebrow { margin-bottom: .7rem; }
@media (min-width: 960px) { .split .viz { aspect-ratio: 1 / 1; } }

/* the 3D scenes of how it works; the background stays if WebGL doesn't */
.viz { position: relative; margin: 0; border-radius: 18px; border: 1px solid var(--line); overflow: hidden; aspect-ratio: 16 / 11;
  background: radial-gradient(75% 70% at 50% 45%, var(--soft) 0%, transparent 72%), var(--panel);
  box-shadow: 0 1px 2px rgb(28 23 20 / .05), 0 18px 40px -22px rgb(28 23 20 / .28); }
@media (max-width: 560px) { .viz { aspect-ratio: 1 / 1; } }
.viz canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; }
.legend { position: absolute; left: 1rem; right: 1rem; bottom: .85rem; margin: 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: .3rem 1.1rem;
  font-size: .8rem; color: var(--text-2); pointer-events: none; }
.legend li { display: flex; align-items: center; gap: .45rem; }
.legend li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--text); opacity: .45; }
.legend li.you::before { background: var(--accent); opacity: 1; }
.legend li.out::before { background: var(--muted); opacity: .9; }
.viz-status { position: absolute; left: 1rem; top: .9rem; margin: 0; font-size: .8rem; font-weight: 600; color: var(--text-2); letter-spacing: .01em;
  padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: color-mix(in srgb, var(--panel) 80%, transparent); }
.viz-status:empty { display: none; }
.viz-bubble { position: absolute; right: 1rem; top: 1rem; margin: 0; max-width: 60%; padding: .5rem .85rem; border-radius: 16px 16px 4px 16px;
  background: var(--accent); color: var(--accent-ink); font-size: .9rem; font-weight: 600; opacity: 0; transform: translateY(6px) scale(.96);
  transition: opacity .25s ease, transform .25s ease; }
.viz-bubble.show { opacity: 1; transform: none; }
.viz:not(.is-live) .viz-bubble, .viz:not(.is-live) .viz-status { display: none; }

/* what setup asks about: each lights up as the scene reaches it */
.topics { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1rem 0 1.6rem; }
.topics li { font-size: .82rem; color: var(--text-2); padding: .28rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--panel);
  transition: color .3s, background .3s, border-color .3s; }
.topics li.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.feature h3.then { margin-top: .2rem; }
.feature .copy p + .topics { margin-top: 1rem; }
