/* ════════════════════════════════════════════
   STRATIFY – hero.css
   Main page hero + navbar visibility fix
   ════════════════════════════════════════════ */

/* ── Navbar always visible on main.html ── */
.navbar.scrolled {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* ── Main hero section ── */
.main-hero {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 80px) 0 100px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(48, 77, 61, .06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48, 77, 61, .06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 80% 80% at 50% 0%, black 40%, transparent 100%);
    pointer-events: none;
}

.hero-glow-top {
    position: absolute;
    top: -120px;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(48, 77, 61, .35) 0%, transparent 65%);
    pointer-events: none;
}

.main-hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 64px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--green-bright);
    background: rgba(110, 203, 138, .1);
    border: 1px solid rgba(110, 203, 138, .2);
    padding: 7px 16px;
    border-radius: var(--radius-pill);
    margin-bottom: 28px;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--green-bright);
    box-shadow: 0 0 8px var(--green-bright);
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.35;
    }
}

.hero-headline {
    font-size: clamp(2.8rem, 5.5vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.05em;
    color: var(--off-white);
    margin-bottom: 24px;
}

.headline-accent {
    font-style: normal;
    background: linear-gradient(130deg, var(--green-bright) 0%, #4aaa6e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-dark);
    line-height: 1.75;
    max-width: 460px;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.hero-social-proof {
    display: flex;
    align-items: center;
    gap: 14px;
}

.proof-avatars {
    display: flex;
}

.proof-avatars img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--black);
    margin-left: -10px;
    object-fit: cover;
}

.proof-avatars img:first-child {
    margin-left: 0;
}

.hero-social-proof p {
    font-size: .88rem;
    color: var(--text-muted);
}

.hero-social-proof strong {
    color: var(--off-white);
}

/* ── Premium Glassmorphic Dashboard Visual ── */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1200px;
}

.glass-dashboard-wrapper {
    position: relative;
    width: 480px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
    transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

/* Ambient glow directly behind dashboard */
.glass-ambient-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(110, 203, 138, 0.15) 0%, rgba(48, 77, 61, 0.1) 40%, transparent 70%);
    filter: blur(40px);
    z-index: 0;
}

.glass-main-panel {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 1200px;
    z-index: 1;
}

.glass-main-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    cursor: pointer;
    /* Suggests it can be clicked */
}

.glass-main-panel.is-flipped .glass-main-inner {
    transform: rotateX(180deg);
}

.glass-main-front,
.glass-main-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 20px;
    overflow: hidden;

    background: rgba(20, 28, 22, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top-color: rgba(255, 255, 255, 0.15);
    box-shadow:
        0 40px 80px -20px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 0 20px rgba(110, 203, 138, 0.03);
}

.glass-main-front {
    display: flex;
    flex-direction: column;
}

.glass-main-back {
    transform: rotateX(180deg);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(110, 203, 138, 0.15);
    /* Slightly stronger green for the welcome message */
    border: 1px solid rgba(110, 203, 138, 0.3);
}

.welcome-msg-large {
    color: var(--green-bright);
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 2px;
    font-family: inherit;
    text-shadow: 0 4px 20px rgba(110, 203, 138, 0.5);
}

/* Fake Mac OS Header */
.glass-header {
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent);
}

.mac-dots {
    display: flex;
    gap: 8px;
}

.mac-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background: #ff5f56;
}

.dot.yellow {
    background: #ffbd2e;
}

.dot.green {
    background: #27c93f;
}

.glass-title {
    flex-grow: 1;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.5px;
    margin-right: 44px;
    /* Offset the dots width for true centering */
}

/* Dashboard Body containing Chart & Metrics */
.glass-body {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 24px;
    gap: 24px;
}

.chart-container {
    width: 100%;
    flex-grow: 1;
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    background: rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.2);
}

.glass-chart {
    width: 100%;
    height: 100%;
    display: block;
}

/* Animated Chart Line */
.chart-line {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: drawPath 3s cubic-bezier(0.2, 0.8, 0.2, 1) forwards 0.5s;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

.chart-area {
    opacity: 0;
    animation: fadeArea 2s ease forwards 1.8s;
}

@keyframes fadeArea {
    to {
        opacity: 1;
    }
}

/* Interior Mini Metrics */
.glass-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.metric {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.m-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.m-val {
    font-size: 1.1rem;
    color: #fff;
    font-weight: 700;
}

.m-val.green {
    color: var(--green-bright);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Premium Floating Glass Widgets */
.glass-float {
    position: absolute;
    background: rgba(14, 20, 16, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top-color: rgba(255, 255, 255, 0.25);
    border-radius: 16px;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow:
        0 20px 40px -10px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    z-index: 10;
    white-space: nowrap;
    transform: translateZ(30px);
}

/* Specific Widget Placements */
.widget-a {
    top: -20px;
    left: -40px;
    animation: g-float-a 6s ease-in-out infinite;
}

.widget-b {
    bottom: 30px;
    right: -50px;
    animation: g-float-b 7s ease-in-out infinite;
    transform: translateZ(50px);
}

.widget-c {
    bottom: -30px;
    left: -20px;
    animation: g-float-c 5s ease-in-out infinite alternate;
    transform: translateZ(40px);
}

@keyframes g-float-a {

    0%,
    100% {
        transform: translateZ(30px) translateY(0);
    }

    50% {
        transform: translateZ(30px) translateY(-14px);
    }
}

@keyframes g-float-b {

    0%,
    100% {
        transform: translateZ(50px) translateY(0) translateX(0);
    }

    50% {
        transform: translateZ(50px) translateY(-8px) translateX(-5px);
    }
}

@keyframes g-float-c {

    0%,
    100% {
        transform: translateZ(40px) translateY(0);
    }

    50% {
        transform: translateZ(40px) translateY(10px);
    }
}

/* Icons inside the widgets */
.glass-float .fc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.fc-icon {
    font-size: 1.4rem;
}

.fc-val {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    color: var(--green-bright);
    letter-spacing: -.02em;
}

.fc-label {
    display: block;
    font-size: .7rem;
    color: var(--text-muted);
    margin-top: 2px;
}

@media(max-width:900px) {
    .main-hero-inner {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .hero-visual {
        display: none;
    }
}

@media(max-width:600px) {
    .main-hero-inner {
        padding: 0 24px;
    }

    .hero-headline {
        font-size: 2.4rem;
    }
}