/* ===========================
   TABLET (max-width: 1024px)
   =========================== */
@media (max-width: 1024px) {
    .hero-grid {
        gap: 2.5rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero-document {
        max-width: 320px;
    }

    .step-card {
        padding: 1.5rem 1.25rem;
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-xl);
    }

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

/* ===========================
   MOBILE NAV + LAYOUT (max-width: 768px)
   =========================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: var(--spacing-lg);
        gap: var(--spacing-md);
        box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.1);
    }

    .site-nav.open {
        display: flex;
    }

    .site-nav .btn {
        width: 100%;
    }

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

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        order: 1;
    }

    .hero-visual {
        order: 2;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .hero-document {
        transform: none;
        max-width: 340px;
        margin: 0 auto;
    }

    .hero-document:hover {
        transform: none;
    }

    .hero-stats {
        gap: 1.5rem;
        margin-top: 2.5rem;
        padding-top: 2rem;
        flex-wrap: wrap;
    }

    .hero-stat-number {
        font-size: 1.25rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }

    .steps-grid {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

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

    .step-connector {
        padding-top: 0;
        transform: rotate(90deg);
    }

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

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }

    .pricing-card-popular {
        transform: none;
        order: -1;
    }

    .pricing-card-popular:hover {
        transform: translateY(-4px);
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }

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

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

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

    .step-label {
        display: none;
    }

    .step-num {
        width: 30px;
        height: 30px;
    }

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

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

    .download-cards {
        grid-template-columns: 1fr;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-md);
    }

    .dashboard-account .form-row {
        grid-template-columns: 1fr;
    }

    .actions-cell {
        flex-direction: column;
    }

    .auth-container {
        padding: var(--spacing-md);
    }

    .auth-card {
        padding: var(--spacing-lg);
    }

    .form-navigation {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }

    #saveDraftBtn {
        margin-left: 0;
        width: 100%;
        order: 3;
    }

    .preview-document .preview-info-grid {
        grid-template-columns: 1fr;
    }

    .preview-document .preview-signatures {
        grid-template-columns: 1fr;
    }

    .error-code {
        font-size: 5rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .result-card {
        padding: var(--spacing-xl);
    }

    .result-actions {
        flex-direction: column;
    }

    .section-title {
        font-size: 1.625rem;
    }

    .section-subtitle {
        font-size: 0.9375rem;
        margin-bottom: 2rem;
    }

    .cta-section h2 {
        font-size: 1.625rem;
    }

    .cta-section p {
        font-size: 0.9375rem;
    }
}

/* ===========================
   SMALL MOBILE (max-width: 480px)
   =========================== */
@media (max-width: 480px) {
    .hero {
        padding: 2rem 0 1.5rem;
    }

    .hero h1 {
        font-size: 1.625rem;
    }

    .hero-subtitle {
        font-size: 0.9375rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-badges {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .hero-stat-divider {
        width: 60px;
        height: 1px;
    }

    .hero-document {
        max-width: 100%;
    }

    .hero-doc-grid {
        grid-template-columns: 1fr;
    }

    .step-connector {
        display: none;
    }

    .section-title {
        font-size: 1.375rem;
    }

    .pricing-card {
        padding: 1.5rem;
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.875rem;
    }

    .faq-answer p {
        padding: 0 1rem 1rem;
    }

    .radio-group {
        flex-direction: column;
    }
}
