:root {
    --base-font-size: 18px;
    --bg: #ffffff;
    --soft: #f6f8fb;
    --soft-2: #eef3f7;
    --text: #1f2933;
    --muted: #5f6c7b;
    --primary: #1b4965;
    --primary-dark: #123246;
    --border: #d9e2ec;
    --card: #ffffff;
    --accent: #e8f3f8;
}

* {
    box-sizing: border-box;
}

html {
    font-size: var(--base-font-size);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.65;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

/* HEADER */

.topbar {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}

.brand-logo img {
    height: 60px;
    width: auto;
    display: block;
}

.brand-logo img {
    height: 195px;
    width: auto;
    display: block;
}

.font-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.font-controls button {
    border: 1px solid var(--border);
    background: var(--soft);
    color: var(--primary-dark);
    border-radius: 10px;
    padding: 9px 13px;
    font-weight: 800;
    cursor: pointer;
    font-size: 0.95rem;
}

.font-controls button:hover {
    background: var(--soft-2);
}

/* HERO */

.hero {
    background: linear-gradient(180deg, #ffffff 0%, #f7fafc 100%);
}

.hero {
    padding-top: 42px;
    padding-bottom: 56px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 0.8fr;
    gap: 36px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    background: var(--accent);
    color: var(--primary);
    border: 1px solid #cfe4ee;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 18px;
}

h1, h2, h3 {
    line-height: 1.2;
    margin-top: 0;
    color: #182635;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.4rem);
    letter-spacing: -0.045em;
    margin-bottom: 20px;
}

h2 {
    font-size: clamp(1.55rem, 3vw, 2.15rem);
    letter-spacing: -0.025em;
    margin-bottom: 18px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

p {
    margin-top: 0;
    margin-bottom: 18px;
}

.lead {
    font-size: 1.22rem;
    color: #334e68;
    max-width: 820px;
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 14px;
    padding: 14px 20px;
    min-height: 52px;
    font-weight: 800;
    border: 1px solid transparent;
}

.btn.primary {
    background: var(--primary);
    color: #ffffff;
}

.btn.primary:hover {
    background: var(--primary-dark);
}

.btn.secondary {
    background: #ffffff;
    color: var(--primary);
    border-color: var(--border);
}

.btn.secondary:hover {
    background: var(--soft);
}

.hero-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.07);
}

.hero-card h2 {
    font-size: 1.45rem;
}

/* SECCIONES */

.section {
    padding: 64px 0;
}

.section.soft {
    background: var(--soft);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.cards {
    display: grid;
    gap: 20px;
}

.cards.three {
    grid-template-columns: repeat(3, 1fr);
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 26px;
}

.card p:last-child {
    margin-bottom: 0;
}

.card-link {
    display: inline-flex;
    margin-top: 12px;
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
}

.card-link:hover {
    text-decoration: underline;
}

.highlight-card {
    background: var(--accent);
    border-color: #cfe4ee;
}

.two-col {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 28px;
    align-items: start;
}

.note {
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 6px solid var(--primary);
    border-radius: 18px;
    padding: 24px;
}

.note p:last-child {
    margin-bottom: 0;
}

.link-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.link-grid a,
.info-box {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    min-height: 76px;
}

.link-grid a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-weight: 800;
}

.link-grid a:hover {
    background: var(--soft);
}

.info-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-box strong {
    color: var(--primary);
    font-size: 1.15rem;
}

.info-box span {
    color: var(--muted);
}

/* FORMULARIO CÓDIGO */

.code-form {
    max-width: 720px;
    margin-top: 24px;
}

.code-form label {
    display: block;
    font-weight: 800;
    margin-bottom: 8px;
}

.code-row {
    display: flex;
    gap: 10px;
}

.code-row input {
    flex: 1;
    min-height: 54px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 0 16px;
    font-size: 1rem;
}

.code-row button {
    min-height: 54px;
    border: 0;
    border-radius: 14px;
    padding: 0 20px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
    font-size: 1rem;
}

.code-row button:hover {
    background: var(--primary-dark);
}

/* DISCLAIMER */

.disclaimer {
    background: #ffffff;
}

.disclaimer .container {
    border-top: 1px solid var(--border);
    padding-top: 36px;
}

.disclaimer p {
    color: var(--muted);
}

/* FOOTER */

.footer {
    background: #152331;
    color: #d9e2ec;
    padding: 34px 0;
    font-size: 0.95rem;
}

.footer p {
    margin-bottom: 8px;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    text-align: left;
}

.footer-isotipo {
    width: 76px;
    height: 76px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer a {
    color: #d9e2ec;
}

/* RESPONSIVE */

@media (max-width: 860px) {

    .hero-grid,
    .two-col,
    .cards.three,
    .link-grid {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 46px 0;
    }

    .code-row {
        flex-direction: column;
    }

    .code-row button {
        width: 100%;
    }
}

@media (max-width: 768px) {

    .container {
        width: min(100% - 28px, 1120px);
    }

    .topbar-inner {
        min-height: 76px;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 0;
    }

    .brand-logo img {
        height: 70px;
        max-width: 48vw;
    }

    .font-controls {
        display: flex;
        gap: 6px;
        width: auto;
    }

    .font-controls button {
        min-height: 40px;
        padding: 6px 9px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .hero {
        padding: 34px 0;
    }

    h1 {
        font-size: clamp(2.05rem, 10vw, 2.8rem);
        line-height: 1.15;
    }

    .lead {
        font-size: 1.16rem;
        line-height: 1.55;
    }

    .hero-card,
    .card,
    .note {
        padding: 22px;
    }

    .btn {
        width: 100%;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .footer-isotipo {
        width: 72px;
        height: 72px;
    }
}

@media (max-width: 420px) {

    .brand-logo img {
        height: 70px;
        max-width: 44vw;
    }

    .font-controls button {
        padding: 5px 8px;
        font-size: 0.85rem;
    }

    h1 {
        font-size: 2.15rem;
    }
}

/* ==========================
   MENÚ PRINCIPAL
========================== */

.main-nav{
    display:flex;
    flex-wrap:wrap;
    gap:10px;
    justify-content:center;
    align-items:center;
}

.main-nav a{
    text-decoration:none;
    color:#1f2937;
    font-size:15px;
    font-weight:600;
    padding:10px 16px;
    border-radius:10px;
    transition:all .25s ease;
}

.main-nav a:hover{
    background:#f3f4f6;
    color:#0f766e;
}

.main-nav a.active{
    background:#0f766e;
    color:#fff;
}

/* ==========================
   HEADER
========================== */

.site-header{
    background:#ffffff;
    border-bottom:1px solid #e5e7eb;
    position:sticky;
    top:0;
    z-index:1000;
}

.header-inner{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:20px;
    padding:15px 0;
}

.brand img{
    height:60px;
    width:auto;
    display:block;
}

/* ==========================
   RESPONSIVE
========================== */

@media (max-width:900px){

    .header-inner{
        flex-direction:column;
    }

    .main-nav{
        width:100%;
        justify-content:center;
    }

    .main-nav a{
        font-size:14px;
        padding:8px 12px;
    }

}

.final-note{
    text-align:center;
    max-width:900px;
    margin:0 auto;
}

.final-note h2{
    margin-bottom:16px;
}

.final-note p{
    max-width:760px;
    margin:0 auto 24px auto;
}

.note{
    margin: 30px 0;
}

.container.narrow p{
    margin-bottom: 22px;
    line-height: 1.8;
}