/* ============================================================
   PRODIGAL LABS â€” Enhanced Design System v2
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@300;400;500;600;700&family=Instrument+Serif:ital,wght@0,400;1,400&display=swap');

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --c-bg: #000;
    --c-surface: rgba(255, 255, 255, 0.03);
    --c-border: rgba(255, 255, 255, 0.10);
    --c-text: #fff;
    --c-muted: rgba(255, 255, 255, 0.45);
    --c-accent: #FCCB06;
    --c-accent2: #e6a800;
    --c-glow: rgba(252, 203, 6, 0.18);
    --radius-pill: 9999px;
    --radius-card: 1.25rem;
    --radius-xl: 2rem;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    background: var(--c-bg);
    color: var(--c-text);
    font-family: 'Barlow', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    cursor: none;
}

/* â”€â”€â”€ Custom Cursor â”€â”€â”€ */
#cursor-dot,
#cursor-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s;
}

#cursor-dot {
    width: 6px;
    height: 6px;
    background: #fff;
    top: 0;
    left: 0;
}

#cursor-ring {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    top: 0;
    left: 0;
    transition: width 0.25s, height 0.25s, border-color 0.25s;
}

body.cursor-hover #cursor-ring {
    width: 56px;
    height: 56px;
    border-color: var(--c-accent);
}

/* â”€â”€â”€ Liquid Glass â”€â”€â”€ */
.liquid-glass {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.12), 0 4px 24px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.liquid-glass::before,
.liquid-glass-strong::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.4px;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.liquid-glass::before {
    background: linear-gradient(160deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.12) 25%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.12) 75%,
            rgba(255, 255, 255, 0.5) 100%);
}

.liquid-glass-strong {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(50px);
    -webkit-backdrop-filter: blur(50px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.18);
    position: relative;
    overflow: hidden;
}

.liquid-glass-strong::before {
    background: linear-gradient(160deg,
            rgba(255, 255, 255, 0.55) 0%,
            rgba(255, 255, 255, 0.15) 25%,
            rgba(255, 255, 255, 0) 50%,
            rgba(255, 255, 255, 0.15) 75%,
            rgba(255, 255, 255, 0.55) 100%);
}

/* Shimmer sweep on glass cards */
.glass-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.04), transparent);
    transition: left 0.6s ease;
    pointer-events: none;
}

.glass-shimmer:hover::after {
    left: 140%;
}

/* â”€â”€â”€ Typography â”€â”€â”€ */
.font-heading {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
}

.font-body {
    font-family: 'Barlow', sans-serif;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.55) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-accent {
    background: linear-gradient(135deg, #FCCB06 0%, #e6a800 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-glow {
    text-shadow: 0 0 40px rgba(252, 203, 6, 0.4);
}

/* â”€â”€â”€ Nav â”€â”€â”€ */
.nav-link {
    color: rgba(255, 255, 255, 0.70);
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-pill);
    transition: all var(--transition);
    font-family: 'Barlow', sans-serif;
}

.nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
}

/* â”€â”€â”€ Buttons â”€â”€â”€ */
.btn-primary {
    background: #fff;
    color: #000;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: all 0.3s ease;
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 50%, rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%) skew(-15deg);
    transition: transform 0.5s ease;
}

.btn-primary:hover::after {
    transform: translateX(200%) skew(-15deg);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
}

.btn-glass {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.65rem 1.4rem;
    border-radius: var(--radius-pill);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    font-family: 'Barlow', sans-serif;
    white-space: nowrap;
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 0 20px var(--c-glow);
}

/* Magnetic wrapper â€” JS adds transform */
.btn-magnetic {
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* â”€â”€â”€ Layout â”€â”€â”€ */
.section {
    padding: 6rem 1.5rem;
}

@media(min-width:768px) {
    .section {
        padding: 8rem 4rem;
    }
}

@media(min-width:1024px) {
    .section {
        padding: 8rem 5rem;
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: #FCCB06;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 1rem;
    font-family: 'Barlow', sans-serif;
}

.section-title {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 0.95;
    letter-spacing: -0.02em;
    color: #fff;
}

/* â”€â”€â”€ Cards â”€â”€â”€ */
.card {
    border-radius: var(--radius-card);
    padding: 1.75rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px var(--c-glow);
}

/* 3-D tilt card */
.card-3d {
    transform-style: preserve-3d;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    will-change: transform;
}

/* â”€â”€â”€ Tags â”€â”€â”€ */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Barlow', sans-serif;
}

/* â”€â”€â”€ Forms â”€â”€â”€ */
.form-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.875rem;
    padding: 0.875rem 1.25rem;
    color: #fff;
    font-family: 'Barlow', sans-serif;
    font-size: 0.9375rem;
    transition: border-color 0.2s, background 0.2s;
    outline: none;
    backdrop-filter: blur(8px);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-input:focus {
    border-color: rgba(252, 203, 6, 0.5);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(252, 203, 6, 0.1);
}

textarea.form-input {
    resize: vertical;
    min-height: 130px;
}

.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 0.5rem;
    font-family: 'Barlow', sans-serif;
    letter-spacing: 0.05em;
}

/* â”€â”€â”€ Footer â”€â”€â”€ */
.footer-link {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-link:hover {
    color: rgba(255, 255, 255, 0.9);
}

.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* â”€â”€â”€ Scrollbar â”€â”€â”€ */
::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: rgba(252, 203, 6, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(252, 203, 6, 0.55);
}

::selection {
    background: rgba(252, 203, 6, 0.3);
    color: #fff;
}

/* â”€â”€â”€ Scroll progress bar â”€â”€â”€ */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(90deg, #FCCB06, #e6a800, #FCCB06);
    z-index: 9998;
    transition: width 0.1s linear;
    box-shadow: 0 0 10px rgba(252, 203, 6, 0.6);
}

/* â”€â”€â”€ Glow orbs (page-wide ambient) â”€â”€â”€ */
.ambient-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(80px);
    opacity: 0.08;
    z-index: 0;
    animation: orbDrift 18s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #FCCB06, transparent 70%);
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #7c6200, transparent 70%);
    bottom: -100px;
    right: -100px;
    animation-delay: -9s;
}

@keyframes orbDrift {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(40px, 30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 50px) scale(0.95);
    }
}

/* â”€â”€â”€ Animations â”€â”€â”€ */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-14px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fade-up {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes marquee-rev {
    0% {
        transform: translateX(-50%);
    }

    100% {
        transform: translateX(0);
    }
}

@keyframes borderRotate {
    from {
        --angle: 0deg;
    }

    to {
        --angle: 360deg;
    }
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeScale {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        box-shadow: 0 0 20px var(--c-glow);
    }

    50% {
        box-shadow: 0 0 50px rgba(252, 203, 6, 0.35);
    }
}

/* â”€â”€â”€ Marquee â”€â”€â”€ */
.marquee-wrap {
    overflow: hidden;
}

.marquee-inner {
    display: flex;
    gap: 3rem;
    animation: marquee 28s linear infinite;
    width: max-content;
}

.marquee-inner-rev {
    display: flex;
    gap: 3rem;
    animation: marquee-rev 28s linear infinite;
    width: max-content;
}

/* â”€â”€â”€ Section reveal utility â”€â”€â”€ */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.75s cubic-bezier(0.4, 0, 0.2, 1), transform 0.75s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* â”€â”€â”€ Horizontal line accent â”€â”€â”€ */
.line-accent {
    width: 48px;
    height: 2px;
    border-radius: 99px;
    background: linear-gradient(90deg, rgba(252, 203, 6, 0.7), rgba(252, 203, 6, 0.3));
    margin-bottom: 1.25rem;
}

/* â”€â”€â”€ Mobile nav â”€â”€â”€ */
.mobile-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 1rem;
    right: 1rem;
    border-radius: var(--radius-card);
    padding: 1rem;
    z-index: 100;
}

/* â”€â”€â”€ Blog cat â”€â”€â”€ */
.blog-cat {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(252, 203, 6, 0.9);
}

/* â”€â”€â”€ Hover glow â”€â”€â”€ */
.hover-glow {
    transition: box-shadow var(--transition);
}

.hover-glow:hover {
    box-shadow: 0 0 40px rgba(252, 203, 6, 0.2);
}

/* â”€â”€â”€ Feature check list â”€â”€â”€ */
.feature-check::before {
    content: 'âœ“';
    color: rgba(252, 203, 6, 0.9);
    margin-right: 0.5rem;
    font-weight: 600;
}

/* â”€â”€â”€ Process number â”€â”€â”€ */
.process-number {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
}

/* â”€â”€â”€ Gradient border card â”€â”€â”€ */
.gradient-border {
    position: relative;
    border-radius: var(--radius-card);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    background-clip: padding-box;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(252, 203, 6, 0.4), rgba(230, 168, 0, 0.15), rgba(252, 203, 6, 0.4));
    z-index: -1;
}

/* â”€â”€â”€ Noise overlay â”€â”€â”€ */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.018;
}

/* â”€â”€â”€ Stat number â”€â”€â”€ */
.stat-num {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    line-height: 1;
    letter-spacing: -0.03em;
}

/* â”€â”€â”€ Responsive hide â”€â”€â”€ */
@media(max-width:767px) {
    .hide-mobile {
        display: none !important;
    }
}

@media(min-width:768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* â”€â”€â”€ Scroll Story Pin â”€â”€â”€ */
.story-sticky {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.story-chapter {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-chapter.hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(40px);
}

.story-chapter.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.story-number {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: clamp(6rem, 15vw, 12rem);
    line-height: 1;
    color: rgba(252, 203, 6, 0.12);
    position: absolute;
    bottom: 2rem;
    right: 3rem;
    user-select: none;
}

/* â”€â”€â”€ Portfolio Grid â”€â”€â”€ */
.work-card {
    border-radius: 1.25rem;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.work-card-bg {
    position: absolute;
    inset: 0;
    transition: transform 0.55s cubic-bezier(0.23, 1, 0.32, 1);
}

.work-card:hover .work-card-bg {
    transform: scale(1.06);
}

.work-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.92) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.75rem;
}

.work-card:hover .work-overlay {
    opacity: 1;
}

.work-tag {
    font-size: 0.65rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(252, 203, 6, 0.9);
    font-family: 'Barlow', sans-serif;
    margin-bottom: 0.5rem;
}

/* â”€â”€â”€ AI Terminal â”€â”€â”€ */
.terminal {
    background: #0a0a12;
    border: 1px solid rgba(252, 203, 6, 0.2);
    border-radius: 1rem;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    font-size: 0.825rem;
}

.terminal-bar {
    background: #111120;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.t-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-body {
    padding: 1.25rem;
    min-height: 260px;
}

.t-line {
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.9;
}

.t-prompt {
    color: #FCCB06;
}

.t-output {
    color: rgba(255, 255, 255, 0.45);
}

.t-success {
    color: #34d399;
}

.t-cursor-blink {
    display: inline-block;
    width: 8px;
    height: 1em;
    background: #FCCB06;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* â”€â”€â”€ Testimonials â”€â”€â”€ */
.testimonial-card {
    border-radius: 1.5rem;
    padding: 2.25rem;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.testimonial-card::before {
    content: '\201C';
    position: absolute;
    top: -0.5rem;
    left: 1.25rem;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 8rem;
    color: rgba(252, 203, 6, 0.08);
    line-height: 1;
    pointer-events: none;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(252, 203, 6, 0.4), rgba(60, 120, 255, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-size: 1rem;
    flex-shrink: 0;
}

/* â”€â”€â”€ Gradient accent line â”€â”€â”€ */
.accent-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(252, 203, 6, 0.5), transparent);
    margin: 0;
    border: none;
}

/* ── Footer brand column – span 2 on desktop, span 1 on mobile ── */
.footer-brand-col {
    grid-column: span 2;
}

@media (max-width: 768px) {
    .footer-brand-col {
        grid-column: span 1 !important;
    }

    .ai-terminal-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
}

/* ── Hide custom cursor on touch devices ── */
@media (hover: none) and (pointer: coarse) {
    body {
        cursor: auto;
    }

    #cursor-dot,
    #cursor-ring {
        display: none !important;
    }
}

/* ── Mobile & Responsiveness ── */
@media (max-width: 1024px) {
    .container {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }
}

/* ────────────────────────────────────────────
   TABLET  (≤ 900px) — hide desktop nav pill
   ──────────────────────────────────────────── */
@media (max-width: 900px) {
    #desktop-nav {
        display: none !important;
    }

    button[aria-label="Menu"] {
        display: flex !important;
    }
}

/* ────────────────────────────────────────────
   TABLET / MOBILE  (≤ 768px)
   ──────────────────────────────────────────── */
@media (max-width: 768px) {

    /* ── Global section padding ── */
    section {
        padding: 5rem 1.25rem !important;
    }

    /* ── Navbar ── */
    nav {
        padding: 0 1rem !important;
    }

    nav span {
        font-size: 1.05rem !important;
    }

    /* ── Hero ── */
    #hero-section {
        height: auto !important;
        min-height: 100svh;
        padding-top: 0 !important;
    }

    #hero-content {
        margin-left: 0 !important;
        padding: 8rem 1.25rem 3rem !important;
        align-items: center !important;
        text-align: center !important;
        max-width: 100% !important;
    }

    #hero-content .floating-badge {
        margin-bottom: 1.5rem !important;
        transform: scale(0.88);
        flex-wrap: wrap;
        text-align: center;
    }

    #hero-content .floating-badge span:last-child {
        font-size: 0.78rem !important;
    }

    /* BlurText headline centering */
    #hero-content .font-heading {
        font-size: clamp(2.6rem, 10vw, 3.75rem) !important;
        line-height: 1 !important;
        justify-content: center !important;
        text-align: center;
    }

    /* Typewriter line */
    #hero-content>div[style*="typewriter"],
    #hero-content>div[data-parallax="0.8"] {
        font-size: clamp(1.1rem, 5vw, 1.5rem) !important;
        text-align: center;
        width: 100%;
    }

    /* Sub paragraph */
    #hero-content p {
        margin-inline: auto !important;
        font-size: 0.95rem !important;
        max-width: 100% !important;
    }

    /* CTA row */
    #hero-content div[data-parallax="0.4"] {
        flex-direction: column !important;
        align-items: center !important;
        gap: 1rem !important;
        width: 100%;
    }

    #hero-content .btn-primary,
    #hero-content .btn-magnetic {
        width: 100% !important;
        justify-content: center !important;
    }

    /* Secondary "Start a Project" link */
    #hero-content a[href="#contact-section"]:not(.btn-primary) {
        justify-content: center !important;
    }

    /* ── OurStory ── */
    #about-section {
        padding: 6rem 1.25rem !important;
    }

    #about-section>div[style*="maxWidth: 1200"] {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
        display: grid !important;
    }

    /* ── Services / WhatWeDo ── */
    #services-section {
        padding: 5rem 1.25rem !important;
    }

    #services-section div[style*="gridTemplateColumns"] {
        grid-template-columns: 1fr !important;
    }

    #services-section .svc-card {
        min-height: auto !important;
    }

    /* ── ScrollStory ── */
    #solution-section .story-chapter {
        padding: 1.25rem !important;
        align-items: flex-start !important;
        padding-top: 5rem !important;
    }

    #solution-section .story-chapter>div:first-child {
        padding: 0 !important;
    }

    #solution-section .story-chapter h2 {
        font-size: clamp(2rem, 7.5vw, 3rem) !important;
        white-space: normal !important;
    }

    #solution-section .story-chapter p {
        font-size: 0.9rem !important;
    }

    .story-number {
        font-size: clamp(4rem, 18vw, 7rem) !important;
        bottom: 1rem !important;
        right: 1.25rem !important;
    }

    /* ── AI Terminal / FaceMeshDemo ── */
    #solution-section+section,
    section[style*="padding: '8rem 1.5rem'"] {
        padding: 5rem 1.25rem !important;
    }

    .fm-window {
        max-width: 100% !important;
    }

    /* ── How We Work ── */
    #services-section~section div[style*="gridTemplateColumns: 'repeat(auto-fit,minmax(220px"] {
        grid-template-columns: 1fr !important;
    }

    /* ── Selected Work ── */
    #work-section {
        padding: 6rem 1.25rem !important;
    }

    #work-section div[style*="display: 'flex', justifyContent: 'space-between'"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
        margin-bottom: 2.5rem !important;
    }

    #work-section div[style*="gridTemplateColumns: 'repeat(auto-fit, minmax(300px"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }

    /* Work card text */
    #work-section h3[style*="fontSize: '3rem'"] {
        font-size: 2rem !important;
    }

    #work-section div[style*="padding: '2rem 2.5rem'"] {
        padding: 1.25rem 1.5rem !important;
    }

    #work-section div[style*="bottom: '2.5rem', left: '2.5rem'"] {
        bottom: 1.25rem !important;
        left: 1.25rem !important;
        right: 1.25rem !important;
    }

    /* ── Stats Bar ── */
    .stat-card {
        padding: 1.75rem 1.25rem !important;
    }

    /* ── Testimonials ── */
    .testimonial-card {
        padding: 1.5rem !important;
    }

    .testimonial-card::before {
        font-size: 5rem !important;
        top: 0 !important;
    }

    div[style*="padding: '3.5rem 2.5rem'"] {
        padding: 2rem 1.5rem !important;
        min-height: auto !important;
    }

    /* ── CTA Section ── */
    div[style*="width: '700px', height: '700px'"] {
        width: 90vw !important;
        height: 90vw !important;
    }

    /* ── Contact ── */
    #contact-section {
        padding: 6rem 1.25rem !important;
    }

    #contact-section>.container>div {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }

    .liquid-glass-strong {
        padding: 1.75rem 1.25rem !important;
    }

    .liquid-glass-strong h2 {
        font-size: 1.5rem !important;
    }

    /* Contact info card */
    div[style*="width: 'fit-content'"] {
        width: 100% !important;
    }

    /* ── Footer ── */
    footer {
        padding: 4rem 1.25rem 2.5rem !important;
    }

    footer>div:first-child {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }

    /* Span-2 brand column becomes span-1 on mobile */
    footer div[style*="gridColumn: 'span 2'"] {
        grid-column: span 1 !important;
    }

    footer div[style*="justifyContent: 'space-between'"] {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 0.75rem !important;
    }

    /* ── Section-specific overrides ── */
    .story-chapter>div {
        padding: 0 0.75rem !important;
    }

    .step-card {
        padding: 1.5rem !important;
    }

    .fm-hud {
        top: 8px !important;
        right: 8px !important;
    }

    .fm-chip {
        padding: 2px 6px !important;
        font-size: 0.6rem !important;
    }
}

/* ────────────────────────────────────────────
   SMALL MOBILE  (≤ 480px)
   ──────────────────────────────────────────── */
@media (max-width: 480px) {

    /* ── Navbar ── */
    nav span {
        font-size: 0.95rem !important;
    }

    nav a>div.liquid-glass {
        width: 40px !important;
        height: 40px !important;
    }

    /* ── Hero ── */
    #hero-content .font-heading {
        font-size: clamp(2.2rem, 9vw, 2.75rem) !important;
    }

    /* ── Chapter labels ── */
    .chapter-label {
        font-size: 0.65rem !important;
    }

    /* ── ScrollStory ── */
    #solution-section .story-chapter h2 {
        font-size: clamp(1.75rem, 8vw, 2.25rem) !important;
    }

    .story-number {
        font-size: clamp(3.5rem, 18vw, 5rem) !important;
    }

    /* ── Service cards ── */
    #services-section .svc-card {
        padding: 1.5rem !important;
    }

    /* ── Contact form grid ── */
    div[style*="gridTemplateColumns: 'repeat(auto-fit,minmax(200px"] {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* ── Testimonial card ── */
    div[style*="padding: '3.5rem 2.5rem'"] {
        padding: 1.5rem 1.25rem !important;
    }

    div[style*="padding: '3.5rem 2.5rem'"] p {
        font-size: 1rem !important;
    }

    /* ── CTA block ── */
    div[style*="borderRadius: '2rem', padding: 'clamp"] {
        padding: 2.5rem 1.25rem !important;
    }

    /* ── Stats bar single column ── */
    div[style*="gridTemplateColumns: 'repeat(auto-fit,minmax(160px"] {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
    }

    .stat-card {
        padding: 1.25rem 1rem !important;
    }

    /* ── How We Work steps full-width ── */
    div[style*="gridTemplateColumns: 'repeat(auto-fit,minmax(220px"] {
        grid-template-columns: 1fr !important;
    }
}

/* ── Prevent Horizontal Overflow everywhere ── */
body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

*,
*::before,
*::after {
    max-width: 100%;
}