/* ============================================
   ONDUU.KE - MOBILE RESPONSIVE OVERRIDES
   Append this to the END of styles.css
   Last updated: May 2026
   ============================================ */

/* Smooth scrolling + safer base sizing on mobile */
html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

img,
svg,
canvas,
video {
    max-width: 100%;
    height: auto;
}

/* ============================================
   TABLET BREAKPOINT (max-width: 992px)
   ============================================ */
@media (max-width: 992px) {

    /* Hero layout switches to single column */
    .hero-content {
        display: flex;
        flex-direction: column-reverse;
        gap: 2.5rem;
        text-align: center;
        align-items: center;
    }

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

    .hero-photo-wrap {
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
    }

    /* Manifesto, about, vision, work grids → single column */
    .manifesto-grid,
    .about-grid,
    .vision-pillars,
    .ideas-grid,
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .work-area-row,
    .work-area-row.reverse {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .work-area-content {
        max-width: 100%;
    }

    .tags {
        justify-content: center;
    }
}

/* ============================================
   MOBILE BREAKPOINT (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {

    /* Container: tighter side padding */
    .container,
    .nav-container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* ---------- NAVBAR ---------- */
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .logo-img {
        height: 36px;
        width: auto;
    }

    /* Mobile menu toggle visible */
    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 22px;
        cursor: pointer;
        z-index: 1001;
    }

    .menu-toggle .bar {
        display: block;
        width: 100%;
        height: 2px;
        background-color: var(--accent, #d4a017);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* Mobile slide-down menu */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 0;
        padding: 5rem 1.5rem 2rem;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1000;
    }

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

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-links li a {
        display: block;
        width: 100%;
        padding: 1rem 0;
        font-size: 1.05rem;
    }

    .nav-links .btn-contact {
        margin-top: 1rem;
        text-align: center;
        background-color: var(--accent, #d4a017);
        color: #ffffff;
        border-radius: 8px;
        padding: 0.85rem 1.25rem;
    }

    /* Animated hamburger to X */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }

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

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }

    /* ---------- HERO SECTION ---------- */
    .hero {
        min-height: auto;
        padding: 6rem 0 3rem;
        text-align: center;
    }

    .hero-content {
        flex-direction: column;
        gap: 2rem;
        padding: 0 1rem;
    }

    /* Photo card: contained and centered */
    .hero-photo-wrap {
        order: 1;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
    }

    .hero-photo-card {
        position: relative;
        width: 100%;
        max-width: 280px;
        margin: 0 auto;
        border-radius: 18px;
        overflow: hidden;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
    }

    .hero-photo {
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 5;
        object-fit: cover;
        object-position: center top;
        display: block;
    }

    .hero-photo-tag {
        position: absolute;
        bottom: 12px;
        left: 50%;
        transform: translateX(-50%);
        width: max-content;
        max-width: calc(100% - 24px);
        font-size: 0.75rem;
        padding: 0.5rem 0.85rem;
        background: #ffffff;
        border-radius: 999px;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: flex;
        align-items: center;
        gap: 0.4rem;
    }

    .tag-dot {
        flex-shrink: 0;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--accent, #d4a017);
    }

    /* Hero text */
    .hero-text {
        order: 2;
        width: 100%;
        text-align: center;
    }

    .hero-eyebrow {
        font-size: 0.8rem;
        letter-spacing: 0.15em;
        display: inline-block;
        margin-bottom: 1rem;
    }

    .hero-title {
        font-size: clamp(2rem, 9vw, 2.75rem);
        line-height: 1.1;
        word-break: keep-all;
        overflow-wrap: break-word;
        margin-bottom: 1rem;
    }

    .title-accent {
        display: inline-block;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.45;
        margin-bottom: 1rem;
        padding: 0 0.5rem;
    }

    .skills-ticker {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.4rem 0.6rem;
        font-size: 0.85rem;
        margin-bottom: 1.25rem;
        padding: 0 0.5rem;
    }

    .ticker-sep {
        opacity: 0.4;
    }

    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
        padding: 0 0.25rem;
        margin-bottom: 1.75rem;
    }

    /* CTA buttons: full-width, tappable (min 48px) */
    .hero-actions {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-actions .btn,
    .btn {
        width: 100%;
        min-height: 48px;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 10px;
        box-sizing: border-box;
    }

    /* Tame the decorative orbs on mobile */
    .orb {
        opacity: 0.35;
        filter: blur(60px);
    }

    .orb-1,
    .orb-2,
    .orb-3 {
        width: 200px !important;
        height: 200px !important;
    }

    /* ---------- SECTION PADDING ---------- */
    .section-padding {
        padding: 3.5rem 0;
    }

    .section-heading {
        font-size: clamp(1.6rem, 6vw, 2rem);
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .subtitle {
        font-size: 0.75rem;
        letter-spacing: 0.18em;
    }

    /* ---------- MANIFESTO ---------- */
    .manifesto-grid {
        gap: 2rem;
    }

    .foundation-list {
        padding-left: 1.25rem;
    }

    .foundation-list li {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .goal-box {
        padding: 1.25rem;
        border-radius: 12px;
        margin-top: 1.5rem;
    }

    .goal-box h3 {
        font-size: 1.1rem;
    }

    .goal-box p {
        font-size: 0.95rem;
    }

    .mv-card {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .mv-big-num {
        font-size: 2.75rem;
    }

    .mv-caption {
        font-size: 0.9rem;
    }

    .mv-p {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* ---------- ABOUT ---------- */
    .about-card {
        padding: 1.75rem 1.25rem;
        border-radius: 14px;
    }

    .about-card h3 {
        font-size: 1.15rem;
    }

    .about-card p,
    .about-card li {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .timeline li {
        padding: 0.75rem 0;
    }

    .timeline .date {
        font-size: 0.78rem;
        display: block;
        margin-bottom: 0.25rem;
    }

    /* ---------- VISION ---------- */
    .vision-pillars {
        gap: 1.75rem;
    }

    .pillar {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
    }

    .pillar-number {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }

    .pillar-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .pillar p {
        font-size: 0.92rem;
        line-height: 1.55;
    }

    .lead {
        font-size: 1rem;
        line-height: 1.55;
        padding: 0 0.5rem;
    }

    /* ---------- WORK & FOCUS ---------- */
    .work-area-row {
        padding: 1.75rem 1.25rem;
        border-radius: 14px;
        gap: 1.25rem;
    }

    .work-title {
        font-size: 1.2rem;
    }

    .work-area-content p {
        font-size: 0.92rem;
    }

    .tags {
        flex-wrap: wrap;
        gap: 0.4rem;
        padding-left: 0;
    }

    .tags li {
        font-size: 0.78rem;
        padding: 0.35rem 0.75rem;
        border-radius: 999px;
    }

    .visual-box {
        width: 80px;
        height: 80px;
        padding: 1rem;
    }

    .visual-box svg {
        width: 36px;
        height: 36px;
    }

    /* ---------- IDEAS ---------- */
    .idea-card {
        padding: 1.5rem 1.25rem;
        border-radius: 14px;
    }

    .idea-title {
        font-size: 1.1rem;
        line-height: 1.3;
    }

    .idea-excerpt {
        font-size: 0.92rem;
    }

    .idea-date {
        font-size: 0.75rem;
    }

    /* ---------- FOOTER ---------- */
    .footer {
        padding: 3rem 0 1.5rem;
        text-align: center;
    }

    .footer-grid {
        gap: 2rem;
        text-align: center;
    }

    .footer-brand,
    .footer-links,
    .footer-connect {
        align-items: center;
    }

    .footer-logo {
        height: 40px;
        margin: 0 auto 1rem;
    }

    .footer-desc {
        font-size: 0.9rem;
    }

    .footer-links h4,
    .footer-connect h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .footer-links ul {
        padding: 0;
        list-style: none;
    }

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    .social-link {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: center;
        font-size: 0.95rem;
    }

    .footer-bottom {
        padding-top: 1.5rem;
        margin-top: 1.5rem;
        font-size: 0.82rem;
        text-align: center;
    }

    /* Particle canvas: reduce visual noise */
    #hero-particles {
        opacity: 0.4;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {

    .container,
    .nav-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hero {
        padding: 5rem 0 2.5rem;
    }

    .hero-title {
        font-size: clamp(1.85rem, 9vw, 2.4rem);
    }

    .hero-photo-wrap,
    .hero-photo-card {
        max-width: 240px;
    }

    .hero-photo-tag {
        font-size: 0.7rem;
        padding: 0.45rem 0.7rem;
    }

    .skills-ticker {
        font-size: 0.8rem;
    }

    .section-padding {
        padding: 2.75rem 0;
    }

    .section-heading {
        font-size: clamp(1.4rem, 6.5vw, 1.8rem);
    }

    .mv-big-num {
        font-size: 2.25rem;
    }

    .about-card,
    .pillar,
    .work-area-row,
    .idea-card {
        padding: 1.5rem 1rem;
    }

    .footer-grid {
        gap: 1.5rem;
    }
}

/* ============================================
   ACCESSIBILITY: respect reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PREVENT TAP HIGHLIGHT FLASH ON MOBILE
   ============================================ */
a,
button,
.btn,
.menu-toggle {
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
