/* ========================================
   HOMEPAGE — PREMIUM MOTION DESIGN
   Hardware-accelerated, 60fps animations
   ======================================== */

/* --- Mesh Gradient Hero Background --- */
.hero-mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-mesh__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    will-change: transform;
}

.hero-mesh__blob--1 {
    width: 600px;
    height: 600px;
    top: -10%;
    right: -5%;
    background: hsl(190 100% 50% / 0.25);
    animation: mesh-drift-1 14s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.hero-mesh__blob--2 {
    width: 500px;
    height: 500px;
    bottom: -15%;
    left: -10%;
    background: hsl(270 100% 60% / 0.18);
    animation: mesh-drift-2 18s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

.hero-mesh__blob--3 {
    width: 350px;
    height: 350px;
    top: 40%;
    left: 35%;
    background: hsl(190 80% 40% / 0.12);
    animation: mesh-drift-3 12s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

@keyframes mesh-drift-1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-80px, 60px) scale(1.15); }
}
@keyframes mesh-drift-2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, -50px) scale(1.1); }
}
@keyframes mesh-drift-3 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -30px) scale(0.9); }
}

/* --- Particle Canvas --- */
#hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* --- Hero Layout: Asymmetric Split --- */
.hero-home {
    position: relative;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 8rem 0 4rem;
}

.hero-home__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 10;
}

@media (min-width: 1024px) {
    .hero-home__grid {
        grid-template-columns: 55fr 45fr;
        gap: 4rem;
    }
}

/* --- Hero Text --- */
.hero-home__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    background: hsl(190 100% 50% / 0.08);
    border: 1px solid hsl(190 100% 50% / 0.15);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    color: hsl(190 100% 60%);
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(8px);
    width: fit-content;
}

.hero-home__eyebrow-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: hsl(160 80% 55%);
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%      { opacity: 0.4; transform: scale(0.7); }
}

.hero-home__title {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-size: clamp(2.5rem, 5.5vw, 4.2rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: hsl(var(--foreground));
}

.hero-home__title-accent {
    display: inline;
    background: linear-gradient(135deg, hsl(190 100% 55%), hsl(200 100% 65%));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Scramble text cursor */
.scramble-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: hsl(190 100% 55%);
    margin-left: 4px;
    vertical-align: text-bottom;
    animation: cursor-blink 0.8s step-end infinite;
}

@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0; }
}

.hero-home__subtitle {
    font-size: 1.15rem;
    line-height: 1.7;
    color: hsl(215 20% 60%);
    max-width: 520px;
    margin-bottom: 2.5rem;
}

/* --- Hero CTAs --- */
.hero-home__ctas {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-home__cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: hsl(190 100% 50%);
    color: hsl(222 47% 5%);
    font-weight: 700;
    font-size: 0.95rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
    text-decoration: none;
    box-shadow: 0 0 0 0 hsl(190 100% 50% / 0);
}

.hero-home__cta-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px -8px hsl(190 100% 50% / 0.35);
}

.hero-home__cta-primary:active {
    transform: translateY(0) scale(0.98);
}

.hero-home__cta-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 2rem;
    background: transparent;
    color: hsl(var(--foreground));
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid hsl(217 33% 20%);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease, background 0.25s ease;
    text-decoration: none;
}

.hero-home__cta-secondary:hover {
    transform: translateY(-2px);
    border-color: hsl(190 100% 50% / 0.4);
    background: hsl(190 100% 50% / 0.05);
}

/* --- Hero Terminal Widget (right side) --- */
.hero-terminal {
    position: relative;
    background: hsl(222 47% 4%);
    border: 1px solid hsl(217 33% 15%);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.04);
    animation: terminal-float 8s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
}

@keyframes terminal-float {
    0%   { transform: translateY(0); }
    100% { transform: translateY(-12px); }
}

.hero-terminal__bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    background: hsl(222 47% 6%);
    border-bottom: 1px solid hsl(217 33% 12%);
}

.hero-terminal__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.hero-terminal__dot--red    { background: #ff5f57; }
.hero-terminal__dot--yellow { background: #febc2e; }
.hero-terminal__dot--green  { background: #28c840; }

.hero-terminal__title {
    margin-left: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: hsl(215 20% 50%);
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.hero-terminal__body {
    padding: 1.5rem;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 0.82rem;
    line-height: 1.8;
    color: hsl(215 20% 55%);
    min-height: 260px;
}

.hero-terminal__line {
    opacity: 0;
    animation: line-appear 0.4s ease-out forwards;
}

.hero-terminal__prompt {
    color: hsl(160 80% 55%);
}

.hero-terminal__cmd {
    color: hsl(var(--foreground));
}

.hero-terminal__ok {
    color: hsl(160 80% 55%);
}

.hero-terminal__warn {
    color: hsl(40 100% 60%);
}

.hero-terminal__err {
    color: hsl(0 85% 60%);
}

@keyframes line-appear {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Live status cards (below terminal) --- */
.hero-status-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.hero-status-card {
    background: hsl(222 47% 5%);
    border: 1px solid hsl(217 33% 13%);
    border-radius: 0.75rem;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.3s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.hero-status-card:hover {
    border-color: hsl(190 100% 50% / 0.3);
    transform: translateY(-3px);
}

.hero-status-card__value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.3rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.hero-status-card__label {
    font-size: 0.7rem;
    color: hsl(215 20% 45%);
    margin-top: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.status-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-dot--green  { background: hsl(160 80% 55%); box-shadow: 0 0 6px hsl(160 80% 55% / 0.5); }
.status-dot--cyan   { background: hsl(190 100% 55%); box-shadow: 0 0 6px hsl(190 100% 55% / 0.5); }

/* --- Marquee Trust Band --- */
.marquee-band {
    overflow: hidden;
    padding: 1.5rem 0;
    border-top: 1px solid hsl(217 33% 12%);
    border-bottom: 1px solid hsl(217 33% 12%);
    background: hsl(222 47% 3%);
    position: relative;
}

.marquee-band::before,
.marquee-band::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 120px;
    z-index: 2;
    pointer-events: none;
}

.marquee-band::before {
    left: 0;
    background: linear-gradient(to right, hsl(222 47% 3%), transparent);
}

.marquee-band::after {
    right: 0;
    background: linear-gradient(to left, hsl(222 47% 3%), transparent);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: marquee-scroll 35s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.marquee-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 2.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(215 20% 50%);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.marquee-item svg {
    width: 18px;
    height: 18px;
    color: hsl(190 100% 50%);
    flex-shrink: 0;
}

/* --- Bento Grid Services --- */
.bento-section {
    padding: 6rem 0;
}

.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .bento-grid {
        grid-template-columns: 2fr 1fr 1fr;
        grid-template-rows: auto auto;
    }
    .bento-grid__item--wide {
        grid-column: 1 / 2;
        grid-row: 1 / 3;
    }
}

.bento-grid__item {
    position: relative;
    background: linear-gradient(145deg, rgba(255,255,255,0.03), rgba(255,255,255,0.005));
    backdrop-filter: blur(8px);
    border: 1px solid hsl(217 33% 13%);
    border-radius: 1.25rem;
    padding: 2rem;
    overflow: hidden;
    transition: border-color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    /* Scroll reveal */
    opacity: 0;
    transform: translateY(30px);
}

.bento-grid__item.revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.3s ease;
}

.bento-grid__item:hover {
    border-color: hsl(190 100% 50% / 0.25);
    transform: translateY(-4px);
}

.bento-grid__item.revealed:hover {
    transform: translateY(-4px);
}

.bento-grid__icon {
    width: 44px;
    height: 44px;
    border-radius: 0.75rem;
    background: hsl(190 100% 50% / 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.bento-grid__icon svg {
    width: 22px;
    height: 22px;
    color: hsl(190 100% 55%);
}

.bento-grid__title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

.bento-grid__desc {
    font-size: 0.9rem;
    color: hsl(215 20% 55%);
    line-height: 1.65;
}

.bento-grid__link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.25rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: hsl(190 100% 55%);
    text-decoration: none;
    transition: gap 0.2s ease;
}

.bento-grid__link:hover {
    gap: 0.7rem;
}

.bento-grid__badge {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    background: hsl(175 100% 22%);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* --- Perpetual shimmer on wide card --- */
.bento-grid__item--wide::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsl(190 100% 50% / 0.03), transparent);
    animation: shimmer-sweep 6s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmer-sweep {
    0%   { transform: translateX(0); }
    100% { transform: translateX(400%); }
}

/* --- Scroll reveal generic --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Stagger delays (CSS cascade) --- */
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }

/* --- Google Font preconnect hint --- */
/* Add to <head>:
   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link href="https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=JetBrains+Mono:wght@400;600;700&display=swap" rel="stylesheet">
*/

/* Mobile refinements */
@media (max-width: 767px) {
    .hero-home {
        padding: 6rem 0 3rem;
        min-height: auto;
    }
    .hero-terminal {
        animation: none;
    }
    .hero-status-row {
        grid-template-columns: 1fr;
    }
    .marquee-item {
        padding: 0 1.5rem;
    }
}
