/*
 * Landing polish layer for TecnoSurf / Bimmer Modular.
 * Loaded after content-hub-core.css so it can refine the public landing without touching app internals.
 */

:root {
    --hub-ink: #112536;
    --hub-ink-soft: #294457;
    --hub-muted: #5d7181;
    --hub-night: #102533;
    --hub-night-soft: #244455;
    --hub-accent: #c9651f;
    --hub-accent-soft: rgba(201, 101, 31, 0.12);
    --hub-highlight: #0b7f71;
    --hub-highlight-soft: rgba(11, 127, 113, 0.12);
    --hub-blue: #2563eb;
    --hub-blue-soft: rgba(37, 99, 235, 0.11);
    --hub-coral: #dc5f45;
    --hub-coral-soft: rgba(220, 95, 69, 0.12);
    --hub-surface: #f6f8f4;
    --hub-surface-alt: #e9f0eb;
    --hub-border: rgba(17, 37, 54, 0.12);
    --hub-shadow: 0 18px 42px rgba(17, 37, 54, 0.12);
    --hub-shadow-soft: 0 10px 28px rgba(17, 37, 54, 0.08);
    --hub-radius-xl: 12px;
    --hub-radius-lg: 8px;
    --hub-radius-md: 8px;
}

html {
    scroll-padding-top: 18px;
}

body:not(.dark-mode) {
    background: #f6f8f4;
}

body:not(.dark-mode)::before {
    opacity: 0.52;
}

.content-hub {
    overflow: hidden;
    padding-top: 24px;
    background:
        linear-gradient(180deg, rgba(248, 251, 247, 0.98), rgba(238, 244, 239, 0.96) 52%, rgba(246, 248, 244, 1)),
        linear-gradient(120deg, rgba(201, 101, 31, 0.08), transparent 34%, rgba(11, 127, 113, 0.08) 72%, rgba(37, 99, 235, 0.07));
}

.content-hub::before {
    inset: 16px max(14px, calc((100vw - var(--hub-max)) / 2)) auto;
    height: 520px;
    border-radius: 12px;
    background:
        linear-gradient(115deg, rgba(7, 20, 31, 0.92), rgba(16, 37, 51, 0.62) 46%, rgba(16, 37, 51, 0.1)),
        url("../../../img/xxx.webp") center / cover no-repeat;
    box-shadow: 0 34px 80px rgba(10, 24, 35, 0.26);
    opacity: 0.42;
}

.content-hub::after {
    background-image:
        linear-gradient(rgba(17, 37, 54, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(17, 37, 54, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, black 0%, black 64%, transparent 100%);
}

.hub-shell {
    display: grid;
    gap: 16px;
}

.hub-breadcrumbs {
    margin: 0;
    color: rgba(255, 248, 238, 0.78);
    font-weight: 800;
    letter-spacing: 0.02em;
}

.hub-breadcrumbs span {
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.28);
}

.hub-app-prompt {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    color: #fff8ee;
    background:
        linear-gradient(135deg, rgba(10, 24, 35, 0.86), rgba(14, 64, 74, 0.78)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.1), transparent);
    box-shadow: 0 18px 42px rgba(10, 24, 35, 0.2);
    backdrop-filter: blur(14px) saturate(1.3);
}

.hub-app-prompt > div:first-child {
    min-width: 0;
}

.hub-app-kicker,
.hub-card-tag,
.page-related-tag {
    border: 1px solid rgba(11, 127, 113, 0.18);
    border-radius: 8px;
    font-size: 0.74rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hub-app-kicker {
    display: inline-flex;
    width: fit-content;
    padding: 5px 9px;
    color: #fed7aa;
    background: rgba(201, 101, 31, 0.18);
}

.hub-app-title {
    display: block;
    margin-top: 8px;
    color: #fff8ee;
    font-family: var(--hub-display);
    font-size: clamp(1.15rem, 2vw, 1.5rem);
    line-height: 1.12;
    text-wrap: balance;
}

.hub-app-copy {
    max-width: 70ch;
    margin: 6px 0 0;
    color: rgba(255, 248, 238, 0.78);
    line-height: 1.52;
}

.hub-app-prompt-actions,
.hub-app-repeater {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.hub-app-prompt-actions {
    justify-content: flex-end;
}

.hub-hero {
    isolation: isolate;
    overflow: hidden;
    grid-template-columns: minmax(0, 1.18fr) minmax(320px, 0.72fr);
    gap: clamp(18px, 2.5vw, 30px);
    min-height: 660px;
    margin-bottom: 30px;
    padding: clamp(22px, 4vw, 42px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 12px;
    background:
        linear-gradient(105deg, rgba(4, 13, 22, 0.94) 0%, rgba(12, 29, 42, 0.9) 44%, rgba(12, 29, 42, 0.54) 72%, rgba(12, 29, 42, 0.68) 100%),
        url("../../../img/xxx.webp") center / cover no-repeat;
    box-shadow: 0 34px 90px rgba(10, 24, 35, 0.34);
}

.hub-hero::before,
.hub-hero::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.hub-hero::before {
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.075) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(90deg, black 0%, black 52%, transparent 100%);
}

.hub-hero::after {
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    height: 44%;
    background: linear-gradient(180deg, transparent, rgba(4, 13, 22, 0.84));
}

.hub-hero-card {
    align-self: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
}

.hub-hero-card::before,
.hub-hero-card::after {
    display: none;
}

.hub-hero-card .hub-eyebrow {
    color: #ffe0b7;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(254, 215, 170, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.hub-hero-card h1 {
    max-width: 19ch;
    margin-top: 18px;
    margin-bottom: 18px;
    color: #fff7ed;
    letter-spacing: 0;
    text-shadow: 0 18px 45px rgba(0, 0, 0, 0.42);
}

.hub-hero-card .hub-lead {
    max-width: 68ch;
    color: rgba(255, 248, 238, 0.82);
    font-weight: 560;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.34);
}

.hub-hero-card .hub-lead:first-of-type {
    color: rgba(255, 248, 238, 0.96);
    font-size: clamp(1.06rem, 1.4vw, 1.2rem);
}

.hub-signal-pill {
    border-radius: 8px;
    color: rgba(255, 248, 238, 0.9);
    background: rgba(255, 255, 255, 0.11);
    border-color: rgba(255, 255, 255, 0.18);
}

.hub-button,
.hub-button-secondary,
.hub-button-tertiary,
.hub-link-inline {
    border-radius: 8px;
    font-weight: 850;
}

.hub-button {
    color: #fff;
    background: linear-gradient(135deg, #dc5f45, #d68228 52%, #0b7f71);
    box-shadow: 0 16px 34px rgba(201, 101, 31, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.hub-button-secondary {
    color: #fff8ee;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.18);
}

.hub-button-tertiary {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(11, 127, 113, 0.48));
    border-color: rgba(191, 219, 254, 0.32);
}

.hub-button:hover,
.hub-button-secondary:hover,
.hub-button-tertiary:hover,
.hub-link-inline:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px rgba(6, 20, 31, 0.24);
}

.hub-proof-band {
    gap: 10px;
}

.hub-proof-band article,
.hub-meta-strip .hub-card {
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hub-proof-band strong {
    font-family: var(--hub-display);
    font-size: clamp(1.24rem, 2vw, 1.62rem);
}

.hub-meta-strip {
    gap: 10px;
}

.hub-hero-side {
    align-self: stretch;
    grid-template-rows: auto 1fr;
}

.hub-fact-card,
.hub-side-note {
    color: #fff8ee;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(8, 21, 32, 0.74);
    box-shadow: 0 24px 58px rgba(0, 0, 0, 0.26);
    backdrop-filter: blur(18px) saturate(1.25);
}

.hub-fact-card img {
    aspect-ratio: 16 / 9;
    filter: saturate(1.05) contrast(1.04) brightness(0.92);
}

.hub-fact-card-body,
.hub-side-note {
    padding: 18px;
}

.hub-fact-list li {
    border-bottom-color: rgba(255, 255, 255, 0.12);
    color: rgba(255, 248, 238, 0.72);
}

.hub-fact-list strong,
.hub-side-note > strong,
.hub-side-matrix strong {
    color: #fff8ee;
}

.hub-side-note p,
.hub-side-matrix span {
    color: rgba(255, 248, 238, 0.72);
}

.hub-side-matrix div {
    border-radius: 8px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
}

.ad-placeholder {
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(18, 41, 60, 0.96), rgba(33, 84, 82, 0.9)),
        linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
}

.ad-placeholder-label {
    color: #c8f7ef;
    background: rgba(11, 127, 113, 0.2);
    border-color: rgba(200, 247, 239, 0.18);
}

.hub-section {
    margin-bottom: 34px;
    padding-top: 10px;
}

.hub-section-head {
    align-items: flex-end;
    margin-bottom: 20px;
}

.hub-section-head h2 {
    max-width: 18ch;
    padding-left: 0;
    color: #112536;
    letter-spacing: 0;
}

.hub-section-head h2::before {
    position: static;
    display: block;
    width: 54px;
    height: 4px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, var(--hub-coral), var(--hub-accent), var(--hub-highlight));
}

.hub-section-head p {
    color: #506778;
    font-size: 1.02rem;
}

.hub-card,
.hub-guide-card,
.hub-feature-card,
.hub-faq-card,
.hub-table-wrap,
.tool-shell-head,
.page-article,
.page-sidebar-card,
.page-cta,
.legal-card {
    border-radius: 8px;
}

.hub-guide-grid {
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
    gap: 16px;
}

.hub-feature-grid,
.hub-faq-grid {
    gap: 16px;
}

.hub-guide-card,
.hub-feature-card,
.hub-faq-card {
    padding: 19px;
    border-color: rgba(17, 37, 54, 0.11);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 247, 0.92)),
        linear-gradient(135deg, rgba(201, 101, 31, 0.08), transparent 46%, rgba(11, 127, 113, 0.08));
}

.hub-guide-card:nth-child(3n + 1),
.hub-guide-card:nth-child(3n + 2),
.hub-guide-card:nth-child(3n) {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 247, 0.92)),
        linear-gradient(135deg, rgba(201, 101, 31, 0.08), transparent 46%, rgba(37, 99, 235, 0.08));
}

.hub-guide-card::before,
.hub-feature-card::before,
.hub-faq-card::before {
    height: 3px;
    background: linear-gradient(90deg, var(--hub-coral), var(--hub-accent), var(--hub-highlight), var(--hub-blue));
}

.hub-guide-card h3,
.hub-feature-card strong,
.hub-faq-card strong {
    color: #112536;
}

.hub-guide-card h3 {
    min-height: 0;
    -webkit-line-clamp: 4;
}

.hub-guide-card p {
    -webkit-line-clamp: 3;
}

.hub-card-tag {
    color: #0b7f71;
    background: rgba(11, 127, 113, 0.1);
}

.hub-guide-link,
.page-related-card a {
    width: fit-content;
    margin-top: auto;
    padding: 8px 10px;
    border-radius: 8px;
    color: #a74916;
    background: rgba(201, 101, 31, 0.1);
    text-decoration: none;
}

.hub-guide-link:hover,
.page-related-card a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--hub-accent), var(--hub-highlight));
    text-decoration: none;
}

.hub-tasacion-panel {
    border-radius: 12px;
    background:
        linear-gradient(135deg, rgba(15, 35, 54, 0.98), rgba(22, 85, 78, 0.9) 56%, rgba(64, 90, 45, 0.84)),
        url("../../../img/xxx.webp") center / cover no-repeat;
}

.hub-tasacion-panel .hub-card-tag {
    color: #ffe0b7;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(254, 215, 170, 0.22);
}

.hub-tasacion-grid div {
    border-radius: 8px;
}

.hub-table-wrap {
    border-color: rgba(17, 37, 54, 0.12);
    background: rgba(255, 255, 255, 0.96);
}

.hub-table th {
    color: #112536;
    background: #e7efe9;
}

.hub-table tbody tr:nth-child(even) {
    background: rgba(231, 239, 233, 0.34);
}

.hub-table td {
    color: #263f51;
}

.hub-note {
    color: #506778;
}

.hub-app-repeater {
    margin-top: 18px;
}

.hub-app-prompt-final {
    margin-top: 20px;
    color: #112536;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 246, 255, 0.9)),
        linear-gradient(90deg, rgba(201, 101, 31, 0.08), rgba(11, 127, 113, 0.08));
    border-color: rgba(17, 37, 54, 0.12);
    box-shadow: var(--hub-shadow);
}

.hub-app-prompt-final .hub-app-kicker {
    color: #a74916;
    background: rgba(201, 101, 31, 0.1);
}

.hub-app-prompt-final .hub-app-title {
    color: #112536;
}

.hub-app-prompt-final .hub-app-copy {
    color: #5d7181;
}

.hub-app-prompt-final .hub-button-secondary {
    color: #173042;
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(17, 37, 54, 0.12);
}

.hub-app-fab {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 55;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(135deg, #dc5f45, #d68228 52%, #0b7f71);
    box-shadow: 0 18px 40px rgba(17, 37, 54, 0.24);
    font-weight: 900;
    text-decoration: none;
}

.hub-app-fab:hover {
    color: #fff;
    transform: translateY(-2px);
}

body.has-active-project .hub-app-fab {
    display: none;
}

.interactive-tool-shell {
    background:
        linear-gradient(180deg, #f6f8f4 0%, #e8f0eb 100%),
        linear-gradient(120deg, rgba(201, 101, 31, 0.06), transparent, rgba(37, 99, 235, 0.05));
}

.tool-shell-head {
    border-color: rgba(17, 37, 54, 0.12);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 244, 0.94)),
        linear-gradient(90deg, rgba(201, 101, 31, 0.08), rgba(11, 127, 113, 0.04));
}

.tool-shell-head h2 {
    color: #112536;
    letter-spacing: 0;
}

body.dark-mode .content-hub {
    background:
        linear-gradient(180deg, rgba(8, 15, 24, 0.98), rgba(12, 24, 35, 0.98)),
        linear-gradient(120deg, rgba(220, 95, 69, 0.12), transparent 42%, rgba(11, 127, 113, 0.1));
}

body.dark-mode .content-hub::before {
    opacity: 0.24;
}

body.dark-mode .hub-app-prompt-final,
body.dark-mode .hub-guide-card,
body.dark-mode .hub-feature-card,
body.dark-mode .hub-faq-card,
body.dark-mode .tool-shell-head {
    background: linear-gradient(180deg, rgba(18, 31, 44, 0.98), rgba(16, 28, 40, 0.96));
}

body.dark-mode .hub-section-head h2,
body.dark-mode .hub-guide-card h3,
body.dark-mode .hub-feature-card strong,
body.dark-mode .hub-faq-card strong,
body.dark-mode .hub-app-prompt-final .hub-app-title,
body.dark-mode .tool-shell-head h2 {
    color: #fff8ee;
}

body.dark-mode .hub-section-head p,
body.dark-mode .hub-app-prompt-final .hub-app-copy {
    color: #bdd0dd;
}

body.dark-mode .hub-table-wrap {
    background: rgba(18, 31, 44, 0.96);
}

body.dark-mode .hub-table th {
    color: #f8fafc;
    background: rgba(30, 49, 65, 0.98);
}

body.dark-mode .hub-table td {
    color: #d8e4eb;
}

@media (max-width: 1180px) {
    .hub-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .hub-hero-side {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: auto;
    }
}

@media (max-width: 860px) {
    .content-hub {
        padding-top: 18px;
    }

    .content-hub::before {
        inset: 10px 12px auto;
        height: 520px;
    }

    .hub-breadcrumbs {
        color: rgba(17, 37, 54, 0.74);
    }

    .hub-breadcrumbs span {
        text-shadow: none;
    }

    .hub-app-prompt {
        grid-template-columns: 1fr;
        color: #112536;
        background: rgba(255, 255, 255, 0.94);
        border-color: rgba(17, 37, 54, 0.12);
    }

    .hub-app-title {
        color: #112536;
    }

    .hub-app-copy {
        color: #5d7181;
    }

    .hub-app-prompt-actions {
        justify-content: stretch;
    }

    .hub-app-prompt .hub-button-secondary {
        color: #173042;
        background: rgba(246, 248, 244, 0.92);
        border-color: rgba(17, 37, 54, 0.12);
    }

    .hub-hero {
        padding: 20px;
        background:
            linear-gradient(180deg, rgba(4, 13, 22, 0.92) 0%, rgba(8, 21, 32, 0.92) 58%, rgba(8, 21, 32, 0.78) 100%),
            url("../../../img/xxx.webp") center / cover no-repeat;
    }

    .hub-hero-card h1 {
        font-size: clamp(2rem, 12vw, 3.2rem);
    }

    .hub-hero-side {
        grid-template-columns: 1fr;
    }

    .hub-proof-band,
    .hub-meta-strip {
        gap: 10px;
    }

    .hub-section-head h2 {
        max-width: none;
    }

    .hub-app-fab {
        display: none;
    }
}

@media (max-width: 720px) {
    .hub-mobile-floating-nav {
        border-radius: 12px;
        background: rgba(7, 20, 31, 0.92);
    }

    .hub-mobile-floating-nav a {
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.08);
    }

    .hub-mobile-floating-nav a.is-primary {
        background: linear-gradient(135deg, #dc5f45, #0b7f71);
    }

    .hub-mobile-door a {
        border-radius: 8px;
    }
}

@media (max-width: 520px) {
    .hub-hero,
    .hub-app-prompt,
    .ad-placeholder,
    .hub-tasacion-panel {
        margin-inline: -4px;
    }

    .hub-button,
    .hub-button-secondary,
    .hub-button-tertiary {
        width: 100%;
        min-height: 46px;
        padding-inline: 14px;
    }

    .hub-app-prompt-actions,
    .hub-app-repeater,
    .hub-tasacion-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
}
