/* ===================================
   PARTNERSHIP MARKETING MASTERY
   Premium Design System v2.0
   Editorial + SaaS Synthesis
   =================================== */

:root {
    /* Color Palette - Warm & Sophisticated */
    --color-bg: #faf9f7;
    --color-bg-alt: #f5f3f0;
    --color-surface: #ffffff;
    --color-text: #1a1a1a;
    --color-text-secondary: #525252;
    --color-text-tertiary: #8a8a8a;
    --color-border: #e5e5e5;
    --color-border-light: #f0f0f0;
    
    /* Accent Colors */
    --color-accent: #dc2626;
    --color-accent-hover: #b91c1c;
    --color-accent-light: #fef2f2;
    
    /* Dark Section */
    --color-dark: #1a1a1a;
    --color-dark-alt: #2a2a2a;
    
    /* Secondary Accents */
    --color-blue: #2563eb;
    --color-green: #16a34a;
    --color-purple: #9333ea;
    --color-orange: #ea580c;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing - Reduced for tighter composition */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4.5rem;
    --space-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ===================================
   BASE STYLES
   =================================== */

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

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

body {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    font-family: var(--font-sans);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   TYPOGRAPHY
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.025em;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

p {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.lead {
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.text-large {
    font-size: 1.125rem;
}

.text-small {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

/* ===================================
   LAYOUT
   =================================== */

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.container-narrow {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-sm {
    padding: var(--space-2xl) 0;
}

/* ===================================
   HEADER & NAVIGATION
   =================================== */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(250, 249, 247, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border-light);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--color-text);
    text-decoration: none;
}

.nav-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo-svg {
    width: 32px;
    height: 32px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-cta {
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
}

/* ===================================
   BUTTONS
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-tertiary);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
}

.btn-ghost:hover {
    background: var(--color-bg-alt);
}

/* ===================================
   HERO SECTION - Redesigned
   =================================== */

.hero {
    padding: var(--space-2xl) 0 var(--space-3xl);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero-text h1 {
    margin-bottom: var(--space-md);
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    max-width: 540px;
}

.hero-ctas {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.hero-mockup {
    background: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: var(--space-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--color-border);
}

/* ===================================
   CARDS - Refined
   =================================== */

.card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 1px solid var(--color-border);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-text-tertiary);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--color-accent-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

.card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--space-xs);
}

.card p {
    font-size: 0.9375rem;
}

/* ===================================
   GRID LAYOUTS
   =================================== */

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

/* ===================================
   SECTION HEADERS
   =================================== */

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto var(--space-2xl);
}

.section-header h2 {
    margin-bottom: var(--space-sm);
}

.section-header p {
    font-size: 1.125rem;
}

/* ===================================
   PROCESS FLOW - Enhanced
   =================================== */

.process-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    padding: var(--space-xl) 0;
}

.process-step {
    flex: 1;
    text-align: center;
}

.process-icon {
    width: 64px;
    height: 64px;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-sm);
    font-size: 1.5rem;
    transition: all 0.3s;
}

.process-step:hover .process-icon {
    border-color: var(--color-accent);
    background: var(--color-accent-light);
    transform: scale(1.1);
}

.process-arrow {
    color: var(--color-text-tertiary);
    font-size: 1.5rem;
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--color-dark);
    color: var(--color-bg);
    padding: var(--space-2xl) 0 var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-brand p {
    color: var(--color-text-tertiary);
    margin-top: var(--space-sm);
}

.footer-column h4 {
    color: var(--color-bg);
    margin-bottom: var(--space-md);
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-xs);
}

.footer-links a {
    color: var(--color-text-tertiary);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--color-bg);
}

.footer-bottom {
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: var(--color-text-tertiary);
    font-size: 0.875rem;
}

/* Improve mobile footer contrast */
@media (max-width: 768px) {
    .footer-brand p {
        color: rgba(255, 255, 255, 0.85);
    }
    
    .footer-bottom {
        color: rgba(255, 255, 255, 1);
        font-size: 1.125rem;
        line-height: 1.8;
    }
    
    .footer-links a {
        color: rgba(255, 255, 255, 0.95);
    }
}

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

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-md);
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 99;
        min-height: 200px;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
    
    .nav-menu li {
        width: 100%;
        display: block;
        visibility: visible;
        opacity: 1;
    }
    
    .nav-menu .nav-link {
        display: block;
        padding: var(--space-sm) 0;
        font-size: 1.125rem;
        color: var(--color-text);
        visibility: visible;
        opacity: 1;
    }
    
    .nav-menu .nav-cta {
        display: block;
        text-align: center;
        padding: var(--space-sm);
        visibility: visible;
        opacity: 1;
    }
    
    /* Mobile grid layouts */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    /* Override inline grid styles on mobile */
    [style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: var(--space-lg) !important;
    }
    
    /* Override inline flex styles on mobile */
    [style*="flex: 0 0 calc"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Mobile process flow */
    .process-flow {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        gap: var(--space-md) !important;
    }
    
    .process-step {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
    
    .process-arrow {
        transform: rotate(90deg);
    }
    
    /* Mobile footer */
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    /* Mobile hero adjustments */
    .hero-content {
        gap: var(--space-lg);
    }
    
    .hero-text h1 {
        font-size: clamp(2rem, 8vw, 2.5rem);
    }
    
    .hero-text p {
        font-size: 1.125rem;
    }
    
    /* Mobile SVG diagrams - hide complex desktop SVGs, show mobile alternatives */
    .hero-mockup svg,
    section svg[viewBox="0 0 1200 200"] {
        display: none !important;
    }
    
    /* Show mobile-specific content */
    .mobile-only {
        display: block !important;
    }
    
    .desktop-only {
        display: none !important;
    }
    
    /* Mobile cards */
    .card {
        padding: var(--space-md);
    }
    
    /* Mobile buttons */
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .hero-ctas {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-ctas .btn {
        width: 100%;
    }
    
    /* Mobile section spacing */
    .section {
        padding: var(--space-2xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--space-xl);
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    /* Tighter container padding */
    .container,
    .container-narrow {
        padding: 0 var(--space-md);
    }
    
    /* Smaller hero text */
    .hero-text h1 {
        font-size: clamp(1.75rem, 7vw, 2rem);
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .lead {
        font-size: 1.0625rem;
    }
    
    /* Smaller section headers */
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }
    
    h3 {
        font-size: clamp(1.25rem, 5vw, 1.5rem);
    }
    
    /* Smaller card padding */
    .card {
        padding: var(--space-sm);
    }
    
    .card h3 {
        font-size: 1.125rem;
    }
    
    .card p {
        font-size: 0.875rem;
    }
    
    /* Smaller process icons */
    .process-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    /* Smaller footer text */
    .footer {
        padding: var(--space-xl) 0 var(--space-md);
    }
    
    .footer-brand p {
        font-size: 0.875rem;
    }
    
    .footer-links a {
        font-size: 0.875rem;
    }
}

/* Extra small mobile devices */
@media (max-width: 375px) {
    /* Even tighter padding */
    .container,
    .container-narrow {
        padding: 0 var(--space-sm);
    }
    
    /* Smallest hero text */
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    /* Smaller buttons */
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }
    
    /* Smaller cards */
    .card {
        padding: var(--space-xs);
    }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===================================
   UTILITIES
   =================================== */

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }
.mb-xl { margin-bottom: var(--space-xl); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mt-xl { margin-top: var(--space-xl); }
