/* =============================================================
   KAD · index.css — Landing — Mobile First
   ============================================================= */

/* =============================================================
   1. Canvas fondo animado
   ============================================================= */

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
    display: block;
}

body {
    position: relative;
}

/* =============================================================
   2. Hero
   ============================================================= */

.hero {
    position: relative;
    z-index: 1;
    min-height: calc(100dvh - 5rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl) var(--padding-section);
}

.hero__content {
    width: 100%;
    max-width: 680px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-lg);
    text-align: center;
}

/* =============================================================
   3. Brand hero
   ============================================================= */

.hero__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
}

.hero__brand-logo {
    height: 5rem;
    width: auto;
}

.hero__brand-tagline {
    font-family:    var(--font-mono);
    font-size:      var(--text-xs);
    font-weight:    500;
    color:          var(--color-text-soft);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

/* =============================================================
   4. Título
   ============================================================= */

.hero__title {
    font-family:    var(--font-heading);
    font-size:      var(--text-2xl);
    font-weight:    400;
    color:          var(--color-text);
    line-height:    1.15;
    letter-spacing: -0.02em;
}

/* =============================================================
   5. Barra de búsqueda — con efecto gloss
   ============================================================= */

.search {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.search__bar {
    width: 100%;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    background-color: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-input);
    padding: 0 var(--space-sm) 0 var(--space-md);
    box-shadow: var(--shadow-sm),
                inset 0 1px 0 rgba(255,255,255,0.9);
    transition: border-color var(--transition),
                box-shadow var(--transition);
    position: relative;
    z-index: 2;
}

[data-theme="dark"] .search__bar {
    background-color: rgba(20, 20, 20, 0.82);
    box-shadow: var(--shadow-sm),
                inset 0 1px 0 rgba(255,255,255,0.06);
}

.search__bar:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(213, 0, 34, 0.10),
                var(--shadow-md),
                inset 0 1px 0 rgba(255,255,255,0.9);
}

[data-theme="dark"] .search__bar:focus-within {
    box-shadow: 0 0 0 3px rgba(255, 45, 74, 0.12),
                var(--shadow-md),
                inset 0 1px 0 rgba(255,255,255,0.06);
}

.search__icon {
    color:       var(--color-primary);
    flex-shrink: 0;
    transition:  opacity var(--transition);
}

.search__bar:focus-within .search__icon {
    opacity: 1;
}

.search__input {
    flex: 1;
    height: 3.5rem;
    border: none;
    outline: none;
    background: transparent;
    font-size:   var(--text-base);
    color:       var(--color-text);
    font-family: var(--font-body);
}

.search__input::placeholder {
    color: var(--color-text-soft);
}

.search__btn {
    display:     flex;
    align-items: center;
    padding:     0.5rem 1.2rem;
    background-color: transparent;
    color:       var(--color-text-soft);
    border:      1px solid var(--color-border);
    border-radius: calc(var(--radius-input) - 4px);
    font-family: var(--font-mono);
    font-size:   var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.08em;
    cursor:      pointer;
    flex-shrink: 0;
    transition:  all var(--transition);
}

.search__btn:hover {
    background-color: var(--color-text);
    color:            var(--color-bg);
    border-color:     var(--color-text);
}

.search__error {
    font-size:   var(--text-sm);
    color:       var(--color-primary);
    min-height:  1.25rem;
    font-family: var(--font-mono);
    text-align:  left;
}

/* =============================================================
   6. Sugerencias
   ============================================================= */

.suggestions {
    display:         flex;
    flex-wrap:       wrap;
    gap:             var(--space-sm);
    justify-content: center;
}

.suggestions__tag {
    display:     inline-flex;
    align-items: center;
    padding:     0.4rem 1rem;
    background-color: transparent;
    color:       var(--color-text);
    border:      1px solid var(--color-border);
    border-radius: 2rem;
    font-family: var(--font-mono);
    font-size:   var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.06em;
    cursor:      pointer;
    transition:  all var(--transition);
}

.suggestions__tag:hover {
    background-color: var(--color-text);
    border-color:     var(--color-text);
    color:            var(--color-bg);
}

/* =============================================================
   7. Footer
   ============================================================= */

.footer {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: var(--space-lg) var(--padding-section);
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg);
}

.footer__inner {
    display:        flex;
    flex-direction: column;
    gap:            var(--space-md);
    align-items:    flex-start;
}

.footer__left {
    display:     flex;
    align-items: center;
    gap:         var(--space-md);
}

.footer__logo {
    height: 1.8rem;
    width:  auto;
}

.footer__copy {
    font-family: var(--font-mono);
    font-size:   var(--text-xs);
    color:       var(--color-text-soft);
    letter-spacing: 0.04em;
}

.footer__links {
    display:  flex;
    flex-wrap: wrap;
    gap:      var(--space-lg);
}

.footer__links a {
    font-family: var(--font-mono);
    font-size:   var(--text-xs);
    color:       var(--color-text-soft);
    letter-spacing: 0.06em;
    transition:  color var(--transition);
}

.footer__links a:hover {
    color: var(--color-text);
}

/* =============================================================
   8. Loading state
   ============================================================= */

.hero--loading .search__btn {
    opacity: 0.6;
    pointer-events: none;
}

/* =============================================================
   9. Media queries
   ============================================================= */

@media only screen and (min-width: 481px) and (max-width: 768px) {
    .hero__title     { font-size: var(--text-3xl); }
    .hero__brand-logo { height: 6rem; }
}

@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: portrait) {
    .hero__title      { font-size: var(--text-3xl); }
    .hero__brand-logo { height: 7rem; }
    .search__input    { height: 4rem; font-size: var(--text-lg); }
}

@media only screen and (min-width: 769px) and (max-width: 1279px) and (orientation: landscape) {
    .hero__title      { font-size: var(--text-3xl); }
    .hero__brand-logo { height: 6rem; }
}

@media only screen and (min-width: 1280px) {
    .hero__content    { max-width: 740px; }
    .hero__title      { font-size: clamp(2rem, 3vw, 2.8rem); }
    .hero__brand-logo { height: 8rem; }
    .search__input    { height: 4rem; font-size: var(--text-lg); }

    .footer__inner {
        flex-direction:  row;
        align-items:     center;
        justify-content: space-between;
    }
}