/*
 * Landing de sevenlyaway.com (public/css/landing.css). Es la única página con texturas, relieves y animaciones
 * (pedido del dueño, 1-nov): la aplicación sigue plana. Paneles a pantalla completa sin scroll; con JavaScript
 * se pasa de uno a otro (GSAP o transiciones CSS) y sin JavaScript quedan uno debajo del otro.
 * Los colores llegan de config/brand.php (--brand, --brand-dark, --brand-accent en el <head>).
 */

:root {
    --brand: #0A5B66;
    --brand-dark: #012D33;
    --brand-accent: #FF8A57;
    --ink-on-dark: #F2F7F7;
    --muted-on-dark: #A9C3C7;
    --line-on-dark: rgba(255, 255, 255, 0.14);
    --panel: rgba(255, 255, 255, 0.055);
    --header-height: 76px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html, body {
    height: 100%;
}

body.landing {
    margin: 0;
    background: var(--brand-dark);
    color: var(--ink-on-dark);
    font-family: Inter, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
}

.js body.landing {
    overflow: hidden;
}

/* ---------------------------------------------------------------- Textura y luz */

.grain {
    position: fixed;
    inset: 0;
    z-index: 5;
    pointer-events: none;
    opacity: 0.085;
    mix-blend-mode: soft-light;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.8 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

.glow {
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    will-change: transform;
}

.glow-a {
    width: 640px;
    height: 640px;
    left: -180px;
    top: -200px;
    background: rgba(29, 140, 155, 0.42);
}

.glow-b {
    width: 520px;
    height: 520px;
    right: -160px;
    bottom: -220px;
    background: rgba(255, 138, 87, 0.22);
}

/* ---------------------------------------------------------------- Cabecera */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line-on-dark);
    background: rgba(1, 45, 51, 0.72);
    backdrop-filter: blur(10px);
}

.no-js .site-header {
    position: sticky;
}

.site-logo {
    display: inline-flex;
    align-items: center;
}

.site-logo img {
    display: block;
    height: 34px;
    width: auto;
}

.site-nav {
    display: flex;
    justify-content: center;
    gap: 28px;
}

.site-nav a {
    color: var(--muted-on-dark);
    font-weight: 500;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
    color: #fff;
}

.site-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ---------------------------------------------------------------- Botones */

.landing .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 18px;
    transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease), color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.landing .btn-accent {
    background: var(--brand-accent);
    border: 1px solid var(--brand-accent);
    color: var(--brand-dark);
    box-shadow: 0 10px 30px rgba(255, 138, 87, 0.25);
}

.landing .btn-accent:hover,
.landing .btn-accent:focus-visible {
    background: #ffa077;
    border-color: #ffa077;
    color: var(--brand-dark);
    box-shadow: 0 14px 34px rgba(255, 138, 87, 0.35);
}

.landing .btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
}

.landing .btn-ghost:hover,
.landing .btn-ghost:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}

.landing .btn-xl {
    padding: 14px 26px;
    font-size: 1.05rem;
}

.landing .btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.landing .btn:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 3px;
}

/* ---------------------------------------------------------------- Escenario y paneles */

.stage {
    position: relative;
    z-index: 2;
}

.js .stage {
    position: fixed;
    inset: 0;
}

.panel {
    display: flex;
    align-items: center;
    padding: calc(var(--header-height) + 24px) 0 96px;
}

.js .panel {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
}

.js .panel.is-active {
    opacity: 1;
    visibility: visible;
}

.no-js .panel {
    min-height: 100vh;
    border-bottom: 1px solid var(--line-on-dark);
}

.panel > .container {
    width: 100%;
}

/* Lo que entra con cada panel: sin GSAP, transiciones CSS; con GSAP, él manda */
.js.no-gsap [data-reveal] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.js.no-gsap .panel.is-active [data-reveal] {
    opacity: 1;
    transform: none;
}

.js.no-gsap .panel {
    transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.js.gsap [data-reveal] {
    opacity: 0;
}

/* ---------------------------------------------------------------- Tipografía */

.eyebrow {
    margin: 0 0 14px;
    color: var(--brand-accent);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.landing h1 {
    margin: 0 0 20px;
    font-size: clamp(2.4rem, 4.4vw, 3.9rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: #fff;
}

.landing h2 {
    margin: 0 0 18px;
    font-size: clamp(1.9rem, 3.2vw, 2.8rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #fff;
}

/* El foco pasa al título de cada panel al cambiar (lectores de pantalla), sin dibujar el marco */
.landing h1:focus,
.landing h2:focus {
    outline: none;
}

.landing h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}

.lead-text {
    margin: 0 0 26px;
    max-width: 34rem;
    font-size: 1.15rem;
    color: var(--muted-on-dark);
}

.muted {
    color: var(--muted-on-dark);
    font-size: 0.85rem;
}

.cta-row {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}

.proof {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 22px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--muted-on-dark);
    font-size: 0.9rem;
}

.proof .bi {
    color: var(--brand-accent);
    margin-right: 6px;
}

/* ---------------------------------------------------------------- Relieves */

.relief {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--line-on-dark);
    border-radius: 18px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
}

.relief-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: 600;
    color: #fff;
}

.relief-head .count {
    display: inline-flex;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: var(--brand-accent);
    color: var(--brand-dark);
    font-size: 0.75rem;
    font-weight: 700;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-accent);
}

.avatar {
    display: inline-flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Portada: tres tarjetas flotando sobre la cuña */
.hero-cards {
    position: relative;
    height: 440px;
}

.hero-cards .wedge {
    position: absolute;
    right: -30px;
    top: -40px;
    width: 380px;
    height: auto;
    opacity: 0.9;
    filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.35));
}

.hero-cards .relief {
    position: absolute;
    padding: 18px 20px;
}

.card-balance {
    left: 0;
    top: 40px;
    width: 280px;
}

.card-balance .big {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}

.card-balance .big small {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--muted-on-dark);
}

.bar {
    height: 8px;
    margin: 14px 0 10px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.12);
    overflow: hidden;
}

.bar span {
    display: block;
    height: 100%;
    border-radius: 4px;
    background: var(--brand-accent);
}

.card-out {
    right: 0;
    top: 118px;
    width: 300px;
}

.card-out ul,
.approvals-mock ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.card-out li,
.approvals-mock li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid var(--line-on-dark);
    font-size: 0.92rem;
}

.card-out li em,
.card-approve em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--muted-on-dark);
}

.card-approve {
    left: 10px;
    bottom: 0;
    width: 330px;
}

.card-approve p {
    display: flex;
    align-items: center;
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.card-approve .cta-row {
    margin: 0;
}

/* Qué trae */
.tiles {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 10px;
}

.tile {
    flex: 1 1 calc(33.333% - 12px);
    max-width: calc(33.333% - 12px);
    padding: 22px 22px 20px;
}

.tile .bi {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(255, 138, 87, 0.14);
    color: var(--brand-accent);
    font-size: 1.2rem;
}

.tile p {
    margin: 0;
    font-size: 0.93rem;
    color: var(--muted-on-dark);
}

/* Cómo funciona */
.steps {
    display: flex;
    gap: 22px;
    margin-top: 14px;
}

.step {
    flex: 1 1 0;
    padding: 30px 28px 26px;
}

.step-number {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    border-radius: 50%;
    background: var(--brand-accent);
    color: var(--brand-dark);
    font-weight: 800;
}

.step p {
    margin: 0;
    font-size: 1rem;
    color: var(--muted-on-dark);
}

.note {
    margin: 26px 0 0;
    color: var(--muted-on-dark);
}

.note .bi {
    color: var(--brand-accent);
    margin-right: 6px;
}

/* Listas con chulo */
.checks {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.checks li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 9px 0;
    font-size: 1rem;
    color: #DCE8EA;
}

.checks .bi {
    flex: 0 0 auto;
    margin-top: 3px;
    color: var(--brand-accent);
}

/* Aprobaciones (maqueta) */
.approvals-mock {
    padding: 20px 22px;
}

.approvals-mock .who {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.approvals-mock .who small {
    color: var(--muted-on-dark);
}

.pill {
    margin-left: auto;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 600;
}

.pill-pending {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pill-final {
    background: rgba(255, 138, 87, 0.2);
    color: var(--brand-accent);
}

.calendar-strip {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-on-dark);
}

.calendar-strip .days {
    display: flex;
    gap: 6px;
    margin: 8px 0 10px;
}

.calendar-strip .day {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.8rem;
    font-weight: 600;
}

.calendar-strip .day.full {
    background: rgba(255, 138, 87, 0.28);
    color: var(--brand-accent);
    text-decoration: line-through;
}

.calendar-strip .day.half {
    background: linear-gradient(90deg, rgba(255, 138, 87, 0.28) 50%, rgba(255, 255, 255, 0.08) 50%);
}

.calendar-strip .day.holiday {
    background: rgba(29, 140, 155, 0.35);
    color: #9fe3ee;
}

.calendar-strip .legend {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--muted-on-dark);
}

.calendar-strip .legend .day {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}

/* Seguridad (maqueta de inicio de sesión) */
.security-mock {
    max-width: 380px;
    padding: 26px 26px 24px;
}

.fake-field {
    height: 44px;
    margin-bottom: 12px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    border-radius: 10px;
    border: 1px solid var(--line-on-dark);
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted-on-dark);
    font-size: 0.9rem;
}

.security-mock .divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 14px 0;
    color: var(--muted-on-dark);
    font-size: 0.8rem;
}

.security-mock .divider::before,
.security-mock .divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--line-on-dark);
}

/* Contacto */
.faq {
    margin: 10px 0 0;
}

.faq dt {
    margin-top: 14px;
    font-weight: 600;
    color: #fff;
}

.faq dd {
    margin: 4px 0 0;
    font-size: 0.93rem;
    color: var(--muted-on-dark);
}

.contact-card {
    padding: 26px 26px 22px;
}

.form-row {
    display: flex;
    gap: 14px;
}

.form-row .form-field {
    flex: 1 1 0;
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.form-field label {
    margin-bottom: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #DCE8EA;
}

.form-field .optional {
    font-weight: 400;
    color: var(--muted-on-dark);
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font: inherit;
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.form-field select option {
    color: var(--brand-dark);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: var(--brand-accent);
    box-shadow: 0 0 0 3px rgba(255, 138, 87, 0.25);
}

.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea {
    border-color: #ff7b7b;
}

.field-error,
.form-error {
    display: none;
    margin-top: 5px;
    font-size: 0.8rem;
    color: #ffb3b3;
}

.form-field.is-invalid .field-error,
.form-error.is-visible {
    display: block;
}

.form-error {
    margin: 10px 0 0;
}

.trap {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 4px;
}

.contact-thanks {
    text-align: center;
    padding: 30px 10px;
}

.contact-thanks .bi {
    font-size: 2.6rem;
    color: var(--brand-accent);
}

.contact-thanks p {
    margin: 0;
    color: var(--muted-on-dark);
}

/* ---------------------------------------------------------------- Puntos, siguiente y pie */

.dots {
    position: fixed;
    right: 26px;
    top: 50%;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transform: translateY(-50%);
}

.no-js .dots,
.no-js .next {
    display: none;
}

.dots a {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    transition: background-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.dots a:hover {
    background: rgba(255, 255, 255, 0.5);
}

.dots a.is-active {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    transform: scale(1.3);
}

.next {
    position: fixed;
    left: 50%;
    bottom: 26px;
    z-index: 20;
    width: 44px;
    height: 44px;
    transform: translateX(-50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.28);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 1.1rem;
    transition: background-color 0.3s var(--ease), opacity 0.4s var(--ease);
}

.next:hover {
    background: rgba(255, 255, 255, 0.16);
}

.next.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.site-footer {
    position: fixed;
    left: 0;
    bottom: 22px;
    z-index: 10;
    font-size: 0.8rem;
    color: var(--muted-on-dark);
}

.no-js .site-footer {
    position: static;
    padding: 24px 0;
}

.site-footer p {
    margin: 0;
}

.site-footer a {
    color: var(--muted-on-dark);
}

.site-footer a:hover {
    color: #fff;
}

/* En pantallas angostas los paneles se leen con scroll normal (la versión móvil no está diseñada todavía) */
@media (max-width: 991px) {
    .js body.landing {
        overflow: auto;
    }

    .js .stage {
        position: static;
    }

    .js .panel {
        position: relative;
        opacity: 1;
        visibility: visible;
        min-height: auto;
    }

    .js [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }

    .dots,
    .next {
        display: none;
    }

    .site-footer {
        position: static;
        padding: 24px 0;
    }

    .hero-cards {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .js.no-gsap [data-reveal],
    .js.no-gsap .panel,
    .landing .btn,
    .dots a {
        transition: none;
    }
}
