/* Shared base for the four trial sites. Mobile first. Each trial sets its colours as CSS variables
   (theme in trials/<slug>/index.js): --accent, --accent-ink, --bg, --fg, --muted, --surface. */
:root {
  --accent: #333;
  --accent-ink: #fff;
  --bg: #faf8f5;
  --fg: #1c1c1c;
  --muted: #666;
  --surface: #fff;
  --line: color-mix(in srgb, var(--fg) 12%, transparent);
  --soft: color-mix(in srgb, var(--accent) 8%, var(--bg));
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgb(0 0 0 / 5%), 0 6px 24px rgb(0 0 0 / 6%);
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-head: var(--font);
  --ok: #1f7a4d;
  --err: #b42318;
  --wa: #1fa855;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; font: 16px/1.55 var(--font); color: var(--fg); background: var(--bg); display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
main { flex: 1; }
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); }
h2 { font-size: clamp(1.35rem, 4.5vw, 1.9rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 680px; }
.section { padding: 40px 0; }
.section-alt { background: var(--soft); }
.lead { font-size: 1.125rem; color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.pre { white-space: pre-line; }
.ok { color: var(--ok); font-weight: 600; }
.center { text-align: center; }

/* Header and footer */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 56px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; color: var(--fg); text-decoration: none; white-space: nowrap; }
.site-nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a { color: var(--fg); text-decoration: none; padding: 8px 10px; border-radius: 8px; font-size: .925rem; white-space: nowrap; }
.site-nav a:hover { background: var(--soft); }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 96px; color: var(--muted); font-size: .925rem; }
.footer-brand { color: var(--fg); font-weight: 600; margin-bottom: .25em; }
.footer-small { font-size: .8rem; }

/* Hero */
.hero { padding: 40px 0 32px; }
.hero h1 { max-width: 20ch; }
.hero .lead { max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.hero-media { margin-top: 24px; border-radius: var(--radius); overflow: hidden; background: var(--soft); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer; transition: transform .05s, background .15s; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #000); }
.btn-ghost { background: transparent; }
.btn-wa { background: var(--wa); color: #fff; border-color: var(--wa); }
.btn-ghost.btn-wa { background: transparent; color: var(--wa); border-color: var(--wa); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }
.wa-float { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 8px; background: var(--wa); color: #fff; text-decoration: none; border-radius: 999px; padding: 12px; box-shadow: 0 4px 16px rgb(0 0 0 / 20%); font-weight: 600; }
.wa-float-label { display: none; }
@media (min-width: 720px) { .wa-float { padding: 12px 18px; } .wa-float-label { display: inline; } }

/* Cards and grids */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 0 0 16px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } .grid-4 { grid-template-columns: repeat(4, 1fr); } }
.steps-list { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps-list li { counter-increment: s; display: flex; gap: 12px; align-items: flex-start; }
.steps-list li::before { content: counter(s); flex: 0 0 32px; height: 32px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--fg); font-size: .85rem; font-weight: 600; }
.badge-won { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge-lost { background: color-mix(in srgb, var(--err) 12%, transparent); color: var(--err); }
.kv { display: grid; gap: 8px; margin: 0 0 12px; }
.kv > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px dashed var(--line); padding-bottom: 6px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; }
.price { font-size: 1.35rem; }

/* Forms */
.request-form { display: grid; gap: 16px; }
.contact-fields { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; margin: 0; border: 0; padding: 0; min-width: 0; }
.label { font-weight: 600; font-size: .95rem; }
.opt { font-weight: 400; color: var(--muted); font-size: .85rem; }
.hint { margin: 0; color: var(--muted); font-size: .875rem; }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--fg) 22%, transparent); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--fg); font: 16px/1.4 var(--font); }
textarea { min-height: 96px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, .choice input:focus-visible + .choice-body { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.has-error input, .has-error select, .has-error textarea { border-color: var(--err); }
.error { color: var(--err); font-size: .875rem; margin: 0; }
.choices { display: grid; gap: 8px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(2, 1fr); } }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice-body { display: grid; gap: 2px; padding: 12px 14px; border: 1px solid color-mix(in srgb, var(--fg) 18%, transparent); border-radius: var(--radius-sm); background: var(--surface); min-height: 48px; }
.choice input:checked + .choice-body { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--soft); }
.choice-label { font-weight: 600; }
.choice-hint { color: var(--muted); font-size: .875rem; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--accent); flex: 0 0 auto; }
.file-input { padding: 12px; border: 1px dashed color-mix(in srgb, var(--fg) 30%, transparent); border-radius: var(--radius-sm); background: var(--surface); width: 100%; font: inherit; }
.file-preview { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 8px; }
.file-preview:empty { display: none; }
.file-preview figure { margin: 0; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--soft); display: grid; place-items: center; font-size: .75rem; text-align: center; padding: 4px; word-break: break-all; }
.file-preview img { width: 100%; height: 100%; object-fit: cover; }
.form-actions { display: grid; gap: 8px; }
.form-note { color: var(--muted); font-size: .9rem; text-align: center; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.alert { padding: 12px 14px; border-radius: var(--radius-sm); margin: 0 0 16px; }
.alert-error { background: color-mix(in srgb, var(--err) 10%, var(--surface)); color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 30%, transparent); }
.alert-ok { background: color-mix(in srgb, var(--ok) 10%, var(--surface)); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); }

/* Confirmation and tracking: flat, left-aligned, one WhatsApp text link (no floating button on these pages). */
.confirm-card { border-top: 2px solid var(--fg); padding: 24px 0 0; }
.confirm-card .lead { color: var(--fg); }
.confirm-number { font-size: 1rem; color: var(--muted); }
.confirm-wa, .track-wa { margin-top: 20px; }
.wa-inline { display: inline-flex; align-items: center; gap: 8px; color: var(--fg); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.wa-inline svg { width: 18px; height: 18px; color: var(--wa); }
.track .card { box-shadow: none; border-radius: 4px; }
.track-status { font-weight: 600; }
.track-status .status-won { color: var(--ok); }
.track-status .status-lost { color: var(--err); }
.decide { display: grid; gap: 10px; margin-top: 12px; }
.reject summary { list-style: none; }
.reject summary::-webkit-details-marker { display: none; }
.reject form { display: grid; gap: 8px; margin-top: 10px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.step { position: relative; display: flex; gap: 12px; padding: 0 0 18px; }
.step::before { content: ''; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.dot { flex: 0 0 16px; height: 16px; margin-top: 4px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--fg) 25%, transparent); background: var(--surface); position: relative; z-index: 1; }
.step-done .dot { background: var(--accent); border-color: var(--accent); }
.step-current .dot { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
.step-todo { color: var(--muted); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin: 8px 0; }
.thumb { display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: var(--soft); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-link { display: inline-block; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; }

/* Placeholder photo (SVG with a label) */
.ph { aspect-ratio: 4 / 3; border-radius: var(--radius); background: repeating-linear-gradient(45deg, var(--soft), var(--soft) 12px, color-mix(in srgb, var(--accent) 12%, var(--bg)) 12px, color-mix(in srgb, var(--accent) 12%, var(--bg)) 24px); display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
