/* ============================================
   MAINE HAUS CATTERY - RESPONSIVE STYLES
   Mobile-First Responsive Design
   ============================================ */

/* ========== TABLET (max-width: 1024px) ========== */
@media (max-width: 1024px) {
    :root {
        --spacing-xl: 4rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    /* Welcome Section */
    .welcome-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .welcome-text {
        padding-right: 0;
    }

    /* Breed Teaser */
    .breed-teaser-content {
        grid-template-columns: 1fr;
    }

    .breed-teaser-image {
        order: -1;
    }

    /* Cats Grid */
    .cats-grid {
        grid-template-columns: 1fr;
    }
}

/* ========== NAV TIGHTENING (769px–1024px) ==========
   Between the desktop layout and the 768px hamburger the full menu
   wraps to two lines; tighten it so it stays on one line. */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 0.75rem;
    }

    .nav-menu a {
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }

    .logo {
        gap: var(--spacing-xs);
    }

    .logo-disc {
        width: 40px;
        height: 40px;
    }

    .logo-img {
        height: 26px;
    }

    .logo-text {
        font-size: 1.125rem;
        letter-spacing: 1px;
    }
}

/* ========== MOBILE (max-width: 768px) ========== */
@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
        --spacing-xl: 3rem;
    }

    /* Navigation */
    .nav-wrapper {
        padding: 0.75rem 0;
    }

    .logo-disc {
        width: 40px;
        height: 40px;
    }

    .logo-img {
        height: 26px;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .nav-menu {
        position: fixed;
        top: 64px; /* mobile nav is 64px tall: 40px logo + 0.75rem padding x2 */
        left: -100%;
        width: 100%;
        height: calc(100vh - 64px);
        background-color: var(--color-white);
        flex-direction: column;
        justify-content: flex-start;
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
        box-shadow: var(--shadow-medium);
        transition: left var(--transition-normal);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu a {
        font-size: 1rem;
        padding: var(--spacing-sm);
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--color-gray-lightest);
    }

    .nav-menu a::after {
        display: none;
    }

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

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

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

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

    /* Hero Section — nav overlays the photo, so no top margin */
    .hero {
        min-height: 500px;
    }

    /* The stacked CTAs leave no room for the scroll cue on small screens */
    .hero .scroll-indicator {
        display: none;
    }

    .hero-content {
        padding-bottom: 4rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    /* Buttons */
    .btn {
        padding: 0.875rem 2rem;
        font-size: 0.8125rem;
    }

    .btn-primary-large {
        padding: 1rem 2rem;
        font-size: 0.9375rem;
    }

    /* Section Headers */
    .section-header {
        margin-bottom: var(--spacing-md);
    }

    /* Highlights Grid */
    .highlights-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    /* Image Placeholders */
    .image-placeholder {
        min-height: 300px;
    }

    /* Cats Grid */
    .cats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .cat-card {
        max-width: 100%;
    }

    .cat-image {
        height: 300px;
    }

    /* Verify Us — same numbered-circle sizing tweak as our-cats.css's
       .verify-list on the equivalent breakpoint */
    .verify-us-list li {
        padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 3.75rem;
    }

    .verify-us-list li::before {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
        left: 0.75rem;
    }

    /* Availability */
    .availability-buttons {
        flex-direction: column;
    }

    .availability-buttons .btn {
        width: 100%;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
        text-align: center;
    }

    .footer-logo {
        margin: 0 auto var(--spacing-sm);
    }

    .footer-links {
        align-items: center;
    }

    .social-links {
        justify-content: center;
    }
}

/* ========== SMALL MOBILE (max-width: 480px) ========== */
@media (max-width: 480px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

    /* Clearance for the fixed scroll-to-top button (50px + 30px inset) so it
       never sits on top of footer text when scrolled to the page bottom */
    .main-footer {
        padding-bottom: calc(var(--spacing-md) + 90px);
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    .lead {
        font-size: 1rem;
    }

    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
        letter-spacing: 2px;
    }

    /* Highlight Cards */
    .highlight-card {
        padding: var(--spacing-sm);
    }

    .highlight-icon svg {
        width: 38px;
        height: 38px;
    }

    .highlight-card h3 {
        font-size: 1.125rem;
    }

    /* Cat Cards */
    .cat-info {
        padding: var(--spacing-sm);
    }

    .cat-info h3 {
        font-size: 1.75rem;
    }

    /* Image Placeholders */
    .image-placeholder {
        min-height: 250px;
        padding: var(--spacing-sm);
    }

    .image-placeholder p {
        font-size: 1rem;
    }

    .image-placeholder span {
        font-size: 0.75rem;
    }

    /* TICA Badge */
    .tica-badge {
        flex-direction: column;
        text-align: center;
        padding: var(--spacing-sm);
    }

    /* Breed Highlights */
    .breed-highlights {
        padding-left: var(--spacing-sm);
    }

    .breed-highlights li {
        font-size: 0.9375rem;
    }
}

/* ========== LANDSCAPE MOBILE (max-height: 500px) ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }

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

    .hero-buttons {
        margin-top: var(--spacing-sm);
    }

    .scroll-indicator {
        display: none;
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .main-nav,
    .mobile-menu-toggle,
    .hero-buttons,
    .scroll-indicator,
    .availability-buttons,
    .section-cta,
    .cta-section,
    .social-links {
        display: none;
    }

    body {
        color: var(--color-black);
        background-color: var(--color-white);
    }

    .hero {
        background: var(--color-white);
        color: var(--color-black);
        page-break-after: always;
    }

    .hero-title,
    .availability-content h2 {
        color: var(--color-black);
    }

    .main-footer {
        background-color: var(--color-white);
        color: var(--color-black);
        border-top: 2px solid var(--color-black);
    }

    a {
        color: var(--color-black);
        text-decoration: underline;
    }
}

/* ========== ACCESSIBILITY ========== */
/* Ensure focus states are visible */
a:focus,
button:focus,
input:focus,
textarea:focus {
    /* gold-dark clears the 3:1 non-text-contrast bar on both white and black
       surfaces; bright gold was ~2.1:1 on white */
    outline: 2px solid var(--color-gold-dark);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .scroll-arrow {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --color-gold: #FFD700;
        --shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.3);
        --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.4);
        --shadow-strong: 0 8px 30px rgba(0, 0, 0, 0.5);
    }

    .btn {
        border-width: 3px;
    }
}
