/* Sitio público. Los colores de marca llegan como variables desde el panel (--primary, --on-primary, --accent). */
:root{
  --ink:#14202e;--muted:#4a5868;--line:#d8dfe7;--bg:#fff;--soft:#f3f5f8;
  --radius:10px;--wrap:72rem;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth;-webkit-text-size-adjust:100%}
body{margin:0;font:1rem/1.65 var(--font);color:var(--ink);background:var(--bg)}
img{max-width:100%;height:auto}
a{color:var(--primary);text-underline-offset:.18em}
a:hover{text-decoration-thickness:2px}
h1,h2,h3{line-height:1.15;letter-spacing:-.015em;margin:0 0 .6rem;font-weight:700}
p{margin:0 0 1rem}
ul,ol{margin:0;padding:0}
:focus-visible{outline:3px solid var(--accent);outline-offset:3px;border-radius:4px}
.wrap{width:min(100% - 2rem,var(--wrap));margin-inline:auto}
.skip-link{position:absolute;left:1rem;top:-4rem;background:var(--ink);color:#fff;padding:.6rem 1rem;border-radius:var(--radius);z-index:100}
.skip-link:focus{top:1rem}

/* Botones */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.4rem;padding:.8rem 1.4rem;border:2px solid transparent;border-radius:var(--radius);
  font:inherit;font-weight:600;line-height:1.2;text-decoration:none;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}
.btn-sm{padding:.5rem 1rem;font-size:.95rem}
.btn-primary{background:var(--primary);color:var(--on-primary)}
.btn-primary:hover{filter:brightness(1.12)}
.btn-outline{border-color:var(--primary);color:var(--primary);background:transparent}
.btn-outline:hover{background:var(--primary);color:var(--on-primary)}
.btn-light{background:#fff;color:var(--primary)}
.btn-light:hover{background:#eef2f6}
.btn-ghost{border-color:currentColor;color:inherit;background:transparent}
.btn-ghost:hover{background:rgba(255,255,255,.14)}

/* Cabecera */
.site-header{position:sticky;top:0;z-index:50;background:rgba(255,255,255,.96);border-bottom:1px solid var(--line);backdrop-filter:blur(6px)}
.header-inner{display:flex;align-items:center;justify-content:space-between;gap:1rem;min-height:4rem}
.brand{display:inline-flex;align-items:center;text-decoration:none;color:var(--ink);font-weight:800;font-size:1.1rem;letter-spacing:-.01em}
.brand-logo{max-height:2.4rem;width:auto}
.site-nav{display:flex;align-items:center;gap:1.5rem}
.site-nav ul{display:flex;gap:1.25rem;list-style:none}
.site-nav a:not(.btn){color:var(--ink);text-decoration:none;font-weight:500;padding:.25rem 0;border-bottom:2px solid transparent}
.site-nav a:not(.btn):hover,.site-nav a[aria-current=page]{border-bottom-color:var(--accent)}
.nav-toggle{display:none;padding:.5rem .9rem;border:1px solid var(--line);border-radius:var(--radius);background:#fff;font:inherit;font-weight:600;cursor:pointer}
@media (max-width:759px){
  .js .nav-toggle{display:inline-block}
  .js .site-nav{display:none;position:absolute;left:0;right:0;top:100%;flex-direction:column;align-items:stretch;gap:1rem;
    padding:1rem;background:#fff;border-bottom:1px solid var(--line)}
  .js .site-nav.open{display:flex}
  .js .site-nav ul{flex-direction:column;gap:.25rem}
  .js .site-nav a:not(.btn){display:block;padding:.6rem 0}
  .site-nav{flex-wrap:wrap}
}

/* Portada */
.hero{background:var(--soft);border-bottom:1px solid var(--line);
  background-image:linear-gradient(var(--line) 1px,transparent 1px),linear-gradient(90deg,var(--line) 1px,transparent 1px);
  background-size:2.5rem 2.5rem;background-position:-1px -1px}
.hero-inner{display:grid;gap:2.5rem;padding:3.5rem 0;align-items:center}
@media (min-width:900px){.hero-inner{grid-template-columns:1.05fr .95fr;padding:5rem 0;gap:3.5rem}}
.hero-copy{background:var(--soft);padding:.25rem 0}
.eyebrow{margin:0 0 .75rem;font-size:.85rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--primary)}
.hero h1{font-size:clamp(2rem,5vw,3.25rem);letter-spacing:-.025em;margin-bottom:1rem}
.lead{font-size:1.15rem;color:var(--muted);max-width:38rem}
.hero-actions{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:1.75rem}

/* Vista de ejemplo de la portada */
.frame,.mock{margin:0;border:1px solid var(--line);border-radius:12px;background:#fff;overflow:hidden;box-shadow:0 18px 40px -22px rgba(20,32,46,.35)}
.frame-bar,.mock-bar{display:flex;gap:.35rem;padding:.6rem .8rem;background:#eef1f5;border-bottom:1px solid var(--line)}
.frame-bar i,.mock-bar i{width:.6rem;height:.6rem;border-radius:50%;background:#c3ccd7}
.frame img{display:block;width:100%;height:auto}
.frame figcaption{padding:.65rem .9rem;font-size:.9rem;color:var(--muted);border-top:1px solid var(--line)}
.mock-body{display:grid;grid-template-columns:5.5rem 1fr;min-height:15rem}
.mock-side{padding:.9rem .7rem;border-right:1px solid var(--line);background:#f8f9fb}
.mock-side b{display:block;height:.55rem;border-radius:3px;background:#d3dae3;margin-bottom:.7rem}
.mock-side b:first-child{background:var(--primary)}
.mock-main{padding:1rem}
.mock-row{height:.6rem;border-radius:3px;background:#dfe5ec;margin-bottom:.7rem}
.mock-row.w60{width:60%;height:.9rem;background:#c7d0db}.mock-row.w80{width:80%}.mock-row.w40{width:40%}
.mock-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:.6rem;margin:1rem 0}
.mock-grid u{display:block;height:3.4rem;border-radius:6px;border:1px solid var(--line);border-top:3px solid var(--accent);background:#fafbfc}

/* Secciones */
.section{padding:4rem 0}
.section-soft{background:var(--soft);border-block:1px solid var(--line)}
.section-head{max-width:42rem;margin-bottom:2rem}
.section-head h2{font-size:clamp(1.5rem,3vw,2.1rem);position:relative;padding-top:1rem}
.section-head h2::before{content:"";position:absolute;top:0;left:0;width:2.5rem;height:4px;background:var(--accent);border-radius:2px}
.section-head p{color:var(--muted);margin:0}
.section-more{margin:2rem 0 0}
.link-arrow{font-weight:600;text-decoration:none}
.link-arrow:hover{text-decoration:underline}

/* Tarjetas de proyecto */
.grid-cards{display:grid;gap:1.5rem;grid-template-columns:repeat(auto-fill,minmax(18.5rem,1fr))}
.card{position:relative;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--radius);background:#fff;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.card:hover,.card:focus-within{border-color:var(--primary);box-shadow:0 14px 30px -20px rgba(20,32,46,.45)}
.card-media{aspect-ratio:16/10;background:#e8edf2;overflow:hidden}
.card-media img{display:block;width:100%;height:100%;object-fit:cover}
.card-media-empty{display:grid;place-items:center;font-size:3rem;font-weight:800;color:#9aa8b8;background:repeating-linear-gradient(45deg,#eef2f6,#eef2f6 10px,#e6ebf1 10px,#e6ebf1 20px)}
.card-body{display:flex;flex-direction:column;flex:1;padding:1.1rem 1.25rem 1.25rem}
.card-meta{display:flex;flex-wrap:wrap;align-items:center;gap:.4rem .6rem;margin:0 0 .6rem;font-size:.8rem}
.card-category{color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.card-title{font-size:1.2rem;margin:0 0 .5rem}
.card-link{color:var(--ink);text-decoration:none}
.card-link::after{content:"";position:absolute;inset:0}
.card-text{color:var(--muted);margin:0 0 1rem;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.card-more{margin-top:auto;font-weight:600;color:var(--primary)}
.status{display:inline-block;padding:.1rem .55rem;border-radius:99px;border:1px solid;font-weight:600;font-size:.78rem;line-height:1.5}
.status-implemented,.status-in_production{background:#e8f6ec;border-color:#8fcfa1;color:#14532d}
.status-functional_demo{background:#e6f0fb;border-color:#97bce6;color:#12396b}
.status-in_development{background:#fff4d6;border-color:#e3c46a;color:#5c4300}
.status-prototype{background:#f1ecfa;border-color:#c0aee3;color:#43296b}
.status-concept{background:#eef1f5;border-color:#c3ccd7;color:#3a4756}
.status-sample{background:#fff;border-color:#8a96a5;color:#3a4756;border-style:dashed}

/* Soluciones */
.solutions{list-style:none;display:grid;gap:0 3rem;grid-template-columns:1fr}
@media (min-width:800px){.solutions{grid-template-columns:1fr 1fr}}
.solutions li{display:flex;gap:1.1rem;padding:1.25rem 0;border-top:1px solid var(--line)}
.solutions-n{font-variant-numeric:tabular-nums;font-weight:800;font-size:1.5rem;line-height:1.2;color:var(--accent);min-width:2.2rem}
.solutions h3{font-size:1.15rem;margin-bottom:.3rem}
.solutions h3 a{color:var(--ink);text-decoration:none}
.solutions h3 a:hover{color:var(--primary);text-decoration:underline}
.solutions p{margin:0;color:var(--muted)}

/* Proceso */
.steps{list-style:none;display:grid;gap:1.75rem;grid-template-columns:1fr;counter-reset:none}
@media (min-width:700px){.steps{grid-template-columns:repeat(auto-fit,minmax(11rem,1fr))}}
.steps li{position:relative;padding-top:.25rem}
.steps-n{display:inline-grid;place-items:center;width:2.4rem;height:2.4rem;margin-bottom:.8rem;border-radius:50%;background:var(--primary);color:var(--on-primary);font-weight:700}
.steps h3{font-size:1.05rem}
.steps p{color:var(--muted);font-size:.95rem;margin:0}
@media (min-width:700px){.steps li:not(:last-child)::after{content:"";position:absolute;top:1.45rem;left:3rem;right:-1rem;height:2px;background:var(--line)}}

/* Llamada final */
.cta-band{background:var(--primary);color:var(--on-primary);padding:3.5rem 0}
.cta-inner{display:grid;gap:1.5rem;align-items:center}
@media (min-width:800px){.cta-inner{grid-template-columns:1.4fr 1fr}.cta-actions{justify-content:flex-end}}
.cta-band h2{font-size:clamp(1.5rem,3vw,2rem)}
.cta-band p{margin:0;max-width:36rem;opacity:.95}
.cta-actions{display:flex;flex-wrap:wrap;gap:.75rem}
.cta-band :focus-visible{outline-color:#fff}

/* Pie */
.site-footer{background:var(--ink);color:#dfe5ec;padding:3rem 0 1.5rem;font-size:.95rem}
.site-footer a{color:#fff}
.footer-grid{display:grid;gap:2rem;grid-template-columns:1fr}
@media (min-width:760px){.footer-grid{grid-template-columns:1.5fr 1fr 1fr}}
.footer-brand{font-weight:800;font-size:1.1rem;color:#fff;margin-bottom:.5rem}
.footer-text{color:#b9c3cf;max-width:28rem}
.footer-title{font-weight:700;color:#fff;margin-bottom:.5rem;text-transform:uppercase;font-size:.8rem;letter-spacing:.08em}
.site-footer ul{list-style:none}
.site-footer li{margin-bottom:.35rem}
.footer-bottom{margin-top:2rem;padding-top:1rem;border-top:1px solid rgba(255,255,255,.15);color:#9eabba}
.footer-bottom p{margin:0}

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

/* ===== Catálogo y detalle de proyecto (Parte 9) ===== */
.visually-hidden{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
.page-head{background:var(--soft);border-bottom:1px solid var(--line);padding:2.5rem 0 2rem}
.page-head h1{font-size:clamp(1.8rem,4vw,2.6rem)}
.filters{display:grid;gap:.75rem 1rem;margin-top:1.5rem;grid-template-columns:1fr}
@media (min-width:760px){.filters{grid-template-columns:2fr 1.4fr 1.4fr auto;align-items:end}}
.filters label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.25rem}
.filters input,.filters select{width:100%;padding:.65rem .75rem;border:1px solid #aeb9c6;border-radius:var(--radius);font:inherit;background:#fff;color:var(--ink)}
.filters-actions{display:flex;gap:.5rem}
.results-count{color:var(--muted);margin-bottom:1rem}
.empty{padding:2.5rem 0;color:var(--muted);font-size:1.05rem}
.pagination{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-top:2rem}
.pagination-info{color:var(--muted);font-size:.95rem}

.project-hero{background:var(--soft);border-bottom:1px solid var(--line);padding:1.5rem 0 3rem}
.breadcrumb ol{display:flex;flex-wrap:wrap;gap:.25rem .5rem;list-style:none;font-size:.9rem;color:var(--muted);margin-bottom:1.5rem}
.breadcrumb li+li::before{content:"/";margin-right:.5rem;color:#8a96a5}
.breadcrumb a{color:var(--muted)}
.project-hero-grid{display:grid;gap:2rem;align-items:start}
@media (min-width:900px){.project-hero-grid{grid-template-columns:1fr 1fr;gap:3rem}}
.project-hero h1{font-size:clamp(1.8rem,4.2vw,2.8rem);margin:.4rem 0 .8rem}
.project-cover img{display:block;width:100%;height:auto}
.facts{display:grid;gap:.5rem;margin:1.5rem 0;padding:1rem 0;border-block:1px solid var(--line)}
.facts div{display:flex;flex-wrap:wrap;gap:.25rem 1rem}
.facts dt{min-width:10rem;color:var(--muted);font-size:.9rem}
.facts dd{margin:0;font-weight:600}
.notice{padding:.65rem .9rem;border-left:4px solid var(--accent);background:#fff;border-radius:0 var(--radius) var(--radius) 0;font-size:.95rem;color:var(--muted)}
.prose{max-width:48rem}
.prose h2{font-size:clamp(1.4rem,3vw,1.9rem);position:relative;padding-top:1rem;margin-bottom:1rem}
.prose h2::before{content:"";position:absolute;top:0;left:0;width:2.5rem;height:4px;background:var(--accent);border-radius:2px}
.prose p{color:#243142}

.features{list-style:none;display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fill,minmax(19rem,1fr))}
.feature{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:1.25rem;display:flex;flex-direction:column;gap:.9rem}
.feature img{width:100%;aspect-ratio:16/10;object-fit:contain;background:var(--soft);border-radius:6px;border:1px solid var(--line)}
.feature h3{font-size:1.1rem}
.feature p{color:var(--muted);margin:0 0 .5rem}

.gallery{list-style:none;display:grid;gap:1.25rem;grid-template-columns:repeat(auto-fill,minmax(15rem,1fr))}
.gallery-item{display:block;border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;background:var(--soft);cursor:zoom-in}
.gallery-item:hover{border-color:var(--primary)}
.gallery-item img{display:block;width:100%;aspect-ratio:16/10;object-fit:contain}
.gallery-cap{margin:.5rem 0 0;font-size:.9rem;color:var(--muted)}
.gallery-cap strong{display:block;color:var(--ink)}

.demo{max-width:42rem}
.demo-kind{margin-bottom:.75rem}
.subhead{font-size:1rem;margin:1.5rem 0 .6rem;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.subhead:first-of-type{margin-top:0}
.chips{list-style:none;display:flex;flex-wrap:wrap;gap:.5rem}
.chips li{padding:.3rem .8rem;border:1px solid var(--line);border-radius:99px;background:#fff;font-size:.92rem}
.chips-links a{text-decoration:none;font-weight:600}
.chips-links li:hover{border-color:var(--primary)}

/* Visor de imágenes */
html.lb-open{overflow:hidden}
.lb{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;background:rgba(10,16,24,.93);padding:1rem}
.lb[hidden]{display:none}
.lb-inner{position:relative;display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.75rem;width:min(100%,72rem);max-height:100%}
.lb-fig{margin:0;text-align:center;min-width:0}
.lb-fig img{max-width:100%;max-height:72vh;width:auto;height:auto;object-fit:contain;background:#fff;border-radius:6px}
.lb-fig figcaption{margin-top:.75rem;color:#e6ebf1;font-size:.95rem;max-width:44rem;margin-inline:auto}
.lb-fig figcaption strong{display:block;color:#fff}
.lb button{width:2.75rem;height:2.75rem;border:0;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:1.6rem;line-height:1;cursor:pointer}
.lb button:hover{background:rgba(255,255,255,.3)}
.lb :focus-visible{outline:3px solid #fff;outline-offset:2px}
.lb-close{position:absolute;top:-3.25rem;right:0}
.lb-count{grid-column:1 / -1;text-align:center;margin:0;color:#c9d2dc;font-size:.9rem}
@media (max-width:600px){.lb-inner{grid-template-columns:1fr 1fr;grid-template-areas:"fig fig" "prev next"}.lb-fig{grid-area:fig}.lb-prev{grid-area:prev;justify-self:start}.lb-next{grid-area:next;justify-self:end}.lb-close{top:-3rem}}
.lb.single .lb-prev,.lb.single .lb-next{display:none}

/* ===== Servicios y contacto (Parte 10) ===== */
.muted{color:var(--muted)}
.solutions-wide{grid-template-columns:1fr}
.check-points{list-style:none;display:grid;gap:.6rem}
.check-points li{position:relative;padding-left:1.8rem}
.check-points li::before{content:"";position:absolute;left:0;top:.45rem;width:.9rem;height:.9rem;border-radius:50%;background:var(--accent)}
.contact-grid{display:grid;gap:2.5rem}
@media (min-width:860px){.contact-grid{grid-template-columns:1.5fr 1fr}}
.form-public label{display:block;margin:1rem 0 .3rem;font-weight:600}
.form-public input,.form-public textarea{width:100%;padding:.75rem;border:1px solid #aeb9c6;border-radius:var(--radius);font:inherit;color:var(--ink);background:#fff}
.form-public textarea{resize:vertical}
.form-public input[aria-invalid=true],.form-public textarea[aria-invalid=true]{border-color:#b42318}
.form-public .btn{margin-top:1.25rem}
.form-public .grid-2{display:grid;gap:0 1.25rem;grid-template-columns:1fr}
@media (min-width:600px){.form-public .grid-2{grid-template-columns:1fr 1fr}}
.hint{margin:.4rem 0 0;font-size:.88rem;color:var(--muted)}
.req{color:#b42318}
.field-error{margin:.35rem 0 0;color:#b42318;font-weight:600;font-size:.92rem}
.alert{padding:.9rem 1rem;border-radius:var(--radius);margin:0 0 1.25rem;border:1px solid}
.alert-ok{background:#e8f6ec;border-color:#8fcfa1;color:#14532d}
.alert-error{background:#fdecea;border-color:#f1a9a0;color:#7a1a12}
.hp{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}
.contact-side{padding:1.5rem;border:1px solid var(--line);border-radius:var(--radius);background:var(--soft);align-self:start}
.contact-side h2{font-size:1.2rem}
.contact-list{list-style:none;display:grid;gap:1rem}
.error-page{padding:4rem 0 5rem;min-height:50vh}
