/* =========================================================
   KitTheme — homepage (rowen.work/kittheme)
   ---------------------------------------------------------
   Charcoal surfaces, white text, and the logo's violet as the one
   accent. The sample kit's artwork carries the color; the page itself
   stays quiet. The FL Browser panels come from fl-preview.css, the same
   stylesheet the editor's preview uses, so the example is the editor's
   real rendering.

   Accent has two values on purpose: --accent is for text on the dark
   ground (6.6:1), the hi/lo pair is for buttons carrying white text
   (≥ 4.3:1). The lighter violet can't do both at AA.
   ========================================================= */

:root {
  color-scheme: dark;
  --bg: #121315;
  --surface: #191a1e;
  --surface-2: #1f2025;
  --line: #2b2c31;
  --line-soft: #232428;
  --text: #ededef;
  --muted: #aaacb3;
  --faint: #8a8c94;
  --accent: #9d8bf7;
  --accent-hi: #7b64ea;
  --accent-lo: #6a52d9;
  --accent-rgb: 124, 100, 234;
  --glow: rgba(124, 100, 234, .38);
  --font: "Gabarito", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", Consolas, "SF Mono", Menlo, monospace;
  --fast: 160ms;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-padding-top: 76px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: inherit; }
code { font-family: var(--mono); font-size: .92em; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
main { overflow-x: clip; }

/* One gutter and one measure for the whole page. */
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 600; font-size: 15.5px; text-decoration: none;
  white-space: nowrap; cursor: pointer;
  transition: background-color var(--fast) ease, border-color var(--fast) ease, transform var(--fast) var(--ease), box-shadow 200ms ease, filter var(--fast) ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-primary:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-primary:active { filter: brightness(.97); transform: translateY(0); }
.btn-glow:hover, .btn-glow:focus-visible { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 8px 26px var(--glow); }
.btn-glow:active { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 3px 12px rgba(var(--accent-rgb), .3); }
.btn-secondary { background: transparent; border-color: var(--line); color: var(--text); }
.btn-secondary:hover { border-color: var(--faint); background: rgba(255, 255, 255, .03); }
.btn-secondary:active { background: rgba(255, 255, 255, .06); }
.btn-sm { min-height: 38px; padding: 0 15px; font-size: 14.5px; }
.linkbtn {
  background: none; border: 0; padding: 4px 2px; font: inherit; font-size: 14px;
  color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}
.linkbtn:hover { color: var(--text); }

/* ---------- navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(18, 19, 21, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; gap: 22px; height: 60px; }
.wordmark { display: inline-flex; align-items: center; text-decoration: none; }
.nav-logo { display: block; height: 22px; width: auto; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { color: var(--muted); text-decoration: none; font-size: 14.5px; padding: 8px 11px; border-radius: 6px; }
.nav-links a:hover { color: var(--text); }
/* The quiet parent-site link: text only, never louder than the product. */
.nav-by { color: var(--faint); text-decoration: none; font-size: 13.5px; white-space: nowrap; }
.nav-by b { color: var(--muted); font-weight: 600; }
.nav-by:hover, .nav-by:hover b { color: var(--text); }

/* ---------- first screen ---------- */
/* Comfortable on a short laptop: the hero is sized by its content, not by
   the viewport, and the demo fits without an inner scrollbar. */
.hero { padding: 44px 0 56px; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}
h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4.4vw, 54px);
  line-height: 1.04;
  letter-spacing: -.028em;
  font-weight: 800;
}
.lede { margin: 0 0 26px; max-width: 30em; font-size: 18px; line-height: 1.55; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.price-note { margin: 18px 0 0; font-size: 15px; color: var(--muted); }
.price-note b { color: var(--text); }
.mobile-note { display: none; margin: 8px 0 0; font-size: 14px; color: var(--faint); }

/* ---------- the demonstration ---------- */
.demo {
  display: grid;
  grid-template-columns: minmax(200px, 250px) auto;
  gap: 22px;
  align-items: start;
  justify-content: end;
}
.demo-controls { display: grid; gap: 14px; padding-top: 6px; }
.seg {
  display: inline-grid; grid-template-columns: 1fr 1fr;
  padding: 3px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface);
}
.seg-btn {
  min-height: 34px; padding: 0 12px;
  border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background-color var(--fast) ease, color var(--fast) ease;
}
.seg-btn:hover { color: var(--text); }
.seg-btn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
.styles { display: grid; gap: 6px; }
.style-chip {
  display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 12px;
  padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface);
  color: var(--text); font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--fast) ease, background-color var(--fast) ease, transform var(--fast) var(--ease);
}
.style-chip img { display: block; width: 74px; height: 13px; object-fit: cover; border-radius: 3px; }
.style-chip b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; }
.style-chip small { display: block; font-size: 12.5px; color: var(--faint); line-height: 1.3; margin-top: 2px; }
.style-chip:hover { border-color: var(--faint); }
.style-chip:active { transform: scale(.99); }
.style-chip[aria-pressed="true"] { border-color: var(--accent); background: rgba(var(--accent-rgb), .1); }
.demo-note { margin: 2px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--faint); }
.demo-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

.showcase { position: relative; isolation: isolate; margin: 0; }
.showcase::before {
  content: "";
  position: absolute; inset: -12% -18% -6%; z-index: -1;
  background: radial-gradient(closest-side, rgba(var(--accent-rgb), .22), rgba(var(--accent-rgb), .06) 60%, transparent 82%);
  pointer-events: none;
}
.showcase .fl-browser {
  width: 352px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .04), 0 0 54px rgba(var(--accent-rgb), .12);
}
.showcase .fl-list { min-height: 300px; }
figcaption { margin-top: 12px; max-width: 352px; font-size: 13px; line-height: 1.5; color: var(--faint); }

/* FL panel details specific to this page (the editor sets these inline) */
.page .fl-ico { color: #c5c5c5; }
.page .fl-ico svg { fill: currentColor; }
.page .fl-item-row { outline-offset: -2px; }
.page .fl-item-row:focus-visible { outline: 2px solid var(--accent); border-radius: 2px; }
.page .fl-footer-row .fl-ico { color: #707070; }
.page .fl-footer-row .fl-name { color: #909090; }
.page .fl-bitmap { padding-left: 22px; }
.page .is-plain .fl-name { color: #c9c9c9 !important; }

/* Motion: the artwork settles into place once; style changes crossfade.
   Under reduced motion both are instant (see the end of the file). */
.fl-list { transition: opacity 140ms ease; }
.fl-list.is-fading { opacity: 0; }
.is-settling .fl-bitmap img { animation: settle 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
.is-settling .fl-name { animation: tint 360ms ease both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes settle { from { opacity: 0; transform: translateY(5px) scale(.985); } }
@keyframes tint { from { color: #c9c9c9; } }

/* ---------- sections ---------- */
.section { padding: 84px 0; border-top: 1px solid var(--line-soft); }
h2 { margin: 0 0 14px; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -.02em; font-weight: 800; }

/* how it works: steps on the left, one changing panel on the right */
.how { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.steps { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; counter-reset: step; }
.steps li { counter-increment: step; }
.step {
  position: relative; width: 100%; display: grid; gap: 3px;
  padding: 14px 16px 14px 54px;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--surface); color: var(--text);
  font: inherit; text-align: left; cursor: pointer;
  transition: border-color var(--fast) ease, background-color var(--fast) ease;
}
.step::before {
  content: counter(step);
  position: absolute; left: 16px; top: 15px;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: var(--muted);
  border: 1px solid var(--line);
  transition: background-color var(--fast) ease, color var(--fast) ease, border-color var(--fast) ease;
}
.step b { font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.step span { font-size: 14.5px; color: var(--muted); line-height: 1.45; }
.step:hover { border-color: var(--faint); }
.step[aria-pressed="true"] { border-color: var(--accent); background: rgba(var(--accent-rgb), .08); }
.step[aria-pressed="true"]::before { background: linear-gradient(180deg, var(--accent-hi), var(--accent-lo)); color: #fff; border-color: transparent; }

.how-visual { position: relative; display: grid; justify-items: center; gap: 12px; }
.how-visual .fl-browser { width: 340px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .03); }
.how-visual .fl-list { min-height: 170px; }
.step-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface);
  font-size: 13.5px; color: var(--muted);
  font-family: var(--mono);
}
.chip-ico { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; font-size: 12px; background: rgba(var(--accent-rgb), .18); color: var(--accent); font-family: var(--font); font-weight: 700; }
.chip-ico.chip-ok { background: rgba(76, 201, 132, .16); color: #57d18f; }
.chip-swatch { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, #e4dcff, #7b64ea); }

.tech { margin-top: 26px; border-top: 1px solid var(--line-soft); }
.tech summary { padding: 14px 0; cursor: pointer; font-weight: 600; color: var(--muted); list-style: none; display: flex; align-items: center; gap: 8px; }
.tech summary::-webkit-details-marker { display: none; }
.tech summary::before { content: "▸"; font-size: 12px; color: var(--faint); transition: transform var(--fast) ease; }
.tech[open] summary::before { transform: rotate(90deg); }
.tech summary:hover { color: var(--text); }
.tech-body { padding: 0 0 8px; font-size: 15px; color: var(--muted); }
.tech-body p { margin: 0 0 12px; }
.tech-body pre {
  margin: 0 0 14px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  font: 13.5px/1.6 var(--mono); color: #d6d6d6; overflow-x: auto;
}
.nfo-file { display: block; margin-bottom: 8px; font-size: 12px; color: var(--faint); }

/* pricing: one contained card */
.price-card {
  max-width: 560px;
  padding: 32px 34px 30px;
  border: 1px solid var(--line); border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255, 255, 255, .02);
}
.price-head h2 { margin: 0 0 18px; display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.price { font-size: clamp(44px, 5vw, 56px); line-height: 1; letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.price-sub { font-size: 20px; font-weight: 600; letter-spacing: -.01em; color: var(--muted); }
.terms { list-style: none; margin: 0 0 24px; padding: 0; }
.terms li {
  position: relative; padding: 10px 0 10px 28px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted); font-size: 15.5px;
}
.terms li:last-child { border-bottom: 1px solid var(--line-soft); }
.terms li::before {
  content: ""; position: absolute; left: 3px; top: 19px;
  width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.price-actions { display: grid; gap: 14px; }
.price-actions .btn { justify-self: start; }
.checkout-note { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--faint); }

/* footer */
.footer { padding: 26px 0 40px; border-top: 1px solid var(--line-soft); font-size: 14px; color: var(--faint); }
.footer .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; }
.footer .brand { color: var(--text); font-weight: 600; }
.footer a { color: var(--muted); text-underline-offset: 3px; padding: 6px 0; }
.footer a:hover { color: var(--text); }
.footer .by { text-decoration: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0 16px; }
.footer .push { margin-left: auto; }

/* Text stand-in, used only if assets/kittheme/brand/kittheme-logo.png is missing. */
.logotype { display: inline-block; font-weight: 900; letter-spacing: -.03em; }
.logotype .kit { color: #fff; }
.logotype .theme { color: var(--accent); }
.logotype-sm { font-size: 19px; letter-spacing: -.02em; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .hero-grid { gap: 36px; }
  .demo { grid-template-columns: 1fr; justify-content: stretch; gap: 16px; }
  .demo-controls { order: 2; }
  .showcase { order: 1; justify-self: center; }
}
@media (max-width: 900px) {
  .hero { padding: 36px 0 52px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .demo { grid-template-columns: minmax(200px, 260px) auto; justify-content: start; gap: 22px; }
  .demo-controls { order: 1; }
  .showcase { order: 2; justify-self: start; }
  .how { grid-template-columns: 1fr; gap: 32px; }
  .how-visual { justify-items: start; }
}
@media (max-width: 767px) {
  .mobile-note { display: block; }
  .section { padding: 60px 0; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 20px; }
  .nav .wrap { gap: 12px; }
  .nav-links, .nav-by { display: none; }
  .nav-cta { margin-left: auto; min-height: 42px; }
  .demo { grid-template-columns: 1fr; }
  .demo-controls { order: 2; }
  .showcase { order: 1; width: 100%; }
  .showcase .fl-browser, .how-visual .fl-browser { width: 100%; }
  figcaption { max-width: none; }
  .actions .btn { flex: 1 1 auto; }
  .lede { font-size: 17px; }
  .price-card { padding: 24px 22px; }
  .price-actions .btn { justify-self: stretch; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .seg-btn, .style-chip, .step, .step::before, .fl-list, .tech summary::before { transition: none; }
  .btn-primary:hover, .btn-primary:active, .style-chip:active { transform: none; }
  .is-settling .fl-bitmap img, .is-settling .fl-name { animation: none; }
}
