/* ==========================================================================
   WHITE BELT / AWREAi - Responsive Styles
   ========================================================================== */

/* --------------------------------------------------------------------------
   Tablet Breakpoint (max-width: 1024px)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    :root {
        --text-6xl: 3rem;
        --text-5xl: 2.5rem;
        --text-4xl: 2rem;
    }

    .container {
        padding: 0 var(--space-5);
    }

    .section {
        padding: var(--space-16) 0;
    }

    /* Navigation */
    .nav-menu {
        gap: var(--space-5);
    }

    /* Hero */
    .hero-content {
        max-width: 900px;
        width: 95%;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-subtitle {
        font-size: var(--text-xl);
        max-width: 700px;
    }

    /* Comparison Grid */
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .comparison-divider {
        display: none;
    }

    .comparison-card {
        max-width: 500px;
        margin: 0 auto;
    }

    /* Tech Grid */
    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Architecture */
    .arch-pipelines {
        gap: var(--space-8);
    }

    /* Audio Grid */
    .audio-grid {
        gap: var(--space-5);
    }

    /* Pie Chart - Tablet */
    .pie-chart {
        width: 480px;
        height: 480px;
    }

    .slice-text {
        font-size: 10px;
    }

    .sub-slice-text {
        font-size: 13px;
    }

    .pie-description {
        max-width: 480px;
    }

    .center-orb {
        width: 70px;
        height: 70px;
    }

    /* Hero Radial - Tablet (10% smaller) */
    .pie-chart-hero {
        width: 580px;
        height: 580px;
    }

    .pie-chart-hero .pie-center {
        width: 145px;
        height: 145px;
    }

    .pie-chart-hero .center-orb {
        width: 95px;
        height: 95px;
    }

    .pie-chart-hero .slice-text {
        font-size: 12px;
    }

    /* Use Cases */
    .use-cases-grid {
        gap: var(--space-6);
    }

    /* Contact */
    .contact-content {
        gap: var(--space-10);
    }
}

/* --------------------------------------------------------------------------
   Mobile Breakpoint (max-width: 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    :root {
        --text-6xl: 2.5rem;
        --text-5xl: 2rem;
        --text-4xl: 1.75rem;
        --text-3xl: 1.5rem;
        --text-2xl: 1.25rem;
        --nav-height: 70px;
    }

    /* Navigation - Mobile Menu */
    .nav-toggle {
        display: block;
        z-index: 1001;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-light);
        flex-direction: column;
        align-items: flex-start;
        padding: calc(var(--nav-height) + var(--space-8)) var(--space-6) var(--space-8);
        gap: var(--space-4);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        z-index: 1000;
    }

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

    .nav-link {
        font-size: var(--text-lg);
        width: 100%;
        padding: var(--space-3) 0;
        border-bottom: 1px solid var(--secondary-dark);
    }

    .nav-link::after {
        display: none;
    }

    .nav-cta {
        margin-top: var(--space-4);
        width: 100%;
        text-align: center;
    }

    /* Hamburger animation when active */
    .nav-toggle.active .hamburger {
        background: transparent;
    }

    .nav-toggle.active .hamburger::before {
        top: 0;
        transform: rotate(45deg);
    }

    .nav-toggle.active .hamburger::after {
        top: 0;
        transform: rotate(-45deg);
    }

    /* Overlay */
    .nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
        z-index: 999;
    }

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

    /* Hero */
    .hero {
        min-height: calc(100vh - var(--nav-height));
    }

    .hero-content {
        padding: var(--space-6);
    }

    .hero-title {
        font-size: var(--text-4xl);
    }

    .hero-subtitle {
        font-size: var(--text-base);
    }

    .hero-cta {
        flex-direction: column;
        gap: var(--space-3);
    }

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

    .scroll-indicator {
        display: none;
    }

    /* Sections */
    .section {
        padding: var(--space-12) 0;
    }

    .section-header {
        margin-bottom: var(--space-10);
    }

    .section-subtitle {
        font-size: var(--text-base);
    }

    /* Comparison */
    .comparison-card {
        padding: var(--space-6);
    }

    /* Tech Grid */
    .tech-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .tech-card {
        padding: var(--space-6);
    }

    /* Architecture */
    .arch-diagram {
        gap: var(--space-4);
    }

    .arch-node {
        padding: var(--space-4) var(--space-5);
        min-width: 150px;
    }

    .arch-label {
        font-size: var(--text-sm);
    }

    .arch-sublabel {
        font-size: var(--text-xs);
    }

    .arch-pipelines {
        flex-direction: column;
        gap: var(--space-4);
    }

    .arch-split,
    .arch-merge {
        display: none;
    }

    /* Audio Grid */
    .audio-grid {
        grid-template-columns: 1fr;
        gap: var(--space-5);
    }

    .audio-card {
        padding: var(--space-6);
    }

    .audio-icon {
        width: 40px;
        height: 40px;
    }

    /* Pie Chart - Mobile */
    .pie-container {
        gap: var(--space-6);
    }

    .pie-chart {
        width: 320px;
        height: 320px;
    }

    .pie-center {
        width: 80px;
        height: 80px;
    }

    .center-orb {
        width: 50px;
        height: 50px;
    }

    .orb-icon {
        font-size: 14px;
    }

    .slice-text {
        font-size: 7px;
        letter-spacing: 0.1em;
    }

    .sub-slice-text {
        font-size: 10px;
    }

    .pie-description {
        min-height: 100px;
    }

    .desc-content h4 {
        font-size: var(--text-lg);
    }

    .desc-content p {
        font-size: var(--text-sm);
    }

    /* Hero Radial - Mobile */
    .pie-chart-hero {
        width: 380px;
        height: 380px;
    }

    .pie-chart-hero .pie-center {
        width: 100px;
        height: 100px;
    }

    .pie-chart-hero .center-orb {
        width: 65px;
        height: 65px;
    }

    .pie-chart-hero .orb-icon {
        font-size: 18px;
    }

    .pie-chart-hero .slice-text {
        font-size: 9px;
        letter-spacing: 0.1em;
    }

    .pie-chart-hero .sub-slice-text {
        font-size: 12px;
    }

    .hero-radial-close {
        top: calc(var(--nav-height) + var(--space-2));
        right: var(--space-4);
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .pie-description-hero .desc-content h4 {
        font-size: var(--text-xl);
    }

    .pie-description-hero .desc-content p {
        font-size: var(--text-base);
    }

    /* Patent Overlay - Mobile */
    .hero-patent-close {
        top: calc(var(--nav-height) + var(--space-2));
        right: var(--space-4);
        width: 44px;
        height: 44px;
        font-size: 24px;
    }

    .patent-content {
        margin: var(--space-4);
        padding: var(--space-8);
        max-width: 100%;
    }

    .patent-header h3 {
        font-size: var(--text-2xl);
    }

    .patent-description {
        font-size: var(--text-sm);
    }

    .highlight-item {
        font-size: var(--text-xs);
    }

    /* Use Cases */
    .use-cases-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .use-case-card {
        padding: var(--space-6);
    }

    .use-case-icon {
        width: 48px;
        height: 48px;
    }

    /* About */
    .about-philosophy {
        padding: var(--space-6);
    }

    .about-patent {
        flex-direction: column;
        gap: var(--space-2);
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-8);
    }

    .contact .section-title {
        text-align: center;
    }

    .contact-description {
        text-align: center;
    }

    .contact-details {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--space-6);
        text-align: center;
    }

    .contact-form {
        padding: var(--space-6);
    }

    /* Footer */
    .footer {
        padding: var(--space-10) 0;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-4);
    }
}

/* --------------------------------------------------------------------------
   Small Mobile Breakpoint (max-width: 480px)
   -------------------------------------------------------------------------- */
@media (max-width: 480px) {
    :root {
        --text-6xl: 2rem;
        --text-5xl: 1.75rem;
        --text-4xl: 1.5rem;
        --text-3xl: 1.25rem;
    }

    .container {
        padding: 0 var(--space-4);
    }

    /* Hero */
    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-subtitle {
        font-size: var(--text-sm);
    }

    .badge {
        font-size: 10px;
        padding: var(--space-1) var(--space-3);
    }

    /* Cards */
    .comparison-card,
    .tech-card,
    .audio-card,
    .use-case-card {
        padding: var(--space-5);
    }

    /* Comparison */
    .comparison-list li {
        font-size: var(--text-sm);
    }

    /* Architecture */
    .arch-node {
        padding: var(--space-3) var(--space-4);
        min-width: 120px;
    }

    /* Audio */
    .audio-title {
        font-size: var(--text-base);
    }

    .audio-description {
        font-size: var(--text-xs);
    }

    .audio-btn {
        padding: var(--space-2) var(--space-4);
        font-size: var(--text-xs);
    }

    /* Pie Chart - Small Mobile */
    .pie-chart {
        width: 280px;
        height: 280px;
    }

    .pie-center {
        width: 65px;
        height: 65px;
    }

    .center-orb {
        width: 45px;
        height: 45px;
    }

    .orb-icon {
        font-size: 12px;
    }

    .slice-text {
        font-size: 6px;
        letter-spacing: 0.08em;
    }

    .sub-slice-text {
        font-size: 9px;
    }

    .pie-description {
        min-height: 90px;
    }

    .desc-content h4 {
        font-size: var(--text-base);
    }

    .desc-content p {
        font-size: var(--text-xs);
    }

    /* About */
    .about-description {
        font-size: var(--text-base);
    }

    .about-philosophy h3 {
        font-size: var(--text-lg);
    }

    .about-philosophy p {
        font-size: var(--text-sm);
    }

    /* Contact */
    .contact-form {
        padding: var(--space-5);
    }

    .form-input {
        padding: var(--space-2) var(--space-3);
        font-size: var(--text-sm);
    }

    /* Footer */
    .footer-brand .logo-text {
        font-size: var(--text-xl);
    }

    .footer-links {
        gap: var(--space-3);
    }

    .footer-links a {
        font-size: var(--text-xs);
    }
}

/* --------------------------------------------------------------------------
   Large Desktop (min-width: 1400px)
   -------------------------------------------------------------------------- */
@media (min-width: 1400px) {
    :root {
        --container-max: 1320px;
        --text-7xl: 5.5rem;
        --text-6xl: 4.5rem;
    }

    .hero-content {
        max-width: 1800px;
    }

    .hero-title {
        font-size: var(--text-7xl);
    }

    .hero-subtitle {
        font-size: var(--text-3xl);
        max-width: 1200px;
    }

    /* Pie Chart - Large Desktop */
    .pie-chart {
        width: 650px;
        height: 650px;
    }

    .slice-text {
        font-size: 13px;
    }

    .sub-slice-text {
        font-size: 16px;
    }

    .center-orb {
        width: 100px;
        height: 100px;
    }

    .orb-icon {
        font-size: 26px;
    }

    /* Hero Radial - Large Desktop (10% smaller) */
    .pie-chart-hero {
        width: 765px;
        height: 765px;
    }

    .pie-chart-hero .pie-center {
        width: 180px;
        height: 180px;
    }

    .pie-chart-hero .center-orb {
        width: 126px;
        height: 126px;
    }

    .pie-chart-hero .orb-icon {
        font-size: 29px;
    }

    .pie-chart-hero .slice-text {
        font-size: 15px;
    }

    .pie-chart-hero .sub-slice-text {
        font-size: 20px;
    }
}

/* --------------------------------------------------------------------------
   High DPI / Retina Display Adjustments
   -------------------------------------------------------------------------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders and shadows on high-DPI displays */
    .btn,
    .nav-cta,
    .comparison-card,
    .tech-card,
    .audio-card,
    .form-input {
        border-width: 0.5px;
    }
}

/* --------------------------------------------------------------------------
   Landscape Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: var(--space-16) 0;
    }

    .hero-content {
        padding: var(--space-4);
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .scroll-indicator {
        display: none;
    }
}

/* --------------------------------------------------------------------------
   Touch Device Optimizations
   -------------------------------------------------------------------------- */
@media (hover: none) and (pointer: coarse) {
    /* Remove hover effects on touch devices */
    .btn:hover {
        transform: none;
    }

    .tech-card:hover,
    .audio-card:hover,
    .use-case-card:hover {
        transform: none;
    }

    .nav-link::after {
        display: none;
    }

    /* Increase tap targets */
    .nav-link {
        padding: var(--space-3) var(--space-2);
    }

    .audio-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .form-input {
        min-height: 44px;
    }

    /* Pie Chart - Touch Devices */
    .slice-group:hover {
        transform: none;
    }

    .slice-group:active {
        transform: scale(0.98);
    }

    .sub-slice-path:hover {
        filter: none;
    }

    .center-orb:hover {
        transform: translate(-50%, -50%) scale(1);
    }

    .center-orb:active {
        transform: translate(-50%, -50%) scale(0.95);
    }
}

/* --------------------------------------------------------------------------
   Reduced Motion Support
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    /* Pie Chart - Disable animations */
    .center-pulse {
        animation: none;
        opacity: 0.5;
    }

    .slice-group {
        transition: none;
    }

    .slice-path,
    .sub-slice-path {
        transition: fill 0.2s ease, stroke 0.2s ease;
    }

    .pie-chart.playing .center-orb {
        animation: none;
        box-shadow: 0 0 50px rgba(114, 47, 55, 0.7);
    }

    .pie-chart.playing .center-pulse {
        animation: none;
    }

    .sub-slice-path.playing {
        animation: none;
        filter: drop-shadow(0 0 10px rgba(114, 47, 55, 0.6));
    }
}

/* --------------------------------------------------------------------------
   Print Styles
   -------------------------------------------------------------------------- */
@media print {
    .nav,
    .hero-background,
    .scroll-indicator,
    .audio-waveform,
    .contact-form,
    .pie-container,
    .footer {
        display: none !important;
    }

    body {
        color: black;
        background: white;
    }

    .hero {
        min-height: auto;
        padding: var(--space-8) 0;
    }

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

    .section {
        padding: var(--space-8) 0;
        page-break-inside: avoid;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
    }
}
