/* ============ BASE ============ */
* { box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-body);
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

.wrap { max-width: 1280px; margin: 0 auto; padding-inline: var(--space-md); width: 100%; }

/* ============ TIPOGRAFÍA ============ */
h1, h2 {
    font-family: var(--font-display);
    font-weight: 700;
    text-wrap: balance;
    margin: 0;
    color: var(--ink);
}
h1 { font-size: clamp(2.1rem, 4.6vw, 2.9rem); line-height: 1.14; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.05rem, 1.6vw, 1.2rem); line-height: 1.3; }
p  { line-height: 1.6; max-width: 62ch; margin: 0; }
.lead { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--ink-soft); }
.eyebrow {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-family: var(--font-display); font-size: 0.8rem; font-weight: 700;
    letter-spacing: 0.06em; color: var(--accent);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ============ BOTONES ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    font-family: var(--font-display); font-weight: 700; font-size: 1rem;
    border-radius: var(--radius-sm); padding: 0.95rem 1.7rem; min-height: 44px;
    text-decoration: none; border: 2px solid transparent; cursor: pointer;
    transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, border-color 150ms ease;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 24px -8px rgba(0,71,171,0.5); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -8px rgba(0,71,171,0.55); }
.btn-ghost-ink {
    background: transparent; border-color: var(--hairline); color: var(--ink);
    font-size: 0.9rem; padding: 0.6rem 1.1rem;
}
.btn-ghost-ink:hover { border-color: var(--ink-faint); background: var(--hairline); }
.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 50%; border: none;
    background: transparent; color: var(--ink-soft); cursor: pointer;
    transition: background 150ms ease, color 150ms ease;
}
.icon-btn:hover { background: var(--hairline); color: var(--ink); }
.icon-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.icon-btn svg { width: 20px; height: 20px; }

/* ============ PANTALLA ÚNICA (navbar + hero + footer, una sola superficie) ============ */
.screen {
    position: relative;
    height: 100vh;
    height: 100dvh;
    background: var(--hero-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.hero-hex-field {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
    background:
        radial-gradient(560px 420px at 78% 30%, rgba(0,71,171,0.14), transparent 68%),
        radial-gradient(420px 320px at 16% 88%, rgba(0,71,171,0.07), transparent 70%);
}
.hex-motif { position: absolute; fill: none; stroke: var(--accent); }
.hex-motif--a { width: 620px; height: 620px; top: -200px; right: -140px; stroke-width: 1.1; opacity: 0.07; }
.hex-motif--b { width: 340px; height: 340px; bottom: 40px; left: 2%; stroke-width: 1.4; opacity: 0.06; }

/* ============ NAVBAR INTEGRADO ============ */
.topbar { position: relative; z-index: 5; padding-block: var(--space-sm); }
.topbar-wrap { max-width: 1360px; margin: 0 auto; padding-inline: var(--space-sm); width: 100%; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); }
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 28px; width: auto; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 0.85rem; }
.topbar-hint { font-size: 0.9rem; color: var(--ink-soft); white-space: nowrap; }
@media (max-width: 480px) { .topbar-hint { display: none; } }

/* ============ HERO ============ */
.hero {
    position: relative; z-index: 2; flex: 1; min-height: 0;
    display: grid; grid-template-columns: 1fr; gap: var(--space-md); align-content: center; align-items: center;
    padding-block: var(--space-sm);
}
@media (min-width: 900px) {
    .hero { grid-template-columns: 1.3fr 0.7fr; gap: var(--space-lg); align-items: stretch; }
}
.hero-copy { display: flex; flex-direction: column; gap: var(--space-sm); min-height: 0; }
.hero-cta-row { display: flex; flex-wrap: wrap; gap: var(--space-sm); align-items: center; }
.hero-note { font-size: 0.95rem; font-weight: 600; color: var(--ink-soft); }

/* ============ FOTO DEL HERO ============ */
.hero-visual { display: flex; align-items: center; justify-content: center; min-height: 0; }
.hero-photo {
    height: auto; max-height: 16vh; width: auto; margin-inline: auto; display: block;
    filter: drop-shadow(0 22px 34px rgba(0,71,171,0.24)) drop-shadow(0 6px 14px rgba(43,47,50,0.14));
}
@media (min-width: 900px) {
    .hero-visual { height: 100%; }
    .hero-photo { height: 100%; max-height: 60vh; }
}

/* ============ COMPACTACIÓN EN PANTALLAS BAJAS ============ */
@media (max-height: 760px) {
    .screen { --space-md: 1.1rem; --space-lg: 1.5rem; }
    .topbar, .integrated-footer { padding-block: 0.55rem; }
}
@media (max-height: 560px) {
    .hero-visual { display: none; }
    .hero { grid-template-columns: 1fr; }
    h1 { font-size: 1.8rem; }
    .lead { font-size: 0.95rem; }
    p { line-height: 1.45; }
}

/* ============ FOOTER INTEGRADO ============ */
.integrated-footer { position: relative; z-index: 2; border-top: 1px solid var(--hairline); padding-block: var(--space-sm); }
.footer-inner {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: var(--space-xs) var(--space-md);
    font-size: 0.82rem; color: var(--ink-faint);
}
.footer-right { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-md); }
.footer-login { color: var(--ink-soft); white-space: nowrap; }
.footer-login a { color: var(--accent); font-weight: 700; text-decoration: none; }
.footer-login a:hover { text-decoration: underline; }
.footer-links { display: flex; gap: var(--space-md); }
.footer-links a { text-decoration: none; color: var(--ink-faint); }
.footer-links a:hover { color: var(--ink); }
@media (max-width: 480px) {
    .footer-inner { justify-content: center; text-align: center; }
    .footer-right { justify-content: center; }
}
