/* Coera — estilos. Mobile-first, sin dependencias externas.
   Orden: tokens · base · componentes · secciones · esquemas · adaptación a pantallas grandes. */

/* ---------- Tokens ---------- */
:root {
	--bg: #faf8f6;
	--surface: #ffffff;
	--surface-alt: #f0ecea;
	--ink: #25232a;
	--ink-soft: #5b565e;
	--line: #e3dcd8;
	--brand: #d00a30;
	--brand-ink: #ffffff;
	--brand-soft: #fde4e9;
	--accent: #f2b705;
	--accent-ink: #231a00;
	--pro: #2b282d;
	--pro-ink: #faf8f6;
	--ok: #1fa855;
	--radius: 16px;
	--shadow: 0 6px 24px rgba(29, 42, 46, .10);
	--gutter: 16px;
	--font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bg: #171517;
		--surface: #211e22;
		--surface-alt: #292629;
		--ink: #f3eeea;
		--ink-soft: #b3adb4;
		--line: #3a353b;
		--brand: #ff5c79;
		--brand-ink: #2a0610;
		--brand-soft: #3d1722;
		--accent: #f5c518;
		--pro: #100e11;
		--pro-ink: #f3eeea;
		--shadow: 0 6px 24px rgba(0, 0, 0, .45);
	}
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 76px; }

body {
	margin: 0;
	padding-bottom: 68px;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font);
	font-size: 1.0625rem;
	line-height: 1.6;
	-webkit-text-size-adjust: 100%;
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }

a { color: var(--brand); text-underline-offset: 3px; }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; hyphens: auto; overflow-wrap: break-word; }
h2 { font-size: clamp(1.6rem, 4.6vw, 2.3rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: 56px; }
.section--alt { background: var(--surface-alt); }
.eyebrow { margin-bottom: .6em; font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); }
.lead { max-width: 62ch; font-size: 1.15rem; color: var(--ink-soft); }
.hint { margin-top: 6px; font-size: .9rem; color: var(--ink-soft); }
.note { padding: 12px 16px; border-left: 4px solid var(--brand); border-radius: 8px; background: var(--brand-soft); font-size: .95rem; }
.icon { flex: none; width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 14px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { left: 8px; }

/* ---------- Botones ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55em;
	min-height: 48px; padding: 0 22px; border: 2px solid transparent; border-radius: 999px;
	font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
	transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn[hidden] { display: none; }
.btn--primary { background: var(--brand); color: var(--brand-ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--whatsapp { background: var(--ok); color: #fff; }

/* ---------- Cabecera ---------- */
.site-header { position: sticky; top: 0; z-index: 50; border-bottom: 1px solid var(--line); background: var(--bg); }
.site-header__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brandline { height: 6px; background: linear-gradient(90deg, var(--brand) 0 33%, var(--accent) 33% 66%, var(--pro) 66%); }

.logo { display: inline-flex; flex: none; align-items: center; }
.logo__img { display: block; flex: none; width: auto; height: 38px; max-width: none; aspect-ratio: 548 / 185; object-fit: contain; mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .logo__img { padding: 3px 9px; border-radius: 10px; background: #fff; mix-blend-mode: normal; }
}

.nav-toggle { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--line); border-radius: 12px; background: none; color: var(--ink); cursor: pointer; }
.nav { display: none; position: absolute; left: 0; right: 0; top: 100%; padding: 8px var(--gutter) 20px; border-bottom: 1px solid var(--line); background: var(--bg); }
.nav.is-open { display: block; }
.nav a { display: block; padding: 12px 4px; border-bottom: 1px solid var(--line); color: var(--ink); font-weight: 600; text-decoration: none; white-space: nowrap; }
.nav .btn { display: inline-flex; width: 100%; margin-top: 14px; border-bottom: 2px solid transparent; }
.nav .btn--accent { color: var(--accent-ink); }
.nav .lang { font-weight: 700; }

/* ---------- Portada ---------- */
.hero { padding-block: 40px 48px; background: radial-gradient(900px 400px at 90% -10%, var(--brand-soft), transparent 70%); }
.hero__grid { display: grid; gap: 28px; align-items: center; }
.hero__grid > * { min-width: 0; }
.hero h1 em { font-style: normal; color: var(--brand); }

.status-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); font-size: .9rem; font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-soft); }
.dot.is-open { background: var(--ok); box-shadow: 0 0 0 4px rgba(31, 168, 85, .2); }

.hero-fig { width: 100%; max-width: 480px; margin: 0 auto; }
.hero-fig svg { width: 100%; height: auto; }

.doors { display: grid; gap: 16px; margin-top: 32px; }
.door { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: transform .2s ease; }
.door:hover { transform: translateY(-4px); }
.door--user { border: 2px solid var(--brand); background: var(--surface); color: var(--ink); }
.door--pro { border: 2px solid var(--pro); background: var(--pro); color: var(--pro-ink); }
.door h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 1.5rem; }
.door p { margin: 0; opacity: .85; }
.door__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; font-weight: 700; }
.door--user .door__go { color: var(--brand); }
.door--pro .door__go { color: var(--accent); }

.trust { background: var(--brand); color: var(--brand-ink); }
.trust ul { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 auto; padding: 18px var(--gutter); list-style: none; font-size: .95rem; font-weight: 600; }
.trust li { display: flex; align-items: center; gap: 10px; }

/* ---------- ¿Qué aparato es? ---------- */
.apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.app {
	display: flex; flex-direction: column; align-items: center; gap: 8px;
	padding: 18px 8px 14px; border: 2px solid var(--line); border-radius: var(--radius);
	background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; font-weight: 700; text-align: center; overflow-wrap: break-word; cursor: pointer;
	transition: transform .15s ease, border-color .15s ease;
}
.app:hover { transform: translateY(-3px); border-color: var(--brand); }
.app svg { width: 52px; height: 52px; fill: none; stroke: var(--brand); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pide tu pieza ---------- */
.finder { display: grid; gap: 28px; }
.field { margin-bottom: 18px; }
.field label, .field legend { display: block; margin-bottom: 8px; padding: 0; font-weight: 700; }
fieldset.field { min-width: 0; margin-inline: 0; padding: 0; border: 0; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--ink); font: inherit; }
.input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--brand-soft); }
textarea.input { min-height: 96px; resize: vertical; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--bg); font-weight: 600; cursor: pointer; }
.chip input:checked + span { border-color: var(--brand); background: var(--brand); color: var(--brand-ink); }
.chip input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.label-hint { margin-top: 12px; }
.label-hint[hidden] { display: none; }
.label-hint .label-fig { max-width: 240px; margin-bottom: 4px; }

.preview { min-height: 4.5em; padding: 14px; border-radius: 12px; background: var(--surface-alt); color: var(--ink-soft); font-size: .95rem; white-space: pre-wrap; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn { flex: 1 1 auto; }

/* ---------- Guía de la etiqueta ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.tab { min-height: 44px; padding: 0 16px; border: 2px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.tabpanel[hidden] { display: none; }
.tabpanel h3 { display: flex; align-items: center; gap: 10px; }
.tabpanel ul { margin: 0 0 1em; padding-left: 1.2em; }

/* ---------- Pasos, servicios y piezas ---------- */
.steps { display: grid; gap: 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.steps li { display: grid; grid-template-columns: 36px 1fr; gap: 14px; }
.steps b { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.steps p { margin: 2px 0 0; color: var(--ink-soft); font-size: .95rem; }

.service { display: flex; flex-direction: column; gap: 8px; }
.service h3 { margin: 0; }
.service p { margin: 0; color: var(--ink-soft); }
.service--hl { border-color: var(--accent); }
.service__photo { aspect-ratio: 16 / 10; margin: 0 0 4px; overflow: hidden; border-radius: 12px; background: var(--surface-alt); }
.service__photo img { width: 100%; height: 100%; max-width: none; object-fit: cover; }
.service__photo--contain { background: #fff; }
.service__photo--contain img { padding: 10px; object-fit: contain; }

.parts { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.parts h3 { margin-bottom: .5em; font-size: 1.05rem; color: var(--brand); }
.parts ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.parts li { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); font-size: .92rem; }

/* ---------- Zona profesional ---------- */
.pro { background: var(--pro); color: var(--pro-ink); }
.pro .eyebrow { color: var(--accent); }
.pro .lead { color: color-mix(in srgb, var(--pro-ink) 78%, transparent); }
.pro .btn--ghost { border-color: color-mix(in srgb, var(--pro-ink) 35%, transparent); color: var(--pro-ink); }
.pro .card { color: var(--ink); }
.pro .card .btn--ghost { border-color: var(--line); color: var(--ink); }
.pro-layout { display: grid; gap: 28px; }
.pro-list { display: grid; gap: 14px; margin: 24px 0; padding: 0; list-style: none; }
.pro-list li { display: flex; align-items: flex-start; gap: 12px; }
.pro-list .icon { margin-top: 3px; color: var(--accent); }
.pro-tool h3 { margin-bottom: .3em; }

/* ---------- Tiendas ---------- */
.sede .service__photo { margin-bottom: 14px; }
.sede h3 { display: flex; align-items: center; gap: 10px; }
.sede address { margin-bottom: 12px; font-style: normal; }
.sede dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; margin: 0 0 14px; }
.sede dt { font-weight: 700; }
.sede dd { margin: 0; overflow-wrap: anywhere; }

/* ---------- Preguntas frecuentes ---------- */
.faq details { margin-bottom: 10px; padding: 0 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.faq summary { display: flex; justify-content: space-between; gap: 12px; padding: 16px 0; list-style: none; font-weight: 700; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--brand); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); }

/* ---------- Pie y barra móvil ---------- */
.site-footer { padding-block: 40px 28px; background: var(--pro); color: var(--pro-ink); font-size: .95rem; }
.site-footer a { color: var(--pro-ink); }
.site-footer .grid { gap: 28px; }
.site-footer h3 { margin-bottom: .6em; font-size: 1rem; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin-bottom: 6px; }
.legal { margin-top: 28px; padding-top: 18px; border-top: 1px solid color-mix(in srgb, var(--pro-ink) 20%, transparent); font-size: .85rem; opacity: .8; }

.mobile-bar { position: fixed; inset: auto 0 0 0; z-index: 40; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--bg); }
.mobile-bar .btn { min-height: 46px; padding: 0 10px; }

/* ---------- Páginas legales ---------- */
.prose { max-width: 760px; padding-block: 40px 64px; }
.prose h2 { margin-top: 1.6em; font-size: 1.4rem; }

/* ---------- Esquemas (guía de etiqueta y portada) ---------- */
.label-fig { max-width: 340px; margin: 0 auto 16px; }
.label-fig svg { width: 100%; height: auto; }
.d-body { fill: var(--surface-alt); stroke: var(--ink-soft); stroke-width: 3; }
.d-line { fill: none; stroke: var(--ink-soft); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.d-part { fill: none; stroke: var(--brand); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.d-fill { fill: var(--accent); stroke: var(--ink-soft); stroke-width: 3; }
.d-thin { stroke: var(--brand); stroke-width: 2; }
.d-tag { fill: var(--brand); }
.d-ring { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 5 4; }
.d-text { fill: var(--brand); font: 700 15px var(--font); }
.d-note { fill: var(--ink-soft); font: 600 12px var(--font); }
.d-label { fill: var(--ink); font: 700 15px var(--font); }

/* ---------- Móvil: etiquetas de la portada legibles ---------- */
@media (max-width: 719px) {
	.hero-fig .d-label { font-size: 21px; }
}

/* ---------- Tablet ---------- */
@media (min-width: 720px) {
	:root { --gutter: 28px; }
	.section { padding-block: 84px; }
	.doors { grid-template-columns: 1fr 1fr; }
	.trust ul { grid-template-columns: repeat(4, auto); justify-content: space-between; }
	.apps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.finder { grid-template-columns: 1.1fr .9fr; align-items: start; }
	.finder > div:first-child { position: sticky; top: 92px; }
	.actions .btn { flex: 0 1 auto; }
	.site-footer .grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

/* ---------- Escritorio ---------- */
@media (min-width: 960px) {
	body { padding-bottom: 0; }
	.hero { padding-block: 64px 72px; }
	.hero__grid { grid-template-columns: 1.15fr .85fr; gap: 40px; }
	.pro-layout { grid-template-columns: 1.1fr .9fr; align-items: start; gap: 48px; }
	.nav-toggle, .mobile-bar { display: none; }
	.nav { display: flex; position: static; align-items: center; gap: 22px; padding: 0; border: 0; background: none; }
	.nav a { padding: 8px 0; border: 0; font-size: .98rem; }
	.nav .btn { width: auto; margin: 0; padding: 0 20px; }
	.nav .lang { padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; }
}

@media (min-width: 960px) and (max-width: 1139px) {
	.nav { gap: 14px; }
	.nav a { font-size: .92rem; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.btn, .door, .app { transition: none; }
}
