/* GlobalToneCare - Tone Voice Analysis Platform */

/* ===== CSS VARIABLES ===== */
:root {
    --bg-white: #fafbfc;
    --surface-glass: rgba(255, 255, 255, 0.72);
    --text-primary: #334155;
    --text-secondary: #64748b;
    --accent-indigo: #6366f1;
    --accent-warm: #f472b6;
    --accent-cool: #14b8a6;
    --accent-neutral: #94a3b8;
    --border-light: #e2e8f0;
    --gradient-lavender: #ede9fe;
    --gradient-rose: #fce7f3;

    --transition-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', sans-serif;
    background: var(--bg-white);
    color: var(--text-primary);
    line-height: 1.8;
    font-weight: 300;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(1.75rem, 4vw, 3.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 700;
}

h3 {
    font-size: 1.3rem;
    font-weight: 700;
}

p {
    font-size: 1rem;
    color: var(--text-secondary);
}

code, pre {
    font-family: 'JetBrains Mono', monospace;
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(237, 233, 254, 0.4) 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    width: 100%;
    text-align: center;
}

.hero-content h1 {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tone-accent {
    color: var(--accent-indigo);
}

.hero-tagline {
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
}

/* ===== SPECTRUM CONTAINER ===== */
.spectrum-container {
    margin-top: 4rem;
}

.spectrum-label {
    display: block;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.tone-input {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.5rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    background: var(--bg-white);
    color: var(--text-primary);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.05);
}

.tone-input:focus {
    outline: none;
    border-color: var(--accent-indigo);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.15);
}

/* ===== TONE SPECTRUM ===== */
.spectrum-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
}

.spectrum-label-left,
.spectrum-label-right {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 70px;
    text-align: center;
}

.tone-spectrum {
    flex: 1;
    max-width: 500px;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
}

.spectrum-gradient {
    width: 100%;
    height: 8px;
    background: linear-gradient(to right, #f472b6, #94a3b8, #14b8a6);
    border-radius: 100px;
}

.spectrum-indicator {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent-indigo);
    border: 3px solid white;
    border-radius: 50%;
    top: 50%;
    left: 33%;
    transform: translate(-50%, -50%);
    transition: left 0.6s var(--transition-spring);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    cursor: grab;
}

.spectrum-indicator:active {
    cursor: grabbing;
}

/* ===== WAVE DIVIDER ===== */
.wave-divider {
    width: 100%;
    height: 120px;
    display: block;
    margin: 0 auto;
    opacity: 0.8;
    transform: translateY(-2px);
}

.wave-path {
    fill: none;
    stroke-linecap: round;
}

.wave-1 {
    animation: wave-1 8s ease-in-out infinite;
}

.wave-2 {
    animation: wave-2 8s ease-in-out infinite;
    animation-delay: 0.5s;
}

.wave-3 {
    animation: wave-3 8s ease-in-out infinite;
    animation-delay: 1s;
}

@keyframes wave-1 {
    0%, 100% { d: path('M0,60 Q300,30 600,60 T1200,60'); }
    50% { d: path('M0,60 Q300,50 600,60 T1200,60'); }
}

@keyframes wave-2 {
    0%, 100% { d: path('M0,60 Q300,40 600,60 T1200,60'); }
    50% { d: path('M0,60 Q300,55 600,60 T1200,60'); }
}

@keyframes wave-3 {
    0%, 100% { d: path('M0,60 Q300,50 600,60 T1200,60'); }
    50% { d: path('M0,60 Q300,60 600,60 T1200,60'); }
}

/* ===== BEFORE/AFTER SECTION ===== */
.before-after-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
    background: linear-gradient(135deg, rgba(237, 233, 254, 0.3) 0%, rgba(252, 231, 243, 0.3) 100%);
}

.before-after-container {
    width: 100%;
    max-width: 1000px;
    height: 500px;
    display: flex;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.1);
    position: relative;
    background: white;
}

.before-pane {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #fafbfc 0%, #f1f5f9 100%);
    position: relative;
    z-index: 1;
}

.after-pane {
    flex: 1;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.05) 0%, rgba(244, 114, 182, 0.05) 100%);
    position: absolute;
    left: 50%;
    top: 0;
    width: 50%;
    height: 100%;
    clip-path: inset(0 0 0 var(--split, 0));
    z-index: 2;
}

.pane-header {
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.pane-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.text-harsh {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0.02em;
    line-height: 1.6;
}

.text-warm {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
    letter-spacing: 0;
    line-height: 1.8;
}

.tone-badge {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    width: fit-content;
}

.tone-badge.harsh {
    background: #fee2e2;
    color: #dc2626;
}

.tone-badge.warm {
    background: #dbeafe;
    color: #0284c7;
}

/* Divider handle */
.divider-handle {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-indigo);
    cursor: col-resize;
    z-index: 3;
    transform: translateX(-50%);
    transition: background 0.3s ease;
}

.divider-handle:hover {
    background: var(--accent-cool);
}

.divider-grip {
    position: absolute;
    width: 40px;
    height: 40px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.2);
    border: 2px solid var(--accent-indigo);
}

/* ===== FEATURES SECTION ===== */
.features-section {
    min-height: 100vh;
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
    position: relative;
}

.features-header {
    text-align: center;
    max-width: 700px;
    margin-bottom: 4rem;
}

.features-header h2 {
    margin-bottom: 1rem;
}

.features-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.features-grid {
    width: 100%;
    max-width: 1200px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* ===== GLASSMORPHIC CARDS ===== */
.feature-card {
    padding: 40px;
    border-radius: 16px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s ease;
}

.feature-card.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.08);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.12);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.feature-card h3 {
    color: var(--accent-indigo);
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ===== GLOBE SECTION ===== */
.globe-section {
    min-height: 100vh;
    padding: 80px 5%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(252, 231, 243, 0.3) 0%, rgba(237, 233, 254, 0.3) 100%);
    position: relative;
}

.globe-container {
    text-align: center;
    max-width: 900px;
}

.globe-container h2 {
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.globe-visual {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
    perspective: 1000px;
}

.globe-svg {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 8px 32px rgba(99, 102, 241, 0.1));
}

.connection-group {
    animation: pulse-connection 3s ease-in-out infinite;
}

.connection-group:nth-child(2) {
    animation-delay: 0.3s;
}

.connection-group:nth-child(3) {
    animation-delay: 0.6s;
}

.connection-group:nth-child(4) {
    animation-delay: 0.9s;
}

@keyframes pulse-connection {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.globe-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CLOSING SECTION ===== */
.closing-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 5%;
    background: linear-gradient(135deg, var(--bg-white) 0%, rgba(20, 184, 166, 0.05) 100%);
    text-align: center;
}

.closing-content {
    max-width: 800px;
}

.closing-content h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: var(--accent-cool);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.closing-tagline {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 40px 5%;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-brand {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-cool);
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .before-after-container {
        height: auto;
        min-height: 600px;
        flex-direction: column;
    }

    .before-pane {
        padding: 40px 30px;
    }

    .after-pane {
        position: relative;
        left: 0;
        width: 100%;
        clip-path: none;
        margin-top: 0;
    }

    .divider-handle {
        display: none;
    }

    .spectrum-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .spectrum-label-left,
    .spectrum-label-right {
        min-width: auto;
    }

    .tone-spectrum {
        max-width: 100%;
    }

    .hero {
        padding: 40px 5%;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .tone-input {
        max-width: 100%;
    }

    .closing-content h2 {
        font-size: clamp(1.5rem, 4vw, 2.5rem);
    }
}

@media (max-width: 480px) {
    .hero-tagline {
        font-size: 1.1rem;
    }

    .pane-header,
    .pane-content {
        padding: 30px 20px;
    }

    .text-harsh,
    .text-warm {
        font-size: 1.1rem;
    }

    .features-section,
    .globe-section {
        padding: 60px 5%;
    }

    .feature-card {
        padding: 30px;
    }
}

/* ===== ACCESSIBILITY: PREFERS REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
