/* =====================================================
   HOME PAGE MODERN DESIGN
   Using Design System Tokens
===================================================== */

.home-page {
    overflow: hidden;
    background: var(--bg-body);
    color: var(--text-body);
    font-family: var(--font-main);
}

.home-page a {
    text-decoration: none;
    color: inherit;
}

.home-shell {
    width: min(1400px, calc(100% - 64px));
    margin: 0 auto;
}

/* =====================================================
   EYEBROW & TYPOGRAPHY
===================================================== */

.eyebrow {
    margin: 0 0 16px;
    color: var(--text-brand);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-uppercase);
    text-transform: uppercase;
}

.eyebrow-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 10px;
    border-radius: 50%;
    background: var(--brand-cyan);
    box-shadow: var(--glow-cyan);
    animation: pulse-dot 2s ease-in-out infinite;
}

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

/* =====================================================
   HERO SECTION
===================================================== */

.home-hero {
    position: relative;
    padding: 140px 0 100px;
    background: 
        radial-gradient(ellipse at 70% 30%, rgba(0, 229, 255, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 30% 70%, rgba(108, 99, 255, 0.1) 0%, transparent 50%),
        var(--gradient-dark);
    overflow: hidden;
}

.home-hero::before {
    position: absolute;
    inset: 0;
    pointer-events: none;
    content: '';
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: linear-gradient(135deg, black 30%, transparent 80%);
    -webkit-mask-image: linear-gradient(135deg, black 30%, transparent 80%);
}

.hero-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(450px, 1fr);
    gap: 60px;
    align-items: center;
}

.hero-copy h1 {
    max-width: 700px;
    margin: 0;
    color: var(--text-heading);
    font-family: var(--font-display);
    font-size: clamp(48px, 5.5vw, 72px);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
    text-rendering: optimizeLegibility;
}

.hero-copy h1 em {
    color: var(--brand-cyan);
    font-style: normal;
    background: linear-gradient(135deg, var(--brand-cyan), var(--brand-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    max-width: 580px;
    margin: 24px 0 32px;
    color: var(--text-secondary);
    font-size: var(--fs-lg);
    line-height: var(--lh-relaxed);
}

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

.home-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 52px;
    padding: 0 28px;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    font-family: var(--font-main);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    transition: all var(--transition-normal);
    cursor: pointer;
}

.home-button-primary {
    color: var(--button-primary-text);
    background: var(--button-primary-bg);
    box-shadow: var(--shadow-neon);
}

.home-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 
        var(--shadow-neon),
        0 8px 25px rgba(0, 229, 255, 0.4);
}

.home-button-quiet {
    color: var(--text-heading);
    border-color: var(--border-light);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
}

.home-button-quiet:hover {
    border-color: var(--border-brand);
    background: rgba(0, 229, 255, 0.1);
}

.home-button-light {
    color: var(--brand-dark);
    background: var(--brand-cyan);
    box-shadow: var(--shadow-neon);
}

.home-button-light:hover {
    transform: translateY(-2px);
    box-shadow: 
        var(--shadow-neon),
        0 8px 25px rgba(0, 229, 255, 0.4);
}

.hero-proof {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
}

.proof-mark {
    display: inline-grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border: 1px solid var(--border-brand);
    border-radius: 50%;
    color: var(--brand-cyan);
    font-size: 12px;
    background: rgba(0, 229, 255, 0.1);
}

/* =====================================================
   HERO SCENE (3D STAGE VISUALIZATION)
===================================================== */

.hero-scene {
    position: relative;
    min-height: 420px;
    padding: 20px;
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    box-shadow: 
        var(--shadow-lg),
        0 0 40px rgba(0, 229, 255, 0.15);
    transform: perspective(1000px) rotateY(-5deg) rotateX(2deg);
    transition: transform var(--transition-slow);
}

.hero-scene:hover {
    transform: perspective(1000px) rotateY(-3deg) rotateX(1deg);
}

.scene-topline,
.scene-footer {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: var(--fs-2xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

.scene-stage {
    position: relative;
    min-height: 340px;
    margin: 16px 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, #1a2f42 0%, #0f1e2e 50%, #0a1219 50%, #0d1620 100%);
}

.scene-grid {
    position: absolute;
    inset: 50% -20% -40%;
    opacity: 0.4;
    transform: perspective(400px) rotateX(60deg);
    background-image: 
        linear-gradient(rgba(0, 229, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 255, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
}

.scene-screen {
    position: absolute;
    top: 80px;
    left: 50%;
    display: flex;
    width: 60%;
    height: 120px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateX(-50%);
    border: 4px solid var(--border-default);
    outline: 1px solid var(--border-brand);
    border-radius: var(--radius-sm);
    background: var(--gradient-primary);
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.3);
}

.scene-screen span,
.scene-screen strong,
.scene-screen small {
    position: relative;
    z-index: 1;
}

.scene-screen span {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--fs-2xs);
    letter-spacing: var(--tracking-wider);
}

.scene-screen strong {
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1;
    letter-spacing: var(--tracking-wide);
    color: var(--text-heading);
}

.scene-screen small {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 10px;
    letter-spacing: var(--tracking-wide);
}

.scene-platform {
    position: absolute;
    bottom: 60px;
    left: 18%;
    width: 64%;
    height: 16px;
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-sm);
    background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.4), transparent);
    box-shadow: 0 20px 0 rgba(0, 229, 255, 0.1);
}

.scene-truss {
    position: absolute;
    top: 20px;
    width: 10px;
    height: 240px;
    border: 2px solid var(--border-default);
    border-radius: var(--radius-sm);
    background: repeating-linear-gradient(135deg, transparent 0 15px, rgba(255, 255, 255, 0.3) 16px 18px);
}

.scene-truss-left {
    left: 35px;
    transform: rotate(-6deg);
}

.scene-truss-right {
    right: 35px;
    transform: rotate(6deg);
}

.scene-light {
    position: absolute;
    bottom: 100px;
    width: 120px;
    height: 160px;
    opacity: 0.5;
    background: linear-gradient(165deg, rgba(0, 229, 255, 0.5), transparent 60%);
    clip-path: polygon(40% 0, 60% 0, 100% 100%, 0 100%);
}

.scene-light-one {
    left: 5%;
    transform: rotate(10deg);
}

.scene-light-two {
    right: 5%;
    transform: rotate(-10deg);
    background: linear-gradient(195deg, rgba(108, 99, 255, 0.5), transparent 60%);
}

/* =====================================================
   TEMPLATE CAROUSEL
===================================================== */

.home-template-carousel {
    padding: 64px 0;
    border-block: 1px solid var(--border-light);
    background: var(--bg-section);
}

.home-template-carousel .home-shell {
    width: min(1400px, calc(100% - 40px));
}

.template-carousel-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.template-carousel-heading .eyebrow {
    margin-bottom: 10px;
}

.template-carousel-heading h2 {
    margin: 0;
    color: var(--text-heading);
    font-family: var(--font-display);
    font-size: clamp(28px, 3vw, 42px);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
}

.template-carousel-controls {
    display: flex;
    align-items: center;
    color: var(--text-muted);
    font-size: var(--fs-xs);
    font-variant-numeric: tabular-nums;
}

.template-carousel-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 3;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
}

.template-carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.template-carousel-slide {
    flex: 0 0 calc(100% / var(--slides-visible, 3));
    width: calc(100% / var(--slides-visible, 3));
    height: 100%;
    margin: 0;
    padding: 8px;
}

.template-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
}

.carousel-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid var(--border-light);
    border-radius: 50%;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    color: var(--text-heading);
    font-size: 20px;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 10;
}

.carousel-nav-button:hover {
    border-color: var(--border-brand);
    background: rgba(0, 229, 255, 0.15);
    box-shadow: var(--shadow-neon);
}

.carousel-nav-prev {
    left: 16px;
}

.carousel-nav-next {
    right: 16px;
}

/* =====================================================
   TRUST STRIP
===================================================== */

.trust-strip {
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-section);
}

.trust-items {
    display: flex;
    min-height: 72px;
    align-items: center;
    justify-content: center;
    gap: 24px;
    color: var(--text-secondary);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    text-align: center;
}

.trust-items i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--brand-cyan);
    box-shadow: var(--glow-cyan);
}

/* =====================================================
   SOLUTIONS SECTION
===================================================== */

.solutions-section,
.workflow-section {
    padding: 120px 0;
    background: var(--bg-section);
}

.section-intro {
    max-width: 720px;
    margin-bottom: 56px;
}

.section-intro h2,
.numbers-layout h2,
.section-intro-split h2,
.cta-panel h2 {
    margin: 0;
    color: var(--text-heading);
    font-family: var(--font-display);
    font-size: clamp(32px, 4vw, 52px);
    font-weight: var(--fw-bold);
    line-height: var(--lh-tight);
    letter-spacing: var(--tracking-tight);
}

.section-intro > p:last-child,
.section-intro-split > p,
.cta-panel-actions p {
    max-width: 560px;
    margin: 20px 0 0;
    color: var(--text-secondary);
    font-size: var(--fs-md);
    line-height: var(--lh-relaxed);
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.solution-card {
    position: relative;
    min-height: 420px;
    padding: 36px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.solution-card::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-normal);
    content: '';
}

.solution-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-brand);
    box-shadow: 
        var(--shadow-md),
        0 0 30px rgba(0, 229, 255, 0.15);
}

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

.solution-card-featured {
    background: var(--gradient-card);
}

.card-index {
    color: var(--brand-cyan);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-wide);
}

.solution-icon {
    display: grid;
    width: 56px;
    height: 56px;
    margin: 48px 0 24px;
    place-items: center;
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-md);
    background: rgba(0, 229, 255, 0.1);
    font-size: 28px;
    line-height: 1;
    transition: all var(--transition-normal);
}

.solution-card:hover .solution-icon {
    background: rgba(0, 229, 255, 0.2);
    box-shadow: var(--shadow-neon);
}

.solution-card h3 {
    margin: 0 0 16px;
    font-family: var(--font-display);
    font-size: var(--fs-xl);
    font-weight: var(--fw-semibold);
    color: var(--text-heading);
}

.solution-card p {
    min-height: 72px;
    margin: 0;
    color: var(--text-secondary);
    line-height: var(--lh-normal);
}

.solution-card ul {
    display: grid;
    gap: 12px;
    margin: 24px 0 32px;
    padding: 0;
    list-style: none;
    color: var(--text-body);
    font-size: var(--fs-sm);
}

.solution-card li::before {
    margin-right: 12px;
    color: var(--brand-cyan);
    content: '✓';
    font-weight: var(--fw-bold);
}

.solution-card a {
    color: var(--brand-cyan);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-wide);
    text-transform: uppercase;
    transition: color var(--transition-fast);
}

.solution-card a:hover {
    color: var(--brand-blue);
}

.solution-card a span {
    margin-left: 8px;
    font-size: 16px;
}

/* =====================================================
   NUMBERS SECTION
===================================================== */

.numbers-section {
    padding: 100px 0;
    background: var(--bg-surface);
}

.numbers-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}

.numbers-layout h2 {
    font-size: clamp(30px, 3.5vw, 48px);
}

.number-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border-top: 1px solid var(--border-light);
    border-left: 1px solid var(--border-light);
}

.number-grid div {
    min-height: 140px;
    padding: 28px;
    border-right: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.number-grid div:hover {
    background: var(--bg-card-hover);
}

.number-grid strong {
    display: block;
    color: var(--brand-cyan);
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 48px);
    font-weight: var(--fw-bold);
    line-height: 1;
    margin-bottom: 8px;
}

.number-grid span {
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
}

/* =====================================================
   WORKFLOW SECTION
===================================================== */

.section-intro-split {
    display: grid;
    grid-template-columns: 1fr 0.9fr;
    gap: 60px;
    max-width: none;
    align-items: flex-end;
}

.section-intro-split > p {
    margin: 0;
}

.workflow-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-top: 1px solid var(--border-light);
}

.workflow-step {
    min-height: 220px;
    padding: 28px 24px 24px 0;
    border-right: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.workflow-step:hover {
    background: var(--bg-card-hover);
}

.workflow-step:not(:first-child) {
    padding-left: 24px;
}

.workflow-step:last-child {
    border-right: 0;
}

.workflow-step span {
    display: inline-block;
    min-width: 32px;
    padding: 4px 12px;
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-pill);
    background: rgba(0, 229, 255, 0.1);
    color: var(--brand-cyan);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    letter-spacing: var(--tracking-wide);
}

.workflow-step h3 {
    margin: 24px 0 12px;
    font-size: var(--fs-lg);
    font-weight: var(--fw-semibold);
    color: var(--text-heading);
}

.workflow-step p {
    margin: 0;
    color: var(--text-secondary);
    font-size: var(--fs-sm);
    line-height: var(--lh-normal);
}

/* =====================================================
   CTA SECTION
===================================================== */

.home-cta-section {
    padding: 0 0 120px;
    background: var(--bg-section);
}

.cta-panel {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    padding: 72px;
    border: 1px solid var(--border-brand);
    border-radius: var(--radius-xl);
    background: 
        linear-gradient(135deg, rgba(0, 229, 255, 0.1) 0%, rgba(0, 123, 255, 0.05) 100%),
        var(--bg-card);
    box-shadow: 
        var(--shadow-lg),
        0 0 50px rgba(0, 229, 255, 0.15);
}

.cta-panel h2 {
    max-width: 680px;
}

.cta-panel-actions {
    border-left: 1px solid var(--border-light);
    padding-left: 40px;
}

.cta-panel-actions p {
    margin-top: 0;
    margin-bottom: 24px;
}

/* =====================================================
   REVEAL ANIMATIONS
===================================================== */

.solution-card,
.workflow-step,
.number-grid div,
.cta-panel {
    opacity: 0;
    transform: translateY(24px);
    transition: 
        opacity 0.6s ease var(--reveal-delay, 0ms),
        transform 0.6s ease var(--reveal-delay, 0ms);
}

.solution-card.is-revealed,
.workflow-step.is-revealed,
.number-grid div.is-revealed,
.cta-panel.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

/* =====================================================
   RESPONSIVE DESIGN
===================================================== */

@media (max-width: 1024px) {
    .home-shell {
        width: min(100% - 48px, 1400px);
    }
    
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    
    .hero-copy h1 {
        max-width: 100%;
    }
    
    .hero-scene {
        max-width: 100%;
        transform: none;
    }
    
    .hero-scene:hover {
        transform: none;
    }
    
    .solution-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .numbers-layout,
    .section-intro-split,
    .cta-panel {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .cta-panel-actions {
        border-top: 1px solid var(--border-light);
        border-left: 0;
        padding: 32px 0 0;
    }
    
    .workflow-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .workflow-step:nth-child(2) {
        border-right: 0;
    }
    
    .workflow-step:nth-child(3),
    .workflow-step:nth-child(4) {
        border-top: 1px solid var(--border-light);
    }
}

@media (max-width: 768px) {
    .home-hero {
        padding: 100px 0 60px;
    }
    
    .hero-copy h1 {
        font-size: clamp(36px, 8vw, 48px);
    }
    
    .hero-lead {
        font-size: var(--fs-md);
    }
    
    .hero-scene {
        min-height: 320px;
        padding: 16px;
    }
    
    .scene-stage {
        min-height: 260px;
    }
    
    .scene-screen {
        top: 60px;
        height: 90px;
    }
    
    .scene-truss {
        height: 180px;
    }
    
    .scene-truss-left {
        left: 20px;
    }
    
    .scene-truss-right {
        right: 20px;
    }
    
    .scene-platform {
        bottom: 40px;
    }
    
    .trust-items {
        min-height: auto;
        flex-wrap: wrap;
        gap: 12px 16px;
        line-height: 1.6;
    }
    
    .solutions-section,
    .workflow-section {
        padding: 80px 0;
    }
    
    .section-intro h2,
    .numbers-layout h2,
    .section-intro-split h2,
    .cta-panel h2 {
        font-size: clamp(28px, 6vw, 36px);
    }
    
    .solution-grid {
        grid-template-columns: 1fr;
    }
    
    .solution-card {
        min-height: auto;
    }
    
    .solution-card p {
        min-height: auto;
    }
    
    .number-grid {
        grid-template-columns: 1fr;
    }
    
    .number-grid div {
        min-height: 100px;
        padding: 20px;
    }
    
    .workflow-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-step,
    .workflow-step:not(:first-child) {
        min-height: auto;
        padding: 24px 0;
        border-right: 0;
        border-bottom: 1px solid var(--border-light);
    }
    
    .workflow-step:last-child {
        border-bottom: 0;
    }
    
    .cta-panel {
        padding: 40px 24px;
    }
    
    .template-carousel-viewport {
        aspect-ratio: 16 / 9;
        min-height: 0;
    }
    
    .carousel-nav-button {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .carousel-nav-prev {
        left: 12px;
    }
    
    .carousel-nav-next {
        right: 12px;
    }
}

@media (max-width: 480px) {
    .home-shell {
        width: calc(100% - 32px);
    }
    
    .hero-actions {
        align-items: stretch;
        flex-direction: column;
    }
    
    .home-button {
        width: 100%;
    }
    
    .hero-proof {
        align-items: flex-start;
        line-height: 1.6;
    }
    
    .template-carousel-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .template-carousel-track,
    .carousel-nav-button,
    .solution-card,
    .workflow-step,
    .number-grid div,
    .cta-panel,
    .hero-scene,
    .eyebrow-dot {
        transition: none;
        animation: none;
    }
    
    .solution-card,
    .workflow-step,
    .number-grid div,
    .cta-panel {
        opacity: 1;
        transform: translateY(0);
    }
}