:root {
  --bg: #f6f1ea;
  --surface: #fffaf3;
  --text: #2b2118;
  --muted: #6e5f52;
  --accent: #8a4b2a;
  --accent-text: #ffffff;
  --border: #ddd0c0;
  --error: #b3261e;
  --radius: 10px;
  --laser-font: Georgia, 'Times New Roman', serif;
}

html { scroll-padding-bottom: 96px; }
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }

.site-header, .site-footer { padding: 16px; max-width: 1000px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; text-decoration: none; color: var(--text); }
.brand img { width: 36px; height: auto; }
.site-footer { color: var(--muted); font-size: 0.9rem; border-top: 1px solid var(--border); margin-top: 48px; }
main { max-width: 1000px; margin: 0 auto; padding: 0 16px; }

/* Home */
.hero h1 { font-size: 2rem; margin: 16px 0 4px; }
.hero p { color: var(--muted); margin: 0 0 24px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; }
.card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.card div { padding: 12px 14px 16px; }
.card h2 { font-size: 1.1rem; margin: 0 0 4px; }
.card p { margin: 0 0 8px; color: var(--muted); font-size: 0.95rem; }
.card span { color: var(--accent); font-weight: 600; }

/* Design page */
.gallery { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin-top: 8px; }
.gallery img { flex: 0 0 85%; max-width: 520px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); scroll-snap-align: start; }
.intro h1 { margin: 20px 0 4px; }
.intro p { color: var(--muted); margin-top: 0; }

fieldset { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); margin: 0 0 16px; padding: 12px 16px 16px; }
legend { font-weight: 700; padding: 0 6px; }
.opt, .hint { color: var(--muted); font-weight: 400; font-size: 0.9rem; }
.line-group h3 { margin: 8px 0 6px; font-size: 0.95rem; color: var(--muted); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { display: flex; flex-direction: column; align-items: center; width: 84px; text-align: center; font-size: 0.85rem; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.chip { width: 52px; height: 52px; border-radius: 50%; border: 2px solid #b9a894; background-size: cover; background-position: center; }
.swatch input:checked + .chip { border-color: var(--accent); box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--accent); }
.swatch input:focus-visible + .chip { outline: 3px solid var(--accent); outline-offset: 3px; }
.swatch.is-out { opacity: 0.45; cursor: not-allowed; }
.swatch em { display: block; font-size: 0.75rem; }

label { display: block; margin: 8px 0; }
input[type='text'], input[type='email'], input[type='tel'], input:not([type]), textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px; font: inherit;
  border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--text);
}
label.radio, label.toggle { display: flex; gap: 8px; align-items: center; }
.row { display: grid; gap: 8px; grid-template-columns: 2fr 1fr 1fr; }

.laser-preview { margin-top: 10px; padding: 14px; border-radius: 8px; background: #6b3f24; min-height: 52px; }
.laser-preview span { font-family: var(--laser-font); font-size: 1.4rem; color: #3a1d0c; text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2); letter-spacing: 0.04em; }

.estimate { position: sticky; bottom: 0; background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 12px 16px; margin: 16px 0; }
.estimate p { margin: 2px 0; }
.estimate .includes { color: var(--muted); font-size: 0.9rem; }
.estimate .total { font-size: 1.2rem; font-weight: 700; }
.estimate .total:empty { display: none; }
.estimate .fine { color: var(--muted); font-size: 0.85rem; }

.err { color: var(--error); margin: 4px 0 0; font-size: 0.9rem; }
.err:empty { display: none; }
.submit { width: 100%; padding: 14px; margin: 12px 0 24px; font: inherit; font-weight: 700; border: 0; border-radius: var(--radius); background: var(--accent); color: var(--accent-text); cursor: pointer; }
.submit:disabled { opacity: 0.6; cursor: wait; }
#turnstile { margin: 12px 0; }
.thanks { padding: 32px 0; }

@media (max-width: 480px) {
  .row { grid-template-columns: 1fr 1fr; }
  .row label:first-child { grid-column: 1 / -1; }
}

@media (max-width: 600px) {
  .estimate { padding: 6px 12px; margin: 8px 0; }
  .estimate .includes, .estimate .fine { display: none; }
  .estimate p { margin: 0; font-size: 0.9rem; }
  .estimate .total { font-size: 1.05rem; }
}
