/* ============================================
   SurveyEarn - Earn By Doing Surveys
   ============================================ */

:root {
    --color-primary: #0d9488;
    --color-primary-dark: #0f766e;
    --color-secondary: #f59e0b;
    --color-accent: #fbbf24;
    --color-bg: #f8fafc;
    --color-bg-alt: #f1f5f9;
    --color-text: #1e293b;
    --color-text-muted: #64748b;
    --color-white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
}

.logo {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 32px;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.2s;
}

.nav-toggle:hover {
    background: var(--color-bg);
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(1) {
    transform: translateY(8.5px) rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-open .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8.5px) rotate(-45deg);
}

.nav-overlay {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: var(--color-white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: 
        linear-gradient(135deg, rgba(13, 148, 136, 0.08) 0%, transparent 50%),
        linear-gradient(225deg, rgba(245, 158, 11, 0.06) 0%, transparent 50%),
        var(--color-bg);
}

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

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: var(--color-white);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 50px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.hero-title .highlight {
    color: var(--color-secondary);
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-muted);
    margin-bottom: 32px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-content .btn {
    margin-top: 8px;
}

/* Sections */
.section {
    padding: 80px 24px;
}

.section-alt {
    background: var(--color-bg-alt);
}

.section-title {
    font-size: clamp(2rem, 4vw, 2.75rem);
    text-align: center;
    margin-bottom: 12px;
    color: var(--color-text);
}

.subsection-title {
    font-size: 1.25rem;
    text-align: center;
    color: var(--color-text-muted);
    margin-bottom: 48px;
}

.section-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--color-text-muted);
    margin-bottom: 40px;
}

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

/* Steps Grid */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
    margin-bottom: 48px;
}

.step-card {
    background: var(--color-white);
    padding: 32px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.step-card h4 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--color-text);
}

.step-card p {
    color: var(--color-text-muted);
}

/* Earn Grid */
.earn-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.earn-card {
    background: var(--color-white);
    padding: 28px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.earn-card:hover {
    border-color: var(--color-primary);
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.12);
}

.earn-icon {
    font-size: 2rem;
    margin-bottom: 16px;
}

.earn-card h4 {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--color-primary-dark);
}

.earn-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.65;
}

/* Countries */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.country-card {
    background: var(--color-white);
    padding: 28px;
    border-radius: var(--radius);
    border-left: 4px solid var(--color-primary);
}

.country-card h4 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.country-card p {
    color: var(--color-text-muted);
}

/* App Steps */
.app-steps {
    max-width: 600px;
    margin: 0 auto 40px;
}

.app-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.app-step p {
    padding-top: 8px;
    color: var(--color-text-muted);
}

.app-step-num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--color-primary);
    color: var(--color-white);
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-tip {
    padding: 16px;
    background: rgba(245, 158, 11, 0.15);
    border-radius: var(--radius);
    color: var(--color-text);
    margin-top: 8px;
}

/* CEO Section */
.ceo-section {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
}

.ceo-section .section-title,
.ceo-section .subsection-title {
    color: var(--color-white);
}

.ceo-quote {
    max-width: 800px;
    margin: 0 auto 40px;
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-accent);
}

.ceo-quote p {
    font-size: 1.125rem;
    line-height: 1.75;
    color: var(--color-white);
}

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

.ceo-section .btn-primary:hover {
    background: var(--color-accent);
    color: var(--color-text);
}

/* Testimonial */
.testimonial-card {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.testimonial-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 24px;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.testimonial-author strong {
    font-size: 1rem;
}

.testimonial-author span {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.testimonial-tag {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--color-primary);
}

/* FAQ */
.faq-list {
    max-width: 720px;
    margin: 0 auto 48px;
}

.faq-item {
    background: var(--color-white);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background 0.2s;
    word-wrap: break-word;
}

.faq-question:hover {
    background: var(--color-bg);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-primary);
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p,
.faq-answer ul {
    padding: 0 24px 20px;
    color: var(--color-text-muted);
}

.faq-answer ul {
    list-style: none;
}

.faq-answer li {
    padding: 6px 0;
    padding-left: 20px;
    position: relative;
}

.faq-answer li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: 700;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, #134e4a 100%);
}

.cta-section .section-title {
    color: var(--color-white);
}

.cta-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-white);
    text-align: center;
    margin-bottom: 12px;
}

.cta-subtext {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

/* Footer */
.footer {
    padding: 24px;
    background: var(--color-text);
    text-align: center;
}

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

/* Registration Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal.is-open .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    line-height: 1;
    color: var(--color-text-muted);
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.modal-close:hover {
    color: var(--color-text);
    background: var(--color-bg);
}

.modal-header {
    margin-bottom: 28px;
}

.modal-title {
    font-size: 1.75rem;
    margin-bottom: 8px;
    color: var(--color-text);
}

.modal-subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Register Form */
.register-form .form-group {
    margin-bottom: 20px;
}

.register-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 8px;
}

.register-form .required {
    color: #dc2626;
}

.register-form input,
.register-form select {
    width: 100%;
    padding: 12px 16px;
    font-family: inherit;
    font-size: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: var(--radius);
    background: var(--color-white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.register-form input:focus,
.register-form select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.register-form input::placeholder {
    color: #94a3b8;
}

.register-form input.error,
.register-form select.error {
    border-color: #dc2626;
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #dc2626;
    margin-top: 6px;
}

.phone-input {
    display: flex;
    gap: 12px;
}

.phone-input .country-code-select {
    flex: 0 0 110px;
}

.phone-input input {
    flex: 1;
}

.btn-block {
    width: 100%;
    margin-top: 8px;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: var(--color-white);
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}

.whatsapp-float:active {
    transform: scale(0.98);
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
}

.whatsapp-tooltip {
    position: absolute;
    right: 100%;
    margin-right: 12px;
    padding: 8px 12px;
    background: var(--color-text);
    color: var(--color-white);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateX(8px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* ============================================
   Responsive - Mobile First Enhancements
   ============================================ */

/* Base fluid typography */
@media (max-width: 640px) {
    body {
        font-size: 16px;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .subsection-title {
        font-size: 1rem;
        margin-bottom: 32px;
    }
}

/* Tablet & Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }
    
    .nav {
        padding: 12px 20px;
    }
    
    .nav-toggle {
        display: flex;
        order: 1;
    }
    
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s, visibility 0.3s;
    }
    
    .nav-overlay.is-visible {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: min(300px, 85vw);
        flex-direction: column;
        gap: 0;
        padding: 80px 24px 32px;
        background: var(--color-white);
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .nav-links.is-open {
        transform: translateX(0);
    }
    
    .nav-links li {
        border-bottom: 1px solid var(--color-bg);
    }
    
    .nav-links a {
        display: block;
        padding: 16px 0;
        font-size: 1.0625rem;
    }
    
    .nav-cta {
        margin-left: auto;
        margin-right: 12px;
        padding: 10px 18px;
        font-size: 0.9375rem;
    }
    
    .logo {
        font-size: 1.35rem;
    }
    
    .hero {
        padding: 88px 20px 60px;
        min-height: auto;
    }
    
    
    .hero-badge {
        font-size: 0.8125rem;
        padding: 6px 14px;
        margin-bottom: 20px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 16px;
    }
    
    .hero-subtitle {
        font-size: 1.0625rem;
        margin-bottom: 24px;
    }
    
    .section {
        padding: 56px 20px;
    }
    
    .steps-grid {
        gap: 20px;
        margin-bottom: 32px;
    }
    
    .step-card {
        padding: 24px;
    }
    
    .earn-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .earn-card {
        padding: 24px;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
    }
    
    .country-card {
        padding: 24px;
    }
    
    .text-center .btn {
        width: 100%;
        max-width: 320px;
    }
    
    .cta-text {
        font-size: 1.125rem;
    }
    
    .cta-subtext {
        font-size: 1rem;
    }
    
    .whatsapp-float {
        bottom: max(20px, env(safe-area-inset-bottom, 20px));
        right: max(20px, env(safe-area-inset-right, 20px));
        width: 52px;
        height: 52px;
    }
    
    .whatsapp-icon {
        width: 26px;
        height: 26px;
    }
}

/* Mobile - Small screens */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .nav {
        padding: 12px 16px;
    }
    
    .hero {
        padding: 80px 16px 48px;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section {
        padding: 48px 16px;
    }
    
    .step-card,
    .earn-card {
        padding: 20px;
    }
    
    .step-number {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }
    
    .ceo-quote {
        padding: 24px 20px;
    }
    
    .ceo-quote p {
        font-size: 1rem;
    }
    
    .testimonial-card {
        padding: 28px 20px;
    }
    
    .testimonial-text {
        font-size: 1.125rem;
    }
    
    .modal-content {
        padding: 24px 20px;
        margin: 16px;
        max-height: calc(100vh - 32px);
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .phone-input {
        flex-direction: column;
    }
    
    .phone-input .country-code-select {
        flex: 1 1 auto;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .whatsapp-float {
        bottom: max(16px, env(safe-area-inset-bottom, 16px));
        right: max(16px, env(safe-area-inset-right, 16px));
        width: 48px;
        height: 48px;
    }
    
    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }
}

/* Desktop - Large screens */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        padding: 0 40px;
    }
    
    .section {
        padding: 100px 40px;
    }
    
    .hero {
        padding: 140px 40px 100px;
    }
    
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    .earn-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 28px;
    }
}

/* Desktop - Extra large */
@media (min-width: 1400px) {
    .container {
        max-width: 1280px;
    }
}

/* Touch device - improve tap targets */
@media (hover: none) {
    .btn:hover {
        transform: none;
    }
    
    .step-card:hover,
    .earn-card:hover {
        transform: none;
    }
    
    .faq-question {
        min-height: 48px;
        padding: 16px 24px;
    }
}

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