/* Fexlo public website. Static, no external fonts or scripts. Colours are tokens; light mode is a fallback. */
:root {
  color-scheme: dark;
  --bg: #0b1117;
  --surface: #111a23;
  --surface-2: #162230;
  --line: #22313f;
  --text: #f4f7f9;
  --muted: #b3c0cb;
  --accent: #2dd4bf;
  --accent-strong: #5eead4;
  --accent-fg: #04201c;
  --danger: #ff9a90;
  --focus: #67e8f9;
  --shadow: 0 18px 50px rgba(0, 0, 0, .35);
  --radius: 16px;
  --max: 1120px;
  --gutter: 24px;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f6f8fa;
    --surface: #ffffff;
    --surface-2: #eef3f6;
    --line: #d6dee5;
    --text: #0b1117;
    --muted: #41505e;
    --accent: #0f766e;
    --accent-strong: #0d5f59;
    --accent-fg: #ffffff;
    --danger: #b42318;
    --focus: #0e7490;
    --shadow: 0 12px 32px rgba(11, 17, 23, .08);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 3vw, 34px); font-weight: 750; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: .92em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--accent); color: var(--accent-fg); padding: 10px 14px; border-radius: 10px; font-weight: 700; z-index: 10; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 68px; flex-wrap: wrap; padding-block: 10px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 19px; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand small { display: none; color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 10px; font-size: 15px; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a[aria-current="page"] { color: var(--accent-strong); background: var(--surface-2); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 11px 20px; border-radius: 12px; border: 1px solid transparent; text-decoration: none; font-weight: 700; font-size: 16px; cursor: pointer; font-family: inherit; }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.primary:hover { background: var(--accent-strong); }
.btn.ghost { color: var(--accent-strong); border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 38px; padding: 8px 14px; font-size: 15px; }
.btn.is-pending { opacity: .7; cursor: not-allowed; background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 10px; }
.pending { color: var(--muted); font-size: 14px; margin-top: 6px; }
.fine { color: var(--muted); font-size: 14px; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 48px; align-items: center; padding: 64px 0 40px; }
.eyebrow { display: inline-block; color: var(--accent-strong); background: color-mix(in srgb, var(--accent) 14%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 18px; }
.lead { font-size: 19px; color: var(--muted); max-width: 60ch; }
.byline { color: var(--muted); font-size: 15px; margin-top: 18px; }
.byline strong { color: var(--text); }
.shot { margin: 0; }
.frame { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.shot figcaption { color: var(--muted); font-size: 14px; margin-top: 10px; }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 24px; padding: 0; margin: 0 0 16px; color: var(--muted); font-size: 15px; }
.facts li::before { content: "✓"; color: var(--accent-strong); font-weight: 800; margin-right: 8px; }

/* Sections */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: none; }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.num { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-fg); font-weight: 800; margin-bottom: 14px; }
.steps p { color: var(--muted); font-size: 15px; margin: 0; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card h3 { color: var(--text); }
.card .use { color: var(--muted); margin-bottom: 10px; }
.card .outcome { color: var(--text); font-size: 15px; margin: 0; padding-top: 12px; border-top: 1px solid var(--line); }
.more { margin-top: 18px; }
.trust { background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--accent) 6%, transparent)); }
.checks { list-style: none; padding: 0; display: grid; gap: 12px; max-width: 80ch; }
.checks li { position: relative; padding-left: 30px; color: var(--text); }
.checks li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin-block: 56px; }
.band p { color: var(--muted); margin: 0; max-width: 62ch; }
.band h2 { margin-bottom: 8px; }
.final { text-align: center; padding: 64px 0 80px; border-top: 1px solid var(--line); }
.final p { color: var(--muted); }
.final .cta-row { justify-content: center; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; }
details p { color: var(--muted); margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 36px 0; margin-top: 40px; }
.foot { display: grid; gap: 14px; }
.foot-brand { margin: 0; font-size: 17px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }
.site-footer .fine { margin: 0; }

/* Inner pages */
.page-head { padding: 48px 0 16px; }
.page-head h1 { font-size: clamp(28px, 4vw, 42px); }
.install-cta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; margin: 40px 0 28px; box-shadow: var(--shadow); }
.install-cta .lead { margin-bottom: 0; }
.notice { background: color-mix(in srgb, var(--accent) 10%, var(--surface)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 12px; padding: 16px 18px; margin: 24px 0; }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 32px 0 8px; }
.support-card .btn { margin: 8px 0 12px; word-break: break-all; }
.auth-form { display: grid; gap: 10px; max-width: 440px; margin: 24px 0; }
.auth-form label { font-weight: 700; }
.auth-form input { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.auth-form .btn { justify-self: start; margin-top: 8px; }
.err { color: var(--danger); min-height: 1.2em; font-size: 14px; }

/* Documents rendered from store/*.md */
.doc { padding: 8px 0 48px; max-width: 78ch; }
.doc h1 { font-size: clamp(28px, 4vw, 42px); margin-top: 32px; }
.doc h2 { font-size: 24px; margin-top: 40px; padding-top: 8px; border-top: 1px solid var(--line); }
.doc h3 { margin-top: 28px; }
.doc li { margin-bottom: 6px; }
.doc a { word-break: break-word; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; margin: 16px 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
caption { text-align: left; color: var(--muted); padding: 10px 12px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 700; }

/* Responsive */
@media (min-width: 900px) { .brand small { display: inline; } }
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 40px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .bar { gap: 10px; }
  .nav { margin-left: 0; width: 100%; order: 3; justify-content: flex-start; gap: 0; }
  .nav a { padding: 6px 8px; font-size: 14px; }
  .btn.small { margin-left: auto; }
  .lead { font-size: 17px; }
  .steps, .cards { grid-template-columns: 1fr; }
  .section { padding: 40px 0; }
  .band { padding: 22px; }
  .btn { width: 100%; }
  .cta-row .btn { width: 100%; }
  .btn.small { width: auto; }
  .hero { padding-top: 28px; }
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color .15s ease, transform .12s ease; }
  .btn:hover { transform: translateY(-1px); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Motion: short, one-off, CSS only. Content is never hidden without JavaScript; reduced motion turns all of it off. */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .6s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .06s; }
  .hero-copy > :nth-child(3) { animation-delay: .12s; }
  .hero-copy > :nth-child(4) { animation-delay: .18s; }
  .hero-copy > :nth-child(5) { animation-delay: .24s; }
  .shot { animation: rise .7s .15s cubic-bezier(.2, .7, .2, 1) both; }
  .frame { transition: transform .3s ease, box-shadow .3s ease; }
  .shot:hover .frame { transform: translateY(-4px); box-shadow: 0 26px 60px rgba(0, 0, 0, .45); }
  .facts li { animation: rise .5s both; }
  .facts li:nth-child(2) { animation-delay: .08s; }
  .facts li:nth-child(3) { animation-delay: .16s; }
  .card { transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
  .card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 50%, var(--line)); }
  .num { transition: transform .25s ease, box-shadow .25s ease; }
  .steps li:hover .num { transform: scale(1.08); box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 16%, transparent); }
  .checks li { transition: transform .2s ease; }
  .checks li:hover { transform: translateX(4px); }
  details[open] > p { animation: rise .25s ease both; }
  summary { transition: color .15s ease; }
  summary:hover { color: var(--accent-strong); }
  .btn.primary:active { transform: scale(.98); }
  .brand img { transition: transform .4s cubic-bezier(.2, .7, .2, 1); }
  .brand:hover img { transform: rotate(-6deg) scale(1.06); }
  .nav a { transition: background-color .15s ease, color .15s ease; }
  .is-pending { animation: none !important; background-image: none !important; }
}

/* V3 components */
.btn.big { min-height: 52px; padding: 13px 26px; font-size: 17px; }
.hero { position: relative; }
.callout { position: absolute; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow); white-space: nowrap; }
.shot { position: relative; }
.callout.c1 { top: 14%; left: -4%; }
.callout.c2 { bottom: 18%; right: -2%; }
.callout::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.shot-wide { margin-top: 40px; }
.shot-wide .frame { max-width: 900px; }
.flow { position: relative; margin-top: 28px; }
.flow-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; position: relative; z-index: 1; }
.stage { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: border-color .2s ease, background-color .2s ease; }
.stage-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-strong); margin-bottom: 14px; }
.stage-icon svg, .chapter-icon svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.stage-no { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.stage h3 { font-size: 17px; }
.stage p { color: var(--muted); font-size: 15px; margin: 0; }
.flow-line { position: absolute; left: 12.5%; right: 12.5%; top: 45px; height: 2px; background: var(--line); z-index: 0; overflow: hidden; }
.flow-dot { position: absolute; top: -4px; left: 0; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.chapters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.chapter { display: grid; gap: 12px; align-content: start; }
.chapter-name { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 800; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-strong); }
.chapter-icon { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--surface-2); }
.card h3 { margin-bottom: 6px; }
.card p { color: var(--muted); font-size: 15px; margin: 0; }
.card { padding: 20px; }
.checks { gap: 10px; }

@media (prefers-reduced-motion: no-preference) {
  .stage { animation: stage-on 3.2s linear both; }
  .stage-1 { animation-delay: .5s; }
  .stage-2 { animation-delay: 1.1s; }
  .stage-3 { animation-delay: 1.7s; }
  .stage-4 { animation-delay: 2.3s; }
  .flow-dot { animation: flow-x 2.4s cubic-bezier(.45, .05, .55, .95) .4s 1 both; }
  .chapter .card:hover { transform: translateY(-3px); }
}
@keyframes flow-x { from { left: 0; } to { left: calc(100% - 10px); } }
@keyframes flow-y { from { top: 0; } to { top: calc(100% - 10px); } }
@keyframes stage-on {
  0% { border-color: var(--line); }
  10%, 25% { border-color: color-mix(in srgb, var(--accent) 70%, var(--line)); background-color: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
  40%, 100% { border-color: var(--line); background-color: var(--surface); }
}
@media (max-width: 960px) {
  .chapters { grid-template-columns: 1fr; }
  .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow-line { display: none; }
  .callout { position: static; display: inline-block; margin: 10px 0 0; }
  .callout.c2 { margin-left: 8px; }
}
@media (max-width: 640px) {
  .flow-steps { grid-template-columns: 1fr; }
  .flow-line { display: block; left: 43px; right: auto; top: 22px; bottom: 22px; width: 2px; height: auto; }
  .flow-dot { left: -4px; top: 0; }
  @media (prefers-reduced-motion: no-preference) { .flow-dot { animation: flow-y 2.4s cubic-bezier(.45, .05, .55, .95) .4s 1 both; } }
  .stage { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: start; }
  .stage-icon { grid-row: span 3; }
  .shot-wide .frame { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .stage, .flow-dot { animation: none !important; }
}
