/* QBIS landing page */
.lp { background: var(--canvas); overflow-x: hidden; }
.lp-wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: var(--r-s); }

/* fixed glass header */
.lp-head { position: fixed; inset: 0 0 auto 0; z-index: 50; padding-top: env(safe-area-inset-top); background: var(--surface-glass); backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); border-bottom: 1px solid transparent; transition: border-color var(--t-med), box-shadow var(--t-med); }
.lp-head.scrolled { border-color: var(--line); box-shadow: var(--shadow-1); }
.lp-head-in { height: 68px; display: flex; align-items: center; gap: 24px; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 800; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: .02em; }
.lp-brand.small { font-size: 1rem; }
.lp-nav { display: flex; gap: 4px; margin-left: 12px; }
.lp-nav a { color: var(--ink-2); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: var(--r-s); transition: background var(--t-fast), color var(--t-fast); }
.lp-nav a:hover { background: var(--surface-2); color: var(--ink); }
.lp-head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* hero */
.hero { position: relative; padding: calc(68px + 72px) 0 88px; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, var(--primary-wash), transparent 70%); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: auto auto -30% -15%; width: 50vw; height: 50vw; max-width: 640px; max-height: 640px;
  background: radial-gradient(closest-side, var(--accent-wash), transparent 70%); pointer-events: none; }
.hero-in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(3rem, 7.2vw, 6.2rem); line-height: .95; margin: 0 0 24px; font-weight: 800; letter-spacing: -.035em; }
.hero-sub { font-size: clamp(1.02rem, 1.4vw, 1.18rem); color: var(--ink-2); max-width: 54ch; margin: 0 0 32px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-note { margin-top: 18px; color: var(--muted); }
.hero-note code { background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* the signature: plate gauge */
.hero-plate { margin: 0; display: grid; justify-items: center; gap: 18px; }
.plate-stage { position: relative; width: min(440px, 80vw); aspect-ratio: 1; display: grid; place-items: center; }
.plate-stage::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow-3), inset 0 0 0 1px var(--line); }
.plate-stage svg { position: relative; width: 100%; height: 100%; overflow: visible; }
.plate-seg { transition: stroke-dasharray 900ms var(--ease), stroke-dashoffset 900ms var(--ease); stroke-linecap: butt; }
.plate-tick { transition: transform 900ms var(--ease); }
.plate-big { font: 800 34px var(--font-display); fill: var(--ink); letter-spacing: -.02em; }
.plate-small { font: 600 10.5px var(--font-ui); fill: var(--muted); }
.meal-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-1); }
.meal-tabs button { border: 0; background: transparent; padding: 6px 14px; border-radius: 999px; font-weight: 700; color: var(--muted); cursor: pointer; transition: background var(--t-med), color var(--t-med); }
.meal-tabs button[aria-selected="true"] { background: var(--ink); color: var(--canvas); }
.legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: 460px; }
.legend li { display: inline-flex; align-items: center; gap: 6px; font-size: .86rem; color: var(--ink-2); }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend b { color: var(--ink); }

/* one orchestrated entrance */
.hero h1, .hero-sub, .hero-cta, .hero-plate { animation: rise .8s var(--ease) both; }
.hero-sub { animation-delay: .08s; } .hero-cta { animation-delay: .16s; } .hero-plate { animation-delay: .12s; animation-duration: 1.1s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }

/* sections */
section { scroll-margin-top: 80px; }
.sec-title { font-size: clamp(1.8rem, 3.4vw, 2.7rem); line-height: 1.08; margin: 0 0 32px; max-width: 22ch; }
.how { padding: 88px 0; background: var(--surface); border-block: 1px solid var(--line); }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.steps li { counter-increment: s; position: relative; }
.steps h3 { font-size: 1.2rem; margin: 18px 0 8px; display: flex; gap: 10px; align-items: baseline; }
.steps h3::before { content: counter(s); font: 800 .9rem var(--font-display); color: var(--primary-ink); background: var(--primary); width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: none; transform: translateY(-2px); }
.steps p { color: var(--ink-2); margin: 0; }
.step-art { height: 150px; border-radius: var(--r-l); background: var(--canvas); border: 1px solid var(--line); padding: 18px; display: grid; gap: 8px; align-content: center; font-size: .82rem; overflow: hidden; }
.art-paste { grid-template-columns: 1fr 1.6fr; }
.art-paste span { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 4px 8px; font-variant-numeric: tabular-nums; }
.art-paste span:nth-child(-n+2) { background: var(--primary-wash); border-color: transparent; font-weight: 700; color: var(--primary); }
.art-cpp b { font-family: var(--font-display); }
.art-cpp span { display: flex; justify-content: space-between; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.art-cpp i { font-style: normal; font-weight: 800; color: var(--primary); }
.art-plan .bar { height: 12px; background: var(--surface); border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
.art-plan .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
.art-plan b { justify-self: start; background: var(--primary-wash); color: var(--primary); border-radius: 999px; padding: 2px 10px; font-size: .8rem; }

.features { padding: 96px 0; }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-l); padding: 26px; transition: transform var(--t-med) var(--ease), box-shadow var(--t-med); }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); }
.tile h3 { margin: 0 0 8px; font-size: 1.12rem; }
.tile p { margin: 0; color: var(--ink-2); }
.tile code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; }
.tile-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; background: linear-gradient(140deg, var(--surface), var(--surface-2)); }
.tile-tall { grid-row: span 2; }
.tile-span2 { grid-column: span 2; }
.mini-meter { background: #0e2621; color: #fff; border-radius: var(--r-m); padding: 18px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
:root[data-theme="dark"] .mini-meter { background: #061310; }
.mini-meter small { display: block; color: #9fbfb5; font-size: .75rem; }
.mini-meter b { font: 800 1.35rem var(--font-display); }
.mini-meter b.up { color: #a9b6ff; }
.mini-meter .track { grid-column: 1 / -1; position: relative; height: 10px; border-radius: 5px; background: rgba(255,255,255,.12); overflow: hidden; }
.mini-meter .track i { position: absolute; inset: 0; background: linear-gradient(90deg, #3cc79a, #8c9bff); transform-origin: left; animation: fill 2.4s var(--ease) infinite alternate; }
.mini-meter .track em { position: absolute; top: -2px; bottom: -2px; left: 33%; width: 2px; background: #fff; }
@keyframes fill { from { transform: scaleX(.25); } to { transform: scaleX(1); } }
.auth-demo { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 8px; }
.auth-demo li { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-radius: var(--r-s); background: var(--surface-2); border: 1px solid var(--line); font-size: .92rem; }
.auth-demo b { font-size: .8rem; padding: 2px 9px; border-radius: 999px; }
.auth-demo .full { background: var(--primary-wash); color: var(--primary); }
.auth-demo .read { background: var(--indigo-wash); color: var(--indigo); }
.auth-demo .none { background: var(--canvas-2); color: var(--muted); }

.security { padding: 88px 0; background: linear-gradient(160deg, #0e2621, #123a31); color: #e6f2ee; }
:root[data-theme="dark"] .security { background: linear-gradient(160deg, #081612, #0f2a23); }
.security .sec-title { color: #fff; }
.sec-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: start; }
.sec-in p { color: #b9d3cb; font-size: 1.05rem; max-width: 56ch; }
.sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sec-list li { padding: 18px 20px; border-radius: var(--r-m); background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); display: grid; gap: 2px; }
.sec-list b { font-family: var(--font-display); }
.sec-list span { color: #b9d3cb; }

.lp-foot { padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--surface); }
.lp-foot-in { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; color: var(--muted); }
.lp-foot-in a { margin-left: auto; font-weight: 700; }

@media (max-width: 960px) {
  .hero-in { grid-template-columns: 1fr; gap: 36px; }
  .hero { padding-top: calc(68px + 40px); }
  .steps { grid-template-columns: 1fr; }
  .bento { grid-template-columns: 1fr 1fr; }
  .tile-wide { grid-column: 1 / -1; grid-template-columns: 1fr; }
  .tile-tall { grid-row: auto; }
  .tile-span2 { grid-column: 1 / -1; }
  .sec-in { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .lp-nav { display: none; }
  .lp-head-in { height: 60px; }
  .hero { padding: calc(60px + 28px) 0 56px; }
  .hero-cta .btn { flex: 1 1 100%; }
  .bento { grid-template-columns: 1fr; }
  .how, .features, .security { padding: 64px 0; }
  .lp-foot-in a { margin-left: 0; }
}
