/* ---------------------------------------------------------------------------
   K-MeleonCCF landing page styles.
   Single file, no build step. Modern dark scheme with a warm K-Meleon orange
   as the accent (echoes the gesture-trail color in the app).
--------------------------------------------------------------------------- */

:root {
  --bg:        #0f1115;
  --bg-elev:   #161922;
  --bg-card:   #1c1f2a;
  --line:      #262a36;
  --line-soft: #1f232e;
  --text:      #e8eaf0;
  --text-dim:  #9aa0ad;
  --text-mute: #6b7180;

  --brand:     #ff6a00;          /* K-Meleon orange */
  --brand-2:   #ff8a3a;
  --brand-soft:#ff6a0010;

  --accent-2:  #6aa9ff;          /* link blue, used sparingly */

  --radius-s:  6px;
  --radius:    10px;
  --radius-l:  14px;

  --maxw:      1180px;

  /* syntax-highlight palette for the code snippets */
  --hl-comment:#6b7180;
  --hl-key:    #c792ea;
  --hl-fn:     #82aaff;
  --hl-method: #ffcb6b;
  --hl-str:    #c3e88d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--text); text-decoration: none; }
a:hover { color: var(--brand-2); }
code { font-family: 'JetBrains Mono', Consolas, ui-monospace, monospace; font-size: 0.92em; }

/* ---------- Nav --------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 17, 21, 0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-radius: 7px;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 14px -4px var(--brand);
}
.brand-name { font-size: 17px; letter-spacing: -0.01em; }
.brand-name-accent { color: var(--brand); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  font-size: 14px;
  color: var(--text-dim);
  font-weight: 500;
}
.nav-links a:hover { color: var(--text); }
.nav-cta {
  background: var(--brand);
  color: #fff !important;
  padding: 8px 16px;
  border-radius: var(--radius-s);
  font-weight: 600 !important;
}
.nav-cta:hover { background: var(--brand-2); color: #fff !important; }

@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

/* ---------- Hero -------------------------------------------------------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-inner h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 16px 0 22px;
  font-weight: 800;
}
.hero-inner h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  display: inline-block;
  padding: 5px 12px;
  background: var(--brand-soft);
  color: var(--brand-2);
  border: 1px solid #ff6a0030;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lede {
  color: var(--text-dim);
  font-size: 1.08rem;
  max-width: 520px;
  margin: 0 0 32px;
}

.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 28px; }
.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  padding: 13px 22px;
  border-radius: var(--radius-s);
  font-weight: 600;
  font-size: 15px;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 30px -10px var(--brand);
}
.btn-primary:hover { background: var(--brand-2); color: #fff; }
.btn-meta { opacity: .8; font-weight: 400; font-size: 12px; }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--brand); color: var(--text); }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  color: var(--text-mute);
  font-size: 13px;
}
.hero-meta strong { color: var(--text-dim); font-weight: 600; }
.dot { width: 3px; height: 3px; border-radius: 50%; background: var(--text-mute); }

/* hero "browser window" mock-up */
.hero-window {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8),
              0 0 0 1px rgba(255, 106, 0, .08);
}
.hero-window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  background: #1a1d27;
  border-bottom: 1px solid var(--line-soft);
}
.hw-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dot-r { background: #ff5f56; }
.dot-y { background: #ffbd2e; }
.dot-g { background: #27c93f; }
.hw-tabs { display: flex; gap: 4px; margin-left: 18px; }
.hw-tab {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 6px;
  color: var(--text-mute);
}
.hw-tab-active {
  background: var(--bg-card);
  color: var(--text);
  border-top: 2px solid var(--brand);
  padding-top: 2px;
}
.hero-window-url {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  font-size: 12.5px;
  background: #14171f;
  color: var(--text-mute);
  border-bottom: 1px solid var(--line-soft);
}
.hw-lock { font-size: 11px; opacity: .8; }
.hw-url { font-family: 'JetBrains Mono', monospace; color: var(--text-dim); }
.hero-window-body { padding: 22px 24px 24px; }
.hw-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}
.hw-c { color: var(--hl-comment); }
.hw-k { color: var(--hl-key); }
.hw-f { color: var(--hl-fn); }
.hw-m { color: var(--hl-method); }
.hw-s { color: var(--hl-str); }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; gap: 50px; }
  .hero-window { order: 2; }
}

/* ---------- Stats ------------------------------------------------------- */
.stats {
  max-width: var(--maxw);
  margin: 0 auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.stat {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 22px 24px;
  text-align: left;
}
.stat-n {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1;
}
.stat-u { color: var(--brand); font-weight: 700; font-size: 0.7em; }
.stat-l { margin-top: 8px; color: var(--text-mute); font-size: 13px; line-height: 1.4; }
@media (max-width: 720px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Section header (shared) ------------------------------------ */
.section-header { max-width: 680px; margin: 0 auto 40px; text-align: center; }
.section-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  margin: 14px 0 14px;
  letter-spacing: -0.02em;
  font-weight: 700;
  line-height: 1.15;
}
.section-header p { color: var(--text-dim); margin: 0; }
.section-eyebrow {
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- Features ---------------------------------------------------- */
.features { max-width: var(--maxw); margin: 0 auto; padding: 80px 24px; }
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.feature {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color .18s ease, transform .18s ease;
}
.feature:hover { border-color: var(--brand); transform: translateY(-2px); }
.feature-icon {
  font-size: 22px;
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--brand-soft);
  border-radius: 9px;
  margin-bottom: 16px;
}
.feature h3 {
  font-size: 1.02rem;
  margin: 0 0 8px;
  font-weight: 600;
}
.feature p {
  margin: 0;
  color: var(--text-mute);
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 980px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .feature-grid { grid-template-columns: 1fr; } }

/* ---------- Split sections (agent / scripting) ------------------------- */
.split {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.split-reverse .split-text { order: 2; }
.split-reverse .split-visual { order: 1; }
.split-text h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -0.02em;
  font-weight: 700;
  margin: 14px 0 18px;
  line-height: 1.1;
}
.split-text p { color: var(--text-dim); margin: 0 0 22px; }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li {
  position: relative;
  padding: 9px 0 9px 28px;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line-soft);
}
.check-list li:last-child { border-bottom: none; }
.check-list li::before {
  content: "✓";
  position: absolute;
  left: 0; top: 9px;
  color: var(--brand);
  font-weight: 700;
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 40px; padding: 60px 24px; }
  .split-reverse .split-text { order: 1; }
  .split-reverse .split-visual { order: 2; }
}

/* chat panel mock */
.chat {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  font-size: 14px;
}
.chat-bar {
  background: #1a1d27;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-weight: 600;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.chat-status { color: var(--brand); font-weight: 500; }
.chat-msg {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line-soft);
  line-height: 1.55;
  color: var(--text-dim);
}
.chat-msg:last-child { border-bottom: none; }
.chat-role {
  display: inline-block;
  font-weight: 700;
  margin-right: 8px;
  font-size: 12px;
}
.chat-role-agent { color: var(--brand-2); }
.chat-role-you   { color: var(--accent-2); }
.chat-msg-action {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  color: var(--text-mute);
  padding-left: 24px;
}
.chat-msg-action code {
  background: var(--bg-elev);
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--text-dim);
}
.chat strong { color: var(--text); }
.chat em { color: var(--text-mute); font-style: italic; }

/* code panel mock */
.code {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.code-bar {
  background: #1a1d27;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.code-name { font-family: 'JetBrains Mono', monospace; color: var(--text-dim); }
.code-saved { color: var(--brand); font-weight: 600; font-size: 11px; }
.code-body {
  padding: 18px 22px;
  margin: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
}

/* ---------- Download ---------------------------------------------------- */
.download { max-width: var(--maxw); margin: 0 auto; padding: 100px 24px; }
.download-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
}
.download-card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px;
  transition: border-color .18s, transform .18s;
}
.download-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.dl-arch {
  color: var(--text-mute);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
}
.dl-version {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 8px 0 4px;
  letter-spacing: -0.01em;
}
.dl-meta { font-size: 13px; color: var(--text-mute); }
.dl-sha {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--text-mute);
  margin-top: 6px;
  word-break: break-all;
}
.download-card-ghost { background: transparent; }
@media (max-width: 680px) { .download-grid { grid-template-columns: 1fr; } }

.sysreq {
  max-width: 720px;
  margin: 60px auto 0;
  padding: 26px 28px;
  background: var(--bg-elev);
  border-radius: var(--radius);
  border: 1px solid var(--line-soft);
}
.sysreq h3 { margin: 0 0 12px; font-size: 1rem; font-weight: 600; }
.sysreq ul {
  margin: 0;
  padding-left: 20px;
  color: var(--text-dim);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- Footer ------------------------------------------------------ */
.footer {
  background: #0b0d12;
  border-top: 1px solid var(--line-soft);
  margin-top: 60px;
  padding: 60px 0 26px;
  font-size: 14px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
}
.footer-tag {
  color: var(--text-mute);
  font-size: 13px;
  margin: 14px 0 0;
  max-width: 280px;
  line-height: 1.5;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}
.footer-cols h4 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.footer-cols a {
  display: block;
  color: var(--text-dim);
  padding: 4px 0;
  font-size: 14px;
}
.footer-cols a:hover { color: var(--brand-2); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 50px auto 0;
  padding: 22px 24px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--text-mute);
  font-size: 12.5px;
  text-align: center;
  line-height: 1.6;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-cols { grid-template-columns: repeat(3, 1fr); }
}
