/* ========================================
   UpSwing Trader - Clone Styles
   Color palette from original:
   Primary dark: rgb(12,24,38) / #0c1826
   Text light: rgb(225,239,242) / #e1eff2
   Text secondary: rgb(134,140,147) / #868c93
   Accent: rgb(194,197,201) / #c2c5c9
   White: #ffffff
   Section dark bg: rgb(25,25,25) / #191919
   Fonts: Space Grotesk (headings), Inter (body)
   ======================================== */

:root {
    --color-bg: #0c1826;
    --color-bg-dark: #191919;
    --color-text: #e1eff2;
    --color-text-secondary: #868c93;
    --color-text-muted: #49525c;
    --color-white: #ffffff;
    --color-accent: #c2c5c9;
    --color-border: rgba(225, 239, 242, 0.1);
    --color-green: #008250;
    --color-red: #df3131;
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;
    --font-secondary: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

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

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: var(--font-body);
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--color-text);
    color: var(--color-bg);
}
.btn-primary:hover {
    background: var(--color-white);
    opacity: 0.9;
}

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-text);
}
.btn-outline:hover {
    background: var(--color-text);
    color: var(--color-bg);
}

.btn-lg {
    padding: 16px 44px;
    font-size: 1.05rem;
}

/* ========================================
   Navbar
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 12px 0;
    transition: all 0.3s ease;
    background: transparent;
}

.navbar.scrolled {
    background: rgba(12, 24, 38, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    letter-spacing: -0.3px;
}

.nav-links {
    display: flex;
    gap: 36px;
    margin-right: 32px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text);
    font-family: var(--font-body);
    letter-spacing: 0.5px;
}
.nav-links a:hover {
    opacity: 0.7;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.nav-actions .btn {
    padding: 8px 24px;
    font-size: 0.85rem;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* ========================================
   Hero
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding: 120px 0 80px;
    background: url('heroiamge.png') no-repeat left center / cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(12,24,38,0.4), rgba(12,24,38,0.85) 50%, rgba(12,24,38,1) 70%);
    z-index: 1;
}

.hero.loaded {
    animation: heroFadeIn 0.8s ease forwards;
}

@keyframes heroFadeIn {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: flex-end;
    max-width: 1100px;
    width: 100%;
}

.hero-text {
    max-width: 520px;
    text-align: right;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -2px;
    margin-bottom: 32px;
    color: var(--color-text);
}

.hero-highlight {
    color: var(--color-text);
}

.hero-subtitle {
    font-family: var(--font-secondary);
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 48px;
}

/* ========================================
   Sections
   ======================================== */
.section {
    padding: 80px 0;
    position: relative;
}

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

.section-light {
    background: #edf1f5;
}
.section-light .section-title,
.section-light .step-number {
    color: #0c1826;
}
.section-light .step-card p {
    color: #3a4550;
}
.section-light .btn-outline {
    color: #0c1826;
    border-color: #0c1826;
}
.section-light .btn-outline:hover {
    background: #0c1826;
    color: #ffffff;
}
.section-light .step-card:hover {
    border-color: rgba(12, 24, 38, 0.15);
    background: rgba(12, 24, 38, 0.04);
}

/* Section dividers */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 600px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-border), rgba(225, 239, 242, 0.15), var(--color-border), transparent);
}

.section:first-of-type::before,
.hero + .section::before,
.partners-section + .section::before {
    display: none;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-text);
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.section-subtitle-light {
    text-align: center;
    font-family: var(--font-secondary);
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    margin-bottom: 40px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

/* ========================================
   Partners Gallery — Marquee
   ======================================== */
.partners-section {
    padding: 64px 0 56px;
    background: #ffffff;
    overflow: hidden;
}

.partners-section .section-title {
    color: #1a1a1a;
}

.partners-section .section-subtitle {
    color: #666;
}

.marquee {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 80px;
    width: max-content;
    animation: marquee-scroll 25s linear infinite;
}

.marquee-track img {
    width: 160px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ========================================
   Steps / How It Works
   ======================================== */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 40px;
}

.step-card {
    text-align: center;
    padding: 44px 28px;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.step-card:hover {
    border-color: var(--color-border);
    background: rgba(225, 239, 242, 0.03);
    transform: translateY(-4px);
}

.step-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: #0c1826;
}

.step-icon svg {
    width: 44px;
    height: 44px;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 16px;
}

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

.learn-more-wrapper {
    text-align: center;
}

/* ========================================
   Features
   ======================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 28px;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
}
.feature-card:hover {
    border-color: rgba(225, 239, 242, 0.08);
    background: rgba(225, 239, 242, 0.03);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.feature-icon-img {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon-img img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.feature-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--color-text);
}

.feature-icon svg {
    width: 48px;
    height: 48px;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--color-text);
}

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

/* ========================================
   Comparison Table
   ======================================== */
.comparison-table-wrapper {
    max-width: 800px;
    margin: 48px auto 0;
}

.comparison-header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    padding-bottom: 24px;
    margin-bottom: 8px;
}

.comparison-header .comp-col {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    text-align: center;
}

.comparison-header .comp-upswing-col {
    color: var(--color-text);
    text-align: center;
}

.highlight-blue {
    display: inline;
    background: linear-gradient(to top, #4170e0 40%, transparent 40%);
    padding: 0 6px;
}

.comparison-header .comp-others-col {
    color: var(--color-text);
    text-align: center;
}

.comparison-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    border-top: 1px solid var(--color-border);
    padding: 24px 0;
}

.comparison-row .comp-label-col,
.comparison-header .comp-label-col {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
}

.comp-pill {
    display: inline-block;
    background: #ffffff;
    color: #1a1a1a;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 12px 0;
    border-radius: 50px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    width: 100%;
    text-align: center;
}

.comparison-row .comp-upswing-col,
.comparison-row .comp-others-col {
    font-family: var(--font-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    color: var(--color-text);
}

.comparison-row .comp-upswing-col {
    justify-content: center;
    font-weight: 500;
    text-align: center;
}

.comparison-row .comp-others-col {
    justify-content: center;
    color: var(--color-text-secondary);
    text-align: center;
}

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

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    background: none;
    border: none;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 500;
    font-family: var(--font-body);
    cursor: pointer;
    text-align: left;
    gap: 16px;
    transition: all 0.3s ease;
}
.faq-question:hover {
    opacity: 0.7;
}
.faq-question svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    color: var(--color-text-secondary);
}
.faq-item.active .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
}
.faq-item.active .faq-answer {
    max-height: 300px;
    padding-bottom: 20px;
}
.faq-answer p {
    color: var(--color-text-secondary);
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: 80px 0;
    background: var(--color-bg);
}

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

.cta-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 36px;
    color: var(--color-text);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    padding: 60px 0 0;
    background: var(--color-bg-dark);
    border-top: 1px solid var(--color-border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
}

.footer-brand-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.footer-tagline {
    font-family: var(--font-secondary);
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    font-family: var(--font-secondary);
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}
.footer-links a:hover {
    color: var(--color-text);
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-family: var(--font-secondary);
}

/* ========================================
   Registration Modal
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 24px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #131f2e;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 48px 40px;
    width: 100%;
    max-width: 480px;
    position: relative;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    transition: color 0.2s ease;
    padding: 4px;
}

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

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    margin-bottom: 32px;
}

.modal-form .form-row {
    display: flex;
    gap: 16px;
}

.modal-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
    flex: 1;
}

.modal-form .form-group-code {
    flex: 0 0 110px;
}

.modal-form label {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-bottom: 8px;
}

.modal-form .required {
    color: var(--color-text-secondary);
}

.modal-form input,
.modal-form select {
    background: rgba(225, 239, 242, 0.06);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    transition: border-color 0.2s ease, background 0.2s ease;
    outline: none;
    width: 100%;
}

.modal-form input:focus,
.modal-form select:focus {
    border-color: rgba(225, 239, 242, 0.3);
    background: rgba(225, 239, 242, 0.1);
}

.modal-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23868c93' stroke-width='2'%3E%3Cpath d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.modal-form input[type="date"] {
    color-scheme: dark;
}

.modal-submit {
    width: 100%;
    margin-top: 8px;
}

.modal-form .form-error {
    color: #e06060;
    font-size: 0.8rem;
    margin-top: 6px;
    display: none;
}

.modal-form .form-group.error .form-error {
    display: block;
}

.modal-form .form-group.error input,
.modal-form .form-group.error select {
    border-color: #e06060;
}

@media (max-width: 480px) {
    .modal {
        padding: 32px 24px;
    }
    .modal-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    .modal-form .form-group-code {
        flex: 1;
    }
}

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

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 768px) {
    .hero-overlay {
        background: linear-gradient(to right, rgba(12,24,38,0.7), rgba(12,24,38,0.95) 60%, rgba(12,24,38,1) 80%);
    }
    .hero-content {
        justify-content: center;
    }
    .hero-text {
        text-align: center;
        max-width: 100%;
    }

    .nav-links { display: none; }
    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(12, 24, 38, 0.98);
        backdrop-filter: blur(10px);
        padding: 24px;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
    }
    .nav-links.active a {
        padding: 14px 0;
        display: block;
        border-bottom: 1px solid var(--color-border);
    }
    .mobile-toggle { display: flex; }

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

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }

    .marquee-track img {
        width: 140px;
        height: 100px;
    }

    .section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .marquee-track img {
        width: 120px;
        height: 70px;
    }
}
