/* ============================================================
   Landing · Cantabria — Component Styles
   ============================================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-body);
    line-height: var(--font-body-lh);
    color: var(--color-text-primary);
    background-color: var(--color-bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Typography utilities ---- */
.text-display {
    font-size: var(--font-display);
    line-height: var(--font-display-lh);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.text-h1 {
    font-size: var(--font-h1);
    line-height: var(--font-h1-lh);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.text-h2 {
    font-size: var(--font-h2);
    line-height: var(--font-h2-lh);
    font-weight: 600;
}

.text-h3 {
    font-size: var(--font-h3);
    line-height: var(--font-h3-lh);
    font-weight: 600;
}

.text-body-lg {
    font-size: var(--font-body-lg);
    line-height: var(--font-body-lg-lh);
}

.text-body {
    font-size: var(--font-body);
    line-height: var(--font-body-lh);
}

.text-small {
    font-size: var(--font-small);
    line-height: var(--font-small-lh);
}

.text-label {
    font-size: var(--font-label);
    line-height: var(--font-label-lh);
    font-weight: 400;
}

.text-button {
    font-size: var(--font-button);
    line-height: var(--font-button-lh);
    font-weight: 500;
    letter-spacing: 0.04em;
}

/* ---- Header ---- */
.site-header {
    position: relative;
    z-index: 100;
    background: var(--color-bg-page);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.site-header .container {
    max-width: var(--container-max);
}

.site-logo {
    font-size: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--color-text-primary);
    text-decoration: none;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: var(--space-6);
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    font-size: var(--font-small);
    line-height: var(--font-small-lh);
    color: var(--color-text-primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.site-nav a:hover {
    opacity: 0.7;
}

/* ---- Hero ---- */
.hero {
    position: relative;
    min-height: calc(100vh - var(--header-height) - var(--footer-height));
    min-height: calc(100dvh - var(--header-height) - var(--footer-height));
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.22) * 0.35)) 0%,
        rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.22) * 0.75)) 40%,
        rgba(0, 0, 0, var(--hero-overlay-opacity, 0.22)) 100%
    );
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: var(--space-7) 0 var(--space-6);
}

.hero__container {
    max-width: var(--container-max);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.hero__grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    align-items: stretch;
    min-height: calc(100vh - var(--header-height) - var(--footer-height) - var(--space-7) - var(--space-6));
    min-height: calc(100dvh - var(--header-height) - var(--footer-height) - var(--space-7) - var(--space-6));
}

.hero__left {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
    padding-top: var(--space-6);
}

.hero__label {
    font-size: var(--font-label);
    line-height: var(--font-label-lh);
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-inverse);
    margin-bottom: var(--space-4);
}

.hero__title {
    color: var(--color-text-inverse);
    margin: 0;
    max-width: 560px;
}

.hero__stats {
    display: flex;
    align-items: center;
    gap: var(--space-5);
    margin-top: auto;
    padding-top: var(--space-8);
}

.hero__stat {
    color: var(--color-text-inverse);
    font-size: var(--font-h2);
    line-height: var(--font-h2-lh);
    font-weight: 600;
    white-space: nowrap;
}

.hero__stat-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.4);
    flex-shrink: 0;
}

/* ---- Form ---- */
.hero__form-wrap {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.lead-form {
    width: 100%;
}

.lead-form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5) var(--space-6);
    margin-bottom: var(--space-5);
}

.lead-form__row--full {
    grid-template-columns: 1fr;
}

.lead-form__field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.lead-form__label {
    font-size: var(--font-label);
    line-height: var(--font-label-lh);
    color: var(--color-text-inverse);
    font-weight: 400;
}

.lead-form__input,
.lead-form__select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border-light);
    border-radius: 0;
    padding: var(--space-2) 0;
    font-family: var(--font-family);
    font-size: var(--font-body);
    line-height: var(--font-body-lh);
    color: var(--color-text-inverse);
    outline: none;
    transition: border-color 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
}

.lead-form__input::placeholder {
    color: var(--color-input-placeholder);
}

.lead-form__input:focus,
.lead-form__select:focus {
    border-bottom-color: var(--color-text-inverse);
}

.lead-form__select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: var(--space-5);
}

.lead-form__select option {
    color: var(--color-text-primary);
    background: var(--color-bg-page);
}

.lead-form__select:invalid,
.lead-form__select option[value=""] {
    color: var(--color-input-placeholder);
}

.lead-form__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: var(--space-6);
    gap: var(--space-4);
    flex-wrap: wrap;
}

.lead-form__footer .btn-submit {
    margin-left: auto;
}

.lead-form__checkbox-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.lead-form__checkbox {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.lead-form__checkbox:checked {
    background: var(--color-action-primary);
    border-color: var(--color-action-primary);
}

.lead-form__checkbox:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.lead-form__checkbox-label {
    font-size: var(--font-small);
    line-height: var(--font-small-lh);
    color: var(--color-text-inverse);
    user-select: none;
}

.lead-form__checkbox-label a {
    color: var(--color-text-inverse);
    text-decoration: underline;
}

.btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    min-width: 140px;
    background: var(--color-action-primary);
    color: var(--color-text-inverse);
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: var(--font-button);
    line-height: var(--font-button-lh);
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.btn-submit:hover {
    background: var(--color-action-primary-hover);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form feedback */
.form-alert {
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-sm);
    font-size: var(--font-small);
    line-height: var(--font-small-lh);
    display: none;
}

.form-alert--success {
    background: rgba(122, 139, 110, 0.25);
    color: var(--color-text-inverse);
    border: 1px solid rgba(122, 139, 110, 0.5);
}

.form-alert--error {
    background: rgba(220, 53, 69, 0.2);
    color: #ffcccc;
    border: 1px solid rgba(220, 53, 69, 0.4);
}

.form-alert.is-visible {
    display: block;
}

.lead-form__input.is-invalid,
.lead-form__select.is-invalid {
    border-bottom-color: #ff6b6b;
}

/* ---- Footer ---- */
.site-footer {
    background: var(--color-bg-page);
    height: var(--footer-height);
    display: flex;
    align-items: center;
}

.site-footer .container {
    max-width: var(--container-max);
}

.site-footer__text {
    font-size: var(--font-small);
    line-height: var(--font-small-lh);
    color: var(--color-text-secondary);
    margin: 0;
}

.site-footer__text a {
    color: var(--color-text-secondary);
    text-decoration: none;
}

.site-footer__text a:hover {
    text-decoration: underline;
}

/* ---- Mobile nav toggle ---- */
.menu-toggle {
    background: none;
    border: none;
    padding: var(--space-2) 0;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: var(--font-small);
    line-height: var(--font-small-lh);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-text-primary);
}

.mobile-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--color-bg-page);
    border-bottom: 1px solid var(--color-border-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 99;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-nav__list {
    list-style: none;
    margin: 0;
    padding: var(--space-4) var(--space-5);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-nav__list a {
    font-size: var(--font-body);
    line-height: var(--font-body-lh);
    color: var(--color-text-primary);
    text-decoration: none;
}

/* ---- Mobile Hero + Form (390px · overlay on image) ---- */
.hero-mobile {
    position: relative;
    background-size: cover;
    background-position: center 35%;
    background-repeat: no-repeat;
    min-height: calc(100dvh - var(--header-height));
}

.hero-mobile__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.22) * 0.55)) 0%,
        rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.22) * 0.75)) 28%,
        rgba(0, 0, 0, var(--hero-overlay-opacity, 0.22)) 100%
    );
    pointer-events: none;
}

.hero-mobile__container {
    position: relative;
    z-index: 1;
    padding: 52px var(--space-5) var(--space-6);
    display: flex;
    flex-direction: column;
}

.hero-mobile__intro {
    margin: 0 0 48px;
}

.hero-mobile__label {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-text-inverse);
    margin: 0 0 8px;
}

.hero-mobile__title {
    font-size: var(--font-h1);
    line-height: var(--font-h1-lh);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--color-text-inverse);
    margin: 0 0 20px;
    max-width: 320px;
}

.hero-mobile__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.hero-mobile__stat {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--color-text-inverse);
    white-space: nowrap;
}

.hero-mobile__stat-sep {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 1;
    user-select: none;
}

/* Mobile form — white on image */
.lead-form--mobile {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.lead-form--mobile .lead-form__field--mobile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 28px;
}

.lead-form--mobile .lead-form__field--mobile:last-of-type {
    margin-bottom: 32px;
}

.lead-form--mobile .lead-form__label {
    color: var(--color-text-inverse);
    font-size: 18px;
    line-height: 24px;
    font-weight: 600;
    margin: 0;
}

.lead-form--mobile .lead-form__input,
.lead-form--mobile .lead-form__select {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--color-border-light);
    border-radius: 0;
    padding: 0 0 var(--space-2);
    color: var(--color-text-inverse);
    font-family: var(--font-family);
    font-size: var(--font-body);
    line-height: var(--font-body-lh);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.lead-form--mobile .lead-form__input::placeholder {
    color: var(--color-input-placeholder);
}

.lead-form--mobile .lead-form__input:focus,
.lead-form--mobile .lead-form__select:focus {
    border-bottom-color: var(--color-text-inverse);
}

.lead-form--mobile .lead-form__select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: var(--space-5);
}

.lead-form--mobile .lead-form__select:invalid {
    color: var(--color-input-placeholder);
}

.lead-form--mobile .lead-form__select option {
    color: var(--color-text-primary);
    background: var(--color-bg-page);
}

.lead-form__checkbox-wrap--mobile {
    margin-top: var(--space-3);
    margin-bottom: var(--space-4);
}

.lead-form--mobile .lead-form__checkbox {
    width: 15px;
    height: 15px;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    border-radius: 2px;
    background: transparent;
}

.lead-form--mobile .lead-form__checkbox:checked {
    background: var(--color-action-primary);
    border-color: var(--color-action-primary);
}

.lead-form--mobile .lead-form__checkbox-label {
    color: var(--color-text-inverse);
    font-size: 13px;
    line-height: 18px;
}

.btn-submit--mobile {
    width: 100%;
    min-height: 48px;
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-sm);
    font-size: var(--font-button);
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-top: 0;
}

.form-alert--mobile.form-alert--success {
    background: rgba(122, 139, 110, 0.25);
    color: var(--color-text-inverse);
    border: 1px solid rgba(122, 139, 110, 0.5);
    margin-top: var(--space-4);
}

.form-alert--mobile.form-alert--error {
    background: rgba(220, 53, 69, 0.2);
    color: #ffcccc;
    border: 1px solid rgba(220, 53, 69, 0.4);
    margin-top: var(--space-4);
}

.lead-form--mobile .lead-form__input.is-invalid,
.lead-form--mobile .lead-form__select.is-invalid {
    border-bottom-color: #ff6b6b;
}
/* ---- Thank you page ---- */
.thank-you {
    position: relative;
    min-height: calc(100dvh - var(--header-height));
    background-size: cover;
    background-position: center 42%;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
}

.thank-you__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.22) * 0.35)) 0%,
        rgba(0, 0, 0, calc(var(--hero-overlay-opacity, 0.22) * 0.75)) 40%,
        rgba(0, 0, 0, var(--hero-overlay-opacity, 0.22)) 100%
    );
    pointer-events: none;
}

.thank-you__container {
    position: relative;
    z-index: 1;
    padding: var(--space-8) var(--space-5) var(--space-9);
}

.thank-you__content {
    max-width: 720px;
}

.thank-you__title {
    margin: 0 0 var(--space-7);
    font-size: 40px;
    line-height: var(--font-display-lh);
    font-weight: 600;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--color-text-inverse);
    display: flex;
    flex-direction: column;
    gap: 0;
}

.thank-you__text {
    margin: 0 0 var(--space-5);
    max-width: 640px;
    font-size: var(--font-body-lg);
    line-height: var(--font-body-lg-lh);
    font-weight: 400;
    color: var(--color-text-inverse);
}

.thank-you__text:last-child {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .thank-you__container {
        padding: var(--space-7) var(--space-5) var(--space-8);
    }

    .thank-you__title {
        margin-bottom: var(--space-6);
        font-size: var(--font-h1);
        line-height: var(--font-h1-lh);
    }

    .thank-you__text {
        font-size: var(--font-body);
        line-height: var(--font-body-lh);
    }
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .hero--desktop {
        display: none !important;
    }

    .hero-mobile {
        --font-h1: 32px;
        --font-h1-lh: 36px;
    }

    .site-header .container,
    .hero-mobile__container.container {
        padding-left: var(--space-5);
        padding-right: var(--space-5);
    }
}

@media (min-width: 992px) {
    .hero-mobile {
        display: none !important;
    }

    /* ---- Desktop · Figma alignment ---- */
    .site-header .container,
    .hero__container.container,
    .site-footer .container {
        padding-left: var(--space-7);
        padding-right: var(--space-7);
    }

    .hero--desktop .hero__content {
        padding: var(--space-8) 0 var(--space-9);
    }

    .hero--desktop .hero__grid {
        grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
        gap: var(--space-8);
        align-items: stretch;
    }

    .hero--desktop .hero__left {
        padding-top: var(--space-4);
    }

    .hero--desktop .hero__label {
        font-size: 12px;
        line-height: 18px;
        letter-spacing: 0.16em;
        margin-bottom: var(--space-3);
    }

    .hero--desktop .hero__title {
        max-width: 540px;
        font-size: var(--font-display);
        line-height: var(--font-display-lh);
    }

    .hero--desktop .hero__stats {
        padding-top: var(--space-7);
        padding-bottom: var(--space-4);
    }

    .hero--desktop .hero__stat {
        font-size: var(--font-h2);
        line-height: var(--font-h2-lh);
    }

    .hero--desktop .hero__stat-divider {
        height: 28px;
    }

    /* Form: debajo del bloque de título, no al mismo nivel */
    .hero--desktop .hero__form-wrap {
        justify-content: flex-start;
        padding-top: clamp(200px, 34vh, 320px);
        padding-bottom: var(--space-9);
    }

    .hero--desktop .lead-form--desktop .lead-form__row {
        gap: var(--space-6) var(--space-7);
        margin-bottom: var(--space-6);
    }

    .hero--desktop .lead-form--desktop .lead-form__field {
        gap: var(--space-2);
    }

    .hero--desktop .lead-form--desktop .lead-form__label {
        font-size: var(--font-label);
        line-height: var(--font-label-lh);
    }

    .hero--desktop .lead-form--desktop .lead-form__input,
    .hero--desktop .lead-form--desktop .lead-form__select {
        padding: var(--space-2) 0 var(--space-3);
        font-size: var(--font-body);
    }

    .hero--desktop .lead-form--desktop .lead-form__footer {
        margin-top: var(--space-7);
        margin-bottom: var(--space-2);
        align-items: flex-end;
    }

    .hero--desktop .lead-form--desktop .btn-submit {
        border-radius: var(--radius-pill);
        min-width: 168px;
        height: 48px;
        padding: 0 var(--space-7);
        font-weight: 600;
        letter-spacing: 0.08em;
    }

    .hero--desktop .lead-form--desktop .lead-form__checkbox {
        width: 16px;
        height: 16px;
        border-radius: 2px;
    }
}
