/**
 * Ryft Landing Page - Responsive Styles
 * ======================================
 * Media queries and responsive adjustments
 */

/* ==========================================
   LARGE DESKTOP (1440px+)
   ========================================== */

@media (min-width: 1440px) {
    :root {
        --container-max-width: 1400px;
    }

    .hero__title {
        font-size: var(--font-size-7xl);
    }
}

/* ==========================================
   DESKTOP (1024px - 1279px)
   ========================================== */

@media (max-width: 1279px) {
    .hero__content {
        max-width: 100%;
    }

    .about__content {
        grid-template-columns: 1fr;
        gap: var(--spacing-12);
    }

    .about__image {
        order: -1;
    }
}

/* ==========================================
   TABLET (768px - 1023px)
   ========================================== */

@media (max-width: 1023px) {
    .section {
        padding: var(--spacing-20) 0;
    }

    /* Hero Section */
    .hero {
        text-align: center;
        padding-top: calc(var(--header-height) + var(--spacing-16));
    }

    .hero__content {
        align-items: center;
    }

    .hero__buttons {
        justify-content: center;
    }

    /* Services Grid */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-6);
    }

    /* Portfolio Grid */
    .portfolio__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Stats Grid */
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* CTA Section */
    .cta__content {
        text-align: center;
    }

    .cta__buttons {
        justify-content: center;
    }
}

/* ==========================================
   MOBILE (481px - 767px)
   ========================================== */

@media (max-width: 767px) {
    .section {
        padding: var(--spacing-16) 0;
    }

    .section-header {
        margin-bottom: var(--spacing-12);
    }

    .section-header__title {
        font-size: var(--font-size-3xl);
    }

    .section-header__description {
        font-size: var(--font-size-base);
    }

    /* Hero Section */
    .hero {
        min-height: calc(100vh - var(--header-height));
        padding-bottom: var(--spacing-16);
    }

    .hero__title {
        font-size: var(--font-size-4xl);
    }

    .hero__subtitle {
        font-size: var(--font-size-base);
    }

    .hero__buttons {
        flex-direction: column;
        width: 100%;
        gap: var(--spacing-3);
    }

    .hero__buttons .btn {
        width: 100%;
    }

    /* Services Grid */
    .services__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }

    /* Portfolio Grid */
    .portfolio__grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-4);
    }

    /* Stats Grid */
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-4);
    }

    .stat-card__value {
        font-size: var(--font-size-3xl);
    }

    /* Testimonials */
    .testimonial-card {
        padding: var(--spacing-6);
    }

    .testimonial-card__quote {
        font-size: var(--font-size-base);
    }

    /* About Section */
    .about__text {
        font-size: var(--font-size-base);
    }

    /* CTA Section */
    .cta {
        padding: var(--spacing-16) 0;
    }

    .cta__title {
        font-size: var(--font-size-3xl);
    }

    .cta__buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta__buttons .btn {
        width: 100%;
    }

    /* Cards */
    .card {
        padding: var(--spacing-6);
    }

    .card__icon {
        width: 56px;
        height: 56px;
        margin-bottom: var(--spacing-4);
    }

    /* Buttons */
    .btn--large {
        padding: var(--spacing-3) var(--spacing-6);
        font-size: var(--font-size-base);
    }
}

/* ==========================================
   SMALL MOBILE (480px and below)
   ========================================== */

@media (max-width: 480px) {
    :root {
        --container-padding: var(--spacing-4);
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .hero__badge {
        font-size: var(--font-size-xs);
        padding: var(--spacing-1) var(--spacing-3);
    }

    /* Stats Grid - Stack on smallest screens */
    .stats__grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-3);
    }

    .stat-card {
        padding: var(--spacing-4);
    }

    .stat-card__value {
        font-size: var(--font-size-2xl);
    }

    .stat-card__label {
        font-size: var(--font-size-xs);
    }

    /* Portfolio Card */
    .portfolio-card {
        aspect-ratio: 3/2;
    }

    /* Footer */
    .footer {
        padding: var(--spacing-12) 0 var(--spacing-6);
    }

    .footer__grid {
        gap: var(--spacing-8);
    }

    /* Slider Controls */
    .slider__controls {
        flex-wrap: wrap;
    }

    .slider__btn {
        width: 40px;
        height: 40px;
    }
}

/* ==========================================
   HEIGHT-BASED ADJUSTMENTS
   ========================================== */

@media (max-height: 700px) {
    .hero {
        min-height: auto;
        padding-top: calc(var(--header-height) + var(--spacing-8));
        padding-bottom: var(--spacing-8);
    }

    .scroll-indicator {
        display: none;
    }
}

/* ==========================================
   LANDSCAPE MOBILE
   ========================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + var(--spacing-6)) 0 var(--spacing-6);
    }

    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .hero__subtitle {
        display: none;
    }

    .section--full {
        min-height: auto;
    }
}

/* ==========================================
   PRINT STYLES
   ========================================== */

@media print {

    .header,
    .mobile-menu,
    .scroll-indicator,
    .slider__controls,
    .btn--primary,
    .btn--secondary {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        color: black;
    }

    .card {
        border: 1px solid #ddd;
        break-inside: avoid;
    }
}

/* ==========================================
   TOUCH DEVICE OPTIMIZATIONS
   ========================================== */

@media (hover: none) {

    /* Disable hover effects on touch devices */
    .card:hover,
    .portfolio-card:hover .portfolio-card__image,
    .btn:hover {
        transform: none;
    }

    /* Show overlay by default on portfolio cards */
    .portfolio-card__overlay {
        opacity: 1;
        background: linear-gradient(180deg, transparent 30%, rgba(10, 10, 15, 0.9) 100%);
    }

    /* Increase tap targets */
    .nav__link,
    .footer__link {
        padding: var(--spacing-2) 0;
    }

    .btn {
        min-height: 48px;
    }
}

/* ==========================================
   HIGH CONTRAST MODE
   ========================================== */

@media (prefers-contrast: high) {
    :root {
        --color-border-primary: rgba(255, 255, 255, 0.3);
        --color-border-secondary: rgba(255, 255, 255, 0.5);
        --color-text-secondary: #d4d4d8;
        --color-text-tertiary: #a1a1aa;
    }

    .card,
    .testimonial-card,
    .btn--secondary {
        border-width: 2px;
    }
}