/* ========================================
   Landing Page Styles
   Clean, minimal design inspired by studiowebux.com and minimaldoc.com
   ======================================== */

/* ========================================
   Layout & Container
   ======================================== */

.landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.landing-main {
    flex: 1;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ========================================
   Header
   ======================================== */

.landing-header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-primary);
    z-index: 100;
}

.landing-header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.landing-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
}

.landing-logo:hover {
    color: var(--link-color);
}

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

.landing-nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease;
}

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

.landing-nav a.active {
    color: var(--text-primary);
    font-weight: 600;
}

/* Mobile menu toggle for landing */
.landing-menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-primary);
    border-radius: 4px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.landing-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--text-primary);
    position: relative;
}

.landing-menu-toggle span::before,
.landing-menu-toggle span::after {
    content: '';
    display: block;
    width: 18px;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    left: 0;
    transition: transform 0.2s ease;
}

.landing-menu-toggle span::before {
    top: -6px;
}

.landing-menu-toggle span::after {
    top: 6px;
}

.landing-menu-toggle.open span {
    background-color: transparent;
}

.landing-menu-toggle.open span::before {
    transform: rotate(45deg);
    top: 0;
}

.landing-menu-toggle.open span::after {
    transform: rotate(-45deg);
    top: 0;
}

/* ========================================
   Hero Section
   ======================================== */

.hero-section {
    padding: 6rem 0 4rem;
    text-align: center;
}

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

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.hero-btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.hero-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.hero-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.hero-btn-secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

.hero-image {
    margin-top: 3rem;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

/* ========================================
   Section Styles
   ======================================== */

.section-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* ========================================
   Features Section
   ======================================== */

.features-section {
    padding: 4rem 0;
}

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

.feature-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-secondary);
    transform: translateY(-2px);
}

.feature-icon,
.feature-emoji {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.feature-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ========================================
   Steps Section
   ======================================== */

.steps-section {
    padding: 4rem 0;
}

.steps-list {
    max-width: 700px;
    margin: 2rem auto 0;
}

.step-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.step-number {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.step-content {
    flex: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.step-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}

.step-code {
    background: var(--bg-code);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    overflow-x: auto;
    font-family: "Consolas", "Monaco", "Courier New", monospace;
    font-size: 0.875rem;
    max-width: 100%;
    box-sizing: border-box;
    line-height: 1.5;
    margin: 0;
}

.step-code code {
    color: var(--text-primary);
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* ========================================
   Links Section
   ======================================== */

.links-section {
    padding: 4rem 0;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.link-card {
    display: block;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.link-card:hover {
    border-color: var(--link-color);
    transform: translateY(-2px);
}

.link-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.link-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.link-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   Testimonials Section
   ======================================== */

.testimonials-section {
    padding: 4rem 0;
}

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

.testimonial-card {
    padding: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
}

.testimonial-quote {
    font-size: 1.125rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin: 0 0 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-info {
    display: flex;
    flex-direction: column;
}

.testimonial-name {
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    padding: 4rem 0;
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
}

.cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.cta-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cta-btn-primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

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

.cta-btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-secondary);
}

.cta-btn-secondary:hover {
    border-color: var(--text-primary);
}

/* ========================================
   Open Source Section
   ======================================== */

.opensource-section {
    padding: 4rem 0;
    text-align: center;
}

.opensource-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.opensource-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 6px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.opensource-link:hover {
    border-color: var(--link-color);
    color: var(--link-color);
}

/* ========================================
   Footer
   ======================================== */

.landing-footer {
    margin-top: auto;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    padding: 3rem 0 2rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

.footer-group-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

.footer-group-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-group-list a:hover {
    color: var(--text-primary);
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-copyright {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin: 0;
}

.footer-badges {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1rem;
}

.footer-badge {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-badge:hover {
    color: var(--text-secondary);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .landing-header-content {
        padding: 0.75rem 1rem;
    }

    .landing-menu-toggle {
        display: flex;
    }

    .landing-nav {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        border-left: 1px solid var(--border-primary);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 4rem 1rem 1rem;
        z-index: 200;
        transition: right 0.3s ease;
        box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
    }

    .landing-nav.open {
        right: 0;
    }

    .landing-nav a {
        display: block;
        padding: 0.875rem 1rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-primary);
    }

    .landing-nav .theme-toggle {
        margin-top: 1rem;
        align-self: flex-start;
        margin-left: 1rem;
    }

    .landing-nav-backdrop {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 199;
    }

    .landing-nav-backdrop.open {
        display: block;
    }

    .hero-section {
        padding: 3rem 0 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
    }

    .features-section,
    .steps-section,
    .links-section,
    .testimonials-section,
    .cta-section,
    .opensource-section {
        padding: 2.5rem 0;
    }

    .step-item {
        flex-direction: column;
        gap: 0.75rem;
    }

    .step-number {
        width: 2rem;
        height: 2rem;
        font-size: 0.875rem;
    }

    .step-content {
        width: 100%;
    }

    .step-code {
        font-size: 0.8rem;
        padding: 0.625rem 0.75rem;
    }

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

@media (max-width: 480px) {
    .landing-main {
        padding: 0 1rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .step-code {
        font-size: 0.75rem;
    }
}

/* ========================================
   Section Backgrounds
   ======================================== */

.section-with-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.section-with-bg > * {
    position: relative;
    z-index: 1;
}

.section-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

/* ========================================
   Image-Text Section
   ======================================== */

.image-text-section {
    padding: 4rem 0;
}

.image-text-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.image-text-container.image-left {
    direction: rtl;
}

.image-text-container.image-left > * {
    direction: ltr;
}

.image-text-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.image-text-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.image-text-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.image-text-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.image-text-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.image-text-item-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2rem;
    text-align: center;
}

.image-text-item-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.25rem;
}

.image-text-item-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.image-text-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.image-text-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-text-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    .image-text-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .image-text-container.image-left {
        direction: ltr;
    }

    .image-text-image {
        order: -1;
    }
}

/* ========================================
   Text Section
   ======================================== */

.text-section {
    padding: 4rem 0;
}

.text-section-content {
    max-width: 800px;
    margin: 0 auto;
}

.text-section-content.align-left {
    text-align: left;
}

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

.text-section-content.align-right {
    text-align: right;
}

.text-section-title {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 1rem;
}

.text-section-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin: 0 0 1.5rem;
}

.text-section-body {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.text-section-body p {
    margin: 0 0 1rem;
}

.text-section-body p:last-child {
    margin-bottom: 0;
}

.text-section-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    justify-content: inherit;
}

/* ========================================
   Links Grid Section
   ======================================== */

.links-grid-section {
    padding: 4rem 0;
}

.links-grid-header {
    text-align: center;
    margin-bottom: 2rem;
}

.links-grid-title {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.links-grid-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

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

.links-grid.columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.links-grid.columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.links-grid-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.links-grid-card:hover {
    border-color: var(--link-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.links-grid-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.links-grid-card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.5rem;
}

.links-grid-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    flex: 1;
}

.links-grid-card-external {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
}

@media (max-width: 1024px) {
    .links-grid,
    .links-grid.columns-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .links-grid,
    .links-grid.columns-2,
    .links-grid.columns-3,
    .links-grid.columns-4 {
        grid-template-columns: 1fr;
    }
}
