/* M TECH — shared styles for all pages */
:root {
  --bg: #0b0a08;
  --bg-2: #110f0c;
  --surface: rgba(255, 236, 200, 0.035);
  --surface-solid: #15120e;
  --ink: #f2ede4;
  --muted: #a69d8f;
  --dim: #716859;
  --line: rgba(214, 182, 128, 0.14);
  --line-strong: rgba(214, 182, 128, 0.30);
  --accent: #d9b066;        /* champagne gold (metal) */
  --accent-2: #a9773d;      /* bronze / earth */
  --silver: #c9cdd3;        /* brushed silver (metal) */
  --sand: #b89a72;          /* sand (earth) */
  --accent-soft: rgba(217, 176, 102, 0.08);
  --metal: linear-gradient(100deg, #f6e4b8 0%, #d9b066 35%, #a9773d 65%, #e9cf96 100%);
  --keepjot: #ff7a3d;       /* KeepJot brand orange */
  --keepjot-soft: rgba(255, 122, 61, 0.10);
  --radius: 14px;
  --max: 1120px;
  --font: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(169, 119, 61, 0.16), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(217, 176, 102, 0.10), transparent 60%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* subtle blueprint grid */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, #000 0%, transparent 70%);
  opacity: 0.55;
  pointer-events: none;
  z-index: -1;
}
a { color: var(--accent); text-decoration-color: rgba(217, 176, 102, 0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
img { max-width: 100%; }
::selection { background: rgba(217, 176, 102, 0.3); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 10, 8, 0.74);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--ink); text-decoration: none; letter-spacing: 0.08em; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--metal);
  color: #1c1407; display: grid; place-items: center;
  font-family: var(--mono); font-size: 15px; font-weight: 800; letter-spacing: 0;
  box-shadow: 0 0 18px rgba(217, 176, 102, 0.35);
}
.nav { display: flex; gap: 22px; flex-wrap: wrap; }
.nav a { color: var(--muted); text-decoration: none; font-size: 14px; font-family: var(--mono); letter-spacing: 0.02em; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* Hero */
.hero { padding: 96px 0 64px; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); border: 1px solid rgba(217, 176, 102, 0.3); background: var(--accent-soft);
  padding: 5px 12px; border-radius: 999px;
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.035em; margin: 22px 0 18px; font-weight: 700; }
.grad { background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; }
.grad-kj { background: linear-gradient(100deg, #ffb07a 0%, var(--keepjot) 55%, #ff4f6d 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(18px, 2.3vw, 21px); color: var(--muted); max-width: 660px; margin: 0; }
.hero p.lead strong { color: var(--ink); }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  border: 1px solid var(--line-strong); color: var(--ink); background: var(--surface);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--metal); color: #1c1407; border-color: transparent; box-shadow: 0 0 24px rgba(217, 176, 102, 0.28); }
.btn.primary:hover { box-shadow: 0 0 32px rgba(217, 176, 102, 0.45); }
.btn.keepjot { background: linear-gradient(135deg, #ff9a5c, var(--keepjot)); color: #1a0a02; border-color: transparent; box-shadow: 0 0 24px rgba(255, 122, 61, 0.3); }
.btn .arrow { font-family: var(--mono); }

/* Stats strip */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 56px; background: var(--surface); }
.stat { padding: 20px 22px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .k { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: 0.1em; text-transform: uppercase; }
.stat .v { font-size: 20px; font-weight: 600; margin-top: 4px; }
@media (max-width: 620px) { .stat { border-right: 0; border-bottom: 1px solid var(--line); } .stat:last-child { border-bottom: 0; } }

/* Sections */
section { padding: 48px 0; }
.label { font-family: var(--mono); font-size: 12px; color: var(--accent); letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; }
h2 { font-size: clamp(28px, 3.8vw, 40px); letter-spacing: -0.025em; line-height: 1.15; margin: 0 0 12px; font-weight: 700; }
h3 { font-size: 19px; margin: 0 0 6px; letter-spacing: -0.01em; font-weight: 600; }
.section-lead { color: var(--muted); margin: 0 0 32px; max-width: 660px; }

/* Product cards (home page) */
.products { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.product-card {
  position: relative; display: flex; flex-direction: column; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; text-decoration: none; color: var(--ink); overflow: hidden;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.product-card::after { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at 100% 0%, var(--glow, rgba(217,176,102,.12)), transparent 70%); pointer-events: none; }
.product-card:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.product-card .top { display: flex; align-items: center; justify-content: space-between; }
.product-card .icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; font-family: var(--mono); }
.tag { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-strong); color: var(--muted); }
.tag.live { color: #f1d79c; border-color: rgba(217, 176, 102, 0.35); background: rgba(217, 176, 102, 0.06); }
.product-card p { margin: 0; color: var(--muted); }
.product-card .meta { font-family: var(--mono); font-size: 13px; color: var(--dim); margin-top: auto; }
.product-card .more { font-weight: 600; color: var(--accent); font-size: 15px; }
.product-card.placeholder { border-style: dashed; background: transparent; justify-content: center; align-items: center; color: var(--dim); cursor: default; min-height: 220px; font-family: var(--mono); font-size: 14px; }
.product-card.placeholder::after { display: none; }
.product-card.placeholder:hover { transform: none; box-shadow: none; border-color: var(--line); }

/* Principles grid */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.grid-3 > div { background: var(--bg-2); padding: 26px; }
.grid-3 .idx { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.grid-3 h3 { margin-top: 10px; }
.grid-3 p { margin: 0; color: var(--muted); font-size: 16px; }

/* Feature grid (product page) */
.features { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: border-color .2s; }
.feature:hover { border-color: rgba(255, 122, 61, 0.4); }
.feature .emoji { font-size: 24px; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: var(--keepjot-soft); border: 1px solid rgba(255,122,61,.25); margin-bottom: 14px; }
.feature p { margin: 0; color: var(--muted); font-size: 16px; }

/* Voice demo / terminal card */
.term { font-family: var(--mono); font-size: 14px; background: #0b0a08; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; max-width: 560px; margin-top: 40px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.term .bar { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.term .bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3328; }
.term .body { padding: 16px 18px; line-height: 1.8; }
.term .say { color: var(--ink); }
.term .say::before { content: "🎙  "; }
.term .out { color: #f1d79c; }
.term .out::before { content: "→ "; color: var(--dim); }
.term .k { color: var(--dim); }

.callout { background: var(--keepjot-soft); border: 1px solid rgba(255,122,61,.25); border-radius: var(--radius); padding: 28px; }
.callout.green { background: var(--accent-soft); border-color: rgba(217, 176, 102, 0.22); }
.callout p { margin: 8px 0 0; }

.links-row { display: flex; gap: 10px; flex-wrap: wrap; }
.links-row a { padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: 8px; text-decoration: none; color: var(--ink); background: var(--surface); font-size: 14px; font-family: var(--mono); }
.links-row a:hover { border-color: var(--accent); color: var(--accent); }

/* Legal / long-form pages */
.doc { max-width: 780px; padding: 56px 0 64px; }
.doc h1 { font-size: clamp(32px, 5vw, 46px); letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 10px; }
.doc .updated { color: var(--dim); margin: 0 0 32px; font-size: 13px; font-family: var(--mono); }
.doc h2 { font-size: 23px; margin: 44px 0 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: #cfc7b9; }
.doc strong { color: var(--ink); }
.doc li { margin: 6px 0; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 14px 0; display: block; overflow-x: auto; }
.doc th, .doc td { text-align: left; border: 1px solid var(--line); padding: 10px 12px; vertical-align: top; }
.doc th { background: var(--surface-solid); font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.doc .summary { background: var(--accent-soft); border: 1px solid rgba(217, 176, 102, 0.22); border-radius: var(--radius); padding: 20px 24px; }
.doc .summary ul { margin: 8px 0 0; padding-left: 20px; }
.toc { font-size: 15px; columns: 2; column-gap: 32px; padding-left: 20px; }
.toc a { text-decoration: none; }
@media (max-width: 560px) { .toc { columns: 1; } }

/* FAQ */
details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 10px 0; transition: border-color .15s; }
details[open] { border-color: var(--line-strong); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-family: var(--mono); color: var(--accent); }
details[open] summary::after { content: "−"; }
details p, details ul { color: var(--muted); margin: 10px 0 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 56px; padding: 32px 0 44px; color: var(--dim); font-size: 13px; font-family: var(--mono); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* Brand sub-name + metal accents */
.brand .sub { display: block; font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: 0.16em; color: var(--dim); text-transform: uppercase; margin-top: 1px; }
.brand .name { line-height: 1.15; }
.hero h1 .silver { background: linear-gradient(180deg, #ffffff 0%, var(--silver) 60%, #8e939a 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .v, .grid-3 .idx { color: var(--ink); }
.grid-3 .idx { background: var(--metal); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 700; }
.hero::after { content: ""; position: absolute; right: -40px; top: 60px; width: 340px; height: 340px; border-radius: 50%; border: 1px solid var(--line-strong); box-shadow: inset 0 0 80px rgba(217,176,102,.08), 0 0 120px rgba(217,176,102,.06); pointer-events: none; z-index: -1; }
.hero::before { content: ""; position: absolute; right: 50px; top: 150px; width: 160px; height: 160px; border: 1px solid var(--line); transform: rotate(45deg); pointer-events: none; z-index: -1; }
@media (max-width: 760px) { .hero::after, .hero::before { display: none; } }
