/* GCodeEdit — marketing site
   Hand-written, no build step, no external requests. */

:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --bg-sunken: #eaeef3;
  --surface: #ffffff;
  --border: #d8dee6;
  --text: #171c23;
  --text-muted: #566372;
  --accent: #0a6c86;
  --accent-strong: #075063;
  --accent-soft: #e2f2f7;
  --warn-bg: #fdf4e3;
  --warn-border: #e6c980;
  --warn-text: #6b4d0e;

  --maxw: 1120px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 32, .06), 0 8px 24px rgba(16, 24, 32, .08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1116;
    --bg-alt: #141922;
    --bg-sunken: #1a212b;
    --surface: #161c25;
    --border: #2a3543;
    --text: #e8edf4;
    --text-muted: #9aa8b8;
    --accent: #3fc9e8;
    --accent-strong: #7adcf3;
    --accent-soft: #10303a;
    --warn-bg: #2a2214;
    --warn-border: #6b5622;
    --warn-text: #e8cf94;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 28px rgba(0, 0, 0, .45);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--accent-strong); }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: .6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: 1.25rem; }

section { padding-block: clamp(3rem, 7vw, 5.5rem); }
section + section { border-top: 1px solid var(--border); }
.band { background: var(--bg-alt); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin-top: 0; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); margin-bottom: .6rem; }
h3 { font-size: 1.12rem; margin-bottom: .35rem; letter-spacing: -.01em; }
.lede { font-size: 1.1rem; color: var(--text-muted); max-width: 68ch; margin-top: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 60px;
}
.brand {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-weight: 650;
  letter-spacing: -.02em;
  color: var(--text);
  text-decoration: none;
}
.brand img { width: 28px; height: 28px; border-radius: 6px; }
.site-nav { margin-left: auto; display: flex; gap: 1.25rem; align-items: center; }
.site-nav a { color: var(--text-muted); text-decoration: none; font-size: .95rem; }
.site-nav a:hover { color: var(--text); }
@media (max-width: 720px) { .site-nav .opt { display: none; } }

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 5vw, 3.5rem); }
.hero-grid { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 3rem; } }

.hero h1 { font-size: clamp(2rem, 5vw, 3.05rem); margin-bottom: .75rem; }
.hero p.sub { font-size: 1.16rem; color: var(--text-muted); margin: 0 0 1.5rem; max-width: 52ch; }

.eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: .3rem .75rem;
  margin-bottom: 1rem;
}

.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.badge-link { display: inline-block; line-height: 0; border-radius: 8px; }
.badge-link img { width: 220px; }
.price-note { font-size: .95rem; color: var(--text-muted); }
.price-note strong { color: var(--text); font-size: 1.05rem; }

.hero-shot {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  background: var(--bg-sunken);
}

/* ---------- generic bits ---------- */

.cards { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .cards.three { grid-template-columns: repeat(3, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.card p { margin: 0; color: var(--text-muted); font-size: .97rem; }

.split { display: grid; gap: 1.5rem; }
@media (min-width: 820px) { .split { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }

.tick, .cross { list-style: none; padding: 0; margin: 0; }
.tick li, .cross li { position: relative; padding-left: 1.75rem; margin-bottom: .6rem; }
.tick li::before, .cross li::before {
  position: absolute; left: 0; top: -.02em; font-weight: 700;
}
.tick li::before { content: "✓"; color: var(--accent); }
.cross li::before { content: "✕"; color: #c0553f; }
@media (prefers-color-scheme: dark) { .cross li::before { color: #e08a72; } }

/* ---------- feature rows ---------- */

.feature { display: grid; gap: 1.5rem; align-items: center; margin-top: 3rem; }
.feature:first-of-type { margin-top: 2rem; }
@media (min-width: 900px) {
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 3rem; }
  .feature.flip .feature-text { order: 2; }
}
.feature figure { margin: 0; }
.feature img {
  border-radius: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: zoom-in;
  width: 100%;
}
.feature h3 { font-size: 1.4rem; letter-spacing: -.02em; }
.feature p { color: var(--text-muted); margin-top: 0; }

/* ---------- spec tables ---------- */

.table-scroll { overflow-x: auto; margin-top: 1.5rem; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 460px; }
th, td { text-align: left; padding: .7rem .9rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 650; color: var(--text); }
td { color: var(--text-muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

code {
  font-family: var(--mono);
  font-size: .89em;
  background: var(--bg-sunken);
  border-radius: 4px;
  padding: .12em .38em;
}

/* ---------- faq ---------- */

.faq { margin-top: 1.75rem; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  padding: 1.05rem 2rem 1.05rem 0;
  font-weight: 600;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-weight: 400; font-size: 1.5rem; color: var(--text-muted); line-height: 1;
}
.faq details[open] summary::after { content: "−"; }
.faq .answer { padding-bottom: 1.1rem; margin: 0; color: var(--text-muted); max-width: 72ch; }
.faq .answer + .answer { margin-top: -.4rem; padding-top: 0; }

/* ---------- notice ---------- */

.notice {
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  color: var(--warn-text);
  border-radius: var(--radius);
  padding: 1.15rem 1.35rem;
  margin-top: 2rem;
  font-size: .95rem;
}
.notice strong { color: inherit; }
.notice p { margin: 0; }
.notice p + p { margin-top: .6rem; }

/* ---------- legal blocks ---------- */

.legal { max-width: 74ch; }
.legal h3 { margin-top: 1.75rem; }
.legal p, .legal li { color: var(--text-muted); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding-block: 2.5rem;
  font-size: .92rem;
  color: var(--text-muted);
}
.footer-grid { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; }
.footer-grid nav { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-left: auto; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--text); }

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 2rem 1rem;
  background: rgba(8, 11, 15, .9);
}
.lightbox[open], .lightbox.is-open { display: grid; }
.lightbox img {
  max-width: min(1400px, 96vw);
  max-height: 90vh;
  width: auto;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.lightbox-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 44px; height: 44px;
  font-size: 1.6rem; line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 8px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .22); }
.lightbox-caption {
  position: absolute;
  bottom: 1rem; left: 50%; transform: translateX(-50%);
  color: #d6dee8; font-size: .9rem; text-align: center;
  max-width: 90vw; margin: 0;
}
