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

:root {
    --blue-600: #2563eb;
    --blue-50: #eff6ff;
    --emerald-600: #059669;
    --emerald-50: #ecfdf5;
    --gray-700: #374151;
    --gray-900: #111827;
    --gray-600: #4b5563;
    --white: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
}

/* Promotional Banner */
.promo-banner {
    background: linear-gradient(to right, var(--blue-600), var(--emerald-600));
    color: var(--white);
    padding: 0.5rem 1rem;
    text-align: center;
    position: relative;
    font-size: 0.875rem;
    z-index: 100;
}

.promo-banner.hidden {
    display: none;
}

.promo-banner-content {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.promo-countdown {
    font-weight: 700;
}

.promo-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.promo-close:hover {
    color: #e5e7eb;
}

/* Header */
.site-header {
    background-color: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Adjust header top when promo banner is visible */
.promo-banner:not(.hidden) + .site-header {
    top: 0;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 4rem;
    width: auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

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

.nav-link:hover {
    color: var(--blue-600);
}

/* Hero Section */
.hero-section {
    position: relative;
    min-height: calc(100vh - 4rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1rem;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, var(--white) 0%, var(--blue-50) 50%, var(--emerald-50) 100%);
    z-index: 0;
}

.hero-gradient::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom right, transparent 0%, rgba(37, 99, 235, 0.1) 50%, rgba(5, 150, 105, 0.1) 100%);
    pointer-events: none;
}

.hero-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding: 2rem 4rem;
}

/* Carousel Wrapper */
.carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    will-change: transform;
}

/* Theme Card (Single Carousel Item) */
.theme-card {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.theme-card.active {
    opacity: 1;
    pointer-events: all;
}

/* Theme Screenshot (iPad Vertical) */
.theme-screenshot-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
}

.theme-screenshot {
    width: 100%;
    max-width: 400px;
    height: auto;
    aspect-ratio: 768 / 1024; /* iPad vertical portrait */
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    background-color: var(--white);
    padding: 1rem;
    transition: transform 0.3s ease;
}

.theme-card.active .theme-screenshot {
    transform: scale(1);
}

.theme-card:not(.active) .theme-screenshot {
    transform: scale(0.95);
}

/* Hero Content */
.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 700px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--gray-900);
    margin: 0;
}

.hero-description {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(to right, var(--blue-600), var(--emerald-600));
    color: var(--white);
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-700);
}

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

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--gray-700);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 30;
    color: var(--gray-700);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-btn:hover {
    background: var(--gray-700);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn-prev {
    left: -1rem;
}

.carousel-btn-next {
    right: -1rem;
}

.carousel-btn svg {
    width: 24px;
    height: 24px;
}

/* Carousel Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    z-index: 20;
    position: relative;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--gray-700);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-dot:hover {
    background: var(--gray-700);
    transform: scale(1.2);
}

.carousel-dot.active {
    background: var(--gray-700);
    width: 32px;
    border-radius: 6px;
}

/* Footer */
.site-footer {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    color: var(--white);
    position: relative;
    overflow: hidden;
    margin-top: 4rem;
}

.footer-bg-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    pointer-events: none;
}

.footer-bg-pattern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 24rem;
    height: 24rem;
    background: var(--blue-600);
    border-radius: 50%;
    filter: blur(80px);
}

.footer-bg-pattern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24rem;
    height: 24rem;
    background: var(--emerald-600);
    border-radius: 50%;
    filter: blur(80px);
}

.footer-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1rem;
    position: relative;
    z-index: 10;
}

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

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 4rem;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.footer-social {
    display: flex;
    gap: 0.75rem;
}

.social-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.social-icon:hover {
    border-color: var(--blue-600);
}

.footer-heading {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links-list li {
    margin-bottom: 0.5rem;
}

.footer-links-list a {
    color: #9ca3af;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
    font-size: 0.875rem;
}

.footer-links-list a:hover {
    color: var(--white);
}

.link-arrow {
    color: #4b5563;
}

.footer-subscribe-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.footer-subscribe-icon {
    width: 2rem;
    height: 2rem;
    background: var(--emerald-600);
    border-radius: 50%;
    opacity: 0.5;
}

.footer-subscribe-text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.footer-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-subscribe-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: #1e293b;
    border: 1px solid #4b5563;
    color: var(--white);
    font-size: 0.875rem;
}

.footer-subscribe-input::placeholder {
    color: #9ca3af;
}

.footer-subscribe-input:focus {
    outline: none;
    border-color: var(--blue-600);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.footer-subscribe-btn {
    width: 100%;
    padding: 0.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(to right, var(--blue-600), var(--emerald-600));
    color: var(--white);
    border: none;
    font-weight: 500;
    cursor: pointer;
    transition: opacity 0.2s;
    font-size: 0.875rem;
}

.footer-subscribe-btn:hover {
    opacity: 0.9;
}

.footer-copyright {
    border-top: 1px solid #374151;
    background: #0f172a;
}

.footer-copyright-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-copyright-text {
    color: #9ca3af;
    font-size: 0.875rem;
    margin: 0;
}

.footer-copyright-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.footer-copyright-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-copyright-links a:hover {
    color: var(--white);
}

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-600);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 50;
    opacity: 0;
    pointer-events: none;
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-to-top:hover {
    background: #eff6ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 968px) {
    .theme-card {
        gap: 2rem;
    }

    .theme-screenshot {
        max-width: 300px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-actions {
        justify-content: center;
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .carousel-btn-prev {
        left: 0;
    }

    .carousel-btn-next {
        right: 0;
    }

    .main-nav {
        display: none;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-copyright-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .theme-screenshot {
        max-width: 250px;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

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

    .footer-copyright-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-copyright-links {
        flex-direction: column;
        gap: 0.75rem;
    }

    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 2.5rem;
        height: 2.5rem;
    }
}
