/* desarrollum.com — paleta original de Divi (#6ec3fd / #2ea3f2), Poppins + Noto Sans, con acabado actualizado. */

:root {
    --brand: #6ec3fd;
    --brand-strong: #2ea3f2;
    --brand-ink: #0a6fb8;          /* texto de marca sobre claro (AA) */
    --ink: #1d2433;
    --muted: #5f6673;
    --bg: #f4f6f9;
    --surface: #ffffff;
    --surface-2: #eef3f8;
    --line: #e2e8f0;
    --radius: 20px;
    --radius-sm: 12px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
    --shadow-lift: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 40px rgba(28, 165, 255, .18);
    --header-h: 72px;
    --container: 1200px;
    --font-head: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(.2, .7, .2, 1);
    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --brand-ink: #8fd0ff;
        --ink: #e7e9ee;
        --muted: #a3a9b5;
        --bg: #131519;
        --surface: #1f2228;
        --surface-2: #262a31;
        --line: #33373f;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .35);
        --shadow-lift: 0 2px 4px rgba(0, 0, 0, .3), 0 18px 40px rgba(46, 163, 242, .22);
    }
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 1rem/1.7 var(--font-body);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-ink); text-underline-offset: .2em; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0 0 .6em; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code { font-size: .9em; }
:focus-visible { outline: 3px solid var(--brand-strong); outline-offset: 3px; border-radius: 4px; }
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--surface); padding: .6rem 1rem; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.icon { flex: none; }

/* Buttons & chips */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .85rem 1.6rem; border-radius: 999px; border: 0; cursor: pointer;
    font: 600 .8rem/1 var(--font-head); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
    transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: linear-gradient(135deg, var(--brand), var(--brand-strong)); color: #fff; box-shadow: 0 10px 24px -10px rgba(28, 165, 255, .7); }
.btn--light { background: #fff; color: #1574c2; box-shadow: 0 14px 30px -16px rgba(0, 40, 90, .45); }
.btn--ghost { background: transparent; color: var(--brand-ink); box-shadow: inset 0 0 0 2px currentColor; }
.btn--sm { padding: .6rem 1.1rem; font-size: .72rem; }
.btn--block { width: 100%; }
.link-button { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.chip {
    display: inline-flex; align-items: center; padding: .5rem 1.05rem; border-radius: 999px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink);
    font: 400 .9rem/1.2 var(--font-head); cursor: pointer; text-decoration: none;
    transition: background .2s, color .2s, border-color .2s, box-shadow .2s;
}
.chip:hover { border-color: var(--brand); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.chip--small { padding: .3rem .8rem; font-size: .78rem; margin-bottom: .8rem; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    backdrop-filter: saturate(160%) blur(14px);
    -webkit-backdrop-filter: saturate(160%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px -18px rgba(0, 0, 0, .35); }
.site-header__inner { display: flex; align-items: center; gap: 1rem; min-height: var(--header-h); }
.site-logo img { height: 44px; width: auto; }
@media (prefers-color-scheme: dark) { .site-logo img { filter: brightness(1.15); } }
.nav-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--ink); padding: .5rem; cursor: pointer; }
.site-nav { margin-left: auto; }
.site-nav__list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.site-nav__item { position: relative; display: flex; align-items: center; }
.site-nav__link:not(.btn) {
    padding: .55rem .8rem; border-radius: 10px; color: var(--ink); text-decoration: none;
    font: 500 .95rem/1 var(--font-body);
}
.site-nav__link:not(.btn):hover, .site-nav__link[aria-current] { color: var(--brand-ink); background: var(--surface-2); }
.site-nav__item .btn { margin-left: .5rem; }
.submenu-toggle { background: none; border: 0; padding: .3rem; margin-left: -.5rem; color: var(--muted); cursor: pointer; display: inline-flex; }
.submenu-toggle .icon { width: 16px; height: 16px; transition: transform .2s; }
.submenu {
    position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px; list-style: none; margin: 0; padding: .5rem;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow);
    opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility .18s;
}
.submenu::before { content: ''; position: absolute; inset: -10px 0 auto; height: 10px; }
.submenu a { display: block; padding: .55rem .8rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .92rem; }
.submenu a:hover { background: var(--surface-2); color: var(--brand-ink); }
.has-children:hover > .submenu, .has-children:focus-within > .submenu, .has-children.is-open > .submenu { opacity: 1; visibility: visible; transform: none; }
.has-children.is-open .submenu-toggle .icon { transform: rotate(180deg); }

@media (max-width: 900px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; margin: 0; max-height: calc(100vh - var(--header-h)); overflow: auto;
        background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
        display: none; padding: 1rem 1.25rem 1.5rem;
    }
    .site-nav.is-open { display: block; }
    .site-nav__list { flex-direction: column; align-items: stretch; }
    .site-nav__item { flex-wrap: wrap; }
    .site-nav__link:not(.btn) { flex: 1; padding: .9rem .5rem; font-size: 1.05rem; }
    .submenu-toggle { margin: 0; padding: .8rem; }
    .submenu { position: static; flex-basis: 100%; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 .5rem 1rem; }
    .has-children:hover > .submenu, .has-children:focus-within > .submenu { display: none; }
    .has-children.is-open > .submenu { display: block; }
    .site-nav__item .btn { margin: .75rem 0 0; flex: 1; }
}

/* Title band (Divi #titulo) */
.page-hero {
    position: relative; overflow: hidden;
    background:
        radial-gradient(60rem 18rem at 10% -40%, color-mix(in srgb, var(--brand) 32%, transparent), transparent 70%),
        radial-gradient(40rem 16rem at 100% 0%, color-mix(in srgb, var(--brand-strong) 18%, transparent), transparent 70%);
}
.page-hero__inner { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1.25rem, 3vw, 2rem); text-align: center; }
.page-hero h1 {
    margin: 0 auto; max-width: 52rem; color: var(--muted);
    font-size: clamp(1.15rem, 1rem + 1.1vw, 1.7rem); font-weight: 500; text-align: center !important;
}
.page-hero h1 strong { color: var(--ink); font-weight: 700; }
.page-hero h2 { font-size: 1rem; color: var(--brand-ink); }

/* Portfolio */
.portfolio { padding-bottom: clamp(3rem, 6vw, 5rem); }
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: 0 0 2rem; }
.card-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
.card { animation: fade-in .35s var(--ease) both; }
.card[hidden] { display: none; }
.card__link {
    display: flex; flex-direction: column; align-items: center; gap: 1rem; height: 100%;
    padding: 1.5rem 1.25rem 1.25rem; border-radius: var(--radius); background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
    transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s;
}
.card__link:hover, .card__link:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lift); border-color: color-mix(in srgb, var(--brand) 55%, var(--line)); }
.card__media { display: grid; place-items: center; width: 100%; aspect-ratio: 1; max-width: 170px; }
.card__media img { max-height: 100%; width: auto; object-fit: contain; border-radius: 18%; transition: transform .3s var(--ease); }
.card__link:hover .card__media img { transform: scale(1.04); }
.card__title {
    font: 500 .95rem/1.35 var(--font-head); text-align: center;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.portfolio__empty { text-align: center; color: var(--muted); }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } }

/* Project */
.project-head__inner { display: flex; align-items: center; justify-content: flex-end; gap: clamp(1.25rem, 4vw, 3rem); padding-block: clamp(2rem, 5vw, 3.5rem) 1.5rem; }
.project-head__logo {
    flex: none; width: clamp(84px, 12vw, 128px); padding: .75rem; border-radius: 28%;
    background: var(--surface); box-shadow: var(--shadow); transform: rotate(-4deg);
}
.project-head__logo img { border-radius: 22%; }
.project-head__text { text-align: right; }
.project-head h1 { font-size: clamp(1.6rem, 1rem + 3vw, 3.1rem); margin: 0; }
.project-preview__grid { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.project-preview__hero img { margin-inline: auto; max-height: 340px; width: auto; }
.shadow-img { border-radius: var(--radius-sm); box-shadow: 0 30px 60px -30px rgba(16, 24, 40, .45); transform: perspective(1200px) rotateY(-6deg) rotateX(2deg); transition: transform .5s var(--ease); }
.shadow-img:hover { transform: none; }
.related { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.related h2 { font-size: 1rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.related ul { list-style: none; margin: 0; padding: 0; }
.related li + li { border-top: 1px solid var(--line); }
.related a { display: block; padding: .55rem 0; text-decoration: none; font-weight: 500; }
.related a:hover { text-decoration: underline; }

.project-details {
    position: relative; color: #fff;
    background: linear-gradient(160deg, var(--brand) 0%, #45b0f8 55%, var(--brand-strong) 100%);
    clip-path: polygon(0 4vw, 100% 0, 100% calc(100% - 4vw), 0 100%);
    padding-block: calc(4vw + 2.5rem) calc(4vw + 3rem);
    margin-bottom: 2rem;
}
@media (prefers-color-scheme: dark) { .project-details { background: linear-gradient(160deg, #1f6ea8 0%, #17598b 100%); } }
.gallery { list-style: none; margin: 0 0 2rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }
.gallery__item {
    position: relative; display: grid; place-items: center; width: 170px; height: 150px; padding: .75rem;
    background: #fff; border-radius: 18px; box-shadow: 0 16px 30px -18px rgba(0, 30, 70, .55);
    transition: transform .25s var(--ease);
}
.gallery__item img { max-height: 120px; width: auto; object-fit: contain; }
.gallery__item:hover { transform: translateY(-3px) scale(1.02); }
.gallery__zoom { position: absolute; right: 8px; bottom: 8px; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(13, 30, 50, .65); color: #fff; opacity: 0; transition: opacity .2s; }
.gallery__item:hover .gallery__zoom, .gallery__item:focus-visible .gallery__zoom { opacity: 1; }
.gallery__zoom .icon { width: 16px; height: 16px; }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; font-size: .95rem; }
.post-nav__link { color: #fff; font-weight: 500; text-decoration: none; opacity: .9; }
.post-nav__link:hover { opacity: 1; text-decoration: underline; }
.project-details__grid { display: grid; grid-template-columns: 3fr 2fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.project-links { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.project-links h2 { font-size: 1.25rem; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
.compare figure { margin: 0; background: #fff; border-radius: var(--radius-sm); padding: .5rem; color: var(--ink); text-align: center; }
.compare figcaption { font: 500 .85rem var(--font-head); padding-top: .4rem; }

/* Prose (exported HTML) */
.prose { max-width: 46rem; }
.prose h1 { font-size: clamp(1.6rem, 1.2rem + 1.5vw, 2.3rem); }
.prose h2 { font-size: clamp(1.25rem, 1.1rem + .8vw, 1.75rem); margin-top: 1.4em; }
.prose h3 { font-size: 1.15rem; margin-top: 1.2em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose--inverse, .prose--inverse a { color: #fff; }
.prose--inverse li::marker { color: rgba(255, 255, 255, .8); }
article.section .prose { max-width: 52rem; }
article.section .prose p:has(> br:only-child) { display: none; }

/* Archive */
.archive-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.archive-card { padding: 1.5rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.archive-card__media img { width: 120px; margin: 0 auto 1rem; border-radius: 18%; }
.archive-card h2 { font-size: 1.1rem; }
.archive-card h2 a { color: var(--ink); text-decoration: none; }
.archive-card h2 a:hover { color: var(--brand-ink); }
.archive-card p { color: var(--muted); font-size: .92rem; margin: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1.5rem; margin-top: 2.5rem; font-family: var(--font-head); }

/* Contact */
.contact { background: linear-gradient(180deg, var(--surface-2), transparent); }
.contact__grid { display: grid; grid-template-columns: 2fr 3fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start; }
.contact__intro h2 { color: var(--brand-ink); font-size: 1rem; text-transform: uppercase; letter-spacing: .1em; }
.contact__intro h1 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.1rem); }
.card-surface { padding: clamp(1.25rem, 3vw, 2.25rem); border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: 1rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field label { font: 500 .88rem var(--font-head); }
.field input, .field textarea {
    width: 100%; padding: .8rem 1rem; border-radius: var(--radius-sm); border: 1px solid var(--line);
    background: var(--bg); color: var(--ink); font: inherit; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--brand-strong); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 30%, transparent); }
[aria-invalid="true"] { border-color: #d64545 !important; }
.field__error { color: #c53030; font-size: .85rem; }
@media (prefers-color-scheme: dark) { .field__error { color: #ff8a8a; } }
.check { display: grid; grid-template-columns: auto 1fr; gap: .6rem; align-items: start; margin-bottom: .9rem; font-size: .9rem; }
.check input { width: 18px; height: 18px; margin-top: .2rem; accent-color: var(--brand-strong); }
.check .field__error { grid-column: 2; }
.check__hint { color: var(--muted); }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-legal { margin: 1rem 0 0; font-size: .75rem; color: var(--muted); }
.notice { padding: 1rem 1.25rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem; }
.notice p { margin: .3rem 0 0; }
.notice--ok { background: #e7f8ee; color: #135c33; }
.notice--error { background: #fdecec; color: #8a1c1c; }
@media (prefers-color-scheme: dark) { .notice--ok { background: #12351f; color: #b6f0cb; } .notice--error { background: #3a1616; color: #ffc9c9; } }
.offices { padding-block: clamp(2.5rem, 5vw, 4rem); }
.offices__grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; align-items: center; }
.office { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-align: center; font-style: normal; color: var(--muted); }
.office .icon { width: 28px; height: 28px; color: var(--brand-strong); margin-bottom: .4rem; }
.office strong { color: var(--ink); font-family: var(--font-head); }
.offices__logo img { width: 120px; }

/* Cookie table */
.table-scroll { overflow-x: auto; margin-bottom: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .6rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-head); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; padding-block: 1.5rem; font-size: .88rem; color: var(--muted); }
.site-footer__copy { margin: 0; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.site-footer__links a, .site-footer__links .link-button { color: var(--muted); text-decoration: none; }
.site-footer__links a:hover, .site-footer__links .link-button:hover { color: var(--brand-ink); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; }
.lightbox::backdrop { background: rgba(8, 12, 20, .9); backdrop-filter: blur(4px); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox img { max-width: min(92vw, 1400px); max-height: 88vh; width: auto; height: auto; object-fit: contain; border-radius: 8px; }
.lightbox button { position: fixed; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; }
.lightbox button:hover { background: rgba(255, 255, 255, .25); }
.lightbox__close { top: 1rem; right: 1rem; }
.lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

.error-page { text-align: center; }
.error-page .prose { margin-inline: auto; }

/* Responsive */
@media (max-width: 800px) {
    .project-head__inner { flex-direction: column; text-align: center; }
    .project-head__text { text-align: center; }
    .project-preview__grid, .project-details__grid, .contact__grid { grid-template-columns: 1fr; }
    .field-row { grid-template-columns: 1fr; }
    .offices__grid { grid-template-columns: 1fr; }
    .offices__logo { order: -1; justify-self: center; }
    .shadow-img { transform: none; }
    .project-details { clip-path: polygon(0 24px, 100% 0, 100% calc(100% - 24px), 0 100%); padding-block: 3.5rem 4rem; }
    .gallery__item { width: calc(50vw - 2rem); }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
    .shadow-img { transform: none; }
}

/* cookieconsent: marca */
#cc-main {
    --cc-font-family: var(--font-body);
    --cc-btn-primary-bg: var(--brand-strong);
    --cc-btn-primary-border-color: var(--brand-strong);
    --cc-btn-primary-hover-bg: #1a8ad6;
    --cc-btn-primary-hover-border-color: #1a8ad6;
    --cc-toggle-on-bg: var(--brand-strong);
    --cc-modal-border-radius: var(--radius);
    --cc-btn-border-radius: 999px;
}
@media (prefers-color-scheme: dark) {
    #cc-main {
        --cc-bg: #1f2228; --cc-primary-color: #e7e9ee; --cc-secondary-color: #a3a9b5;
        --cc-btn-secondary-bg: #2c3038; --cc-btn-secondary-color: #e7e9ee; --cc-btn-secondary-border-color: #2c3038;
        --cc-btn-secondary-hover-bg: #363b44; --cc-btn-secondary-hover-border-color: #363b44;
        --cc-separator-border-color: #33373f; --cc-cookie-category-block-bg: #262a31;
        --cc-cookie-category-block-border: #33373f; --cc-cookie-category-block-hover-bg: #2c3038;
        --cc-cookie-category-block-hover-border: #3a3f48; --cc-cookie-category-expanded-block-bg: #23262c;
        --cc-overlay-bg: rgba(0, 0, 0, .65); --cc-toggle-readonly-bg: #3a3f48;
        --cc-footer-bg: #1a1d22; --cc-footer-border-color: #33373f;
    }
}
