:root {
    color-scheme: dark;
    --blue: #004da2;
    --blue-d: #0a5fc4;
    --blue-l: rgba(111, 168, 236, .12);
    --accent: #6fa8ec;
    --red: #e1262d;
    --ink: #e8eef7;
    --bg: #060b14;
    --soft: #0e1726;
    --card: #18253b;
    --navy: #0a1c36;
    --muted: #93a3b8;
    --muted-d: #93a3b8;
    --line: #24334d;
    --r: 20px;
    --shadow: 0 24px 60px -24px rgba(0, 0, 0, .7);
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font: 400 17px/1.65 "Archivo", system-ui, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
svg { width: 1.2em; height: 1.2em; flex: none; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
/* Archivo Expanded for headings and big numbers */
h1, h2, h3, h4, .stat strong, .float strong { font-stretch: 125%; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -.01em; }

.container { width: min(1200px, 100% - 40px); margin-inline: auto; }
section { position: relative; padding: clamp(72px, 10vw, 120px) 0; }
main > section:not(.hero, .page-hero)::before { content: ""; position: absolute; top: 0; left: 50%; width: min(1200px, 100% - 40px); height: 1px; translate: -50% 0; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.eyebrow svg { width: 16px; height: 16px; color: var(--red); }
.head { max-width: 680px; margin-bottom: 56px; }
.head p { color: var(--muted); margin-top: 16px; font-size: 1.1rem; }
.center { text-align: center; margin-inline: auto; }

.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 26px; border-radius: 999px; font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1; border: 2px solid transparent; cursor: pointer; transition: .25s; white-space: nowrap; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 12px 24px -12px rgba(0, 77, 162, .8); }
.btn-primary:hover { background: var(--blue-d); transform: translateY(-2px); }
.btn-ghost { background: var(--card); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

/* Header */
.header { position: fixed; inset: 0 0 auto; z-index: 50; transition: .3s; }
.header.scrolled, .header.open { background: rgba(6, 11, 20, .88); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); }
.nav { display: flex; align-items: center; gap: 32px; height: 80px; }
.logo img { height: 60px; width: auto; }
.menu { display: flex; gap: 30px; margin-left: auto; font-weight: 600; font-size: .95rem; }
.menu a { position: relative; padding: 6px 0; }
.menu a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: var(--accent); scale: 0 1; transition: scale .3s; }
.menu a.active::after { scale: 1; }
.menu a:hover, .menu a.active, .phone:hover { color: var(--accent); }
.nav-cta { display: flex; align-items: center; gap: 22px; }
.nav-cta .btn { padding: 12px 22px; }
.phone { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.phone svg { color: var(--accent); }
.burger { display: none; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); cursor: pointer; }
.burger svg + svg, .open .burger svg:first-child { display: none; }
.open .burger svg + svg { display: block; }

/* Side section dots (desktop) */
.dots { position: fixed; top: 50%; right: 24px; z-index: 40; display: grid; gap: 14px; translate: 0 -50%; }
.dots a { position: relative; display: block; width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: .3s; }
.dots a:hover, .dots a.active { background: var(--accent); }
.dots a.active { box-shadow: 0 0 0 4px var(--blue-l); }
.dots a::before { content: attr(data-label); position: absolute; top: 50%; right: 22px; padding: 5px 11px; border-radius: 8px; background: var(--card); color: var(--ink); font-size: .75rem; font-weight: 600; white-space: nowrap; translate: 0 -50%; opacity: 0; pointer-events: none; transition: opacity .3s; }
.dots a:hover::before, .dots a.flash::before { opacity: 1; }

/* Hero */
.hero { padding: 150px 0 100px; background: radial-gradient(900px 500px at 90% 0, rgba(0, 77, 162, .35), transparent 70%), var(--soft); }
.hero .container { display: grid; grid-template-columns: 1.05fr .95fr; gap: 72px; align-items: center; }
.hero h1 span { color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); margin: 24px 0 36px; max-width: 560px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }
.checks { display: grid; grid-template-columns: repeat(2, max-content); gap: 14px 32px; margin-top: 44px; font-weight: 600; font-size: .95rem; }
.checks li { display: flex; align-items: center; gap: 10px; }
.checks svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--blue); color: #fff; stroke-width: 3; }
.hero-media { position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.float { position: absolute; display: flex; align-items: center; gap: 14px; padding: 16px 22px 16px 16px; background: var(--card); border-radius: 18px; box-shadow: var(--shadow); }
.float strong { display: block; font-size: 1.6rem; line-height: 1; font-weight: 800; }
.float small { display: block; color: var(--muted); font-size: .85rem; }
.float-1 { left: -36px; bottom: 56px; }
.float-2 { right: -24px; top: 48px; }
.ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--blue-l); color: var(--accent); flex: none; }

/* Stats */
.stats { background: var(--navy); color: #fff; padding: 52px 0; }
.stats .container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat { padding-left: 24px; border-left: 2px solid rgba(255, 255, 255, .12); }
.stat strong { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.1; }
.stat span { color: var(--muted-d); font-size: .95rem; }

/* Services */
.cats { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cat { position: relative; display: flex; align-items: flex-end; min-height: 560px; overflow: hidden; border-radius: 28px; isolation: isolate; }
.cat img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: scale .8s; }
.cat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(6, 11, 20, .05) 15%, rgba(6, 11, 20, .96) 80%); }
.cat:hover img { scale: 1.06; }
.cat:hover .link svg { transform: translateX(4px); }
.cat-body { display: block; padding: 40px; }
.cat-body p { max-width: 460px; margin: 10px 0 14px; color: #c5d2e3; }
.cat-body small { display: block; margin-bottom: 22px; color: var(--muted); font-size: .9rem; }
.ic-lg { display: grid; place-items: center; width: 60px; height: 60px; margin-bottom: 22px; border-radius: 16px; color: #fff; flex: none; }
.ic-lg svg { width: 28px; height: 28px; }
.ic-lg.interior { background: var(--blue); }
.ic-lg.exterior { background: var(--red); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.svc { position: relative; padding: 26px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: .25s; }
.svc:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.svc h4 { margin: 18px 0 6px; font-size: 1.05rem; letter-spacing: -.01em; }
.svc p { color: var(--muted); font-size: .95rem; }
.svc .link { margin-top: 18px; }

/* Category pages */
.page-hero { padding: 150px 0 80px; background: radial-gradient(900px 500px at 90% 0, rgba(0, 77, 162, .35), transparent 70%), var(--soft); }
.page-hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: center; }
.page-hero-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 28px; box-shadow: var(--shadow); }
.link.back-link { display: flex; width: fit-content; margin-bottom: 28px; }
.back-link svg { rotate: 180deg; }
.page-cta { background: var(--soft); text-align: center; }
.page-cta h2 { margin-bottom: 28px; }

/* Blog and blog admin */
.post-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 12px; margin-bottom: 18px; }
.post-card small { color: var(--muted); font-size: .85rem; }
.post-body { font-size: 1.1rem; }
.post-body p { max-width: 760px; }
.post-body p + p { margin-top: 1.2em; }
.admin .container { align-items: start; }
.admin-list { margin: 16px 0 24px; }
.admin-list li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); }
.link:hover svg { transform: translateX(4px); }
.link svg { transition: .25s; }
.badge { position: absolute; top: 22px; right: 22px; padding: 5px 11px; border-radius: 999px; background: rgba(225, 38, 45, .16); color: #ff7a7f; font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

/* Gallery */
.gallery { columns: 3 280px; column-gap: 16px; }
.albums { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; max-width: 880px; margin-inline: auto; padding: 12px 12px 0; }
/* Lands just below the fixed header (scroll-padding-top) when opening/closing an album */
.album-stage { scroll-margin-top: 28px; }
.album { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.album-cover { position: relative; display: block; aspect-ratio: 4 / 5; transition: scale .2s; }
.album:active .album-cover { scale: .97; }
.album-cover::before, .album-cover::after { content: ""; position: absolute; inset: 0; border: 1px solid var(--line); border-radius: 18px; background: var(--card); transition: .4s; }
.album-cover::before { rotate: -4deg; }
.album-cover::after { rotate: 3deg; }
.album:hover .album-cover::before { rotate: -8deg; translate: -8px 0; }
.album:hover .album-cover::after { rotate: 7deg; translate: 8px 0; }
.album-cover img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow); transition: .4s; }
.album:hover .album-cover img { translate: 0 -6px; }
.album-info { display: block; margin-top: 22px; }
.album-info b { display: block; font-size: 1.15rem; }
.album-info small, .album-bar small { color: var(--muted); font-size: .9rem; }
.album-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 20px; margin-bottom: 32px; }
.album-bar h3 { font-size: 1.6rem; }
.albums.sub { grid-template-columns: repeat(3, 1fr); max-width: none; }
.crumbs { margin-bottom: 2px; color: var(--muted); font-size: .9rem; }
.crumbs button { padding: 0; border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; }
.crumbs button:hover { text-decoration: underline; }
.back svg { rotate: 180deg; }
.play { position: absolute; inset: 0; display: grid; place-items: center; width: 68px; height: 68px; margin: auto; border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--blue); box-shadow: var(--shadow); }
.play svg { width: 26px; height: 26px; margin-left: 4px; }
.gallery button { position: relative; display: block; width: 100%; margin-bottom: 16px; padding: 0; border: 0; border-radius: 16px; overflow: hidden; background: var(--soft); cursor: zoom-in; break-inside: avoid; }
.gallery img { width: 100%; transition: transform .6s; }
.gallery button:hover img { transform: scale(1.05); }
.lightbox { width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: none; }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(8, 14, 24, .94); }
.lightbox img, .lightbox video { max-width: calc(100vw - 200px); max-height: 84vh; width: auto; border-radius: 14px; user-select: none; }
.lb-btn { position: fixed; display: grid; place-items: center; width: 54px; height: 54px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; transition: background .2s; }
.lb-btn:hover { background: rgba(255, 255, 255, .25); }
.lb-prev, .lb-next { top: 50%; translate: 0 -50%; }
.lb-prev { left: 28px; }
.lb-prev svg { rotate: 180deg; }
.lb-next { right: 28px; }
.lb-close { top: 20px; right: 20px; width: 46px; height: 46px; }
.lb-count { position: fixed; bottom: 28px; left: 50%; translate: -50% 0; color: #c5d2e3; font-size: .9rem; font-weight: 600; letter-spacing: .1em; }

/* Before & after: the before photo sits on top, clipped at --x (set by the range input) */
@property --x { syntax: '<percentage>'; inherits: true; initial-value: 50%; }
.before-after, .reviews { background: var(--soft); }
.ba-list { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; max-width: 920px; margin-inline: auto; }
.ba { padding: 14px; border-radius: var(--r); background: var(--card); }
.ba-slider { position: relative; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 12px; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ba-slider img + img { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.ba-slider::before, .ba-slider::after { content: ""; position: absolute; z-index: 1; left: var(--x); translate: -50% 0; pointer-events: none; }
.ba-slider::before { inset-block: 0; width: 3px; background: #fff; }
.ba-slider::after { content: "\2039\00a0\203A"; top: 50%; display: grid; place-items: center; width: 48px; height: 48px; margin-top: -24px; border-radius: 50%; background: #fff; color: var(--blue); font-size: 1.4rem; font-weight: 800; box-shadow: var(--shadow); }
.ba-slider b { position: absolute; top: 12px; left: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(6, 11, 20, .8); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; }
.ba-slider b + b { left: auto; right: 12px; background: var(--blue); }
.ba-slider input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.ba figcaption { padding: 16px 6px 4px; font-weight: 700; }
/* Once in view, the handle sweeps once to show it can be dragged */
@keyframes ba-hint { 30% { --x: 22%; } 70% { --x: 78%; } }
@media (prefers-reduced-motion: no-preference) { .ba.in .ba-slider { animation: ba-hint 1.8s .5s ease-in-out; } }

/* Reviews */
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quotes figure { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; padding: 44px 40px 36px; background: var(--card); border-radius: var(--r); }
.quotes figure::before { content: "“"; position: absolute; top: 12px; right: 32px; font: 800 6rem/1 Georgia, serif; color: var(--blue-l); }
.quotes blockquote { position: relative; font-size: 1.08rem; font-weight: 500; line-height: 1.6; }
figcaption { display: flex; align-items: center; gap: 14px; }
figcaption small { display: block; color: var(--muted); font-size: .88rem; }
.avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; }

/* Estimate */
.estimate { color: #fff; background: linear-gradient(100deg, rgba(11, 22, 38, .97) 35%, rgba(0, 59, 125, .85)), url(../img/cta-bg.webp) center / cover; }
.estimate .container { display: grid; grid-template-columns: 1fr 1.05fr; gap: 72px; align-items: center; }
.estimate .lead { color: #c5d2e3; }
.contact-list { display: grid; gap: 18px; }
.contact-list a { display: flex; align-items: center; gap: 16px; font-weight: 600; }
.contact-list .ic { background: rgba(255, 255, 255, .1); color: #fff; }
.contact-list small { display: block; color: var(--muted-d); font-size: .8rem; font-weight: 500; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 44px; border-radius: 24px; background: var(--card); color: var(--ink); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .5); }
.form h3, .form .full, .form .btn, .notice { grid-column: 1 / -1; }
.form h3 { font-size: 1.5rem; }
.form label { display: grid; gap: 8px; font-size: .85rem; font-weight: 600; }
.form input, .form select, .form textarea { width: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); font: inherit; font-size: 1rem; color: var(--ink); transition: .2s; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--blue); border-color: transparent; background: var(--bg); }
.form textarea { resize: vertical; }
.form .btn { justify-content: center; margin-top: 6px; }
.notice { padding: 14px 16px; border-radius: 12px; font-size: .95rem; font-weight: 600; }
.notice.ok { background: rgba(34, 197, 94, .14); color: #74e3a1; }
.notice.err { background: rgba(239, 68, 68, .14); color: #ff8f8f; }
.hp { position: absolute; left: -9999px; }

/* Footer */
.footer { padding: 80px 0 32px; background: #04080f; color: var(--muted-d); font-size: .95rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 48px; }
.footer-logo { height: 80px; width: auto; margin-bottom: 20px; }
.footer p { max-width: 320px; }
.social { display: flex; gap: 10px; margin-top: 22px; }
.social a { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: rgba(255, 255, 255, .08); color: #fff; transition: .2s; }
.social a:hover { background: var(--blue); }
.footer h4 { margin-bottom: 18px; color: #fff; font-size: 1rem; }
.footer ul { display: grid; gap: 10px; }
.footer a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; padding-top: 26px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .88rem; }
.mobile-bar { display: none; }

/* Links page (QR code) */
.links-page { min-height: 100vh; padding-bottom: 0; background: radial-gradient(700px 400px at 50% 0, rgba(0, 77, 162, .35), transparent 70%), var(--bg); }
.links { width: min(440px, 100% - 32px); margin-inline: auto; padding: 56px 0 40px; text-align: center; }
.links-logo { height: 120px; width: auto; margin: 0 auto 16px; }
.links p { color: var(--muted); margin-bottom: 32px; }
.links ul { display: grid; gap: 14px; }
.links-btn { display: flex; align-items: center; gap: 14px; padding: 12px 18px 12px 12px; border: 1px solid var(--line); border-radius: 18px; background: var(--card); font-weight: 700; text-align: left; box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .8); transition: .2s; }
.links-btn:hover { transform: translateY(-2px); border-color: var(--blue); }
.links-btn > svg { margin-left: auto; color: var(--muted); }
.links small { display: block; margin-top: 36px; color: var(--muted); }

/* Scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 1080px) {
    .menu, .phone, .dots { display: none; }
    .burger { display: grid; }
    .nav-cta { margin-left: auto; }
    .open .menu { display: flex; flex-direction: column; gap: 4px; position: absolute; top: 80px; left: 0; right: 0; padding: 12px 20px 24px; background: var(--bg); box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .8); font-size: 1.1rem; }
    .open .menu a { padding: 10px 0; }
    .hero .container, .page-hero .container, .estimate .container { grid-template-columns: 1fr; gap: 56px; }
    .hero-media img { aspect-ratio: 4 / 3; }
    .quotes { grid-template-columns: 1fr; max-width: 680px; margin-inline: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    body { font-size: 16px; padding-bottom: 84px; }
    .nav-cta .btn { display: none; }
    .hero { padding: 120px 0 72px; }
    .checks, .ba-list, .quotes, .footer-grid, .form, .stats .container { grid-template-columns: 1fr; }
    .float { padding: 12px 16px 12px 12px; }
    .float-1 { left: 12px; bottom: 12px; }
    .float-2 { right: 12px; top: 12px; }
    .form { padding: 28px 22px; }
    .quotes figure { padding: 36px 26px 28px; }
    .mobile-bar { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; position: fixed; inset: auto 12px 12px; z-index: 40; padding: 8px; border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
    .mobile-bar .btn { justify-content: center; padding: 13px; }
    .albums, .albums.sub { grid-template-columns: 1fr 1fr; gap: 36px 20px; }
    .cats { grid-template-columns: 1fr; }
    .cat { min-height: 460px; }
    .cat-body { padding: 28px 24px; }
    .lightbox img, .lightbox video { max-width: calc(100vw - 24px); max-height: 74vh; }
    .lb-prev, .lb-next { top: auto; bottom: 16px; translate: none; }
    .lb-prev { left: 16px; }
    .lb-next { right: 16px; }
    .lb-count { bottom: 32px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, .js .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
}
