/* ===================================
   UNIMODE AI - Design System v3.0
   "Anthropic-Inspired Editorial" Theme
   =================================== */

/* CSS Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Custom Properties - Warm Editorial Palette */
:root {
    /* Background Colors - Warm Beige/Cream (Anthropic-style) */
    --bg-primary: #F5F1EB;
    --bg-secondary: #EDE8E0;
    --bg-elevated: #FAF8F5;
    --bg-card: #FAF8F5;
    --bg-card-hover: #FFFFFF;
    --bg-muted: #E8E3DB;
    
    /* Text Colors - Pure Black for Impact */
    --text-primary: #191918;
    --text-secondary: #4A4A48;
    --text-tertiary: #7A7A78;
    --text-inverse: #FFFFFF;
    
    /* Accent Colors - Rich Terracotta/Coral */
    --accent: #E85A30;
    --accent-hover: #D14A22;
    --accent-muted: rgba(232, 90, 48, 0.1);
    --accent-glow: rgba(232, 90, 48, 0.15);
    
    /* Secondary accent - Deep Teal */
    --accent-secondary: #0D7377;
    --accent-secondary-muted: rgba(13, 115, 119, 0.08);
    
    /* Card accent colors (Anthropic-style) */
    --card-sage: #D4DDD4;
    --card-lavender: #D4D4E0;
    --card-cream: #E8E3D8;
    
    /* Borders - Warm Subtle */
    --border-subtle: rgba(25, 25, 24, 0.08);
    --border-default: rgba(25, 25, 24, 0.12);
    --border-hover: rgba(25, 25, 24, 0.2);
    --border-accent: rgba(232, 90, 48, 0.3);
    
    /* Typography - Editorial Style */
    --font-display: 'Source Serif 4', 'Instrument Serif', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    
    /* Font Sizes - Larger for Impact */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    --text-7xl: 4.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-32: 8rem;
    
    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;
    --header-height: 72px;
    
    /* Borders & Shadows */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-2xl: 24px;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.02);
    --shadow-card-hover: 0 4px 16px rgba(0, 0, 0, 0.08), 0 8px 32px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
    --duration-slower: 600ms;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

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

/* Subtle Grid Pattern */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: 
        linear-gradient(rgba(28, 28, 31, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 28, 31, 0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* Typography - Bold Editorial Style */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

h1 { 
    font-size: var(--text-7xl); 
    font-weight: 600;
    line-height: 1.05;
}
h2 { 
    font-size: var(--text-5xl); 
    font-weight: 600;
}
h3 { 
    font-size: var(--text-4xl); 
    font-weight: 600;
}
h4 { 
    font-size: var(--text-2xl); 
    font-weight: 600;
}
h5 { 
    font-size: var(--text-xl); 
    font-weight: 600;
}
h6 { 
    font-size: var(--text-lg); 
    font-weight: 600;
}

/* Italic headline variant (Anthropic-style) */
.heading-italic {
    font-style: italic;
    font-weight: 500;
}

p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: 1.7;
}

a {
    color: var(--text-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity var(--duration-fast) var(--ease-out);
}

a:hover {
    opacity: 0.7;
}

strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Selection */
::selection {
    background: var(--accent-muted);
    color: var(--text-primary);
}

/* Container */
.container {
    position: relative;
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
    z-index: 1;
}

.container--narrow {
    max-width: var(--container-narrow);
}

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

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-default);
    z-index: 1000;
    transition: all var(--duration-base) var(--ease-out);
}

.header.scrolled {
    background: var(--bg-primary);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.header__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
}

.header__logo-icon {
    width: 36px;
    height: 36px;
    transition: transform var(--duration-base) var(--ease-spring);
}

.header__logo:hover .header__logo-icon {
    transform: scale(1.05);
}

.header__logo-icon path {
    fill: var(--text-primary);
}

.header__logo-text {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav__list {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    list-style: none;
}

.nav__link {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--text-primary);
    text-decoration: none;
    padding: var(--space-2) var(--space-3);
    position: relative;
    transition: opacity var(--duration-fast) var(--ease-out);
}

.nav__link:hover {
    opacity: 0.6;
}

.nav__link.active {
    font-weight: 500;
}

.nav__link.active::after {
    display: none;
}

/* Mobile Menu Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
}

.nav__toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 1px;
    transition: all var(--duration-fast) var(--ease-out);
}

/* ===================================
   BUTTONS - Anthropic-style Minimal
   =================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 100px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--duration-fast) var(--ease-out);
    white-space: nowrap;
}

.btn--primary {
    background: var(--text-primary);
    color: var(--text-inverse);
    border-color: var(--text-primary);
}

.btn--primary:hover {
    background: var(--text-secondary);
    border-color: var(--text-secondary);
    color: var(--text-inverse);
}

.btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-default);
}

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

.btn--outline {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-default);
}

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

/* Accent button variant */
.btn--accent {
    background: var(--accent);
    color: var(--text-inverse);
    border-color: var(--accent);
}

.btn--accent:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn--large {
    padding: 12px 24px;
    font-size: var(--text-base);
}

.btn--small {
    padding: 8px 16px;
    font-size: var(--text-xs);
}

/* ===================================
   SECTIONS
   =================================== */

section {
    position: relative;
    padding: var(--space-24) 0;
    z-index: 1;
}

.section__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-16);
}

.section__label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.section__title {
    margin-bottom: var(--space-6);
}

.section__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===================================
   CARDS
   =================================== */

.card {
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    transition: all var(--duration-base) var(--ease-out);
}

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

/* Anthropic-style colored cards */
.card--sage {
    background: var(--card-sage);
}

.card--lavender {
    background: var(--card-lavender);
}

.card--cream {
    background: var(--card-cream);
}

.card__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-4);
}

.card__icon svg {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
}

.card__title {
    font-family: var(--font-display);
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.card__text {
    color: var(--text-secondary);
    margin-bottom: 0;
    font-size: var(--text-base);
    line-height: 1.6;
}

/* ===================================
   STATS
   =================================== */

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-8);
}

.stat {
    text-align: center;
    padding: var(--space-6);
}

.stat__number {
    font-family: var(--font-display);
    font-size: var(--text-5xl);
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
    letter-spacing: -0.03em;
}

.stat__number span {
    color: var(--accent);
}

.stat__label {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

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

.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-16) 0 var(--space-8);
    position: relative;
    z-index: 1;
}

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

.footer__brand {
    max-width: 280px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.footer__logo-icon {
    width: 32px;
    height: 32px;
}

.footer__logo-icon path {
    fill: var(--text-primary);
}

.footer__logo-text {
    font-family: var(--font-body);
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.footer__tagline {
    color: var(--text-tertiary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    line-height: 1.6;
}

.footer__social {
    display: flex;
    gap: var(--space-3);
}

.footer__social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    transition: all var(--duration-fast) var(--ease-out);
}

.footer__social a:hover {
    background: var(--accent-muted);
    border-color: var(--border-accent);
    color: var(--accent);
}

.footer__nav h4 {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    margin-bottom: var(--space-4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer__nav ul {
    list-style: none;
}

.footer__nav li {
    margin-bottom: var(--space-2);
}

.footer__nav a {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    transition: color var(--duration-fast) var(--ease-out);
}

.footer__nav a:hover {
    color: var(--text-primary);
}

.footer__bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--border-subtle);
}

.footer__copyright {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.footer__links {
    display: flex;
    gap: var(--space-6);
}

.footer__links a {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.footer__links a:hover {
    color: var(--text-secondary);
}

/* ===================================
   FORMS
   =================================== */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-body);
    font-size: var(--text-base);
    color: var(--text-primary);
    background: var(--bg-elevated);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    transition: all var(--duration-fast) var(--ease-out);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-tertiary);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

/* ===================================
   FADING GRID PATTERN
   =================================== */

.has-grid {
    position: relative;
}

.has-grid::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(28, 28, 31, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 28, 31, 0.03) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, black 100%);
    -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 50%, transparent 0%, black 100%);
    pointer-events: none;
    z-index: 0;
}

.has-grid > * {
    position: relative;
    z-index: 1;
}

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

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

.text-accent {
    color: var(--accent);
}

.text-gradient {
    background: linear-gradient(135deg, var(--accent) 0%, #F07B4D 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }

.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes gentlePulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.02);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

/* Animation utility classes */
.animate-fade-in {
    animation: fadeIn var(--duration-slow) var(--ease-out) forwards;
}

.animate-slide-up {
    animation: slideUp var(--duration-slow) var(--ease-out) forwards;
}

.animate-scale-in {
    animation: scaleIn var(--duration-slow) var(--ease-out) forwards;
}

.animate-pulse {
    animation: gentlePulse 4s var(--ease-in-out) infinite;
}

.animate-float {
    animation: float 6s var(--ease-in-out) infinite;
}

/* Staggered animation delays */
[data-animate] {
    opacity: 0;
}

[data-animate].is-visible {
    animation: slideUp var(--duration-slow) var(--ease-out) forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0ms; }
.stagger > *:nth-child(2) { animation-delay: 80ms; }
.stagger > *:nth-child(3) { animation-delay: 160ms; }
.stagger > *:nth-child(4) { animation-delay: 240ms; }
.stagger > *:nth-child(5) { animation-delay: 320ms; }
.stagger > *:nth-child(6) { animation-delay: 400ms; }

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

@media (max-width: 1024px) {
    :root {
        --text-5xl: 2.75rem;
        --text-6xl: 3.5rem;
    }
    
    .footer__inner {
        grid-template-columns: 1fr 1fr;
    }
    
    .footer__brand {
        grid-column: 1 / -1;
        max-width: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
        --text-4xl: 2rem;
        --text-5xl: 2.25rem;
        --text-6xl: 2.75rem;
    }
    
    section {
        padding: var(--space-16) 0;
    }
    
    .nav__list {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--bg-elevated);
        padding: var(--space-4);
        border-bottom: 1px solid var(--border-subtle);
        box-shadow: var(--shadow-md);
        gap: var(--space-1);
    }
    
    .nav__list.active {
        display: flex;
    }
    
    .nav__link {
        width: 100%;
        padding: var(--space-3) var(--space-4);
    }
    
    .nav__toggle {
        display: flex;
    }
    
    .footer__inner {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }
    
    .footer__bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }
    
    .btn--large {
        padding: var(--space-3) var(--space-6);
        font-size: var(--text-sm);
    }
}
