
:root {
    /* Brand Colors (Vibrant & Deep) */
    --p-primary: #4285F4;
    --p-accent: #34A853;
    --p-glow: rgba(66, 133, 244, 0.15);
    
    /* Surfaces (Glassmorphism Base) */
    --p-surface: #ffffff;
    --p-surface-dim: #f9fafb;
    --p-glass-bg: rgba(255, 255, 255, 0.7);
    --p-glass-border: rgba(0, 0, 0, 0.05);
    
    /* Text */
    --p-text-main: #111827;
    --p-text-muted: #4b5563;
    
    /* Typography */
    --font-h: 'Outfit', sans-serif;
    --font-b: 'Inter', sans-serif;

    /* Spacing & Radius */
    --p-radius: 24px;
    --p-radius-sm: 12px;
}

body.dark-mode {
    --p-surface: #0a0c10;
    --p-surface-dim: #111418;
    --p-glass-bg: rgba(10, 12, 16, 0.75);
    --p-glass-border: rgba(255, 255, 255, 0.08);
    --p-text-main: #f9fafb;
    --p-text-muted: #9ca3af;
    --p-glow: rgba(66, 133, 244, 0.25);
}

.m3-home {
    background: var(--p-surface);
    color: var(--p-text-main);
    font-family: var(--font-b);
    overflow-x: hidden;
}

#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--p-primary), var(--p-accent));
    width: 0%;
    z-index: 10000;
    box-shadow: 0 0 10px var(--p-primary);
}

/* ===== CINEMATIC HERO ===== */
.p-hero {
    position: relative;
    padding: 160px 24px 100px;
    background: var(--p-surface);
    overflow: hidden;
}

.p-hero-bg-glow {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 60%;
    height: 80%;
    background: radial-gradient(circle, var(--p-glow) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
}

.p-hero-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

.p-hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
}

.p-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--p-glass-bg);
    border: 1px solid var(--p-glass-border);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--p-primary);
    margin-bottom: 32px;
    backdrop-filter: blur(10px);
}

.p-hero-headline {
    font-family: var(--font-h);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -2px;
    margin-bottom: 24px;
}

.p-text-gradient {
    background: linear-gradient(135deg, var(--p-primary), var(--p-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.p-text-gradient .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.5s cubic-bezier(0.2, 0, 0, 1);
    transition-delay: calc(var(--i) * 0.05s + 0.3s);
}

.is-visible .p-text-gradient .char {
    opacity: 1;
    transform: translateY(0);
}

.p-hero-sub {
    font-size: 1.2rem;
    color: var(--p-text-muted);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 48px;
}

.p-hero-actions {
    display: flex;
    gap: 20px;
    margin-bottom: 64px;
}

/* Buttons */
.p-btn-glow {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 32px;
    background: var(--p-primary);
    color: white;
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 10px 20px rgba(66, 133, 244, 0.2);
}

.p-btn-glow:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(66, 133, 244, 0.3);
}

.p-btn-outline {
    display: flex;
    align-items: center;
    padding: 16px 32px;
    background: transparent;
    color: var(--p-text-main);
    border: 1px solid var(--p-glass-border);
    text-decoration: none;
    border-radius: 100px;
    font-weight: 600;
    transition: all 0.3s;
}

.p-btn-outline:hover {
    background: var(--p-glass-bg);
    border-color: var(--p-primary);
}

/* Stats */
.p-hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.p-stat-item {
    display: flex;
    flex-direction: column;
}

.p-stat-item strong {
    font-family: var(--font-h);
    font-size: 1.5rem;
    font-weight: 800;
}

.p-stat-item span {
    font-size: 0.8rem;
    color: var(--p-text-muted);
}

.p-divider {
    width: 1px;
    height: 40px;
    background: var(--p-glass-border);
}

/* Hero Visual */
.p-hero-visual {
    position: relative;
}

.p-visual-card {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0,0,0,0.1);
    transform: rotate3d(1, -1, 0, 15deg);
}

.p-visual-header {
    background: rgba(0,0,0,0.05);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--p-text-muted);
}

.p-dots { display: flex; gap: 6px; }
.p-dots span { width: 8px; height: 8px; border-radius: 50%; background: #ccc; }

.p-visual-body {
    padding: 32px;
    position: relative;
    background: var(--p-glass-bg);
}

.p-code-block {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.p-code-line { display: block; }
.c1 { color: #8b5cf6; } /* keyword */
.c2 { color: #4285F4; } /* class */
.c3 { color: #f59e0b; } /* this */
.c4 { color: #10b981; } /* number */
.c5 { color: #ec4899; } /* string */

.p-visual-glow {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 100px;
    height: 100px;
    background: var(--p-primary);
    filter: blur(50px);
    opacity: 0.3;
}

.p-visual-floating-icons .material-symbols-outlined {
    position: absolute;
    font-size: 32px;
    color: var(--p-primary);
    background: var(--p-surface);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    animation: float 4s ease-in-out infinite;
}

.icon-1 { top: -20px; right: 20px; animation-delay: 0s; }
.icon-2 { bottom: 40px; left: -30px; animation-delay: 1s; }
.icon-3 { top: 60%; right: -20px; animation-delay: 2s; }

/* ===== BENTO PILLARS ===== */
.p-section {
    padding: 100px 0;
}

.p-section-header {
    text-align: center;
    margin-bottom: 64px;
}

.p-section-title {
    font-family: var(--font-h);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.p-section-sub {
    color: var(--p-text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.p-bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 240px;
    gap: 20px;
}

.p-bento-item {
    background: var(--p-surface-dim);
    border: 1px solid var(--p-glass-border);
    border-radius: var(--p-radius);
    padding: 32px;
    text-decoration: none;
    color: var(--p-text-main);
    transition: all 0.4s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
}

.p-bento-item:hover {
    transform: scale(1.02);
    border-color: var(--p-primary);
    background: var(--p-glass-bg);
}

.p-bento-item.large { grid-column: span 2; grid-row: span 2; }
.p-bento-item.tall { grid-row: span 2; }
.p-bento-item.wide { grid-column: span 2; }

.p-bento-letter {
    position: absolute;
    bottom: -10px;
    right: 20px;
    font-family: var(--font-h);
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--p-primary);
    opacity: 0.05;
    transition: all 0.4s cubic-bezier(0.2, 0, 0, 1);
    pointer-events: none;
}

.p-bento-item:hover .p-bento-letter {
    opacity: 0.15;
    transform: translateY(-10px) scale(1.1);
}

.p-bento-item h3 {
    font-family: var(--font-h);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.p-bento-item p {
    font-size: 0.9rem;
    color: var(--p-text-muted);
    line-height: 1.5;
    position: relative;
    z-index: 2;
}

/* ===== ECOSYSTEM ===== */
.p-ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.p-eco-card {
    padding: 40px;
    border-radius: var(--p-radius);
    background: var(--p-glass-bg);
    border: 1px solid var(--p-glass-border);
    text-decoration: none;
    color: var(--p-text-main);
    transition: all 0.3s;
    text-align: center;
}

.p-eco-card:hover {
    background: var(--p-surface);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}

.p-eco-icon-wrap {
    width: 64px;
    height: 64px;
    background: var(--p-glow);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.p-eco-icon-wrap .material-symbols-outlined {
    font-size: 32px;
    color: var(--p-primary);
}

.p-eco-card h3 {
    font-family: var(--font-h);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
}

/* ===== REVEAL ANIMATIONS ===== */
.animate-reveal {
    opacity: 0;
    transform: translateY(30px);
}/* ===== CTA CARD ===== */
.p-cta-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
    padding: 64px;
    border-radius: calc(var(--p-radius) * 1.5);
    background: linear-gradient(135deg, var(--p-glass-bg), var(--p-glow));
    border: 1px solid var(--p-glass-border);
}

.p-cta-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--p-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .p-bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
    }
    .p-bento-item.large { grid-column: span 2; grid-row: span 2; }
    .p-ecosystem-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .p-hero-grid { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .p-hero-content { display: flex; flex-direction: column; align-items: center; }
    .p-hero-sub { margin: 0 auto 40px; }
    .p-hero-actions { justify-content: center; }
    .p-hero-stats { justify-content: center; }
    
    .p-hero-visual { order: -1; perspective: 1000px; }
    .p-visual-card { transform: rotate3d(1, 0, 0, 10deg); }
    
    .p-cta-card { grid-template-columns: 1fr; padding: 40px; text-align: center; }
    .p-hero-actions { justify-content: center; }
    .p-cta-img { height: 250px; }
    
    .p-bento-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
    .p-bento-item.large, .p-bento-item.wide, .p-bento-item.tall { grid-column: span 1; grid-row: span 1; }
    
    .p-ecosystem-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .p-hero { padding-top: 120px; }
    .p-hero-stats { flex-direction: column; gap: 16px; }
    .p-divider { display: none; }
}

/* ===== ANIMATION CLASSES (JS Triggered) ===== */
.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.8s cubic-bezier(0.2, 0, 0, 1);
}

/* ===== DNA SECTION ===== */
.p-dna-section {
    padding: 80px 0;
    background: var(--p-surface);
}

.p-dna-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.p-dna-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: var(--p-surface-dim);
    border: 1px solid var(--p-glass-border);
    border-radius: var(--p-radius-sm);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.p-dna-item:hover {
    background: var(--p-glass-bg);
    border-color: var(--p-primary);
    transform: translateX(10px);
}

.p-dna-letter {
    font-family: var(--font-h);
    font-size: 3.5rem;
    font-weight: 900;
    line-height: 1;
    color: var(--p-primary);
    opacity: 0.2;
    transition: opacity 0.3s;
}

.p-dna-item:hover .p-dna-letter {
    opacity: 1;
}

.p-dna-content h4 {
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.p-dna-content p {
    font-size: 0.85rem;
    color: var(--p-text-muted);
    line-height: 1.4;
}

/* ===== TESTIMONIALS ===== */
.p-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.p-testimonial-card {
    padding: 40px;
    border-radius: var(--p-radius);
    position: relative;
}

.p-quote {
    font-family: serif;
    font-size: 4rem;
    color: var(--p-primary);
    opacity: 0.2;
    line-height: 1;
    position: absolute;
    top: 20px;
    left: 20px;
}

.p-testimonial-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 32px;
    position: relative;
    z-index: 1;
}

.p-testimonial-author {
    display: flex;
    align-items: center;
    gap: 16px;
}

.p-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--p-primary);
}

.p-author-info strong {
    display: block;
    font-family: var(--font-h);
    font-size: 1rem;
}

.p-author-info span {
    font-size: 0.8rem;
    color: var(--p-text-muted);
}

/* ===== FAQ ===== */
.p-faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.p-faq-item {
    margin-bottom: 12px;
    border-radius: var(--p-radius-sm);
    overflow: hidden;
    background: var(--p-surface);
    border: 1px solid var(--p-glass-border);
}

.p-faq-trigger {
    width: 100%;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-h);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--p-text-main);
    transition: all 0.3s;
}

.p-faq-trigger:hover {
    background: var(--p-glass-bg);
}

.p-faq-trigger .material-symbols-outlined {
    transition: transform 0.3s;
}

.p-faq-item.active .p-faq-trigger .material-symbols-outlined {
    transform: rotate(180deg);
}

.p-faq-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.p-faq-item.active .p-faq-content {
    max-height: 200px;
    padding: 0 24px 24px;
}

.p-faq-content p {
    font-size: 0.95rem;
    color: var(--p-text-muted);
    line-height: 1.6;
}

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }

/* ===== NOISE OVERLAY ===== */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

@media (max-width: 900px) {
    .p-footer-grid { grid-template-columns: 1fr; gap: 48px; }
    .p-footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}
