/* Trowelscape — brand tokens pulled from the LUXE Surface Finishing Design
   System identity sheet (Trowelscape Identity.dc.html): warm charcoal/sand/
   bronze palette, the trowel-blade-over-a-swept-horizon mark, Fraunces as
   the light-weight display face for the wordmark and page headlines.
   Exact hex values are our best match to the named tokens (--char-900,
   --sand-100, --bronze-500/600, --stone-600, --border-hairline) — the
   identity sheet only links to the design system's own token files, which
   weren't fetchable here. Swap these for the resolved token values if the
   real stylesheet becomes available. */

:root {
  --ink: #1c1b18;
  --muted: #6e6862;
  --surface: #f3eee3;
  --surface2: #fbf8f1;
  --surface3: #efe7d6;
  --border: #e4dcc9;
  --accent: #ae8a52;
  --accent-dark: #8f6e3e;
  --accent-ink: #ffffff;
  --danger: #b23b3b;
  --radius: 10px;
  --maxw: 1080px;
  --font-display: "Fraunces", Georgia, serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.5;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.hidden { display: none !important; }
.visuallyHidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1, h2 { font-family: var(--font-display); font-weight: 300; letter-spacing: -0.01em; }
p { margin: 0 0 12px; color: var(--muted); }

/* ── Header ─────────────────────────────────────────────────────────────── */

.siteHeader { border-bottom: 1px solid var(--border); padding: 16px 0; background: var(--surface2); }
.headerInner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brandMark {
  width: 34px; height: 34px; border-radius: 8px; background: var(--ink);
  display: flex; align-items: center; justify-content: center; flex: none;
}
.brandWordmark {
  font-family: var(--font-display); font-weight: 300; font-size: 22px;
  letter-spacing: -0.01em; color: var(--ink);
}
.headerNav { display: flex; align-items: center; gap: 20px; }
.headerNav a { color: var(--accent-dark); text-decoration: none; font-size: 14px; font-weight: 600; }
.langToggle {
  background: none; border: 1px solid var(--border); border-radius: 20px;
  padding: 6px 14px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--ink);
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.hero { text-align: center; padding: 56px 20px 40px; }
.hero h1 { font-size: clamp(28px, 4vw, 42px); }
.heroSubtitle { max-width: 640px; margin: 0 auto 24px; font-size: 16px; }

.stepsRow {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin-top: 48px; text-align: left;
}
.stepCard {
  background: var(--surface2); border-radius: var(--radius); padding: 20px;
}
.stepCard h3 { font-size: 15px; }
.stepCard p { font-size: 14px; margin: 0; }

/* ── Marketing sections (why-render / FAQ) ─────────────────────────────── */

.wrap > h2 { font-size: 24px; margin-top: 48px; }
.ctaBlock { text-align: center; background: var(--surface2); border-radius: var(--radius); padding: 32px 20px; margin: 40px auto; max-width: 640px; }
.faq { max-width: 700px; }
.faq dt { font-weight: 700; margin-top: 20px; font-size: 15px; }
.faq dd { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

/* ── Buttons ────────────────────────────────────────────────────────────── */

.btn {
  display: inline-block; border-radius: 999px; padding: 12px 24px;
  font-size: 15px; font-weight: 600; cursor: pointer; border: none;
  text-decoration: none; text-align: center;
}
.btnPrimary { background: var(--ink); color: #fff; }
.btnPrimary:disabled { background: var(--surface3); color: var(--muted); cursor: not-allowed; }
.btnSecondary { background: var(--surface2); color: var(--ink); border: 1px solid var(--border); }
.btnGhost { background: transparent; color: var(--muted); }

/* ── Render tool ────────────────────────────────────────────────────────── */

.renderTool { padding: 24px 20px 64px; }
.stage { max-width: 640px; margin: 0 auto; }
.stageActions { display: flex; gap: 12px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.statusText { text-align: center; font-size: 14px; min-height: 20px; }
.errorText { color: var(--danger); }
.hintText { text-align: center; font-size: 14px; }

.uploadArea {
  position: relative; border: 2px dashed var(--border); border-radius: var(--radius);
  min-height: 280px; display: flex; align-items: center; justify-content: center;
  background: var(--surface2); overflow: hidden; cursor: pointer;
}
.uploadPlaceholder { text-align: center; padding: 24px; color: var(--muted); }
.photoPreview { max-width: 100%; max-height: 400px; display: block; }

.canvasWrap { display: flex; justify-content: center; margin: 16px 0; }
#maskCanvas { max-width: 100%; border-radius: var(--radius); cursor: crosshair; touch-action: none; }

.brushControls { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.brushControls button {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 8px 14px; font-size: 13px; cursor: pointer;
}
.brushControls button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.swatchSearch {
  width: 100%; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 14px; margin-bottom: 16px;
}
.swatchList { max-height: 360px; overflow-y: auto; margin-bottom: 20px; }
.swatchCollectionHeader {
  display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px;
  padding: 8px 4px; cursor: pointer; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em;
}
.swatchCount { background: var(--surface3); border-radius: 10px; padding: 1px 8px; font-size: 11px; }
.chevron { margin-left: auto; transition: transform 0.15s; }
.swatchCollectionHeader.collapsed .chevron { transform: rotate(-90deg); }
.swatchCollectionGrid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 10px; padding: 4px 0 16px;
}
.swatchOption { text-align: center; cursor: pointer; border-radius: 8px; padding: 6px; border: 2px solid transparent; }
.swatchOption.selected { border-color: var(--accent); background: var(--surface2); }
.swatchThumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; }
.swatchOption .dot { display: block; width: 100%; aspect-ratio: 1; border-radius: 6px; border: 1px solid var(--border); }
.swatchLabel { display: block; font-size: 11px; margin-top: 4px; color: var(--muted); }

.finishGrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 8px; }
.finishOption {
  border: 2px solid var(--border); border-radius: var(--radius); padding: 14px; cursor: pointer; text-align: center;
}
.finishOption.selected { border-color: var(--accent); background: var(--surface2); }
.finishLabel { display: block; font-weight: 700; font-size: 14px; }
.finishDesc { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

.resultCompare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.resultCompare figure { margin: 0; }
.resultCompare img { width: 100%; border-radius: var(--radius); display: block; }
.resultCompare figcaption { text-align: center; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-top: 6px; }

/* ── Sheets (approval / email gate) ────────────────────────────────────── */

.sheet {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4); display: flex;
  align-items: flex-end; justify-content: center; z-index: 100;
  opacity: 0; transition: opacity 0.2s;
}
.sheet.visible { opacity: 1; }
@media (min-width: 640px) {
  .sheet { align-items: center; }
}
.sheetInner {
  background: var(--surface); border-radius: 16px 16px 0 0; padding: 28px 24px;
  max-width: 420px; width: 100%; text-align: center;
}
@media (min-width: 640px) {
  .sheetInner { border-radius: 16px; }
}
.approvalSummary { display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 12px; font-weight: 600; }
.dot { display: inline-block; width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); }
#emailGateInput {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 15px; margin: 12px 0 4px;
}

/* ── Installer interest ─────────────────────────────────────────────────── */

.interestSection { text-align: center; padding: 48px 20px; background: var(--surface2); border-radius: var(--radius); margin: 0 20px 48px; }
.interestForm { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.interestForm input {
  padding: 12px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 14px;
  min-width: 180px;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.siteFooter { border-top: 1px solid var(--border); padding: 32px 0; margin-top: 32px; }
.footerInner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footerRights { font-size: 13px; }

@media (max-width: 560px) {
  .resultCompare { grid-template-columns: 1fr; }
  .footerInner { flex-direction: column; }
}
