/* ---------- Tokens (cambia aquí los colores de marca) ---------- */
:root {
  --brand: #14451c;
  --brand-2: #2a7a1f;
  --accent: #8cc63f;
  --accent-ink: #10300a;
  --wa: #128c4a;
  --wa-hover: #0e7a3f;
  --bg: #f4f8f2;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5b6776;
  --line: #dde4ee;
  --danger: #c0392b;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 42, 71, .08);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-2); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; color: var(--brand); }
p { margin: 0 0 1em; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55em;
  padding: .85em 1.4em; border-radius: 999px; border: 2px solid transparent;
  font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .15s, background .15s, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 1.2em; height: 1.2em; flex: none; }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-accent:hover { background: #79b32e; }
.btn-wa { background: var(--wa); color: #fff; }
.btn-wa:hover { background: var(--wa-hover); }
.btn-ghost { background: transparent; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn-lg { font-size: 1.1rem; padding: 1em 1.8em; }
.btn-block { width: 100%; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brand); font-weight: 800; font-size: 1.05rem; }
.brand img { height: 46px; width: auto; }
.nav { display: none; gap: 24px; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.nav a:hover { color: var(--brand-2); }
.header-cta { padding: .6em 1.1em; font-size: .92rem; white-space: nowrap; flex: none; }
.brand span { line-height: 1.15; }
@media (min-width: 820px) { .nav { display: flex; } }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: #fff; padding: 56px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(140,198,63,.25), transparent 70%); pointer-events: none; }
.hero h1 { color: #fff; font-size: clamp(1.9rem, 5vw, 3.1rem); max-width: 18ch; letter-spacing: -.02em; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p.lead { font-size: 1.15rem; max-width: 52ch; color: #d8ebd3; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 28px; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { border-color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 10px 22px; padding: 0; margin: 0; list-style: none; color: #d8ebd3; font-size: .95rem; }
.chips li::before { content: "✓"; color: var(--accent); font-weight: 800; margin-right: .5em; }

/* ---------- Secciones ---------- */
section { padding: 64px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }

.services { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.service { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); text-align: left; font: inherit; cursor: pointer; transition: transform .15s, border-color .15s; }
.service:hover { transform: translateY(-3px); border-color: var(--accent); }
.service .ico { width: 52px; height: 52px; border-radius: 14px; background: #eaf6dc; display: grid; place-items: center; margin-bottom: 14px; }
.service .ico svg { width: 28px; height: 28px; color: #2f7d12; }
.service h3 { font-size: 1.2rem; margin-bottom: .3em; }
.service p { color: var(--muted); font-size: .95rem; margin: 0 0 .8em; }
.service .go { font-weight: 700; color: var(--brand-2); font-size: .92rem; }

.steps { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); counter-reset: s; }
.how { background: var(--surface); border-block: 1px solid var(--line); }
.step-card { padding: 4px 8px; }
.step-card::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: 12px; }
.step-card h3 { font-size: 1.1rem; }
.step-card p { color: var(--muted); margin: 0; }

/* ---------- Formulario ---------- */
.form-wrap { max-width: 820px; margin-inline: auto; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
fieldset.group { border: 0; margin: 0; padding: 26px 22px; border-bottom: 1px solid var(--line); min-width: 0; }
fieldset.group:last-of-type { border-bottom: 0; }
legend { padding: 0; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.12rem; color: var(--brand); margin-bottom: 14px; float: left; width: 100%; }
legend + * { clear: both; }
legend .num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; font-size: .9rem; flex: none; }
legend .opt { font-weight: 600; font-size: .8rem; color: var(--muted); background: var(--bg); border-radius: 999px; padding: 2px 10px; }
.hint { color: var(--muted); font-size: .9rem; margin: 0 0 12px; }

.tiles { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(125px, 1fr)); }
.cita-wrap { margin-top: 20px; padding: 18px; background: #f4f9f0; border: 1px solid #d3e6c7; border-radius: 12px; }
.cita-wrap[hidden] { display: none; }
.sub-title { font-size: 1.02rem; margin: 0 0 4px; }
.tiles-2 { grid-template-columns: 1fr 1fr; max-width: 420px; }
.tile { position: relative; cursor: pointer; }
.tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.tile-body { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border: 2px solid var(--line); border-radius: 12px; font-weight: 700; text-align: center; background: var(--surface); transition: .15s; }
.tile-body svg { width: 30px; height: 30px; color: var(--muted); }
.tile:hover .tile-body { border-color: #b9c6d8; }
.tile input:checked + .tile-body { border-color: var(--accent); background: #f1f9e6; box-shadow: 0 0 0 3px rgba(140,198,63,.3); }
.tile input:checked + .tile-body svg { color: #2f7d12; }
.tile input:focus-visible + .tile-body { outline: 3px solid var(--accent); outline-offset: 2px; }

.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label, .lbl { font-weight: 600; font-size: .93rem; }
.field label .opt { font-weight: 400; color: var(--muted); }
input[type="text"], input[type="tel"], input[type="email"], textarea, select {
  width: 100%; font: inherit; color: inherit; padding: .75em .9em; border: 1.5px solid var(--line);
  border-radius: 10px; background: #fff; transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 84px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(42,122,31,.18); }
.is-invalid { border-color: var(--danger) !important; }
.field-error { color: var(--danger); font-size: .88rem; font-weight: 600; margin: 6px 0 0; min-height: 0; }
.field-error:empty { display: none; }

.pick-label { font-weight: 600; font-size: .93rem; margin: 0 0 8px; display: block; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: block; padding: .55em .95em; border: 1.5px solid var(--line); border-radius: 10px; font-weight: 600; font-size: .92rem; background: #fff; cursor: pointer; text-align: center; transition: .15s; line-height: 1.25; }
.chip span small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; }
#dates .chip span small { text-transform: capitalize; }
.chip:hover span { border-color: #b9c6d8; }
.chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chip input:checked + span small { color: #d8ebd3; }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.dropzone { display: flex; align-items: center; gap: 14px; padding: 18px; border: 2px dashed #b9c6d8; border-radius: 12px; cursor: pointer; background: #fafdf9; transition: .15s; }
.dropzone:hover, .dropzone.drag { border-color: var(--brand-2); background: #eff7ec; }
.dropzone svg { width: 34px; height: 34px; color: var(--brand-2); flex: none; }
.dropzone strong { display: block; }
.dropzone small { color: var(--muted); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-pill { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 14px; background: #eaf6ee; border: 1px solid #b7e0c4; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.file-pill[hidden] { display: none; }
.file-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-pill button { background: none; border: 0; color: var(--danger); font: inherit; font-weight: 700; cursor: pointer; }

.contact-opts { display: grid; gap: 10px; }
.opt-card { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; transition: .15s; }
.opt-card:hover { border-color: #b9c6d8; }
.opt-card input { margin-top: .3em; accent-color: var(--brand); width: 18px; height: 18px; flex: none; }
.opt-card:has(input:checked) { border-color: var(--accent); background: #f1f9e6; }
.opt-card strong { display: block; }
.opt-card small { color: var(--muted); }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.consent input { width: 18px; height: 18px; margin-top: .2em; accent-color: var(--brand); flex: none; }

.info-basica { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; font-size: .86rem; color: var(--muted); }
.info-basica strong { color: var(--ink); display: block; margin-bottom: 6px; }
.info-basica dl { margin: 0 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; }
.info-basica dt { font-weight: 700; color: var(--ink); }
.info-basica dd { margin: 0; }
@media (max-width: 520px) { .info-basica dl { grid-template-columns: 1fr; gap: 0; } .info-basica dd { margin-bottom: 6px; } }
.submit-area { padding: 22px; background: #f8fafd; border-radius: 0 0 18px 18px; }
.submit-note { text-align: center; color: var(--muted); font-size: .88rem; margin: 12px 0 0; }

/* ---------- Confirmación ---------- */
.confirm { padding: 30px 22px; text-align: center; }
.confirm .ok { width: 64px; height: 64px; border-radius: 50%; background: #e3f5ea; color: var(--wa); display: grid; place-items: center; margin: 0 auto 14px; }
.confirm .ok svg { width: 34px; height: 34px; }
.confirm h2 { font-size: 1.6rem; }
.summary { text-align: left; max-width: 520px; margin: 18px auto; background: var(--bg); border-radius: 12px; padding: 16px 20px; }
.summary dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.summary dt { color: var(--muted); font-size: .9rem; }
.summary dd { margin: 0; font-weight: 600; word-break: break-word; }
.confirm-actions { display: grid; gap: 10px; max-width: 420px; margin: 20px auto 0; }
.notice { max-width: 520px; margin: 14px auto 0; background: #f1f9e6; border: 1px solid #cfe6a8; border-radius: 10px; padding: 12px 14px; font-size: .92rem; text-align: left; }

.dev-banner { background: #fff3cd; color: #6b4e00; text-align: center; font-size: .85rem; padding: 6px 12px; font-weight: 600; }

/* ---------- Pie ---------- */
.site-footer { background: var(--brand); color: #cfe3ca; padding: 40px 0 28px; font-size: .92rem; }
.site-footer a { color: #fff; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 24px; }
.site-footer h4 { color: #fff; margin: 0 0 10px; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.copy { border-top: 1px solid rgba(255,255,255,.15); padding-top: 18px; font-size: .85rem; }

/* ---------- Páginas legales ---------- */
.legal { padding: 40px 0 64px; }
.legal .card { padding: 28px 22px; max-width: 820px; margin-inline: auto; }
.legal h1 { font-size: 1.9rem; }
.legal h2 { font-size: 1.2rem; margin-top: 1.6em; }
.legal .todo { background: #fff3cd; border: 1px dashed #d9a400; border-radius: 8px; padding: 10px 14px; color: #6b4e00; font-size: .92rem; }

@media (min-width: 720px) {
  fieldset.group { padding: 30px 34px; }
  .submit-area { padding: 26px 34px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* Factura: llamativa */
.dropzone.hot { border: 2px solid var(--accent); background: linear-gradient(135deg, #f1f9e6, #e4f3cf); box-shadow: 0 0 0 4px rgba(140,198,63,.18); }
.dropzone.hot:hover, .dropzone.hot.drag { border-color: var(--brand-2); background: linear-gradient(135deg, #eaf6dc, #d8edbd); }
.dropzone.hot svg { color: var(--brand-2); width: 40px; height: 40px; }
.dropzone.hot strong { color: var(--brand); font-size: 1.05rem; }
.file-pill { justify-content: flex-start; align-items: center; }
.file-pill .pill-ico { width: 26px; height: 26px; flex: none; padding: 5px; border-radius: 50%; background: var(--wa); color: #fff; }
.file-pill .pill-text { flex: 1; white-space: normal; overflow: visible; }
.file-pill .pill-text small { display: block; color: var(--muted); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.file-pill .spinner { width: 26px; height: 26px; flex: none; border-radius: 50%; border: 3px solid #cfe6a8; border-top-color: var(--brand-2); animation: spin .8s linear infinite; }
.file-pill .spinner[hidden], .file-pill .pill-ico[hidden] { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .file-pill .spinner { animation-duration: 2s; } }

/* Enviando… con puntitos animados */
.dots { display: inline-flex; gap: 3px; margin-left: 4px; vertical-align: middle; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .3; animation: dot 1.1s infinite ease-in-out; }
.dots i:nth-child(2) { animation-delay: .18s; }
.dots i:nth-child(3) { animation-delay: .36s; }
@keyframes dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.btn:disabled { cursor: progress; opacity: .92; }
@media (prefers-reduced-motion: reduce) { .dots i { animation: none; opacity: .8; } }

/* Firma del estudio en el pie */
.copy { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; }
.credit { opacity: .75; font-size: .82rem; }
.credit strong { font-weight: 700; letter-spacing: .02em; }

/* Ruedas de horas */
.wheel-box { margin-top: 4px; padding: 16px; background: #fff; border: 1.5px solid #cfe6a8; border-radius: 14px; }
.wheel-box[hidden] { display: none; }
.wheel-title { font-weight: 700; font-size: .95rem; margin: 0 0 10px; color: var(--brand); text-align: center; }
.wheels { position: relative; display: flex; justify-content: center; align-items: flex-end; gap: 14px; }
.wheel-col { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; z-index: 1; }
.wheel-lbl { font-size: .8rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.wheel { width: 108px; height: 180px; overflow-y: auto; scroll-snap-type: y mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; outline: none; border-radius: 12px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 28%, #000 72%, transparent); overscroll-behavior: contain; }
.wheel::-webkit-scrollbar { display: none; }
.wheel:focus-visible { box-shadow: 0 0 0 3px rgba(140,198,63,.5); }
.wheel-pad { height: 72px; }
.wheel-item { height: 36px; line-height: 36px; text-align: center; scroll-snap-align: center; font-size: 1.05rem; font-weight: 600; color: #8a97a6; cursor: pointer; transition: color .15s, transform .15s; user-select: none; }
.wheel-item.is-near { color: #55657a; }
.wheel-item.is-sel { color: var(--brand); font-size: 1.5rem; font-weight: 800; }
.wheel-sep { align-self: center; margin-top: 22px; font-weight: 700; color: var(--muted); z-index: 1; }
.wheel-band { position: absolute; left: 6%; right: 6%; bottom: 72px; height: 36px; border-radius: 10px; background: #eaf6dc; border: 1.5px solid #cfe6a8; z-index: 0; pointer-events: none; }
.wheel-summary { text-align: center; margin: 12px 0 0; font-weight: 700; color: var(--brand-2); }
@media (prefers-reduced-motion: reduce) { .wheel { scroll-behavior: auto; } }
