/* Kartech download site. Same marks as the app: near-black surfaces, lime for the one action (download),
   violet for what AI does; section numbers sit on a drafted dimension line, as on the logo. */
:root {
  --bg: #0a0b0d; --surface: #121417; --surface-2: #1a1d21; --text: #eceef1; --muted: #979ea9; --faint: #6b727d;
  --border: #22262c; --border-strong: #363c45; --accent: #c8f04f; --accent-hover: #d9f77e; --accent-ink: #10140a;
  --ai: #a594ff; --ai-soft: rgba(165, 148, 255, .14); --ai-line: rgba(165, 148, 255, .38);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; scrollbar-color: #2e333b transparent; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.65 "IBM Plex Sans Thai", "Leelawadee UI", "Noto Sans Thai", Tahoma, system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(200, 240, 79, .28); }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 820px; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }

/* ---------- Buttons and tags ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 12px; border: 1px solid transparent; background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: var(--accent-hover); }
.btn:active { transform: translateY(1px); }
.btn--lg { height: 54px; padding: 0 26px; font-size: 1.05rem; border-radius: 14px; }
.btn--sm { height: 38px; padding: 0 16px; font-size: .9rem; border-radius: 10px; }
.btn--ghost { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--ghost:hover { background: var(--surface-2); border-color: #4a525d; }
.btn small { font-weight: 500; opacity: .75; font-size: .82em; }
.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 7px; border: 1px solid var(--border-strong); font-size: .72rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.tag--ai { background: var(--ai-soft); border-color: var(--ai-line); color: var(--ai); letter-spacing: .08em; }

/* ---------- Top bar ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(10, 11, 13, .86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; flex: none; }
.brand span { display: grid; line-height: 1.2; }
.brand b { font-size: 1.05rem; font-weight: 700; }
.brand small { font-size: .66rem; letter-spacing: .08em; color: var(--muted); }
.nav-links { display: flex; gap: 24px; margin-left: auto; font-size: .92rem; }
.nav-links a { color: var(--muted); text-decoration: none; transition: color .15s; }
.nav-links a:hover { color: var(--text); }

/* ---------- Hero: a drafting sheet ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--border);
  background:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px) 0 0 / 40px 40px,
    radial-gradient(900px 420px at 85% -10%, rgba(165, 148, 255, .14), transparent 62%),
    radial-gradient(760px 380px at 0% 110%, rgba(200, 240, 79, .08), transparent 62%), var(--bg); }
.hero-in { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); gap: 48px; align-items: center; padding-top: 72px; padding-bottom: 80px; }
.eyebrow { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
h1 { font-size: clamp(2rem, 4.1vw, 3.15rem); line-height: 1.22; font-weight: 700; letter-spacing: -.01em; }
h1 em { font-style: normal; color: var(--accent); }
.lede { margin-top: 18px; color: var(--muted); font-size: 1.08rem; max-width: 56ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-meta { margin-top: 16px; font-size: .86rem; color: var(--faint); font-variant-numeric: tabular-nums; }

/* A screenshot in a window frame */
.shot { margin: 0; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: var(--surface); box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.shot img { width: 100%; }
.shot-bar { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; background: #0d0e11; border-bottom: 1px solid var(--border); }
.shot-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2c313a; }
.shot-bar span { margin-left: 8px; font-size: .74rem; color: var(--faint); }
.shot figcaption { padding: 12px 16px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--muted); }
.shot figcaption b { color: var(--text); font-weight: 600; margin-right: 10px; }
.shot--hero { transform: perspective(1600px) rotateY(-5deg) rotateX(1.5deg); transform-origin: left center; }

/* ---------- Sections ---------- */
.sec { padding: 84px 0; }
.sec--alt { background: #0d0e11; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.sec-head { max-width: 720px; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); line-height: 1.3; font-weight: 700; }
.sec-head > p:last-child { margin-top: 10px; color: var(--muted); }
/* The section number on a dimension line with the architect's 45° ticks */
.dim { position: relative; display: flex; align-items: center; width: 132px; height: 22px; margin-bottom: 16px; color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .1em; }
.dim::before { content: ""; position: absolute; inset: 50% 0 auto 0; height: 1px; background: currentColor; opacity: .55; }
.dim::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(135deg, transparent 46%, currentColor 46%, currentColor 54%, transparent 54%) left center / 14px 14px no-repeat,
  linear-gradient(135deg, transparent 46%, currentColor 46%, currentColor 54%, transparent 54%) right center / 14px 14px no-repeat; }
.dim span { position: relative; z-index: 1; margin: 0 auto; padding: 0 10px; background: var(--bg); }
.sec--alt .dim span { background: #0d0e11; }

.grid { display: grid; gap: 18px; }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid--2 .shot { box-shadow: 0 16px 44px rgba(0, 0, 0, .4); }
.card { padding: 24px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); transition: border-color .15s; }
.card:hover { border-color: var(--border-strong); }
.card h3 { margin: 16px 0 8px; font-size: 1.08rem; font-weight: 600; }
.card p { color: var(--muted); font-size: .95rem; }
.ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--accent); }
.ico--ai { background: var(--ai-soft); border-color: var(--ai-line); color: var(--ai); }

.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; counter-reset: none; }
.flow li { position: relative; display: grid; gap: 6px; align-content: start; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.flow i { font-style: normal; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--bg); border: 1px solid var(--border-strong); color: var(--accent); font-weight: 700; font-size: .85rem; margin-bottom: 6px; }
.flow b { font-weight: 600; }
.flow span { color: var(--muted); font-size: .88rem; line-height: 1.55; }

/* ---------- Download ---------- */
.dl { padding: 32px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong); }
.dl-main { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 24px; align-items: center; }
.dl-main img { border-radius: 22px; }
.dl-main h2 { font-size: clamp(1.3rem, 2.2vw, 1.7rem); line-height: 1.3; }
.dl-ver { margin-top: 6px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dl-note { margin-top: 18px; padding: 12px 16px; border-radius: 12px; background: #2b2410; border: 1px solid #5a4a16; color: #f0d47a; font-size: .9rem; }
.dl-cols { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 36px; margin-top: 30px; padding-top: 28px; border-top: 1px solid var(--border); }
.dl-cols h3 { font-size: .95rem; font-weight: 600; margin: 0 0 10px; }
.dl-cols h3:not(:first-child) { margin-top: 22px; }
.steps, .list { margin: 0; padding-left: 22px; display: grid; gap: 8px; color: var(--muted); font-size: .93rem; }
.steps b { color: var(--text); font-weight: 600; }
.hash { color: var(--muted); font-size: .84rem; }
.hash code { display: block; margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border); color: var(--text); font: .78rem/1.5 ui-monospace, Consolas, monospace; word-break: break-all; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.faq details[open] { border-color: var(--border-strong); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--border-strong); color: var(--accent); font-weight: 500; }
.faq details[open] summary::after { content: "–"; }
.faq p { padding: 0 20px 18px; color: var(--muted); font-size: .95rem; }

/* ---------- The not-found page ---------- */
.lost { min-height: 100vh; display: grid; place-content: center; justify-items: center; gap: 16px; padding: 32px 24px; text-align: center; }
.lost img { border-radius: 22px; margin-bottom: 8px; }
.lost .dim { margin: 0; }
.lost .lede { margin: 0 0 12px; }

/* ---------- Foot ---------- */
.foot { border-top: 1px solid var(--border); padding: 28px 0; }
.foot-in { display: flex; align-items: center; gap: 24px; }
.foot p { flex: 1; color: var(--faint); font-size: .84rem; }

@media (max-width: 1023px) {
  .hero-in { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 36px; }
  .shot--hero { transform: none; }
  .grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dl-main { grid-template-columns: auto minmax(0, 1fr); }
  .dl-main .btn { grid-column: 1 / -1; }
  .dl-cols { grid-template-columns: 1fr; gap: 8px; }
  .nav-links { display: none; }
  .nav-in { justify-content: space-between; }
}
@media (max-width: 680px) {
  .wrap { padding: 0 16px; }
  .sec { padding: 56px 0; }
  .grid--3, .grid--2, .flow { grid-template-columns: 1fr; }
  .hero-cta .btn { width: 100%; }
  .dl { padding: 20px; }
  .dl-main img { width: 64px; height: 64px; border-radius: 15px; }
  .foot-in { flex-direction: column; align-items: flex-start; gap: 14px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
