/* GetLaserQuote — clean flat theme
   Palette: white #FFFFFF · alt #F7F7F5 · line #E5E7EB
            accent red #C40C0C · text #16181D · muted #55606B */

:root {
  --bg: #FFFFFF;
  --bg-alt: #F7F7F5;
  --line: #E5E7EB;
  --accent: #C40C0C;
  --accent-dark: #A30A0A;
  --accent-tint: #FDF2F2;
  --text: #16181D;
  --muted: #55606B;
  --sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --maxw: 1080px;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  
}
::selection { background: var(--accent); color: #fff; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.mono { font-family: var(--mono); }
a { color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* ---------- header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: var(--maxw); margin: 0 auto; padding: 1.1rem 1.25rem;
}
.brand { display: flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent);
}
.brand-name { font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand-name em { font-style: normal; color: var(--accent); }
.brand-name.small { font-size: 1rem; }
.site-nav { display: flex; gap: 1.5rem; align-items: center; }
.site-nav a { text-decoration: none; font-size: 0.92rem; color: var(--muted); transition: color 0.18s ease; }
.site-nav a:hover { color: var(--text); }
.site-nav .nav-cta { color: var(--accent); font-weight: 600; }

/* ---------- hero ---------- */
.hero { padding: 4.5rem 1.25rem 4rem; text-align: center; }
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); font-weight: 800; margin-bottom: 1.1rem; }
.hero h1 .accent { color: var(--accent); }
.hero-sub { color: var(--muted); font-size: 1.08rem; max-width: 52ch; margin: 0 auto 2rem; }
.hero-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.6rem;
  margin-top: 1.6rem;
  list-style: none;
  color: var(--muted); font-size: 0.9rem;
}
.hero-trust li { display: flex; align-items: center; gap: 0.45rem; }
.hero-trust svg { color: var(--accent); flex-shrink: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-weight: 600; font-size: 1rem;
  padding: 0.8rem 1.8rem; border-radius: 8px;
  text-decoration: none; border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--line); color: var(--text); background: var(--bg); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- sections ---------- */
section { padding: 3.5rem 1.25rem; }
.section-head { max-width: var(--maxw); margin: 0 auto 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 0.4rem; }
.section-head p { color: var(--muted); }

/* ---------- calculator ---------- */
.calc { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.calc-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem;
  align-items: start;
}
.calc-file, .calc-params {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.mode-tabs { display: flex; gap: 0.5rem; margin-bottom: 1.2rem; }
.mode-tab {
  font-family: inherit; font-size: 0.88rem; font-weight: 600;
  background: none; border: 1px solid var(--line); color: var(--muted);
  padding: 0.5rem 1rem; border-radius: 7px; cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}
.mode-tab:hover { color: var(--text); }
.mode-tab.active { color: var(--accent); border-color: var(--accent); background: var(--accent-tint); }

.dropzone {
  position: relative;
  border: 1.5px dashed #C9CFD6;
  border-radius: var(--radius);
  padding: 2.8rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: var(--bg-alt);
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.dropzone:hover, .dropzone.drag { border-color: var(--accent); background: var(--accent-tint); }
.dz-icon { color: var(--accent); margin-bottom: 0.6rem; }
.dz-title { font-weight: 700; }
.dz-sub { font-size: 0.85rem; color: var(--muted); }

.parse-error { margin-top: 0.9rem; color: var(--accent); font-size: 0.9rem; }

.file-meta { margin-top: 1.2rem; }
.preview-wrap {
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 8px;
  height: 220px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
  overflow: hidden;
}
#preview { width: 100%; height: 100%; }
#preview path, #preview polyline {
  fill: none; stroke: var(--accent); stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.meta-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1rem; }
.meta-list div { display: flex; justify-content: space-between; gap: 0.5rem; border-bottom: 1px solid var(--line); padding: 0.3rem 0; }
.meta-list dt { color: var(--muted); font-size: 0.85rem; }
.meta-list dd { font-size: 0.9rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.scale-fix { margin-top: 1rem; display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.scale-fix label { font-size: 0.82rem; color: var(--muted); }
.scale-fix input { width: 110px; }

.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text); margin-bottom: 0.35rem; }
.field > span em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 0.78rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-row .field, .calc-grid > * { min-width: 0; }
input[type="number"], select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: var(--bg);
  border: 1px solid #C9CFD6;
  color: var(--text);
  font-family: var(--mono); font-size: 1rem; /* <16px makes iOS Safari zoom-jump on focus */
  padding: 0.55rem 0.7rem;
  border-radius: 7px;
  transition: border-color 0.18s ease;
}
input[type="number"]:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--accent-tint); }
.field > span.input-unit, .input-unit { display: flex; gap: 0.5rem; }
.input-unit select { width: 80px; }
.hint { font-size: 0.82rem; color: var(--muted); margin-top: 0.6rem; }

.engrave {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
}
.engrave summary {
  cursor: pointer; font-size: 0.88rem; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: baseline;
}
.engrave summary::-webkit-details-marker { display: none; }
.engrave summary::after { content: "+"; color: var(--accent); font-family: var(--mono); }
.engrave[open] summary::after { content: "–"; }
.engrave summary em { font-style: normal; color: var(--muted); font-weight: 400; font-size: 0.78rem; margin-right: auto; padding-left: 0.5rem; }
.engrave[open] summary { margin-bottom: 0.9rem; }

.result {
  margin-top: 1.4rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.result-main { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 0.9rem; }
.result-label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.12em; color: var(--muted); display: block; margin-bottom: 0.25rem; }
.result-value { font-size: 1.8rem; font-weight: 700; display: block; line-height: 1.2; font-family: var(--mono); }
#r-price { color: var(--accent); }
.result-sub { font-size: 0.78rem; color: var(--muted); display: block; margin-top: 0.2rem; }
.result-breakdown { border-top: 1px solid var(--line); padding-top: 0.7rem; font-size: 0.85rem; display: grid; gap: 0.3rem; }
.result-breakdown div { display: flex; justify-content: space-between; }
.result-breakdown span:first-child { color: var(--muted); }
.result-note { font-size: 0.78rem; color: var(--muted); margin-top: 0.9rem; }

/* ---------- material usage / layout ---------- */
.layout-panel {
  max-width: var(--maxw); margin: 1.5rem auto 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.layout-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.layout-head h3 { font-size: 1.1rem; }
.layout-sheet-inputs label { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; }
.layout-sheet-inputs input { width: 80px; }
.layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.layout-svg-wrap {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 8px;
  padding: 0.6rem; display: flex; align-items: center; justify-content: center;
}
#layoutsvg { width: 100%; max-height: 240px; }
.lay-sheet { fill: var(--bg); stroke: #C9CFD6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.lay-part { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- machines table ---------- */
.table-wrap { max-width: var(--maxw); margin: 0 auto; overflow-x: auto; }
.machine-table {
  width: 100%; border-collapse: collapse; font-size: 0.9rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
}
.machine-table th, .machine-table td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--line); }
.machine-table th { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); background: var(--bg-alt); }
.machine-table tr:last-child td { border-bottom: none; }
.machine-table td:nth-child(3), .machine-table td:nth-child(4) { font-family: var(--mono); font-size: 0.85rem; white-space: nowrap; }
.table-note { max-width: var(--maxw); margin: 1rem auto 0; font-size: 0.85rem; color: var(--muted); }

/* ---------- ads ---------- */
.ad-slot {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.house-ad {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.4rem;
  text-decoration: none;
  transition: border-color 0.18s ease;
}
.house-ad:hover { border-color: var(--accent); }
.house-ad b { font-weight: 700; }
.house-ad small { color: var(--muted); display: block; }
.house-ad .tag { font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.14em; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0.15rem 0.4rem; flex-shrink: 0; }

/* ---------- materials ---------- */
.mat-grid {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.8rem;
}
.mat-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 0.9rem 1rem;
  cursor: pointer;
  transition: border-color 0.18s ease;
  color: var(--text);
  font-family: inherit;
  text-align: left;
}
.mat-card:hover { border-color: var(--accent); }
.mat-card h3 { font-size: 0.95rem; margin-bottom: 0.2rem; }
.mat-card p { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.mat-cat {
  grid-column: 1 / -1;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); margin-top: 0.8rem;
}
.mat-cat:first-child { margin-top: 0; }

/* ---------- how ---------- */
.how { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.how-steps {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem;
  list-style: none; counter-reset: step;
}
.how-steps li {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem; counter-increment: step; position: relative;
}
.how-steps li::before {
  content: counter(step);
  display: flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-tint); color: var(--accent);
  font-size: 0.8rem; font-weight: 700;
  margin-bottom: 0.7rem;
}
.how-steps b { font-size: 1.05rem; font-weight: 700; }
.how-steps p { color: var(--muted); font-size: 0.92rem; margin-top: 0.3rem; }

/* ---------- promo ---------- */
.promo { padding: 4rem 1.25rem; }
.promo-inner {
  max-width: var(--maxw); margin: 0 auto;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 3rem;
}
.promo-inner h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 0.6rem; }
.promo-inner p { color: var(--muted); max-width: 56ch; margin-bottom: 1.4rem; }
.promo-inner p b { color: var(--text); }

/* ---------- faq ---------- */
.faq details {
  max-width: var(--maxw); margin: 0 auto 0.6rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px;
}
.faq summary {
  font-weight: 600; font-size: 0.98rem;
  padding: 1rem 1.3rem; cursor: pointer; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--accent); font-family: var(--mono); }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 1.3rem 1rem; color: var(--muted); font-size: 0.93rem; }

/* ---------- donate ---------- */
.donate-inner {
  max-width: var(--maxw); margin: 0 auto; text-align: center;
  border-top: 1px solid var(--line);
  padding: 2.6rem 1rem 0;
}
.donate-inner h2 { margin-bottom: 0.5rem; }
.donate-inner p { color: var(--muted); margin-bottom: 1.3rem; }

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 2rem 1.25rem 2.6rem;
  color: var(--muted); font-size: 0.88rem;
}
.site-footer p { margin-top: 0.2rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer nav { display: flex; gap: 1.2rem; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 3rem 1.25rem 2.5rem; }
  .hero h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
  .calc-grid { grid-template-columns: 1fr; }
  .layout-grid { grid-template-columns: 1fr; }
  .how-steps { grid-template-columns: 1fr; }
  .site-nav a:not(.nav-cta) { display: none; }
  .promo-inner { padding: 2rem 1.4rem; }
  .site-footer { flex-direction: column; text-align: center; }
}

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