/* CSS Variables */
:root {
    --primary: #eb282e;
    --primary-dark: #c41e23;
    --secondary: #ea8e8f;
    --text-primary: #555555;
    --text-secondary: #6B7280;
    --bg-gray: #F9FAFB;
    --border: #E5E7EB;
    --white: #FFFFFF;
    --gradient: linear-gradient(135deg, #eb282e 0%, #c41e23 100%);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Navigation */
.navbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 32px;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    background-image: linear-gradient(var(--primary), var(--primary));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s, color 0.2s;
}

.nav-menu a.btn {
    background-image: var(--gradient) !important;
    background-size: 100% 100% !important;
    color: white !important;
}

.nav-menu a:hover {
    color: var(--primary);
    background-size: 100% 2px;
}

.nav-menu a.btn:hover {
    background-image: var(--gradient) !important;
    background-size: 100% 100% !important;
    color: white !important;
    opacity: 0.9;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 20px;
    flex-direction: column;
    gap: 16px;
}

.mobile-menu.show {
    display: flex;
}

.mobile-menu a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    text-align: center;
}

.mobile-menu a:hover {
    background: var(--bg-gray);
}

.mobile-menu .btn {
    margin-top: 8px;
    color: white;
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.btn-primary {
    background: var(--gradient);
    color: var(--white);
}

.btn-primary:hover {
    box-shadow: 0 0 24px rgba(235, 40, 46, 0.4);
}

.btn-secondary {
    background: var(--white);
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 22px !important;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

/* Hero Section */
.hero {
    padding: 60px 0;
    background: linear-gradient(180deg, var(--bg-gray) 0%, var(--white) 100%);
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 80px;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 28px;
    letter-spacing: -0.02em;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 36px;
    }
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

@media (max-width: 768px) {
    .hero-subtitle {
        font-size: 18px;
    }
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
    }
}

.hero-stats {
    display: flex;
    gap: 48px;
}

@media (max-width: 768px) {
    .hero-stats {
        flex-direction: column;
        gap: 24px;
    }
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Widget Mockup */
.widget-mockup {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    overflow: visible;
    max-width: 400px;
    margin: 0 auto;
}

.widget-header {
    border-radius: 16px 16px 0 0;
}

.widget-body {
    border-radius: 0 0 16px 16px;
}

.widget-header {
    background: var(--gradient);
    padding: 20px;
    color: var(--white);
}

.widget-title {
    font-size: 20px;
    font-weight: 600;
}

.widget-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
}

/* Widget-specific overrides to prevent dropdown cutoff */
.widget-mockup .form-group input {
    padding: 0 16px;
}

.widget-mockup .form-group select {
    padding: 0 45px 0 16px;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--white);
}

.section-title {
    font-size: 48px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 20px;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 60px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.feature-card {
    padding: 40px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 32px rgba(235, 40, 46, 0.2);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
}

/* Pricing Section */
.pricing {
    padding: 80px 0;
    background: var(--bg-gray);
}

.billing-toggle-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
}

.billing-toggle-pill {
    display: inline-flex;
    background: var(--bg-gray);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 4px;
    gap: 4px;
    cursor: pointer;
    position: relative;
}

.billing-toggle-pill::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: calc(50% - 6px);
    height: calc(100% - 8px);
    background: var(--gradient);
    border-radius: 50px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(235, 40, 46, 0.25);
    z-index: 0;
}

.billing-toggle-pill:has([data-billing="yearly"].active)::before {
    transform: translateX(calc(100% + 4px));
}

.billing-option {
    padding: 12px 32px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s ease;
    background: transparent;
    color: var(--text-secondary);
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.billing-option.active {
    color: white;
}

.billing-toggle-pill:hover {
    border-color: var(--primary);
}

.discount-badge {
    background: var(--primary);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
}

/* Pricing Cards */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin-bottom: 32px;
}

.pricing-card {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 32px;
    position: relative;
    transition: all 0.3s;
}

.pricing-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 32px rgba(235, 40, 46, 0.25);
}

.pricing-card.featured {
    border-color: var(--primary);
    box-shadow: 0 12px 32px rgba(16, 185, 129, 0.2);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.pricing-header {
    text-align: center;
    margin-bottom: 24px;
}

.pricing-header h3 {
    font-size: 24px;
    margin-bottom: 16px;
}

.price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary);
}

.period {
    font-size: 18px;
    color: var(--text-secondary);
}

.yearly-savings {
    display: block;
    margin-top: 8px;
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
}

.pricing-features {
    list-style: none;
    margin-bottom: 24px;
}

.pricing-features li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li.disabled {
    color: var(--text-secondary);
}

.pricing-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: block;
}

.modal-content {
    background-color: var(--white);
    margin: 10vh auto;
    padding: 0;
    border-radius: 16px;
    max-width: 600px;
    animation: slideDown 0.3s;
    max-height: 80vh;
    overflow: hidden;
    position: relative;
}

.modal-content h2 {
    padding: 32px 32px 8px 32px;
    margin: 0;
}

.modal-content p {
    padding: 0 32px 24px 32px;
    margin: 0;
}

/* Platform Choice Modal Specific Styling */
#platform-choice-modal .modal-content {
    max-width: 560px;
}

#platform-choice-modal h2 {
    padding: 40px 40px 8px 40px;
    font-size: 28px;
}

#platform-choice-modal .checkout-subtitle {
    padding: 0 40px 0 40px;
    margin-bottom: 0;
}

.modal-content form {
    overflow-y: auto;
    max-height: calc(80vh - 180px);
    padding: 0 32px 32px 32px;
}

.modal-close {
    color: var(--text-secondary);
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 4px;
    z-index: 10;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-back {
    color: var(--text-secondary);
    position: absolute;
    top: 24px;
    left: 24px;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    background: none;
    border: none;
    padding: 8px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

/* Add top padding to h2 when back button is visible */
#waitinglist-modal .modal-content h2 {
    transition: padding-top 0.3s;
}

#waitinglist-modal.has-back-button .modal-content h2 {
    padding-top: 64px;
}

.modal-back:hover {
    color: var(--text-primary);
    background: var(--background);
}

.platform-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 24px 40px 40px 40px;
}

.platform-choice-btn {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 24px;
    background: #fafafa;
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: inherit;
    position: relative;
}

.platform-choice-btn:hover {
    background: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(235, 40, 46, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.platform-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 10px;
    color: var(--primary);
    flex-shrink: 0;
    transition: all 0.25s;
}

.platform-choice-btn:hover .platform-icon {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(235, 40, 46, 0.15);
}

.platform-info {
    flex: 1;
    text-align: left;
}

.platform-info h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.platform-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.platform-arrow {
    font-size: 20px;
    color: var(--text-secondary);
    transition: all 0.25s;
    opacity: 0.6;
}

.platform-choice-btn:hover .platform-arrow {
    transform: translateX(4px);
    opacity: 1;
    color: var(--primary);
}

.checkout-subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.sites-container {
    margin: 24px 0;
}

.site-input-group {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.site-url-input {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 16px;
}

.btn-remove-site {
    padding: 12px 16px;
    background: #EF4444;
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

.btn-remove-site:disabled {
    background: var(--border);
    cursor: not-allowed;
}

.help-text {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Notification Modal */
.notification-modal .modal-content {
    max-width: 450px;
    text-align: center;
    padding: 48px 32px;
}

.notification-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.notification-modal h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--text-primary);
}

.notification-modal p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 32px;
    line-height: 1.6;
}

.order-summary {
    background: var(--bg-gray);
    padding: 24px;
    border-radius: 8px;
    margin: 24px 0;
}

.order-summary h3 {
    margin-bottom: 16px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.summary-line.total {
    color: var(--text-primary);
    font-size: 20px;
    padding-top: 16px;
}

.summary-note {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    text-align: center;
}

/* Footer */
.footer {
    background: #1F2937;
    color: var(--white);
    padding: 60px 0 24px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 40px;
}

.footer .brand-name {
    color: var(--white);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 16px;
}

.footer-links {
    display: contents;
}

.footer-column h4 {
    margin-bottom: 16px;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    margin-bottom: 12px;
    width: fit-content;
    background-image: linear-gradient(rgba(255, 255, 255, 1), rgba(255, 255, 255, 1));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: background-size 0.3s, color 0.2s;
}

.footer-column a:hover {
    color: var(--white);
    background-size: 100% 2px;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .nav-menu {
        display: none;
    }
    
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .billing-toggle-wrapper {
        flex-direction: column;
        gap: 12px;
    }
    
    .billing-option {
        padding: 10px 24px;
        font-size: 15px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
