/* ===== CLIPIFY — RESPONSIVE DESIGN ===== */
/* Mobile-first adaptive system */

/* === Desktop Large (1400px+) === */
@media (min-width: 1400px) {
    :root {
        --container-max: 1200px;
    }
}

/* === Standard Desktop (1200px and below) === */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

/* === Tablet (1024px and below) === */
@media (max-width: 1024px) {
    :root {
        --section-pad: 100px;
        --card-pad: 28px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

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

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

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

    .pricing-card--featured {
        transform: scale(1);
    }

    .testimonials-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .testimonials-grid .testimonial-card:nth-child(3) {
        grid-column: span 2;
        max-width: 480px;
        margin: 0 auto;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .ps-content {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ps-divider {
        width: 80px;
        height: 1px;
    }
}

/* === Tablet Portrait (768px and below) === */
@media (max-width: 768px) {
    :root {
        --section-pad: 80px;
        --card-pad: 24px;
    }

    .container {
        padding: 0 20px;
    }

    /* Navigation */
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.96);
        backdrop-filter: blur(40px);
        -webkit-backdrop-filter: blur(40px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        z-index: 999;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 18px 24px;
        font-size: 20px;
        font-weight: 500;
        color: var(--white) !important;
        border-bottom: 1px solid var(--black-border);
    }

    .nav-links a:hover::after {
        display: none;
    }

    .btn-nav {
        margin-top: 16px;
        display: inline-block !important;
        font-size: 16px !important;
        padding: 14px 32px;
    }

    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }

    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Hero */
    .hero {
        padding: 120px 0 80px;
        min-height: auto;
    }

    .hero-title {
        font-size: clamp(40px, 10vw, 64px);
    }

    .hero-subtitle {
        font-size: 17px;
        margin-bottom: 36px;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
        margin-bottom: 56px;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    .hero-metrics {
        flex-direction: column;
        gap: 28px;
    }

    .metric {
        padding: 0;
    }

    .metric-divider {
        width: 48px;
        height: 1px;
    }

    .hero-scroll-indicator {
        display: none;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section-header {
        margin-bottom: 48px;
    }

    /* Steps */
    .step-card {
        gap: 20px;
        padding: 28px 0;
    }

    .step-number {
        width: 56px;
        font-size: 13px;
    }

    .timeline-line {
        left: 28px;
    }

    .step-title {
        font-size: 19px;
    }

    /* Portfolio */
    .portfolio-item {
        flex: 0 0 260px;
    }

    .portfolio-grid {
        padding: 16px 40px;
    }

    /* Testimonials */
    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .testimonials-grid .testimonial-card:nth-child(3) {
        grid-column: span 1;
        max-width: none;
    }

    /* Contact */
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 32px 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* === Mobile (480px and below) === */
@media (max-width: 480px) {
    :root {
        --section-pad: 64px;
        --card-pad: 20px;
    }

    .container {
        padding: 0 16px;
    }

    /* Typography */
    .section-title {
        font-size: 32px;
    }

    .section-subtitle {
        font-size: 16px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 5px 14px;
    }

    /* Metrics */
    .metric-value {
        font-size: 28px;
    }

    .metric-label {
        font-size: 11px;
    }

    /* Buttons */
    .btn {
        padding: 11px 22px;
        font-size: 14px;
    }

    .btn-large {
        padding: 13px 26px;
        font-size: 15px;
    }

    /* Services */
    .service-title {
        font-size: 18px;
    }

    .service-description {
        font-size: 13px;
    }

    .price-value {
        font-size: 30px;
    }

    /* Steps */
    .step-card {
        gap: 16px;
    }

    .step-number {
        width: 48px;
        font-size: 12px;
    }

    .timeline-line {
        left: 24px;
    }

    .step-title {
        font-size: 17px;
    }

    .step-description {
        font-size: 14px;
    }

    /* Portfolio */
    .portfolio-item {
        flex: 0 0 240px;
    }

    .portfolio-grid {
        padding: 12px 32px;
        gap: 14px;
    }

    .scroll-arrow {
        width: 36px;
        height: 36px;
    }

    .play-btn {
        width: 44px;
        height: 44px;
    }

    .play-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Contact */
    .contact-form {
        padding: 24px 20px;
        border-radius: var(--radius-lg);
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }

    /* Testimonials */
    .testimonial-text {
        font-size: 14px;
    }

    .author-avatar {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    /* Footer */
    .footer-links {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-legal {
        flex-direction: column;
        gap: 12px;
    }
}

/* === Small Mobile (360px and below) === */
@media (max-width: 360px) {
    .hero-title {
        font-size: 30px;
    }

    .section-title {
        font-size: 28px;
    }

    .portfolio-item {
        flex: 0 0 220px;
    }
}

/* Landscape Mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 80px 0 40px;
    }

    .hero-metrics {
        flex-direction: row;
    }

    .metric-divider {
        width: 1px;
        height: 48px;
    }
}

/* Print */
@media print {
    .navbar,
    .hero-cta,
    .contact-form,
    .footer,
    .cursor-glow,
    .hero-bg-grid,
    .hero-glow,
    .hero-scroll-indicator,
    .scroll-arrow {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section-title,
    .hero-title {
        color: black;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    :root {
        --white-secondary: #e5e5e7;
        --white-tertiary: #b0b0b5;
        --black-border: rgba(255, 255, 255, 0.2);
    }
}