/* ===========================
   styles.css — DIY Solutions
   Full responsive fix for all devices
   =========================== */

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }

body {
    max-width: 100vw;
    overflow-x: hidden;
    font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding-top: 0; /* changed from 64px */
    margin: 0;
}

html { scroll-behavior: smooth; }

img {
    max-width: 100%;
    height: auto;
    image-rendering: -webkit-optimize-contrast;
}

/* ── Floating animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    33%       { transform: translateY(-30px) translateX(20px) rotate(2deg); }
    66%       { transform: translateY(-15px) translateX(-20px) rotate(-2deg); }
}
@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) translateX(0px) rotate(0deg); }
    33%       { transform: translateY(-40px) translateX(-25px) rotate(-3deg); }
    66%       { transform: translateY(-20px) translateX(25px) rotate(3deg); }
}
.animate-float         { animation: float 20s ease-in-out infinite; }
.animate-float-delayed { animation: float-delayed 25s ease-in-out infinite; animation-delay: 5s; }

@media (max-width: 768px) {
    .animate-float, .animate-float-delayed { animation: none; }
}

/* ── Fade-in scroll animation ── */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Button ripple ── */
button { position: relative; overflow: hidden; }
button::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
button:active::before { width: 300px; height: 300px; }

a, button { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

.group { transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); }
.group:hover { transform: translateY(-4px); }

::selection      { background-color: #1d1d1f; color: #ffffff; }
::-moz-selection { background-color: #1d1d1f; color: #ffffff; }

.counter { display: inline-block; }

.gradient-text {
    background: linear-gradient(135deg, #1d1d1f 0%, #6e6e73 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

section { position: relative; }

a:focus-visible, button:focus-visible {
    outline: 2px solid #1d1d1f;
    outline-offset: 4px;
    border-radius: 4px;
}

@keyframes shimmer {
    0%   { background-position: -1000px 0; }
    100% { background-position:  1000px 0; }
}
.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f5f5f7 0%, #e8e8ed 50%, #f5f5f7 100%);
    background-size: 2000px 100%;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ══════════════════════════════════════════
   NAVBAR — Pure CSS, NO Tailwind dependency
   Works perfectly at all widths: 320px → 4K
   ════════════════════════════════════════ */

#main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.3s ease, background 0.3s ease;
}

#main-nav.scrolled {
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.98);
}

/* ── Nav inner container: full width, max 1440px ── */
.nav-container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* ── Logo group (left) ── */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}
.nav-logo img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}
.nav-logo-text {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #1d1d1f;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Desktop links (center) — hidden by default ── */
#desktop-links {
    display: none;
    align-items: center;
    gap: 2px;
    flex: 1;
    justify-content: center;
    padding: 0 16px;
}

/* ── CTA (right) — hidden by default ── */
#nav-cta-desktop {
    display: none;
    flex-shrink: 0;
}

/* ── Hamburger (right on mobile) ── */
#menu-toggle {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.ham-line {
    display: block;
    width: 22px;
    height: 2px;
    background: #1d1d1f;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
#menu-toggle.open .ham-line:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#menu-toggle.open .ham-line:nth-child(2) { opacity: 0; transform: scaleX(0); }
#menu-toggle.open .ham-line:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Show desktop nav at 900px+ ── */
@media (min-width: 900px) {
    #desktop-links  { display: flex; }
    #nav-cta-desktop { display: inline-flex; }
    #menu-toggle    { display: none; }
    #mobile-menu    { display: none !important; }
}

/* ── Nav links ── */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    font-size: clamp(0.70rem, 0.9vw, 0.88rem);
    font-weight: 500;
    letter-spacing: 0.01em;
    color: #515154;
    text-decoration: none;
    border-radius: 6px;
    transition: color 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}
.nav-link:hover  { color: #1d1d1f; background: rgba(0,0,0,0.05); }
.nav-link.active { color: #1d1d1f; font-weight: 600; }

/* ── CTA button ── */
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    background: #1d1d1f;
    color: #ffffff !important;
    font-size: clamp(0.72rem, 0.85vw, 0.88rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 50px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    white-space: nowrap;
}
.nav-cta:hover { background: #3a3a3c; transform: translateY(-1px); }

/* ══════════════════════════════════
   MOBILE MENU
   ══════════════════════════════════ */
#mobile-menu {
    background: #ffffff;
    width: 100%;
    border-top: 1px solid #f0f0f0;
}

.mob-link {
    display: block;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 500;
    color: #1d1d1f;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.15s, padding-left 0.2s;
    -webkit-tap-highlight-color: transparent;
}
.mob-link:hover, .mob-link:active { background: #f5f5f7; padding-left: 32px; }
.mob-link:last-of-type { border-bottom: none; }

/* ══════════════════════════════════
   HERO VIDEO
   ══════════════════════════════════ */
/* ══════════════════════════════════
   HERO VIDEO — fully responsive, no crop
   ══════════════════════════════════ */
#hero-wrapper {
    width: 100%;
    margin-top: 64px;
    position: relative;
    overflow: hidden;
    background: #000;
    /* Forces wrapper to exactly match 16:9 video — zero crop, zero black bars */
    aspect-ratio: 16 / 9;
    max-height: calc(100vh - 64px);
}

#hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: fill;
}

@media (max-width: 768px) {
    #hero-wrapper {
        margin-top: 64px;
        aspect-ratio: 16 / 9;
        max-height: unset;
        width: 100%;
    }

    #hero-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: fill;
    }
}
/* ══════════════════════════════════
   LOGO CAROUSEL
   ══════════════════════════════════ */
.logo-carousel-section {
    display: flex;
    align-items: center;
    width: 100%;
}

.logo-carousel-viewport {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.logo-carousel-track {
    display: flex;
    gap: 16px;
    align-items: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.logo-card {
    flex: 0 0 auto;
    width: 150px;
    height: 100px;
    background: #fff;
    border: 1px solid #e8e8ed;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    box-sizing: border-box;
    cursor: default;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.logo-card:hover {
    border-color: #b0b0b5;
    box-shadow: 0 8px 24px rgba(0,0,0,0.09);
    transform: translateY(-3px);
}
.logo-card img {
    max-width: 100%;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.logo-card-name {
    font-size: 10px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.03em;
    text-align: center;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.logo-carousel-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #d2d2d7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 24px;
    color: #1d1d1f;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    line-height: 1;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}
.logo-carousel-btn:hover {
    background: #1d1d1f;
    color: #fff;
    border-color: #1d1d1f;
    transform: scale(1.1);
}
.logo-carousel-btn--prev { margin-right: 14px; }
.logo-carousel-btn--next { margin-left: 14px; }

.logo-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.logo-carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.3s;
}
.logo-carousel-dot.active {
    background: #1d1d1f;
    transform: scale(1.4);
}

/* Mobile logo card sizing */
@media (max-width: 640px) {
    .logo-card { width: 110px; height: 80px; padding: 8px 10px; }
    .logo-card img { max-height: 36px; }
    .logo-card-name { font-size: 9px; }
    .logo-carousel-btn { width: 36px; height: 36px; font-size: 18px; }
    .logo-carousel-btn--prev { margin-right: 8px; }
    .logo-carousel-btn--next { margin-left: 8px; }
}

/* ══════════════════════════════════
   TESTIMONIAL SLIDER
   ══════════════════════════════════ */
#t-clip {
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

#tTrack {
    display: flex !important;
    transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.t-slide {
    min-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 4px 0 8px;
}

/* Testimonial grid — 3 col desktop, 1 col mobile */
.t-inner-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    align-items: stretch;      /* stretch = equal height */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;           /* left/right breathing room */
}

@media (max-width: 768px) {
    .t-inner-grid {
        grid-template-columns: 1fr !important;
        gap: 60px !important;
        padding: 0 16px !important;
    }
}
/* Testimonial slider — hard clip fix */
#tTrack {
    width: 100%;
    flex-wrap: nowrap !important;
}
#tTrack > div {
    min-width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .t-inner-grid {
        grid-template-columns: 1fr !important;
        gap: 60px !important;
    }
}

/* Testimonial card */
.t-card {
    background: #f3f4f6;
    border-radius: 12px;
    padding: 40px 28px 32px;
    text-align: center;
    position: relative;
    margin-top: 50px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    
    /* Equal height fix */
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    min-height: 280px;
    box-sizing: border-box;
}

/* Push name/role to bottom so all cards align */
.t-card .t-divider {
    width: 40px;
    height: 2px;
    background: #c8922a;
    margin: auto auto 16px;  /* auto top pushes it down */
}

.t-card:hover {
    transform: translateY(-6px);
}

.t-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.t-card .t-quote {
    font-size: 2.5rem;
    color: #c8922a;
    line-height: 1;
    margin-bottom: 8px;
}

.t-card p.t-text {
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.t-card .t-divider {
    width: 40px;
    height: 2px;
    background: #c8922a;
    margin: 0 auto 16px;
}

.t-card .t-name {
    color: #c8922a;
    font-weight: 700;
    font-size: 0.95rem;
}

.t-card .t-role {
    color: #6b7280;
    font-size: 0.8rem;
}

/* Testimonial arrow buttons */
.t-arrow {
    flex-shrink: 0;
    align-self: center;
    width: 46px;
    height: 46px;
    background: #fff;
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(0,0,0,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 26px;
    color: #1d1d1f;
    transition: background 0.2s, color 0.2s, transform 0.2s;
    z-index: 10;
    line-height: 1;
}
.t-arrow:hover { background: #1d1d1f; color: #fff; transform: scale(1.08); }

@media (max-width: 640px) {
    .t-arrow { width: 36px; height: 36px; font-size: 20px; }
}
#founder {
    background: #fafafa;
}

#founder .max-w-7xl {
    padding-left: 48px !important;
    padding-right: 48px !important;
}

@media (max-width: 768px) {
    #founder .max-w-7xl {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

.t-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    padding: 0;
    cursor: pointer;
    background: #d1d5db;
    transition: background 0.3s, transform 0.3s;
}
.t-dot.active { background: #1d1d1f; transform: scale(1.4); }

/* ══════════════════════════════════
   STEP IMAGE BOXES
   ══════════════════════════════════ */
.step-image-box {
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 1.5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: center;
}
.step-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.5s ease, transform 0.4s ease;
    display: block;
}
.step-image-box:hover img { transform: scale(1.04); }

/* ══════════════════════════════════
   ABOUT PAGE
   ══════════════════════════════════ */
.framework-title { font-size: clamp(18px, 4vw, 24px); font-weight: 700; margin-bottom: 10px; color: black; }
.framework-text  { color: #aaa; line-height: 1.6; font-size: clamp(13px, 2.5vw, 15px); }
.metric-number   { font-size: clamp(32px, 8vw, 48px); font-weight: 800; line-height: 1; }
.metric-label    { color: #6b7280; font-size: clamp(14px, 3vw, 18px); margin-top: 4px; }

/* ══════════════════════════════════
   TEAM SLIDER
   ══════════════════════════════════ */
.team-slider { position: relative; overflow: hidden; touch-action: pan-y; }
.team-track  { display: flex; transition: transform 0.8s ease; will-change: transform; }
.team-card   { min-width: 100%; padding: 12px 0; box-sizing: border-box; }

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: black;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    -webkit-tap-highlight-color: transparent;
}
.slider-btn:hover { transform: translateY(-50%) scale(1.1); }
.left-btn  { left: 8px; }
.right-btn { right: 8px; }

/* ══════════════════════════════════
   CONNECT BUTTON
   ══════════════════════════════════ */
.connect-wrapper { position: relative; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.connect-btn {
    background: black; color: white; padding: 12px 26px; border-radius: 30px;
    font-size: 14px; font-weight: 600; cursor: pointer; letter-spacing: 0.5px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.15); border: none;
}
.connect-btn:hover { transform: scale(1.05); }
.social-icons {
    display: flex; gap: 14px; background: white; padding: 10px 16px;
    border-radius: 30px; box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    opacity: 0; transform: translateY(-10px);
    transition: all 0.3s ease; pointer-events: none;
}
.connect-wrapper:hover .social-icons,
.connect-wrapper.open .social-icons { opacity: 1; transform: translateY(0); pointer-events: auto; }
.social-icons a { display: flex; align-items: center; justify-content: center; min-width: 36px; min-height: 36px; }
.social-icons a:hover { transform: scale(1.2); }

/* ══════════════════════════════════
   LOGO CAROUSEL (about page section)
   ══════════════════════════════════ */
.logo-placeholder { display: flex; justify-content: center; align-items: center; padding: 16px 0; }
.logo-box {
    width: 100%; max-width: 280px; height: auto; min-height: 160px;
    border: 3px dashed #444; display: flex; align-items: center;
    justify-content: center; border-radius: 20px; padding: 20px; box-sizing: border-box;
}
.logo-box img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ══════════════════════════════════
   KEYBOARD ACCESSIBILITY
   ══════════════════════════════════ */
body.keyboard-nav a:focus,
body.keyboard-nav button:focus {
    outline: 2px solid #1d1d1f;
    outline-offset: 3px;
}

/* ══════════════════════════════════
   HIGH CONTRAST
   ══════════════════════════════════ */
@media (prefers-contrast: high) {
    body { background: #fff; color: #000; }
}

/* ══════════════════════════════════
   NAV BACKDROP BLUR
   ══════════════════════════════════ */
@supports (backdrop-filter: blur(20px)) {
    #main-nav { backdrop-filter: blur(20px); }
}