/* Leverage Finder Styles - Twisthand Intelligence */

/* CSS Variables */
:root {
    --navy: #0f1f33;
    --blue: #2563eb;
    --gold: #d69e2e;
    --green: #38a169;
    --red: #e53e3e;
    --text: #1a202c;
    --text-light: #434a60;
    --bg: #ffffff;
    --bg-subtle: #f7fafc;
    --cubic-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--navy);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 1000;
    border-radius: 0 0 8px 0;
}
.skip-link:focus {
    top: 0;
}

/* Focus States */
*:focus {
    outline: 2px solid var(--navy);
    outline-offset: 2px;
}
*:focus:not(:focus-visible) {
    outline: none;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* No-JS Fallback */
.no-js .animated-element {
    opacity: 1 !important;
    transform: none !important;
}

/* Base Styles */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text);
    line-height: 1.6;
    background: var(--bg);
    overflow-x: hidden;
}

/* Leverage page specific typography overrides removed to use site.css standards */

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Page-specific overrides for shared header (if needed) */

/* Main Content */
main {
    margin-top: 80px;
    min-height: calc(100vh - 80px);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-subtle) 100%);
    animation: fadeIn 0.8s var(--cubic-smooth);
}

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

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

.hero h1 {
    margin-bottom: 1.5rem;
    max-width: 900px;
    animation: slideUp 0.8s var(--cubic-smooth) 0.1s both;
}

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

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 3rem;
    max-width: 700px;
    animation: slideUp 0.8s var(--cubic-smooth) 0.2s both;
}

/* Live Counter - Dynamic Social Proof */
.live-counter {
    display: flex;
    gap: 3rem;
    padding: 1.5rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(15, 31, 51, 0.06);
    margin-bottom: 2rem;
    animation: slideUp 0.8s var(--cubic-smooth) 0.3s both;
}

.counter-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.counter-number {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.counter-label {
    font-size: 0.875rem;
    color: var(--text-light);
    text-align: center;
}

.counter-divider {
    width: 1px;
    background: rgba(15, 31, 51, 0.1);
}

/* Trust Indicators */
.trust-bar {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    animation: slideUp 0.8s var(--cubic-smooth) 0.4s both;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-subtle);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-light);
}

.trust-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.trust-item strong {
    color: var(--navy);
    font-weight: 600;
}

/* Analysis Tool */
.analysis-tool {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 31, 51, 0.08);
    overflow: hidden;
    margin-bottom: 6rem;
    animation: slideUp 0.8s var(--cubic-smooth) 0.5s both;
}

/* Progress Bar */
.progress-bar {
    height: 4px;
    background: var(--bg-subtle);
    position: relative;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy) 0%, var(--blue) 100%);
    transition: width 0.5s var(--cubic-smooth);
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3));
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100px); }
    100% { transform: translateX(100px); }
}

/* Step Screens */
.step-screen {
    padding: 3rem;
    min-height: 500px;
    display: none;
    opacity: 0;
}

.step-screen.active {
    display: block;
    animation: fadeSlideIn 0.5s var(--cubic-smooth) forwards;
}

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

/* Industry Selection */
.industry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.industry-card {
    padding: 2rem 1.5rem;
    background: var(--bg-subtle);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s var(--cubic-smooth);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.industry-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent, rgba(15, 31, 51, 0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.industry-card:hover {
    border-color: var(--navy);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(15, 31, 51, 0.1);
}

.industry-card:hover::before {
    opacity: 1;
}

.industry-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1rem;
}

.industry-icon svg {
    width: 100%;
    height: 100%;
}

.industry-name {
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

.industry-hint {
    font-size: 0.75rem;
    color: var(--text-light);
}

/* Process Input */
.process-input-group {
    margin: 2rem 0;
}

.process-textarea {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid rgba(15, 31, 51, 0.1);
    border-radius: 12px;
    font-size: 1.125rem;
    resize: vertical;
    min-height: 150px;
    transition: all 0.3s var(--cubic-smooth);
    font-family: inherit;
}

.process-textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(15, 31, 51, 0.05);
    transform: translateY(-2px);
}

.input-helper {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sliders */
.slider-group {
    margin: 2rem 0;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.slider-value {
    font-weight: 600;
    color: var(--navy);
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.slider-value.changing {
    transform: scale(1.1);
    color: var(--blue);
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-subtle);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--navy);
    cursor: pointer;
    transition: all 0.3s var(--cubic-smooth);
    box-shadow: 0 2px 4px rgba(15, 31, 51, 0.2);
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(15, 31, 51, 0.3);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--navy);
    cursor: pointer;
    transition: all 0.3s var(--cubic-smooth);
    border: none;
}

/* Buttons */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s var(--cubic-smooth);
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

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

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 31, 51, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}

.btn-secondary:hover {
    background: var(--navy);
    color: white;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Enhanced Analysis Animation */
.analysis-animation {
    text-align: center;
    padding: 4rem 2rem;
}

.analysis-visual {
    width: 320px;
    height: 200px;
    margin: 2rem auto;
    position: relative;
}

.analysis-visual svg {
    width: 100%;
    height: 100%;
}

/* Multi-stage analysis status */
.analysis-status {
    font-size: 1.25rem;
    color: var(--navy);
    margin: 2rem 0;
    font-weight: 500;
    min-height: 2em;
}

.status-detail {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

.analysis-steps {
    max-width: 400px;
    margin: 2rem auto;
    text-align: left;
}

.analysis-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    opacity: 0.3;
    transition: all 0.5s var(--cubic-smooth);
}

.analysis-step.active {
    opacity: 1;
    transform: translateX(5px);
}

.analysis-step.complete {
    opacity: 0.7;
}

.step-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.analysis-step.active .step-icon {
    background: var(--blue);
    color: white;
    animation: pulse 1.5s infinite;
}

.analysis-step.complete .step-icon {
    background: var(--green);
    color: white;
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 99, 235, 0);
    }
}

/* Results */
.results-container {
    display: grid;
    gap: 2rem;
}

.result-card {
    background: var(--bg-subtle);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--navy);
    animation: slideInResult 0.6s var(--cubic-smooth) both;
}

@keyframes slideInResult {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.result-card:nth-child(2) { animation-delay: 0.1s; }
.result-card:nth-child(3) { animation-delay: 0.2s; }
.result-card:nth-child(4) { animation-delay: 0.3s; }

.result-card h3 {
    color: var(--navy);
    margin-bottom: 1rem;
}

.savings-highlight {
    font-size: 3rem;
    font-weight: 700;
    color: var(--green);
    margin: 1rem 0;
    font-family: 'Montserrat', sans-serif;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(15, 31, 51, 0.08);
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--navy);
    font-family: 'Montserrat', sans-serif;
}

.metric-label {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
    border-bottom: 1px dashed var(--text-light);
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    background: var(--navy);
    color: white;
    font-size: 0.875rem;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    animation: tooltipIn 0.3s ease;
}

@keyframes tooltipIn {
    from { 
        opacity: 0;
        transform: translateX(-50%) translateY(5px);
    }
    to { 
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Workflow Visualization */
.workflow-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    margin: 2rem 0;
    align-items: center;
}

.workflow-before, .workflow-after {
    padding: 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.workflow-before {
    background: #fee;
    border: 2px solid #fcc;
}

.workflow-after {
    background: #efe;
    border: 2px solid #cfc;
    animation: glow 2s ease infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(56, 161, 105, 0.3); }
    50% { box-shadow: 0 0 20px rgba(56, 161, 105, 0.5); }
}

.workflow-arrow {
    font-size: 2rem;
    color: var(--navy);
    animation: arrowPulse 1.5s ease infinite;
}

@keyframes arrowPulse {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

/* CTA Section */
.cta-section {
    background: var(--navy);
    color: white;
    padding: 3rem;
    border-radius: 12px;
    text-align: center;
    margin-top: 2rem;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
    position: relative;
}

.cta-section p {
    position: relative;
}

.cta-button {
    background: white;
    color: var(--navy);
    padding: 1rem 3rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    margin-top: 1.5rem;
    transition: all 0.3s var(--cubic-smooth);
    position: relative;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

/* Email Capture */
.email-capture {
    background: var(--bg-subtle);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.email-form {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid rgba(15, 31, 51, 0.1);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(15, 31, 51, 0.05);
}

/* Success Animation */
.success-pulse {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Privacy Notice */
.privacy-notice {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: 8px;
    text-align: center;
}

.privacy-notice a {
    color: var(--navy);
    text-decoration: underline;
}

/* Whisper Animation now in global site.css */
.whisper-delay-1 { animation-delay: 0.5s; }
.whisper-delay-2 { animation-delay: 1s; }

/* Breathing Animation for Metrics - Matching index.html */
.breathing {
    animation: subtleBreathe 4s ease-in-out infinite;
    display: inline-block;
    transform-origin: left center;
}
@keyframes subtleBreathe {
    0%, 95% { transform: scale(1); }
    97.5% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Interactive Elements - Matching index.html patterns */
.live-counter, .trust-bar, .analysis-tool {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}
.live-counter { animation-delay: 0.2s; }
.trust-bar { animation-delay: 0.4s; }
.analysis-tool { animation-delay: 0.6s; }

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

/* Touch targets for mobile - matching index.html standards */
.industry-card, .btn, button, input[type="range"] {
    min-height: 48px;
}

/* Responsive */
@media (max-width: 768px) {
    /* Typography overrides removed - using site.css standards */
    
    
    .live-counter {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .counter-divider {
        width: 100%;
        height: 1px;
    }
    
    .industry-grid {
        grid-template-columns: 1fr;
    }
    
    .workflow-comparison {
        grid-template-columns: 1fr;
    }
    
    .workflow-arrow {
        transform: rotate(90deg);
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
    }
    
    .email-form {
        flex-direction: column;
    }
    
    .trust-bar {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .step-screen {
        padding: 1.5rem;
    }
    
    .savings-highlight {
        font-size: 2rem;
    }
}