/* ============================================
   viaBanking — Coming Soon
   Minimalist light theme with 3D animation
   ============================================ */

:root {
    /* Brand colors derived from logo */
    --c-ink: #001D46;
    --c-ink-soft: #1B355F;
    --c-blue: #0067D7;
    --c-blue-soft: #4793E8;
    --c-yellow: #FDD009;

    /* Light surface palette */
    --c-bg: #F5F7FB;
    --c-bg-soft: #ECF0F7;
    --c-surface: #FFFFFF;
    --c-surface-feature: rgba(255, 255, 255, 0.9);
    --c-border: rgba(0, 29, 70, 0.08);
    --c-border-strong: rgba(0, 29, 70, 0.14);
    --c-muted: rgba(0, 29, 70, 0.55);
    --c-muted-2: rgba(0, 29, 70, 0.42);

    /* Typography */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --text-hero: clamp(2rem, 1.25rem + 3.5vw, 4rem);
    --text-hero-sm: clamp(1.875rem, 1.5rem + 2vw, 2.5rem);
    --text-subtitle: clamp(1rem, 0.92rem + 0.4vw, 1.125rem);
    --text-feature-title: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);
    --text-feature-body: clamp(0.75rem, 0.72rem + 0.15vw, 0.8125rem);
    --text-footer: clamp(0.6875rem, 0.65rem + 0.15vw, 0.78125rem);
    --text-404-code: clamp(4rem, 2.5rem + 8vw, 7rem);
    --text-404-title: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
    --text-404-body: clamp(0.9375rem, 0.88rem + 0.3vw, 1.0625rem);

    /* Motion */
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 29, 70, 0.04), 0 2px 6px rgba(0, 29, 70, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 29, 70, 0.06), 0 12px 32px rgba(0, 29, 70, 0.05);
    --shadow-lg: 0 12px 32px rgba(0, 29, 70, 0.08), 0 24px 64px rgba(0, 29, 70, 0.06);
    --shadow-glow: 0 0 0 1px rgba(0, 103, 215, 0.18), 0 8px 28px rgba(0, 103, 215, 0.18);

    /* Layout container */
    --container-max: 1240px;
    --container-px: 56px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: clamp(15px, 14px + 0.35vw, 16px);
}

html,
body {
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.55;
    color: var(--c-ink);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Ambient background (static gradient + optional desktop blobs)
   ============================================ */
.ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background:
        radial-gradient(ellipse 85% 65% at 8% 5%, rgba(0, 103, 215, 0.2) 0%, transparent 58%),
        radial-gradient(ellipse 75% 55% at 92% 32%, rgba(253, 208, 9, 0.14) 0%, transparent 52%),
        radial-gradient(ellipse 90% 70% at 42% 98%, rgba(0, 103, 215, 0.12) 0%, transparent 55%),
        var(--c-bg);
}

.ambient__blob {
    display: none;
    position: absolute;
    border-radius: 50%;
    opacity: 0.45;
    will-change: transform;
}

.ambient__blob--1 {
    width: 620px;
    height: 620px;
    top: -180px;
    left: -120px;
    background: radial-gradient(circle, rgba(0, 103, 215, 0.22) 0%, transparent 72%);
}

.ambient__blob--2 {
    width: 540px;
    height: 540px;
    top: 30%;
    right: -180px;
    background: radial-gradient(circle, rgba(253, 208, 9, 0.18) 0%, transparent 72%);
}

.ambient__blob--3 {
    width: 720px;
    height: 720px;
    bottom: -260px;
    left: 30%;
    background: radial-gradient(circle, rgba(0, 103, 215, 0.14) 0%, transparent 72%);
}

@media (min-width: 961px) {
    .ambient__blob {
        display: block;
    }

    .ambient__blob--1 {
        animation: float-1 18s ease-in-out infinite;
    }

    .ambient__blob--2 {
        animation: float-2 22s ease-in-out infinite;
    }

    .ambient__blob--3 {
        animation: float-3 26s ease-in-out infinite;
    }
}

@keyframes float-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 80px) scale(1.08); }
}

@keyframes float-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-80px, 40px) scale(1.12); }
}

@keyframes float-3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -60px) scale(0.92); }
}

/* ============================================
   Subtle grid overlay
   ============================================ */
.grid-overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 29, 70, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 29, 70, 0.035) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 90%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 90%);
}

/* ============================================
   Header
   ============================================ */
.header {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding: 32px var(--container-px) 0;
    animation: fade-down 0.9s var(--ease-out-expo) both;
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand__logo {
    height: 56px;
    width: auto;
    transition: transform 0.4s var(--ease-out-quart);
}

.brand:hover .brand__logo {
    transform: scale(1.04);
}

/* ============================================
   Hero — two-column layout: text / visual
   ============================================ */
.hero {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 56px;
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding: 32px var(--container-px) 48px;
    text-align: left;
}

.hero__inner {
    flex: 0 1 520px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Hero animation slot — styles/keyframes in assets/visual.css (lazy-loaded) */
.visual[data-visual] {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 760px;
    aspect-ratio: 800 / 600;
}

.hero__title {
    margin-top: 0;
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--c-ink);
    animation: fade-up 0.9s 0.2s var(--ease-out-expo) both;
}

.hero__title--accent {
    background: linear-gradient(135deg, var(--c-blue) 0%, var(--c-ink) 60%, var(--c-blue-soft) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    background-size: 200% 200%;
    background-position: 0% 50%;
}

@media (min-width: 961px) {
    .hero__title--accent {
        animation: gradient-shift 8s ease-in-out infinite;
    }
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero__subtitle {
    margin-top: 22px;
    font-size: var(--text-subtitle);
    line-height: 1.6;
    color: var(--c-muted);
    max-width: 480px;
    animation: fade-up 0.9s 0.3s var(--ease-out-expo) both;
}

/* Features — vertical stack, equal width */
.features {
    margin-top: 36px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
    animation: fade-up 0.9s 0.4s var(--ease-out-expo) both;
}

.feature {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: var(--c-surface-feature);
    border: 1px solid var(--c-border);
    text-align: left;
    width: 100%;
    min-height: 72px;
    transition: transform 0.4s var(--ease-out-quart), box-shadow 0.4s var(--ease-out-quart), border-color 0.3s ease;
}

.feature:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-border-strong);
}

.feature__icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 103, 215, 0.12), rgba(253, 208, 9, 0.10));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-blue);
}

.feature__copy h3 {
    font-size: var(--text-feature-title);
    font-weight: 600;
    color: var(--c-ink);
    line-height: 1.3;
}

.feature__copy p {
    margin-top: 2px;
    font-size: var(--text-feature-body);
    color: var(--c-muted);
    line-height: 1.4;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px 24px;
    width: 100%;
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding: 24px var(--container-px) 28px;
    font-size: var(--text-footer);
    color: var(--c-muted-2);
    animation: fade-up 0.9s 0.7s var(--ease-out-expo) both;
}

.footer__links a {
    color: var(--c-ink-soft);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.25s ease;
}

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

/* ============================================
   404 page
   ============================================ */
.page-404 {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px var(--container-px);
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
}

.page-404__code {
    font-size: var(--text-404-code);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--c-blue);
    opacity: 0.25;
}

.page-404__title {
    margin-top: 8px;
    font-size: var(--text-404-title);
    font-weight: 700;
    color: var(--c-ink);
}

.page-404__message {
    margin-top: 12px;
    font-size: var(--text-404-body);
    color: var(--c-muted);
    max-width: 420px;
}

.page-404__link {
    display: inline-block;
    margin-top: 28px;
    padding: 12px 24px;
    font-size: var(--text-feature-title);
    font-weight: 600;
    color: var(--c-ink);
    text-decoration: none;
    border-radius: 12px;
    background: var(--c-surface-feature);
    border: 1px solid var(--c-border);
    transition: transform 0.3s var(--ease-out-quart), box-shadow 0.3s ease, border-color 0.3s ease;
}

.page-404__link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--c-border-strong);
    color: var(--c-blue);
}

/* ============================================
   Animations
   ============================================ */
@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-down {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1180px) {
    :root {
        --container-px: 40px;
    }

    .hero {
        gap: 36px;
    }

    .hero__inner {
        flex: 0 1 440px;
    }
}

@media (max-width: 960px) {
    :root {
        --container-px: 24px;
    }

    .header {
        justify-content: center;
        padding-top: 28px;
        padding-bottom: 4px;
    }

    .hero {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 28px;
        padding-top: 32px;
        padding-bottom: 32px;
    }

    .hero__inner {
        flex: 0 1 auto;
        align-items: center;
        max-width: 560px;
        width: 100%;
    }

    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .features {
        align-items: center;
    }

    .feature {
        max-width: 420px;
    }

    .visual[data-visual] {
        display: none;
    }

    .footer {
        flex-direction: column;
        align-items: center;
        gap: 14px;
        padding-top: 22px;
        padding-bottom: 26px;
        text-align: center;
    }

}

@media (max-width: 520px) {
    :root {
        --container-px: 18px;
    }

    .header {
        padding-top: 24px;
    }

    .brand__logo {
        height: 44px;
    }

    .hero {
        padding-top: 16px;
        padding-bottom: 32px;
        gap: 24px;
    }

    .hero__title {
        font-size: var(--text-hero-sm);
    }

    .hero__subtitle {
        margin-top: 16px;
    }

    .features {
        margin-top: 28px;
        gap: 10px;
    }

    .feature {
        padding: 14px 16px;
        min-height: 64px;
    }

    .footer {
        padding-top: 20px;
        padding-bottom: 24px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .ambient__blob,
    .hero__title--accent {
        animation: none !important;
    }
}
