/* 
  Varun Jain - Digital Headquarters CSS Architecture
  Aesthetic: Calm, Modern, Premium, Intelligent & Timeless
  Inspirations: Apple, Linear, Stripe Press, Notion, Framer
*/

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    /* Color Palette - Joyful & Premium Light Mode */
    --bg-dark: #fdfbf7;
    --bg-surface: #ffffff;
    --bg-elevated: #f8fafc;
    --bg-glass: rgba(255, 250, 240, 0.85); /* Warm happy tint */
    
    --border-subtle: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --border-accent: rgba(251, 113, 133, 0.3);
    
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    
    --accent-gold: #fb7185; /* Coral Pink */
    --accent-gold-glow: rgba(251, 113, 133, 0.15);
    --accent-teal: #fbbf24; /* Sunshine Yellow */
    --accent-blue: #38bdf8; /* Azure Blue */
    
    --gradient-accent: linear-gradient(135deg, #fb7185 0%, #fbbf24 100%);
    
    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-serif: 'Instrument Serif', Georgia, serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Motion */
    --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-spring: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Container Widths */
    --max-width: 1240px;
    --max-width-narrow: 840px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Dynamic Atmospheric Background Mesh */
body::before {
    content: '';
    position: fixed;
    top: -40%;
    left: -30%;
    width: 160%;
    height: 180%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(212, 163, 115, 0.05), transparent 45%),
        radial-gradient(circle at 80% 60%, rgba(42, 157, 143, 0.04), transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(59, 130, 246, 0.03), transparent 50%);
    z-index: -2;
    pointer-events: none;
    animation: ambientPulse 25s ease-in-out infinite alternate;
}

@keyframes ambientPulse {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.05) translate(-20px, 15px); }
    100% { transform: scale(1) translate(15px, -20px); }
}

/* Grid Noise Overlay */
.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(var(--border-subtle) 1px, transparent 1px),
                      linear-gradient(90deg, var(--border-subtle) 1px, transparent 1px);
    background-size: 80px 80px;
    background-position: center center;
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

h1 {
    font-size: clamp(3rem, 6vw, 5.5rem);
    letter-spacing: -0.04em;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.03em;
}

h3 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    letter-spacing: -0.02em;
}

.heading-xl {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, var(--text-primary) 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    font-weight: 400;
}

a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

/* Layout Elements */
.container {
    width: 90%;
    max-width: var(--max-width);
    margin: 0 auto;
}

.container-narrow {
    width: 90%;
    max-width: var(--max-width-narrow);
    margin: 0 auto;
}

.section-padding {
    padding: 6.5rem 0;
}

.section-padding-sm {
    padding: 3.5rem 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }

/* Tag Pill */
.tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: var(--accent-gold-glow);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
    color: var(--accent-gold);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1.5rem;
}

/* Card / Glass Panel */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2.2rem;
    transition: transform var(--transition-smooth), border-color var(--transition-fast), box-shadow var(--transition-smooth);
}

.glass-panel:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(251, 113, 133, 0.15);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.8rem;
    border-radius: 100px;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-surface);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: #000000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: var(--bg-surface);
}

.btn-accent {
    background: var(--gradient-accent);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(251, 113, 133, 0.35);
    border: none;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #f43f5e 0%, #f59e0b 100%);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 25px rgba(251, 113, 133, 0.5);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}

.btn-outline:hover {
    border-color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(253, 251, 247, 0.85); /* Cream blur */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.2rem 0;
    transition: background var(--transition-fast), padding var(--transition-smooth);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
}

.brand-name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: var(--text-primary);
}

.brand-title {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--accent-gold);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

nav ul.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 2.2rem;
}

nav ul.nav-links a {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.04em;
    position: relative;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

nav ul.nav-links a:hover,
nav ul.nav-links a.active {
    color: var(--text-primary);
}

/* Underline animation only for non-button links */
nav ul.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gold);
    transition: width var(--transition-fast);
}

nav ul.nav-links a:not(.btn):hover::after,
nav ul.nav-links a.active:not(.btn)::after {
    width: 100%;
}

/* Dropdown styling */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: -1rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    min-width: 220px;
    padding: 0.8rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition-fast);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    padding: 0.6rem 1.5rem !important;
    font-size: 0.85rem !important;
    color: var(--text-secondary) !important;
}

.dropdown-menu a:hover {
    color: var(--accent-gold) !important;
    background: rgba(255, 255, 255, 0.03);
}

.dropdown-menu a::after {
    display: none !important;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 130px;
    padding-bottom: 80px;
    position: relative;
}

.hero-content {
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    font-size: clamp(2.8rem, 5.5vw, 4.8rem);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 1.8rem;
}

.hero-content p.hero-subtitle {
    font-size: clamp(1.15rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    max-width: 760px;
    margin: 0 auto 2.8rem;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Positioning Highlight Grid */
.positioning-strip {
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(18, 20, 26, 0.4);
    padding: 2rem 0;
}

.strip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    text-align: center;
}

.strip-item .number {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-style: italic;
    color: var(--accent-gold);
    line-height: 1;
    margin-bottom: 0.3rem;
}

.strip-item .label {
    font-size: 0.85rem;
    font-family: var(--font-mono);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Methodology 3-Stage Showcase */
.methodology-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.method-card {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: all var(--transition-smooth);
}

.method-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-6px);
}

.method-step {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-gold);
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.method-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.method-card p {
    font-size: 0.98rem;
    color: var(--text-secondary);
}

/* Core Beliefs Grid */
.beliefs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.belief-card {
    background: rgba(18, 20, 26, 0.5);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    transition: border-color var(--transition-fast);
}

.belief-card:hover {
    border-color: var(--border-hover);
}

.belief-icon {
    font-size: 1.2rem;
    color: var(--accent-gold);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.belief-card p {
    font-size: 1rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* Essays / Frameworks Grid */
.essay-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.essay-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.essay-meta {
    display: flex;
    gap: 1rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.essay-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.essay-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.essay-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent-gold);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.essay-link i {
    transition: transform var(--transition-fast);
}

.essay-link:hover i {
    transform: translateX(4px);
}

/* Target Audience Marquee */
.audience-strip {
    background: var(--bg-surface);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 3rem 0;
}

.audience-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.audience-badge {
    padding: 0.6rem 1.4rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: 100px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* AI Summary Block (For LLM Optimization) */
.ai-summary {
    background: var(--bg-surface);
    border-left: 4px solid var(--accent-gold);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.02);
}

.ai-summary::before {
    content: '✦ AI TL;DR';
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-gold);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

/* Interactive Diagnostic Form */
.diagnostic-box {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.form-group {
    margin-bottom: 1.8rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 0.6rem;
    color: var(--text-primary);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-hover);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 2px var(--accent-gold-glow);
}

/* Footer */
footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border-subtle);
    padding: 4.5rem 0 3rem;
    color: var(--text-muted);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3.5rem;
}

.footer-brand p {
    margin-top: 1rem;
    max-width: 400px;
    font-size: 0.95rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    margin-bottom: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.8rem;
}

.footer-col a {
    color: var(--text-secondary);
    font-size: 0.92rem;
}

.footer-col a:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    font-size: 0.85rem;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .methodology-cards {
        grid-template-columns: 1fr;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    nav ul.nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-dark);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        text-align: center;
    }
    nav ul.nav-links.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .hero {
        min-height: auto;
        padding-top: 120px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* Animations */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-reveal > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-reveal.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* Add slight delay for staggered children */
.stagger-reveal.visible > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-reveal.visible > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-reveal.visible > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-reveal.visible > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-reveal.visible > *:nth-child(5) { transition-delay: 0.5s; }

.grid {
    display: grid;
}
