/* ============================================================
   Alliance Corpo — Hero & Page Banner Styles
   ============================================================ */

/* ── Dark Hero (Homepage) ── */
.hero-home {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--color-dark);
    padding-top: var(--nav-h);
    transform: translateZ(0);
}

.hero-home::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 60% at 62% 55%, rgba(181, 255, 71, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 70% at 20% 30%, rgba(71, 207, 255, 0.05) 0%, transparent 55%),
        radial-gradient(ellipse 40% 40% at 80% 80%, rgba(181, 255, 71, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle grid overlay */
.hero-home::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 0%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, black 0%, transparent 75%);
}

/* Giant background text */
.hero-bg-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: var(--font-display);
    font-size: clamp(8rem, 20vw, 22rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 1px rgba(181, 255, 71, 0.14);
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    line-height: 1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    align-items: center;
    gap: 32px;
    min-height: calc(100vh - var(--nav-h));
    padding: 80px 0 60px;
    overflow: visible;
}

/* Left copy */
.hero-copy {
    display: flex;
    flex-direction: column;
    gap: 28px;
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-dim);
}

.hero-eyebrow .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--color-accent);
    animation: glowPulse 2s infinite;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 8vw, 5.5rem);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.0;
    color: var(--color-white);
}

.hero-headline .accent-word {
    color: var(--color-accent);
}

.hero-headline .line-2 {
    display: block;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.22);
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--color-text-dim);
    max-width: 440px;
    line-height: 1.75;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .hero-actions {
        justify-content: center;
    }

    .hero-sub {
        max-width: none;
    }

    .hero-headline .line-2 {
        -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.2);
    }
}

.hero-stats {
    display: flex;
    gap: 36px;
    flex-wrap: wrap;
}

@media (max-width: 900px) {
    .hero-stats {
        justify-content: center;
        gap: 24px;
        margin-top: 16px;
    }
}

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--color-white);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-dim);
    margin-top: 2px;
}

/* Right visual — Glassmorphic Dashboard Scene */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 600px;
    margin-top: -60px;
    margin-right: -40px;
    perspective: 1400px;
    overflow: visible;
    contain: layout style;
}

/* ── Mobile Layout Flow (Order Override) ── */
@media (max-width: 900px) {
    .hero-content {
        display: flex;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 60px 0 40px;
        gap: 24px;
    }

    .hero-copy {
        display: contents;
    }

    .hero-eyebrow {
        order: 1;
        margin: 0 auto;
    }

    .hero-headline {
        order: 2;
        margin: 0 auto;
    }

    .hero-sub {
        order: 3;
        margin: 0 auto;
    }

    .hero-visual {
        order: 4;
        margin: 20px auto 0;
        transform: scale(0.65);
        transform-origin: top center;
        height: 420px;
        display: flex;
        align-items: flex-start;
        z-index: 10;
    }

    .hero-actions {
        order: 5;
        justify-content: center;
        width: 100%;
        margin-top: 40px;
    }

    .hero-stats {
        order: 6;
        justify-content: center;
        width: 100%;
        margin-top: 20px;
    }
}

/* ── Command Panel (Background Layer) ── */
.command-panel {
    position: absolute;
    inset: -10px -20px 20px 0px;
    z-index: 1;
    background: linear-gradient(135deg,
            rgba(15, 18, 15, 0.95) 0%,
            rgba(8, 10, 8, 0.98) 100%);
    background-image:
        radial-gradient(circle at 20% 0%, rgba(181, 255, 71, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 80% 100%, rgba(71, 207, 255, 0.04) 0%, transparent 40%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1.5px, transparent 1.5px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1.5px, transparent 1.5px);
    background-size: 100% 100%, 100% 100%, 32px 32px, 32px 32px;
    backdrop-filter: blur(32px) saturate(180%) contrast(110%);
    -webkit-backdrop-filter: blur(32px) saturate(180%) contrast(110%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-top-color: rgba(255, 255, 255, 0.12);
    border-left-color: rgba(255, 255, 255, 0.10);
    border-radius: 28px;
    padding: 24px 28px 48px;
    display: flex;
    flex-direction: column;
    will-change: transform;
    transform-style: preserve-3d;
    box-shadow:
        0 10px 30px -10px rgba(0, 0, 0, 0.5),
        0 40px 120px -30px rgba(0, 0, 0, 0.95),
        0 0 100px -20px rgba(181, 255, 71, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        inset 0 0 40px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: scale(0.96) rotateY(-8deg) rotateX(4deg);
    -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 100%, transparent 100%);
    mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 100%, transparent 100%);
}

/* Glass sheen highlight across the panel */
.command-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(125deg,
            rgba(255, 255, 255, 0.07) 0%,
            rgba(255, 255, 255, 0.02) 30%,
            transparent 60%);
    pointer-events: none;
    z-index: 0;
}

.command-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.command-panel-title {
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0;
}

.command-panel-period {
    font-size: 0.70rem;
    color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
}

#chart-canvas {
    flex: 1;
    width: 100%;
    border-radius: var(--radius-sm);
    opacity: 0.85;
}

.command-panel-legend {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    padding-bottom: 4px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    white-space: nowrap;
}

.legend-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-profit {
    background: #ff9f43;
    /* Orange */
}

.legend-reservations {
    background: var(--color-accent);
    /* Green */
}

.legend-satisfaction {
    background: #47c8ff;
    /* Blue */
}

.legend-load {
    background: rgba(255, 255, 255, 0.3);
    /* grey */
}

/* ── Metric Cards (Foreground Layer) ── */
.metric-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(165deg,
            rgba(25, 30, 25, 0.92) 0%,
            rgba(12, 14, 12, 0.96) 100%);
    backdrop-filter: blur(40px) saturate(200%) brightness(110%);
    -webkit-backdrop-filter: blur(40px) saturate(200%) brightness(110%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-top-color: rgba(255, 255, 255, 0.14);
    border-left-color: rgba(255, 255, 255, 0.10);
    border-radius: 20px;
    box-shadow:
        0 4px 12px rgba(0, 0, 0, 0.3),
        0 24px 64px -12px rgba(0, 0, 0, 0.75),
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        inset 0 0 24px rgba(0, 0, 0, 0.4);
    will-change: transform;
    transform-style: preserve-3d;
    font-family: var(--font-display);
    white-space: nowrap;
    opacity: 0;
    transform: translateY(-20px) translateX(120px) translateZ(50px);
    transition:
        border-color 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        background 0.4s ease;
}

/* Glass surface sheen for cards */
.metric-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.12) 0%,
            rgba(255, 255, 255, 0.02) 40%,
            transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.metric-card:hover {
    border-color: rgba(181, 255, 71, 0.40);
    box-shadow:
        0 24px 64px rgba(0, 0, 0, 0.60),
        0 8px 24px rgba(0, 0, 0, 0.35),
        0 0 1px rgba(181, 255, 71, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        inset 0 -1px 0 rgba(0, 0, 0, 0.12);
}

#chart-canvas {
    width: 100%;
    height: 100%;
    display: block;
    mix-blend-mode: screen;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 8%, black 20%, black 65%, rgba(0, 0, 0, 0.1) 85%, transparent 95%);
    mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 8%, black 20%, black 65%, rgba(0, 0, 0, 0.1) 85%, transparent 95%);
}

.metric-card-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(8, 12, 8, 0.6);
    border: 1px solid rgba(181, 255, 71, 0.15);
    /* intense stroke depth */
    box-shadow: inset 0 0 12px rgba(181, 255, 71, 0.15);
    /* neon glow inside */
    color: var(--color-accent);
    flex-shrink: 0;
}

.metric-card-icon svg {
    width: 20px;
    height: 20px;
}

.metric-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.70rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.60);
}

.metric-indicator {
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: auto;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
}

.metric-indicator.up {
    color: var(--color-accent);
    background: rgba(181, 255, 71, 0.12);
    border: 1px solid rgba(181, 255, 71, 0.2);
}

/* Card Positions — exact older bounds */
.metric-card-revenue {
    top: 5%;
    right: -2%;
}

.metric-card-occupancy {
    top: 58%;
    left: -8%;
}

.metric-card-bookings {
    bottom: 5%;
    right: 5%;
}

/* ── Idle Parallax Drift Keyframes ── */
@keyframes panelDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1) rotateY(-6deg) rotateX(3deg);
    }

    25% {
        transform: translate(3px, -2px) scale(1) rotateY(-5.5deg) rotateX(3.3deg);
    }

    50% {
        transform: translate(-2px, 3px) scale(1) rotateY(-6.5deg) rotateX(2.7deg);
    }

    75% {
        transform: translate(2px, 1px) scale(1) rotateY(-5.8deg) rotateX(3.1deg);
    }
}

@keyframes cardDrift1 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-4px, 3px);
    }

    66% {
        transform: translate(3px, -4px);
    }
}

@keyframes cardDrift2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(4px, -3px);
    }

    66% {
        transform: translate(-3px, 5px);
    }
}

@keyframes cardDrift3 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(-3px, -4px);
    }

    66% {
        transform: translate(5px, 2px);
    }
}

/* Applied after GSAP entrance */
.command-panel.drifting {
    animation: panelDrift 12s ease-in-out infinite;
}

.metric-card-revenue.drifting {
    animation: cardDrift1 7s ease-in-out infinite;
}

.metric-card-occupancy.drifting {
    animation: cardDrift2 8s ease-in-out infinite;
    animation-delay: 0.5s;
}

.metric-card-bookings.drifting {
    animation: cardDrift3 7.5s ease-in-out infinite;
    animation-delay: 1s;
}

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

    .hero-content {
        max-width: 100%;
        text-align: center;
        align-items: center;
    }

    .hero-tags {
        justify-content: center;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual-wrapper {
        min-height: 480px;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        margin-top: 2rem;
        width: 100%;
        overflow-x: clip;
        overflow-y: visible;
    }

    .hero-visual {
        transform: scale(0.65);
        transform-origin: top center;
        width: 100%;
        max-width: 600px;
        z-index: 10;
        margin-left: 0;
    }

    .metric-card-revenue {
        top: 2%;
        right: 2%;
    }

    .metric-card-occupancy {
        bottom: 20%;
        left: 4%;
    }

    .metric-card-bookings {
        bottom: 2%;
        right: 2%;
    }

    /* Reduce backdrop-filter on mobile for performance */
    .command-panel {
        backdrop-filter: blur(16px) saturate(140%);
        -webkit-backdrop-filter: blur(16px) saturate(140%);
    }

    .metric-card {
        backdrop-filter: blur(20px) saturate(150%);
        -webkit-backdrop-filter: blur(20px) saturate(150%);
    }

    /* Disable drift animations on mobile for battery/perf */
    .command-panel.drifting {
        animation: none;
    }

    .metric-card-revenue.drifting,
    .metric-card-occupancy.drifting,
    .metric-card-bookings.drifting {
        animation: none;
    }
}

@media (max-width: 600px) {
    .hero-visual-wrapper {
        min-height: 400px;
        margin-top: 0.5rem;
    }

    .hero-visual {
        transform: scale(0.42);
        /* Scale down but keep content visible */
        transform-origin: top center;
        margin-top: -10px;
    }

    /* Resize the cards so they don't look huge and fit all 3 */
    .metric-card {
        padding: 8px 12px;
        gap: 8px;
    }

    .metric-card-icon {
        width: 28px;
        height: 28px;
    }

    .metric-card-icon svg {
        width: 14px;
        height: 14px;
    }

    .metric-value {
        font-size: 0.95rem;
    }

    .metric-label {
        font-size: 0.55rem;
    }

    .metric-indicator {
        font-size: 0.55rem;
        padding: 2px 6px;
    }

    .metric-card-revenue {
        right: -2%;
        top: 14%;
    }

    .metric-card-occupancy {
        left: -2%;
        top: 42%;
        bottom: auto;
        /* Fix stretching */
    }

    /* Show all 3 properly aligned */
    .metric-card-bookings {
        display: flex;
        right: -2%;
        bottom: 16%;
    }

    #chart-canvas {
        -webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 12%, black 25%, black 45%, rgba(0, 0, 0, 0.1) 75%, transparent 92%);
        mask-image: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.1) 12%, black 25%, black 45%, rgba(0, 0, 0, 0.1) 75%, transparent 92%);
    }
}

/* ── Dark Page Banner (Systems, HMS) ── */
.page-banner {
    background: var(--color-dark);
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

@media (max-width: 768px) {
    .page-banner {
        padding: 120px 0 60px;
    }
}

.page-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse 60% 50% at 50% 0%, rgba(181, 255, 71, 0.1) 0%, transparent 60%),
        radial-gradient(ellipse 30% 40% at 80% 80%, rgba(71, 216, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

.page-banner-eyebrow {
    margin-bottom: 20px;
}

.page-banner h1 {
    color: var(--color-white);
    margin-bottom: 20px;
}

.page-banner p {
    color: var(--color-text-dim);
    max-width: 520px;
    margin: 0 auto;
    font-size: 1.05rem;
}

/* ── About Page Hero ── */
.about-hero {
    background: var(--color-dark);
    padding: 160px 0 100px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .about-hero {
        padding: 120px 0 60px;
    }
}

.about-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 50% at 20% 50%, rgba(181, 255, 71, 0.09) 0%, transparent 60%),
        radial-gradient(ellipse 50% 60% at 80% 20%, rgba(71, 216, 255, 0.05) 0%, transparent 55%);
}

.about-hero-content {
    position: relative;
    z-index: 1;
}

.about-hero h1 {
    color: var(--color-white);
    margin-bottom: 24px;
}

.about-hero p {
    color: var(--color-text-dim);
    max-width: 600px;
    font-size: 1.1rem;
    line-height: 1.75;
}

/* ── Contact Hero ── */
.contact-hero {
    background: var(--color-dark);
    padding: 140px 0 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.contact-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(181, 255, 71, 0.07) 0%, transparent 60%);
}

.contact-hero h1 {
    color: var(--color-white);
}

.contact-hero p {
    color: var(--color-text-dim);
    max-width: 480px;
    margin: 16px auto 0;
}

/* ── Scrolling marquee — dark ── */
.marquee-track {
    overflow: hidden;
    white-space: nowrap;
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    background: var(--color-dark-2);
}

.marquee-inner {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.marquee-item {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-right: 56px;
    font-family: var(--font-display);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--color-text-dim);
}

.marquee-item::before {
    content: '✦';
    color: var(--color-accent);
    font-size: 0.65rem;
}