/* ============================================================
   HUBBOARD — лендінг-портал
   Дизайн: iOS 26 "Liquid Glass" — рідке скло, прозорість, глибина
   ============================================================ */

:root {
    --bg-1: #0a0e27;
    --bg-2: #141a3a;
    --bg-3: #1a1145;
    --primary: #6e8bff;
    --primary-light: #a5b8ff;
    --accent: #4fe9ff;
    --violet: #b388ff;
    --pink: #ff8fd0;
    --text: #f4f6ff;
    --text-muted: rgba(244, 246, 255, 0.74);
    --glass: rgba(255, 255, 255, 0.12);
    --glass-strong: rgba(255, 255, 255, 0.16);
    --glass-border: rgba(255, 255, 255, 0.18);
    --glass-border-hi: rgba(255, 255, 255, 0.4);
    --radius: 28px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(160deg, var(--bg-1) 0%, var(--bg-2) 55%, var(--bg-3) 100%);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ---------- Рідкі світлові плями (liquid background) ---------- */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.55;
    pointer-events: none;
    will-change: transform;
}

body::before {
    width: 60vw;
    height: 60vw;
    top: -18vw;
    left: -12vw;
    background: radial-gradient(circle at 30% 30%, var(--primary), transparent 70%);
    animation: drift-a 22s ease-in-out infinite alternate;
}

body::after {
    width: 55vw;
    height: 55vw;
    bottom: -20vw;
    right: -14vw;
    background: radial-gradient(circle at 60% 40%, var(--accent), transparent 70%);
    animation: drift-b 26s ease-in-out infinite alternate;
}

@keyframes drift-a {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(14vw, 10vh) scale(1.15); }
}

@keyframes drift-b {
    from { transform: translate(0, 0) scale(1.1); }
    to   { transform: translate(-12vw, -8vh) scale(1); }
}

/* ---------- Layout ---------- */
.page {
    position: relative;
    z-index: 1;
    flex: 1;
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(2.5rem, 6vw, 5.5rem) 1.5rem 3rem;
}

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    margin-bottom: clamp(2.5rem, 6vw, 4.5rem);
    animation: rise 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    margin-bottom: 1.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 4px 18px rgba(0, 0, 0, 0.25);
}

.hero__title {
    font-size: clamp(2.8rem, 9vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.02;
    background: linear-gradient(110deg, #ffffff 0%, var(--primary-light) 45%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 30px rgba(110, 139, 255, 0.45));
}

.hero__subtitle {
    margin: 1.1rem auto 0;
    max-width: 38rem;
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-muted);
}

/* ---------- Сітка карток ---------- */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.6rem;
}

/* ---------- Liquid Glass картка ---------- */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.9rem;
    text-decoration: none;
    color: inherit;
    isolation: isolate;
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    backdrop-filter: blur(34px) saturate(190%);
    -webkit-backdrop-filter: blur(34px) saturate(190%);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        inset 0 0 24px rgba(255, 255, 255, 0.04);
    overflow: hidden;
    transition:
        transform 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        border-color 0.5s ease,
        background 0.5s ease,
        box-shadow 0.5s ease;
    animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Світловий відблиск (specular sheen) угорі скла */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(120% 80% at 50% -20%, rgba(255, 255, 255, 0.22), transparent 60%);
    opacity: 0.8;
    transition: opacity 0.5s ease;
}

.card--active:hover {
    transform: translateY(-10px) scale(1.015);
    background: var(--glass-strong);
    border-color: var(--glass-border-hi);
    box-shadow:
        0 24px 60px rgba(78, 233, 255, 0.22),
        0 10px 40px rgba(110, 139, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.card--active:hover::before {
    opacity: 1;
}

/* Видимий фокус для клавіатури (доступність) */
.card--active:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 4px;
    transform: translateY(-6px) scale(1.01);
    border-color: var(--glass-border-hi);
    box-shadow:
        0 0 0 4px rgba(79, 233, 255, 0.25),
        0 24px 60px rgba(78, 233, 255, 0.22);
}

.card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 1.35rem;
    font-size: 1.7rem;
    color: #fff;
    border-radius: 20px;
    background: linear-gradient(140deg, var(--primary) 0%, var(--violet) 100%);
    box-shadow:
        0 10px 26px rgba(110, 139, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.card--active:hover .card__icon {
    transform: scale(1.12) rotate(-5deg);
}

.card__title {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.45rem;
}

.card__desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    flex: 1;
}

.card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent);
}

.card__cta i {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card--active:hover .card__cta i {
    transform: translateX(6px);
}

/* ---------- Стан "Незабаром" ---------- */
.card--soon {
    cursor: default;
}

.card--soon .card__icon {
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.06));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.card--soon .card__title,
.card--soon .card__desc {
    opacity: 0.9;
}

.card__badge {
    position: absolute;
    top: 1.35rem;
    right: 1.35rem;
    padding: 0.3rem 0.8rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.13);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
}

/* ---------- Footer ---------- */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---------- Анімація появи ---------- */
.card:nth-child(1) { animation-delay: 0.05s; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.19s; }
.card:nth-child(4) { animation-delay: 0.26s; }
.card:nth-child(5) { animation-delay: 0.33s; }

@keyframes rise {
    from { opacity: 0; transform: translateY(28px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
