/* ============================================
   Yggdrasil Product Page - Styles
   ============================================ */

/* Yggdrasil specific color accent */
:root {
    --ygg-accent: #5b8a72;
    --ygg-accent-light: #7aa892;
    --ygg-accent-bg: rgba(91, 138, 114, 0.08);
    --ygg-accent-bg-hover: rgba(91, 138, 114, 0.12);
}

/* ============================================
   Hero Section
   ============================================ */
.ygg-hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(80px + var(--spacing-2xl)) 0 var(--spacing-2xl);
    background: var(--color-bg-secondary);
    overflow: hidden;
}

.ygg-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 30% 30%, rgba(91, 138, 114, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 70% 70%, rgba(91, 138, 114, 0.05) 0%, transparent 40%);
}

.ygg-hero-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.03;
    background-image:
        linear-gradient(var(--ygg-accent) 1px, transparent 1px),
        linear-gradient(90deg, var(--ygg-accent) 1px, transparent 1px);
    background-size: 60px 60px;
}

.ygg-hero-content {
    position: relative;
    z-index: 2;
    width: 55%;
    padding: 0 var(--spacing-md) 0 calc(var(--spacing-md) + 5%);
}

.ygg-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--ygg-accent-bg);
    border: 1px solid rgba(91, 138, 114, 0.2);
    border-radius: var(--border-radius-full);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ygg-accent);
    margin-bottom: var(--spacing-md);
}

.ygg-badge svg {
    width: 16px;
    height: 16px;
}

.ygg-hero-title {
    margin-bottom: var(--spacing-md);
}

.ygg-hero-title .title-accent {
    display: block;
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 700;
    color: var(--ygg-accent);
    letter-spacing: -0.03em;
    line-height: 1;
}

.ygg-hero-title .title-sub {
    display: block;
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 400;
    color: var(--color-text-secondary);
    margin-top: 0.5rem;
}

.ygg-hero-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 520px;
    line-height: 1.7;
    margin-bottom: var(--spacing-lg);
}

.ygg-hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
}

.ygg-hero-cta .btn-primary {
    background: var(--ygg-accent);
}

.ygg-hero-cta .btn-primary:hover {
    background: var(--ygg-accent-light);
}

.ygg-hero-stats {
    display: flex;
    gap: var(--spacing-xl);
}

.hero-stat {
    text-align: left;
}

.hero-stat-number {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-text-primary);
}

.hero-stat-label {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* Hero Visual - Tree */
.ygg-hero-visual {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 35%;
    z-index: 1;
}

.ygg-tree {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tree-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

.tree-root {
    background: var(--ygg-accent);
    border-color: var(--ygg-accent);
    color: white;
}

.tree-root .node-icon {
    width: 32px;
    height: 32px;
}

.tree-root .node-icon svg {
    width: 100%;
    height: 100%;
}

.node-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.node-module {
    background: #6366f1;
}

.node-pipeline {
    background: #f59e0b;
}

.node-docs {
    background: #10b981;
}

.tree-branches {
    display: flex;
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
    position: relative;
}

.tree-branch {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.branch-line {
    width: 2px;
    height: 30px;
    background: var(--color-border);
    margin-bottom: 0.5rem;
}

.tree-child {
    font-size: 0.75rem;
    padding: 0.75rem 1rem;
}

/* ============================================
   Features Section
   ============================================ */
.ygg-features {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-lg);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.feature-primary {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(135deg, var(--color-bg-card) 0%, var(--ygg-accent-bg) 100%);
    border-color: rgba(91, 138, 114, 0.2);
}

.feature-primary:hover {
    border-color: var(--ygg-accent);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ygg-accent-bg);
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-md);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
    color: var(--ygg-accent);
}

.feature-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

.feature-list {
    list-style: none;
    margin-top: var(--spacing-md);
}

.feature-list li {
    position: relative;
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--ygg-accent);
    border-radius: 50%;
}

/* ============================================
   Capabilities Section
   ============================================ */
.ygg-capabilities {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-secondary);
}

.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.capability-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    transition: all var(--transition-normal);
}

.capability-item:hover {
    border-color: var(--ygg-accent);
    box-shadow: var(--shadow-md);
}

.capability-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--ygg-accent);
    opacity: 0.5;
    line-height: 1;
    min-width: 36px;
}

.capability-content h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.capability-content p {
    font-size: 0.825rem;
    color: var(--color-text-muted);
}

/* ============================================
   Architecture Section
   ============================================ */
.ygg-architecture {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-primary);
}

.architecture-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.architecture-text .section-title {
    text-align: left;
}

.architecture-text > p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.architecture-components {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.arch-component {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
}

.arch-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    flex-shrink: 0;
}

.arch-icon svg {
    width: 20px;
    height: 20px;
}

.arch-yggdrasil {
    background: var(--ygg-accent);
    color: white;
}

.arch-willow {
    background: #6366f1;
    color: white;
}

.arch-valhalla {
    background: #f59e0b;
    color: white;
}

.arch-laurel {
    background: #ec4899;
    color: white;
}

.arch-component h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.arch-component p {
    font-size: 0.825rem;
    color: var(--color-text-muted);
    margin: 0;
}

/* Architecture Visual */
.architecture-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.arch-diagram {
    position: relative;
    width: 100%;
    max-width: 360px;
    aspect-ratio: 1;
}

.arch-center {
    position: relative;
    width: 100%;
    height: 100%;
}

.arch-node-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--ygg-accent);
    border-radius: 50%;
    color: white;
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.arch-node-main svg {
    width: 32px;
    height: 32px;
}

.arch-node-main span {
    font-size: 0.75rem;
    font-weight: 600;
}

.arch-satellites {
    position: absolute;
    inset: 0;
}

.arch-satellite {
    position: absolute;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-elevated);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    box-shadow: var(--shadow-md);
}

.sat-1 { top: 5%; left: 50%; transform: translateX(-50%); border-color: #6366f1; }
.sat-2 { top: 50%; right: 5%; transform: translateY(-50%); border-color: #ec4899; }
.sat-3 { bottom: 5%; left: 50%; transform: translateX(-50%); border-color: #10b981; }
.sat-4 { top: 50%; left: 5%; transform: translateY(-50%); border-color: #f59e0b; }

.arch-connections {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.arch-line {
    position: absolute;
    background: var(--color-border);
    opacity: 0.5;
}

.line-1 {
    width: 2px;
    height: 60px;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
}

.line-2 {
    width: 60px;
    height: 2px;
    top: 50%;
    right: 75px;
    transform: translateY(-50%);
}

.line-3 {
    width: 2px;
    height: 60px;
    bottom: 75px;
    left: 50%;
    transform: translateX(-50%);
}

.line-4 {
    width: 60px;
    height: 2px;
    top: 50%;
    left: 75px;
    transform: translateY(-50%);
}

/* ============================================
   Tech Stack Section
   ============================================ */
.ygg-tech {
    padding: var(--spacing-2xl) 0;
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.tech-grid {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
}

.tech-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.tech-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.tech-item span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

/* ============================================
   Benefits Section
   ============================================ */
.ygg-benefits {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-primary);
}

.benefits-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.benefit-card {
    padding: var(--spacing-xl);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    text-align: center;
    transition: all var(--transition-normal);
}

.benefit-card:hover {
    border-color: var(--ygg-accent);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ygg-accent-bg);
    border-radius: 50%;
    margin: 0 auto var(--spacing-md);
}

.benefit-icon svg {
    width: 28px;
    height: 28px;
    color: var(--ygg-accent);
}

.benefit-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.benefit-card p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ============================================
   Contact Section
   ============================================ */
.ygg-contact {
    padding: var(--spacing-3xl) 0;
    background: var(--color-bg-secondary);
}

.ygg-contact .contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.ygg-contact .section-title {
    text-align: left;
}

.ygg-contact .contact-info > p {
    color: var(--color-text-secondary);
    margin-bottom: var(--spacing-lg);
    line-height: 1.7;
}

.contact-form-wrapper {
    padding: var(--spacing-lg);
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
}

.ygg-contact .btn-primary {
    background: var(--ygg-accent);
}

.ygg-contact .btn-primary:hover {
    background: var(--ygg-accent-light);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1024px) {
    .ygg-hero-content {
        width: 100%;
        padding: 0 var(--spacing-md);
        text-align: center;
    }

    .ygg-hero-visual {
        display: none;
    }

    .ygg-hero-stats {
        justify-content: center;
    }

    .hero-stat {
        text-align: center;
    }

    .features-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-primary {
        grid-column: span 2;
        grid-row: span 1;
    }

    .capabilities-grid {
        grid-template-columns: 1fr;
    }

    .architecture-content {
        grid-template-columns: 1fr;
    }

    .architecture-visual {
        order: -1;
    }

    .arch-diagram {
        max-width: 280px;
    }

    .benefits-content {
        grid-template-columns: 1fr;
    }

    .ygg-contact .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-primary {
        grid-column: span 1;
    }

    .ygg-hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .ygg-hero-cta .btn {
        width: 100%;
        max-width: 280px;
    }

    .ygg-hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .tech-grid {
        gap: var(--spacing-md);
    }
}

/* ============================================
   Animations
   ============================================ */
.feature-card,
.capability-item,
.benefit-card {
    opacity: 0;
    animation: fadeInUp 0.5s ease-out forwards;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.15s; }
.feature-card:nth-child(3) { animation-delay: 0.2s; }
.feature-card:nth-child(4) { animation-delay: 0.25s; }
.feature-card:nth-child(5) { animation-delay: 0.3s; }
.feature-card:nth-child(6) { animation-delay: 0.35s; }

.capability-item:nth-child(1) { animation-delay: 0.05s; }
.capability-item:nth-child(2) { animation-delay: 0.1s; }
.capability-item:nth-child(3) { animation-delay: 0.15s; }
.capability-item:nth-child(4) { animation-delay: 0.2s; }
.capability-item:nth-child(5) { animation-delay: 0.25s; }
.capability-item:nth-child(6) { animation-delay: 0.3s; }
.capability-item:nth-child(7) { animation-delay: 0.35s; }
.capability-item:nth-child(8) { animation-delay: 0.4s; }
.capability-item:nth-child(9) { animation-delay: 0.45s; }
.capability-item:nth-child(10) { animation-delay: 0.5s; }
.capability-item:nth-child(11) { animation-delay: 0.55s; }

.benefit-card:nth-child(1) { animation-delay: 0.1s; }
.benefit-card:nth-child(2) { animation-delay: 0.2s; }
.benefit-card:nth-child(3) { animation-delay: 0.3s; }

/* Tree animation */
.tree-node {
    animation: fadeInUp 0.5s ease-out forwards;
}

.tree-root { animation-delay: 0.2s; }
.branch-1 .tree-child { animation-delay: 0.4s; }
.branch-2 .tree-child { animation-delay: 0.5s; }
.branch-3 .tree-child { animation-delay: 0.6s; }

.branch-line {
    animation: growLine 0.3s ease-out forwards;
    transform-origin: top;
    transform: scaleY(0);
}

.branch-1 .branch-line { animation-delay: 0.3s; }
.branch-2 .branch-line { animation-delay: 0.4s; }
.branch-3 .branch-line { animation-delay: 0.5s; }

@keyframes growLine {
    to { transform: scaleY(1); }
}

/* Architecture diagram animation */
.arch-node-main {
    animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: var(--shadow-lg); }
    50% { box-shadow: 0 0 30px rgba(91, 138, 114, 0.3); }
}

.arch-satellite {
    animation: float 4s ease-in-out infinite;
}

.sat-1 { animation-delay: 0s; }
.sat-2 { animation-delay: -1s; }
.sat-3 { animation-delay: -2s; }
.sat-4 { animation-delay: -3s; }
