/* Responsive Design and Media Queries */

/* Tablet and Large Mobile */
@media (max-width: 1024px) {
    .nav-content {
        padding: 0 16px;
    }
    
    .hero-content {
        padding: 40px 16px 30px;
    }
    
    .features-content {
        padding: 0 16px;
    }
    
    .spaces-demo {
        padding: 0 16px;
    }
    
    .cta-content {
        padding: 0 16px;
    }
}

/* Mobile Devices */
@media (max-width: 768px) {
    /* Navigation */
    .nav-content {
        padding: 0 16px;
        height: 44px;
    }
    
    .nav-links {
        gap: 18px;
    }

    .nav-links a {
        font-size: 13px;
    }

    /* Logo already links to sociail.com; redundant nav link hides on narrow screens */
    .nav-links li:has(.nav-link-external) {
        display: none;
    }
    
    .theme-toggle {
        gap: 10px;
    }
    
    /* Hero Section */
    .hero-content {
        padding: 28px 16px 8px;
    }
    
    .coming-soon-badge {
        font-size: 11px;
        padding: 6px 14px;
        margin-bottom: 16px;
        gap: 6px;
        max-width: calc(100vw - 32px);
        white-space: normal;
        text-align: center;
        line-height: 1.3;
    }

    /* Hide the "INTRODUCING — " prefix on narrow screens so the pill
     * keeps the meaningful "Hardware companion for Shared Intelligence"
     * line tight instead of wrapping to 3 lines. */
    .coming-soon-badge .pill-prefix {
        display: none;
    }

    .coming-soon-badge .pill-icon {
        width: 12px;
        height: 12px;
    }
    
    h1 {
        font-size: 36px;
        line-height: 1.1;
        margin-bottom: 4px;
    }

    .hero-tagline {
        font-size: 18px;
        max-width: 18ch;
    }
    
    .hero-subtitle {
        font-size: 20px;
        line-height: 1.3;
        margin-bottom: 30px;
    }
    
    /* Enhanced Device Section for Mobile */
    .device-section {
        min-height: 400px;
        padding: 0 0 24px 0;
    }
    
    .device-preview {
        min-height: 350px;
    }
    
    /* Optimized Device Animation */
    .device-float {
        transform: translate(-50%, -50%) scale(0.75);
        width: 280px;
        height: 110px;
    }
    
    @keyframes float {
        0%, 100% { transform: translate(-50%, -50%) scale(0.75) translateY(0) rotateX(0deg) rotateY(0deg); }
        25% { transform: translate(-50%, -50%) scale(0.75) translateY(-15px) rotateX(3deg) rotateY(10deg); }
        75% { transform: translate(-50%, -50%) scale(0.75) translateY(8px) rotateX(-3deg) rotateY(-10deg); }
    }
    
    /* Hey Sociail Text - Mobile */
    .hey-sociail-text {
        font-size: 24px;
        width: min(84vw, 420px);
        min-height: 2.8em;
    }
    
    /* Concentric Circles - Optimized for Mobile */
    .concentric-circles {
        top: 45%;
        width: 120vw;
        height: 120vw;
        max-width: 800px;
        max-height: 800px;
    }
    
    .circle:nth-child(1) {
        min-width: 150px;
        min-height: 150px;
    }
    
    .circle:nth-child(2) {
        min-width: 200px;
        min-height: 200px;
    }
    
    .circle:nth-child(3) {
        min-width: 250px;
        min-height: 250px;
    }
    
    .circle:nth-child(4) {
        min-width: 300px;
        min-height: 300px;
    }
    
    .circle:nth-child(5) {
        min-width: 350px;
        min-height: 350px;
    }
    
    /* Keep ecosystem devices but make them smaller */
    .ecosystem-device {
        opacity: 0.4;
    }
    
    .iphone-silhouette {
        width: 80px;
        height: 160px;
        left: -18px;
        top: 38%;
    }

    .laptop-silhouette {
        width: 180px;
        height: 120px;
        right: -90px;
        top: 38%;
    }

    /* Mobile hotspot positioning */
    .device-hotspot.iphone-hotspot {
        width: 80px;
        height: 160px;
        left: -18px;
        top: 38%;
    }

    .device-hotspot.laptop-hotspot {
        width: 180px;
        height: 120px;
        right: -90px;
        top: 38%;
    }

    /* Hide tooltips on mobile - hover doesn't work on touch */
    .device-tooltip {
        display: none;
    }
    
    /* Ticker Optimization */
    .ticker-item {
        font-size: 13px;
        padding: 0 15px;
    }
    
    .ticker-content {
        animation-duration: 25s;
    }

    .ticker-bottom {
        bottom: 78px;
    }

    .hero-bridge {
        bottom: 16px;
        width: min(100% - 28px, 460px);
        padding: 11px 14px;
        border-radius: 18px;
    }

    .hero-bridge p {
        font-size: 13.5px;
        line-height: 1.36;
    }
    
    /* Features Section */
    .section-title {
        font-size: 32px;
        margin-bottom: 40px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 30px 20px;
    }
    
    /* Value Prop Grid - Stack on Mobile */
    .features-content > div:first-of-type {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Use Case Grid */
    .features-content > div:nth-of-type(3) > div {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Trust & Privacy Grid */
    .feature-card > div:last-child {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    
    /* Spaces Section */
    .spaces-demo {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .spaces-visual {
        height: 300px;
        order: 2;
    }
    
    .spaces-info {
        order: 1;
    }
    
    .spaces-info h3 {
        font-size: 28px;
    }
    
    .spaces-info p {
        font-size: 18px;
    }
    
    /* CTA Section */
    .cta h2 {
        font-size: 28px;
    }
    
    .cta p {
        font-size: 18px;
    }
    
    /* Pricing Grid - Stack on Mobile */
    .cta-content > div:nth-of-type(2) {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        max-width: 400px !important;
    }
    
    /* Email Form */
    .email-form {
        flex-direction: column;
        gap: 15px;
        max-width: 400px;
    }
    
    .email-input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .notify-btn {
        padding: 14px 20px;
        font-size: 16px;
    }
}

/* Small Mobile Devices */
@media (max-width: 480px) {
    /* Extra small screens */
    h1 {
        font-size: 28px;
    }

    .hero .coming-soon-badge {
        margin-bottom: 8px;
    }

    .hero-tagline {
        font-size: 16px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .device-section {
        min-height: 350px;
        padding: 0 0 18px 0;
    }
    
    .hey-sociail-text {
        font-size: 20px;
        /* Do not set `top` here — base rule positions via `bottom: 100% + gap`,
         * so adding `top` stretches the element between both edges and parks
         * the caption inside the device body. Caption stays above the device. */
    }
    
    .device-float {
        transform: translate(-50%, -50%) scale(0.65);
        width: 240px;
        height: 95px;
    }
    
    @keyframes float {
        0%, 100% { transform: translate(-50%, -50%) scale(0.65) translateY(0) rotateX(0deg) rotateY(0deg); }
        25% { transform: translate(-50%, -50%) scale(0.65) translateY(-12px) rotateX(2deg) rotateY(8deg); }
        75% { transform: translate(-50%, -50%) scale(0.65) translateY(6px) rotateX(-2deg) rotateY(-8deg); }
    }
    
    .concentric-circles {
        top: 46%;
        width: 90vw;
        height: 90vw;
        max-width: 520px;
        max-height: 520px;
    }

    .ticker-bottom {
        bottom: 78px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .nav-links {
        gap: 15px;
    }
    
    .nav-links a {
        font-size: 12px;
    }
}

/* Landscape Mobile Optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
    }
    
    .device-section {
        min-height: 300px;
        padding: 5px 0 20px 0;
    }
    
    .device-float {
        transform: translate(-50%, -50%) scale(0.6);
    }
    
    .concentric-circles {
        top: 40%;
    }
}

/* Post-hero density pass responsive refinements */
@media (max-width: 1100px) {
    .section-heading-row,
    .journey-panel,
    .capability-section,
    .spaces-demo,
    .thinking-content,
    .cta-panel {
        grid-template-columns: 1fr;
    }

    .section-heading-row .section-title,
    .section-lead,
    .spaces-info p {
        max-width: 100%;
    }

    .journey-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .assistant-context-card {
        min-height: 430px;
    }

    .spaces-visual {
        min-height: 440px;
    }
}

@media (max-width: 768px) {
    .features,
    .spaces,
    .thinking,
    .cta {
        padding: 56px 0;
    }

    .features-content,
    .spaces-demo,
    .thinking-content,
    .cta-content {
        width: min(100% - 32px, 1180px);
        padding: 0;
    }

    .section-heading-row {
        gap: 16px;
        margin-bottom: 24px;
    }

    .section-heading-row .section-title,
    .spaces-info h2,
    .capability-copy h2,
    .thinking-header h2,
    .cta h2 {
        font-size: 34px;
        line-height: 1.02;
    }

    .section-lead,
    .spaces-info p,
    .cta p {
        font-size: 17px;
        line-height: 1.5;
    }

    .journey-panel,
    .cta-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .journey-copy h3 {
        font-size: 32px;
    }

    .journey-proof {
        margin-top: 18px;
    }

    .journey-steps,
    .capability-grid,
    .thinking-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .journey-step {
        min-height: auto;
        padding: 20px;
    }

    .step-icon,
    .capability-icon {
        margin: 14px 0 16px;
    }

    .capability-section {
        gap: 24px;
        margin-top: 30px;
    }

    .assistant-context-card {
        min-height: 360px;
        border-radius: 24px;
    }

    .assistant-puck {
        width: min(78%, 280px);
        height: 92px;
    }

    .assistant-speaker {
        left: 28px;
        top: 30px;
        width: 68px;
        height: 31px;
    }

    .assistant-mic {
        width: 54px;
        height: 54px;
    }

    .context-chip {
        min-height: 32px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .chip-work {
        left: 5%;
        top: 16%;
    }

    .chip-personal {
        right: 5%;
        top: 22%;
    }

    .chip-family {
        left: 8%;
        bottom: 18%;
    }

    .assistant-context-card > p {
        bottom: 22px;
        font-size: 13px;
    }

    .spaces-visual {
        order: 2;
        min-height: 380px;
        height: auto;
        border-radius: 24px;
    }

    .spaces-info {
        order: 1;
    }

    .space-hub {
        width: 160px;
        height: 160px;
        padding: 22px;
    }

    .space-hub span {
        font-size: 17px;
    }

    .space-bubble {
        width: 154px;
        padding: 15px;
        border-radius: 18px;
    }

    .space-bubble strong {
        font-size: 14px;
    }

    .space-bubble small {
        font-size: 11px;
    }

    .space-work {
        top: 22px;
        left: 18px;
    }

    .space-personal {
        top: 70px;
        right: 16px;
    }

    .space-family {
        bottom: 24px;
        left: 44px;
    }

    .thinking-content {
        gap: 22px;
    }

    .thinking-card {
        min-height: auto;
    }

    .cta-copy,
    .cta-actions {
        text-align: left;
    }

    .pricing-card {
        min-height: auto;
    }

    .email-form {
        flex-direction: column;
        max-width: none;
    }

    .trust-signals {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 14px;
    }
}

@media (max-width: 480px) {
    .section-heading-row .section-title,
    .spaces-info h2,
    .capability-copy h2,
    .thinking-header h2,
    .cta h2,
    .journey-copy h3 {
        font-size: 30px;
    }

    .assistant-context-card {
        min-height: 320px;
    }

    .assistant-puck {
        width: 250px;
        height: 82px;
    }

    .spaces-visual {
        min-height: 350px;
    }

    .space-hub {
        width: 140px;
        height: 140px;
    }

    .space-bubble {
        width: 140px;
    }
}
