/*
 * Construction OS — estilos de la web (marketing).
 * Se apoya en tokens.css (colores, tipografía), efectos.css y componentes.css del kit de marca.
 * Aquí solo va lo propio de la web: secciones, portada, menú, formularios.
 */

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body.cos { font-size: var(--text-base); line-height: 1.6; }
img, svg { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 100; background: var(--card); padding: .5rem 1rem; border-radius: var(--radius-md); box-shadow: var(--shadow-pop); }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 768px) { .wrap { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding: 0 2rem; } }
section { padding: 4rem 0; scroll-margin-top: 4rem; }
@media (min-width: 768px) { section { padding: 6rem 0; } }
h1, h2, h3 { letter-spacing: var(--tracking-tight); margin: 0; text-wrap: balance; }
p { text-wrap: pretty; }
.eyebrow { display: inline-flex; align-items: center; gap: .5rem; font-size: var(--text-xs); font-weight: 600; text-transform: uppercase; letter-spacing: var(--tracking-wide); color: var(--teal); margin: 0 0 1rem; }
.eyebrow svg { width: 1rem; height: 1rem; }
.lead { font-size: var(--text-lg); color: var(--muted-foreground); line-height: 1.6; margin: 1rem 0 0; max-width: 40rem; }
.h2 { font-size: var(--text-3xl); font-weight: 800; line-height: 1.15; }
@media (min-width: 768px) { .h2 { font-size: var(--text-4xl); } }
.muted-bg { background: var(--muted); }
.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

/* Botones de la web */
.btn-teal { background: var(--teal); color: var(--teal-foreground); box-shadow: var(--shadow); }
.btn-teal:hover { background: color-mix(in oklab, var(--teal) 88%, black); }
.cos-btn-lg { height: 3rem; padding: 0 1.5rem; font-size: var(--text-base); font-weight: 600; border-radius: var(--radius-lg); }
.cos-btn-outline:hover { background: var(--muted); color: var(--foreground); }
.on-dark .cos-btn-outline { background: transparent; color: #fff; border-color: var(--sidebar-border); box-shadow: none; }
.on-dark .cos-btn-outline:hover { background: var(--sidebar-accent); color: #fff; }
.link-arrow { display: inline-flex; align-items: center; gap: .375rem; font-weight: 600; color: var(--primary); text-decoration: none; }
.link-arrow:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-arrow svg { width: 1rem; height: 1rem; }

/* Menú superior */
.nav { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--border); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 4rem; gap: 1rem; }
.nav .brand img { height: 30px; width: auto; display: block; }
.nav-links { display: none; gap: 1.5rem; font-weight: 500; font-size: var(--text-sm); }
.nav-links a { color: var(--muted-foreground); text-decoration: none; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--foreground); }
@media (min-width: 960px) { .nav-links { display: flex; } }
.nav-right { display: flex; align-items: center; gap: .75rem; }
.lang { display: inline-flex; border: 1px solid var(--border); border-radius: var(--radius-full); padding: 2px; font-size: var(--text-xs); font-weight: 600; }
.lang a { padding: .25rem .6rem; border-radius: var(--radius-full); text-decoration: none; color: var(--muted-foreground); }
.lang a[aria-current="true"] { background: var(--primary); color: var(--primary-foreground); }
@media (max-width: 380px) { .nav .brand img { height: 24px; } .nav-right .cos-btn { padding: 0 .6rem; } }

/* Portada (azul marino) */
.hero { background: var(--sidebar); color: var(--sidebar-foreground); padding: 4rem 0 0; overflow: hidden; position: relative; }
@media (min-width: 768px) { .hero { padding-top: 5.5rem; } }
.hero h1 { font-size: 2.5rem; font-weight: 800; line-height: 1.05; color: #fff; max-width: 15ch; }
@media (min-width: 768px) { .hero h1 { font-size: 4rem; } }
.hero .lead { color: color-mix(in oklab, var(--sidebar-foreground) 75%, transparent); }
.hero .eyebrow { color: var(--sidebar-primary); }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.hero-proof { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin-top: 1.5rem; font-size: var(--text-sm); color: color-mix(in oklab, var(--sidebar-foreground) 70%, transparent); }
.hero-proof span { display: inline-flex; align-items: center; gap: .375rem; }
.hero-proof svg { width: 16px; height: 16px; color: var(--sidebar-primary); }
.hero-mark { position: absolute; right: -80px; top: 40px; width: 420px; opacity: .06; pointer-events: none; }
@media (max-width: 767px) { .hero-mark { display: none; } }
.hero > .wrap { position: relative; }

/* Captura simulada de la app */
.shot { margin-top: 3rem; border-radius: var(--radius-2xl) var(--radius-2xl) 0 0; background: var(--background); color: var(--foreground); box-shadow: var(--shadow-pop); border: 1px solid var(--sidebar-border); border-bottom: 0; overflow: hidden; font-size: var(--text-sm); }
.shot-top { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-bottom: 1px solid var(--border); background: var(--card); }
.shot-top i { width: 10px; height: 10px; border-radius: 99px; background: var(--border); }
.shot-top .cos-help { margin-left: .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shot-top .cos-status { margin-left: auto; }
.shot-body { padding: 1rem; display: grid; gap: .75rem; }
@media (min-width: 768px) { .shot-body { padding: 1.5rem; } }
.shot .cos-metric { font-size: var(--text-base); }
@media (min-width: 640px) { .shot .cos-metric { font-size: var(--text-xl); } }
.shot .cos-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 1024px) { .shot .cos-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.shot .cos-panel.cos-stat { padding: .875rem; }
.shot .cos-overline { font-size: 10px; }
.table-scroll { overflow-x: auto; }
.cos-table td, .cos-table th { white-space: nowrap; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: table-cell; } }

/* Antes / después */
.split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.compare { display: grid; gap: .75rem; }
.compare .cos-panel { display: flex; gap: .875rem; align-items: flex-start; }
.compare .cos-stat-icon { width: 2.25rem; height: 2.25rem; flex-shrink: 0; border-radius: var(--radius-md); }
.compare .cos-stat-icon svg { width: 1.125rem; height: 1.125rem; }
.compare p { margin: .25rem 0 0; color: var(--muted-foreground); }

/* Recorrido de una obra */
.flow { list-style: none; padding: 0; margin: 3rem 0 0; display: grid; gap: .75rem; counter-reset: step; }
@media (min-width: 640px) { .flow { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .flow { grid-template-columns: repeat(3, 1fr); } }
.flow li { counter-increment: step; }
.flow .cos-panel { height: 100%; }
.flow .step { display: flex; align-items: center; gap: .625rem; }
.flow .step::before { content: counter(step, decimal-leading-zero); font-size: var(--text-xs); font-weight: 700; color: var(--teal); }
.flow b { font-size: var(--text-base); font-weight: 700; }
.flow p { margin: .375rem 0 0; color: var(--muted-foreground); font-size: var(--text-sm); }

/* Bloque destacado (pay apps, quick upload) */
.feature-split { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .feature-split { grid-template-columns: 1.05fr 1fr; gap: 4rem; } .feature-split.reverse > :first-child { order: 2; } }
.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .625rem; }
.checks li { display: flex; gap: .625rem; align-items: flex-start; }
.checks svg { width: 18px; height: 18px; color: var(--teal); flex-shrink: 0; margin-top: 4px; }
.mock { padding: 1.5rem; }
.mock-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.mock .big { font-size: 2rem; font-weight: 800; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; margin: .5rem 0 0; }
.mock .cos-progress { margin-top: 1rem; height: .625rem; }
.mock .steps { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: 1.25rem; }
.mock .steps .cos-status { font-size: var(--text-xs); padding: .2rem .6rem; }
.mock-stack { display: grid; gap: .75rem; }
.mock-actions { display: flex; gap: .5rem; margin-top: 1rem; }

/* Rejilla de funciones */
.features { display: grid; gap: 1rem; margin-top: 3rem; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature h3 { font-size: var(--text-lg); font-weight: 700; margin: 1rem 0 .375rem; }
.feature p { margin: 0; color: var(--muted-foreground); font-size: var(--text-sm); }
.feature .cos-stat-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-lg); }
.feature .cos-stat-icon svg { width: 1.25rem; height: 1.25rem; }
.feature .cos-status { margin-top: .75rem; }
.after-grid { margin-top: 2rem; }

/* Principios */
.rules { background: var(--card); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.rule-grid { display: grid; gap: 1.5rem; margin-top: 2.5rem; }
@media (min-width: 768px) { .rule-grid { grid-template-columns: repeat(3, 1fr); } }
.rule .cos-stat-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-lg); margin-bottom: 1rem; }
.rule .cos-stat-icon svg { width: 1.25rem; height: 1.25rem; }
.rule b { display: block; font-size: var(--text-lg); font-weight: 800; letter-spacing: var(--tracking-tight); }
.rule p { margin: .5rem 0 0; color: var(--muted-foreground); }

/* Para quién */
.who { display: grid; gap: 1rem; margin-top: 2.5rem; }
@media (min-width: 640px) { .who { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .who { grid-template-columns: repeat(4, 1fr); } }
.who .cos-stat-icon { width: 2.25rem; height: 2.25rem; border-radius: var(--radius-md); }
.who .cos-stat-icon svg { width: 1.125rem; height: 1.125rem; }
.who .cos-panel b { display: block; font-size: var(--text-base); margin-top: .75rem; }
.who .cos-panel p { margin: .25rem 0 0; color: var(--muted-foreground); font-size: var(--text-sm); }
.fit { margin-top: 2rem; display: grid; gap: .5rem; }
.fit div { display: flex; gap: .5rem; align-items: flex-start; }
.fit svg { width: 18px; height: 18px; color: var(--success); flex-shrink: 0; margin-top: 4px; }

/* En camino */
.soon { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.soon .cos-status { font-size: var(--text-sm); padding: .35rem .8rem; background: var(--card); border: 1px dashed color-mix(in oklab, var(--muted-foreground) 45%, transparent); color: var(--foreground); }
.soon-note { margin-top: 1rem; }

/* Llamada a la acción */
.cta { background: var(--sidebar); color: var(--sidebar-foreground); text-align: center; }
.cta h2 { color: #fff; max-width: 22ch; margin: 0 auto; }
.cta .lead { margin-left: auto; margin-right: auto; color: color-mix(in oklab, var(--sidebar-foreground) 75%, transparent); }
.cta .hero-cta { justify-content: center; }
.cta small { display: block; margin-top: 1.25rem; font-size: var(--text-sm); color: color-mix(in oklab, var(--sidebar-foreground) 65%, transparent); }

/* Cabecera de páginas internas */
.page-hero { background: var(--sidebar); color: var(--sidebar-foreground); padding: 3.5rem 0; }
@media (min-width: 768px) { .page-hero { padding: 4.5rem 0; } }
.page-hero h1 { color: #fff; font-size: 2.25rem; font-weight: 800; line-height: 1.1; max-width: 20ch; }
@media (min-width: 768px) { .page-hero h1 { font-size: 3rem; } }
.page-hero .lead { color: color-mix(in oklab, var(--sidebar-foreground) 75%, transparent); }
.page-hero .eyebrow { color: var(--sidebar-primary); }
.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.75rem; }
.jump a { font-size: var(--text-sm); font-weight: 500; color: #fff; text-decoration: none; border: 1px solid var(--sidebar-border); border-radius: var(--radius-full); padding: .35rem .9rem; }
.jump a:hover { background: var(--sidebar-accent); }
.group-head { display: flex; align-items: center; gap: .75rem; }
.group-head .cos-stat-icon { width: 2.5rem; height: 2.5rem; border-radius: var(--radius-lg); }
.group-head .cos-stat-icon svg { width: 1.25rem; height: 1.25rem; }
.feature-list { display: grid; gap: 1rem; margin-top: 2rem; }
@media (min-width: 768px) { .feature-list { grid-template-columns: repeat(2, 1fr); } }
.feature-list h3 { font-size: var(--text-lg); font-weight: 700; }
.feature-list p { margin: .5rem 0 0; color: var(--muted-foreground); font-size: var(--text-sm); }
.feature-list ul { margin: .75rem 0 0; padding-left: 1.1rem; color: var(--muted-foreground); font-size: var(--text-sm); }
.feature-list li + li { margin-top: .25rem; }

/* Formulario de demo */
.demo-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 960px) { .demo-grid { grid-template-columns: 1fr 1.25fr; gap: 3rem; } }
@media (max-width: 959px) { .demo-grid > .form-card { order: -1; } }
.demo-aside h2 { font-size: var(--text-2xl); font-weight: 800; }
.demo-aside ol { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; counter-reset: s; }
.demo-aside li { display: flex; gap: .875rem; align-items: flex-start; counter-increment: s; }
.demo-aside li::before { content: counter(s); display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border-radius: 99px; background: var(--teal-soft); color: var(--teal); font-weight: 700; font-size: var(--text-sm); flex-shrink: 0; }
.demo-aside li b { display: block; }
.demo-aside li span { color: var(--muted-foreground); font-size: var(--text-sm); }
.demo-aside .note { margin-top: 1.5rem; }
.form-card { padding: 1.5rem; }
@media (min-width: 768px) { .form-card { padding: 2rem; } }
.form-card h2 { font-size: var(--text-xl); font-weight: 800; }
.form-grid { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.form-card .cos-input, .form-card .cos-select, .form-card .cos-textarea { height: 2.75rem; font-size: var(--text-base); background: var(--card); width: 100%; }
.form-card .cos-textarea { height: auto; min-height: 110px; }
.form-card .cos-label { font-size: var(--text-sm); }
.form-card .req { color: var(--destructive); }
.form-foot { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 640px) { .form-foot { flex-direction: row; align-items: center; justify-content: space-between; } }
.form-foot .cos-btn { width: 100%; }
@media (min-width: 640px) { .form-foot .cos-btn { width: auto; } }

/* Página de gracias / 404 */
.thanks { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 4rem 0; }
.thanks .cos-panel { max-width: 36rem; margin: 0 auto; padding: 2.5rem 1.5rem; }
.thanks .cos-stat-icon { width: 3rem; height: 3rem; border-radius: 99px; margin: 0 auto 1rem; }
.thanks .cos-stat-icon svg { width: 1.5rem; height: 1.5rem; }
.thanks h1 { font-size: var(--text-3xl); font-weight: 800; }
.thanks p { color: var(--muted-foreground); }
.thanks .hero-cta { justify-content: center; }
[hidden] { display: none !important; }
.form-error { color: var(--destructive); font-size: var(--text-sm); margin: 1rem 0 0; }

/* Selector de día y hora (agenda de demos) */
.demo-grid > *, .form-card form { min-width: 0; }
.slots { border: 0; padding: 0; margin: 1.5rem 0 0; min-width: 0; }
.slots legend { padding: 0; margin-bottom: .25rem; font-size: var(--text-sm); }
.slots [data-slots-tz] { margin: .25rem 0 .75rem; }
.tz-picker { display: grid; gap: .25rem; max-width: 26rem; }
.tz-picker span { font-size: var(--text-xs); color: var(--muted-foreground); }
.tz-picker .cos-select { height: 2.5rem; font-size: var(--text-sm); width: 100%; }
.slot-days { display: flex; gap: .5rem; overflow-x: auto; padding: 2px 2px .5rem; scroll-snap-type: x mandatory; }
.slot-day { flex: 0 0 auto; scroll-snap-align: start; display: grid; justify-items: center; gap: 0; min-width: 4.25rem; padding: .5rem .5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); color: var(--foreground); font: inherit; cursor: pointer; }
.slot-day span { font-size: var(--text-xs); color: var(--muted-foreground); text-transform: capitalize; }
.slot-day b { font-size: var(--text-xl); font-weight: 800; line-height: 1.2; }
.slot-day[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-soft); box-shadow: 0 0 0 1px var(--teal); }
.slot-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .5rem; margin-top: .5rem; }
.slot-time { height: 2.75rem; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--card); color: var(--foreground); font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; }
.slot-day:hover, .slot-time:hover { border-color: var(--teal); }
.slot-time[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--teal-foreground); }
.slots-status { margin: .75rem 0 0; min-height: 1.25rem; font-weight: 500; }
.slots-status.is-error { color: var(--destructive); }

/* Pie */
footer { padding: 2.5rem 0; border-top: 1px solid var(--border); font-size: var(--text-sm); color: var(--muted-foreground); background: var(--card); }
footer .wrap { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { footer .wrap { grid-template-columns: 1fr auto; align-items: center; } }
footer img { height: 26px; width: auto; display: block; }
footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
footer nav a { text-decoration: none; }
footer nav a:hover { color: var(--foreground); }
footer .legal { grid-column: 1 / -1; font-size: var(--text-xs); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
