/* TurboPCB website — colours follow the app icon: PCB green, copper traces, a yellow bolt. */
:root {
  --green-900: #063a26;
  --green-800: #0a4d33;
  --green-700: #10663f;
  --green-600: #1a8554;
  --copper: #ed9e38;
  --copper-dark: #b8701e;
  --bolt: #ffdb4d;
  --trace-blue: #3f8cf2;
  --trace-red: #d9544a;
  --ink: #16211c;
  --ink-soft: #4b5a53;
  --ink-faint: #8a958f;
  --paper: #ffffff;
  --paper-soft: #f4f6f4;
  --line: #e2e7e4;
  --radius: 14px;
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #e8ede9;
    --ink-soft: #b5c0b9;
    --ink-faint: #7c877f;
    --paper: #0f1512;
    --paper-soft: #161e1a;
    --line: #26322c;
  }
}
:root[data-theme="dark"] {
  --ink: #e8ede9;
  --ink-soft: #b5c0b9;
  --ink-faint: #7c877f;
  --paper: #0f1512;
  --paper-soft: #161e1a;
  --line: #26322c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-600); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; color: var(--ink); font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: 22px; align-items: center; }
.nav a { color: var(--ink-soft); font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav .btn { color: #fff; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; color: var(--ink); font: inherit; cursor: pointer; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: 10px; font-weight: 650; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: transform .12s ease, background .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--green-600); color: #fff; }
.btn-primary:hover { background: var(--green-700); }
.btn-ghost { background: transparent; border-color: color-mix(in srgb, currentColor 35%, transparent); color: inherit; }
.btn-copper { background: var(--copper); color: #1b1203; }
.btn-copper:hover { background: #f5ad52; }
.btn svg { width: 18px; height: 18px; }

/* Hero */
.hero {
  position: relative; overflow: hidden; color: #f3f7f4;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(237,158,56,.18), transparent 60%),
    linear-gradient(135deg, var(--green-700) 0%, var(--green-800) 45%, var(--green-900) 100%);
}
.hero .wrap { position: relative; padding: 72px 16px 0; }
.hero-grid > *, .split > *, .gallery > * { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: var(--bolt); }
.hero .lede { font-size: 1.22rem; color: rgba(255,255,255,.86); max-width: 34rem; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.hero .fine { color: rgba(255,255,255,.62); font-size: .9rem; }
.hero-shot { position: relative; margin-top: 10px; }
.hero-shot img {
  border-radius: 12px 12px 0 0;
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
}
.traces { position: absolute; inset: 0; pointer-events: none; opacity: .35; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--paper-soft); }
.section-head { max-width: 46rem; margin-bottom: 40px; }
.section-head p { font-size: 1.1rem; color: var(--ink-soft); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--copper-dark); margin-bottom: 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 28px 24px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); }
.step::before {
  counter-increment: step; content: counter(step);
  display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--green-600); color: #fff; font-weight: 800; margin-bottom: 14px;
}
.step p { color: var(--ink-soft); margin: 0; }

/* Feature grid */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { padding: 24px; border-radius: var(--radius); background: var(--paper); border: 1px solid var(--line); }
.feature .icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 14px; background: color-mix(in srgb, var(--green-600) 14%, transparent); color: var(--green-600); }
.feature .icon svg { width: 22px; height: 22px; }
.feature ul { margin: 0; padding-left: 18px; color: var(--ink-soft); }
.feature li { margin-bottom: 6px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr; gap: 18px; }
.gallery-main { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 20px 50px rgba(0,0,0,.12); }
.gallery-main img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; cursor: zoom-in; }
.gallery-caption { padding: 12px 16px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; display: flex; justify-content: space-between; gap: 12px; }
.gallery-thumbs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.gallery-thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: 10px; overflow: hidden; background: none; cursor: pointer;
  transition: border-color .12s ease, transform .12s ease;
}
.gallery-thumbs button img { aspect-ratio: 16 / 10; object-fit: cover; }
.gallery-thumbs button:hover { transform: translateY(-2px); }
.gallery-thumbs button[aria-selected="true"] { border-color: var(--copper); }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; background: rgba(5,12,8,.9); padding: 24px; }
.lightbox[open] { display: grid; }
.lightbox img { max-width: min(96vw, 1600px); max-height: 90vh; border-radius: 10px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.lightbox button { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 22px; cursor: pointer; }

/* Single-sided section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split .board-art { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #cfd7d0; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-left: 30px; margin-bottom: 12px; color: var(--ink-soft); }
.checks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 18px; height: 18px; border-radius: 50%; background: var(--green-600); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 60% no-repeat, linear-gradient(#000 0 0); mask-composite: exclude; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 60% no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; }
.checks strong { color: var(--ink); }

/* Output formats */
.formats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.format { padding: 20px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.format code { font-family: var(--mono); font-size: .85rem; color: var(--copper-dark); }
.format p { margin: 6px 0 0; color: var(--ink-soft); font-size: .95rem; }

/* FAQ */
.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 6px 0; }
.faq summary { cursor: pointer; font-weight: 650; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--ink-faint); transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0 0 14px; }

/* CTA band */
.cta { background: linear-gradient(135deg, var(--green-800), var(--green-900)); color: #fff; text-align: center; padding: 72px 0; }
.cta h2 { color: #fff; }
.cta p { color: rgba(255,255,255,.8); max-width: 38rem; margin: 0 auto 24px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0; color: var(--ink-soft); font-size: .92rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-soft); }

/* Document pages (privacy, support) */
.doc { max-width: 44rem; padding: 56px 16px 80px; margin: 0 auto; }
.doc h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 6px; }
.doc .meta { color: var(--ink-faint); margin-bottom: 32px; }
.doc h2 { font-size: 1.35rem; margin-top: 36px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc .note { padding: 14px 18px; border-left: 4px solid var(--copper); background: var(--paper-soft); border-radius: 0 10px 10px 0; }
.doc kbd { font-family: var(--font); font-size: .85em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--paper-soft); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .split { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 48px; }
  .steps, .features { grid-template-columns: 1fr 1fr; }
  .formats { grid-template-columns: 1fr 1fr; }
  .gallery-thumbs { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .steps, .features, .formats { grid-template-columns: 1fr; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; }
  .nav .btn { margin-top: 8px; justify-content: center; }
  .nav-toggle { display: inline-block; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .gallery-thumbs button { transition: none; }
}
