/* ================================
   Paleta (variables)
   ================================ */
:root {
    --color-azul: #09aef2;
    --color-morado: #be17dc;
    --color-negro: #2a2928;
    --color-blanco: #ffffff;

    --soft-100: #f2f2f2;
    --soft-80: #e6e6e6;
    --soft-60: #cfcfcf;
    --ink-40: #a9a8a7;
}

/* ================================
   Fuentes locales
   ================================ */
@font-face {
    font-family: "Kiona";
    src: url("../assets/fonts/Kiona-Regular.ttf") format("truetype");
    font-display: swap;
    font-weight: 400;
}

@font-face {
    font-family: "Raleway";
    src: url("../assets/fonts/Raleway-VariableFont_wght.ttf") format("truetype");
    font-display: swap;
    font-weight: 100 900;
}

@font-face {
    font-family: "Raleway";
    src: url("../assets/fonts/Raleway-SemiBold.ttf") format("truetype");
    font-display: swap;
    font-weight: 600;
}

/* ================================
   Reset básico (mobile-first)
   ================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Scrollbar fino en navegadores compatibles */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-azul);
  border-radius: 4px;
}
::-webkit-scrollbar-track {
  background: var(--color-negro);
}

/* Ajuste de safe areas en iPhone (notch) */
body {
  padding-top: env(safe-area-inset-top);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
}
html, body {
  background: transparent;
  min-height: 100%;
}


body {
    width: 100dvw;
    /* min-height, no height: con altura fija el contenido se desborda y
       el footer acaba montandose encima en pantallas bajas. */
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    margin: 0;
    color: var(--soft-100);
    background: var(--color-negro);
    font-family: "Raleway", system-ui, sans-serif;
    line-height: 1.45;
}


/* ================================
   Fondo degradado alternable
   ================================ */
body.is-gradient {
    position: relative;
    background: var(--color-negro);
}

body.is-gradient::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    width: 100vw;
    height: 100vh;
    background:
        radial-gradient(1200px 800px at 80% 8%, rgba(190, 23, 220, 0.13) 0%, rgba(190, 23, 220, 0.06) 60%, rgba(0, 0, 0, 0) 100%),
        radial-gradient(1200px 800px at 15% 40%, rgba(9, 174, 242, 0.11) 0%, rgba(9, 174, 242, 0.03) 60%, rgba(0, 0, 0, 0) 100%);
    filter: blur(22px);
    opacity: .85;
    animation: gradientMove 18s ease-in-out infinite alternate;
}

/* (si luego quieres animación real, descomenta keyframes) */
/*
@keyframes gradientMove{
  0%{ background-position: 80% 8%, 15% 40%; }
  50%{ background-position: 85% 12%, 10% 35%; }
  100%{ background-position: 78% 10%, 18% 45%; }
}
*/

/* ================================
   Topbar (redes + idioma) — base móvil
   ================================ */
.topbar {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
    padding: 12px 14px;
}

.social {
    display: flex;
    gap: 28px;
    justify-content: center;
}

.social a {
    color: var(--soft-80);
    font-size: 1.8rem;
    text-decoration: none;
    transition: color .18s ease, transform .18s ease;
}

.social a:hover,
.social a:focus-visible {
    color: var(--color-azul);
    transform: translateY(-1px);
    outline: none;
}

/* Botones de idioma (base móvil) */
.lang-switch button {
    background: transparent;
    border: 1.5px solid var(--soft-60);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--soft-80);
    transition: all 0.2s ease;
}

.lang-switch button:hover,
.lang-switch button:focus-visible {
    border-color: var(--color-azul);
    color: var(--color-azul);
    transform: translateY(-1px);
    outline: none;
}


/* Botón de tema */
.theme-switch {
    display: flex;
    margin-left: .5rem;
}

.theme-switch button {
    background: transparent;
    border: 1.4px solid var(--soft-60);
    border-radius: 6px;
    padding: 6px 8px;
    color: var(--soft-80);
    cursor: pointer;
    transition: all .2s ease;
}

.theme-switch button:hover,
.theme-switch button:focus-visible {
    border-color: var(--color-azul);
    color: var(--color-azul);
    transform: translateY(-1px);
    outline: none;
}

/* ================================
   Hero central — base móvil
   ================================ */
.hero {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    /* min-height: 100svh; */
    display: flex;
    gap: clamp(28px, 7vh, 80px);
    flex-direction: column;
    place-items: center;
    text-align: center;
    padding: 18px 16px 14px;
}

.hero__inner {
    max-width: 640px;
    width: 100%;
}

/* Logo (móvil) */
.hero__logo {
    margin: 4vh 0 12px;
}

.hero__logo img {
    max-width: min(72vw, 260px);
    /* Tope por altura: en pantallas anchas pero bajas (portatiles 1366x768)
       el logo crecia por ancho y empujaba el footer fuera de la ventana. */
    max-height: 26vh;
    width: auto;
    height: auto;
    display: block;
    margin-inline: auto;
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, .25));
}

/* Título y subtítulo (móvil) */
.hero__title {
    margin: 8px 0 4px;
    font-family: "Kiona", "Raleway", sans-serif;
    font-weight: 400;
    font-size: clamp(1.7rem, 5vw + .6rem, 2.1rem);
    line-height: 1.15;
    color: var(--soft-100);
    text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
}

/* Título en gradiente si <main> tiene .is-gradient-title */
.is-gradient-title .hero__title {
    background: linear-gradient(135deg, var(--color-azul), var(--color-morado));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero__subtitle {
    margin: 6px 0 18px;
    font-weight: 300;
    font-size: clamp(1rem, 1.5vw + .8rem, 1.1rem);
    color: color-mix(in oklab, var(--color-azul) 82%, white 18%);
    letter-spacing: .015em;
    opacity: .96;
}

/* Título con gradiente */
.is-gradient-title .hero__title {
  background: linear-gradient(135deg, var(--color-azul), var(--color-morado));
  -webkit-background-clip: text; /* prefijo necesario */
  background-clip: text;
  -webkit-text-fill-color: transparent; /* prefijo necesario en WebKit */
  color: transparent;
}

/* Input blur (para compatibilidad Huawei/Android) */
.notify-form {
  -webkit-backdrop-filter: blur(2px); /* prefijo */
  backdrop-filter: blur(2px);
}

/* Filtro drop-shadow en logo */
.hero__logo img {
  -webkit-filter: drop-shadow(0 2px 16px rgba(0, 0, 0, .25)); /* prefijo */
  filter: drop-shadow(0 2px 16px rgba(0, 0, 0, .25));
}

/* Filtro blur en el degradado de fondo */
body.is-gradient::before {
  -webkit-filter: blur(22px); /* prefijo */
  filter: blur(22px);
}


/* Formulario (móvil) */
.notify-form {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 320px;
    margin: 0 auto 22px;
    border: 1.6px solid color-mix(in oklab, var(--soft-80) 85%, transparent);
    border-radius: 12px;
    overflow: hidden;
    backdrop-filter: blur(2px);
}

.notify-form input {
    flex: 1;
    padding: .8rem .9rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--soft-100);
    font-size: 1rem;
}

.notify-form input::placeholder {
    color: rgba(255, 255, 255, .6);
}

.notify-form button {
    display: grid;
    place-items: center;
    width: 52px;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--soft-100);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color .18s ease, background-color .18s ease;
}

.notify-form button:hover,
.notify-form button:focus-visible {
    color: var(--color-azul);
    outline: none;
}

/* Parte inferior (móvil) */
.hero__bottom {
    margin-top: 22px;
    text-align: center;
}

.hero__connect {
    margin: 0 0 8px;
    color: var(--ink-40);
    font-weight: 300;
}

.social--bottom a {
    color: color-mix(in oklab, var(--soft-80) 85%, transparent);
}

.social--bottom a:hover {
    color: var(--color-azul);
}

/* Footer (móvil) */
.hero__footer {
    /* En flujo normal. Antes era position:fixed y se montaba sobre el
       contenido en cuanto la pagina superaba la altura de la ventana. */
    position: relative;
    z-index: 1;
    width: 100%;
    text-align: center;
    padding: 40px 0 16px;
    color: rgba(255, 255, 255, .65);
    font-size: .9rem;
}

/* =====================================================
   BREAKPOINTS (mobile-first → mejoras progresivas)
   ===================================================== */

/* ≥ 480px — teléfonos grandes */
@media (min-width: 480px) {
    .topbar {
        padding: 14px 16px;
        gap: .9rem;
    }

    .social a {
        font-size: 1.45rem;
    }

    .hero {
        padding: 22px 18px 16px;
    }

    .hero__logo {
        margin: 5vh 0 14px;
    }

    .hero__logo img {
        max-width: min(68vw, 300px);
    }

    .hero__title {
        font-size: clamp(1.8rem, 4.5vw + .5rem, 2.3rem);
    }

    .hero__subtitle {
        font-size: clamp(1.05rem, 1.2vw + .85rem, 1.15rem);
    }

    .notify-form {
        max-width: 380px;
    }
}

/* ≥ 768px — tablets */
@media (min-width: 768px) {
    .topbar {
        padding: 16px 20px;
    }

    .social {
        gap: 16px;
    }

    .social a {
        font-size: 1.55rem;
    }

    .lang-switch {
        gap: 8px;
    }

    .lang-switch button {
        padding: 4px 8px;
        font-size: 1rem;
    }

    .hero {
        grid-template-rows: 1fr auto auto;
        padding: 40px 28px 18px;
    }

    .hero__inner {
        max-width: 760px;
    }

    .hero__logo {
        margin: 5vh 0 16px;
    }

    .hero__logo img {
        max-width: min(54vw, 360px);
    }

    .hero__title {
        font-size: clamp(2rem, 2.6vw + 1rem, 2.6rem);
    }

    .hero__subtitle {
        margin-bottom: 22px;
    }

    .notify-form {
        max-width: 480px;
    }

    .notify-form button {
        width: 56px;
        font-size: 1.15rem;
    }

    .hero__bottom {
        margin-top: 28px;
    }
}

/* ≥ 1024px — desktop */
@media (min-width: 1024px) {
    .topbar {
        padding: 18px 28px;
    }

    .social a {
        font-size: 1.65rem;
    }

    .hero {
        /* Menos hueco muerto arriba: la topbar ya separa visualmente, y
           sin esto la pagina se pasa de alto y saca barra de scroll. */
        padding: 34px 34px 22px;
        gap: 56px;
    }

    .hero__logo {
        margin: 2vh 0 16px;
    }

    .hero__inner {
        max-width: 880px;
    }

    .hero__logo img {
        max-width: min(42vw, 420px);
    }

    .hero__title {
        font-size: clamp(2.2rem, 2.2vw + 1rem, 3rem);
        letter-spacing: .01em;
    }

    .hero__subtitle {
        font-size: clamp(1.1rem, .9vw + .9rem, 1.25rem);
    }

    .notify-form {
        max-width: 560px;
    }
}

/* ≥ 1440px — desktop grande */
@media (min-width: 1440px) {
    .hero__inner {
        max-width: 960px;
    }

    .hero__logo img {
        max-width: 460px;
    }

    .hero__title {
        font-size: clamp(2.4rem, 1.8vw + 1.2rem, 3.2rem);
    }

    .notify-form {
        max-width: 600px;
    }
}
/* =====================================================================
   Iconos
   Sprite SVG en linea al principio de index.html.
   Copia maestra en public/assets/icons/ui-sprite.svg.
   `width/height: 1em` + `currentColor` para que se comporten igual que
   los <i> de Font Awesome: heredan font-size y color del contenedor.
   ===================================================================== */
.icon {
    width: 1em;
    height: 1em;
    fill: currentColor;
    display: inline-block;
    vertical-align: -0.125em;
    flex: none;
}
