/* ═══════════════════════════════════════════════════════
   Fairtrag Showcase — Custom Case Study Page
   ═══════════════════════════════════════════════════════ */

/* Global Vars */
:root {
    --ft-brand: var(--wp--preset--color--accent, #FC490B);
    --ft-accent: #D4FF3F;
    --ft-dark: #0a0a0a;
    --ft-bg: var(--wp--preset--color--bg, #F5F4F0);
    --ft-text: var(--wp--preset--color--text-main, #121212);
    --ft-text-muted: var(--wp--preset--color--text-muted, #3D3D3D);
    --ft-ease: cubic-bezier(0.25, 1, 0.5, 1);
}

body {
    transition: background-color 1.2s ease, color 1.2s ease;
}

.mobile-only-text { display: none; }

body.theme-dark {
    --ft-bg: var(--ft-dark);
    --ft-text: #FFFFFF;
    --ft-text-muted: #A1A1A6;
    background-color: var(--ft-dark);
}

.showcase-ft {
    background-color: var(--ft-bg);
    color: var(--ft-text);
    transition: background-color 1.2s ease, color 1.2s ease;
    overflow-x: hidden;
    padding-top: var(--wp--custom--header-height, 64px);
}

/* ── Sub-Nav ── */
.ft-subnav {
    position: sticky;
    top: var(--wp--custom--header-height, 64px);
    z-index: 900;
    background: transparent;
}
body.theme-dark .ft-subnav {
    background: transparent;
}

.ft-subnav__inner {
    max-width: var(--layout-max-width, 1400px);
    margin: 0 auto;
    padding: 20px var(--layout-padding, 40px);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ft-subnav__title {
    display: flex;
    align-items: center;
}
.ft-subnav__logo {
    height: 16px;
    width: auto;
}
a.ft-subnav__badge {
    font-size: 11px;
    font-weight: 600;
    color: var(--wp--preset--color--text-muted, #888);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s;
}
a.ft-subnav__badge:hover {
    color: var(--ft-brand);
}

/* ── Utilities ── */
.ft-eyebrow {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--ft-text-muted);
    margin-bottom: 16px;
}
.text-brand { color: var(--ft-brand); }
.text-accent { color: var(--ft-accent); }

/* ── 1. Hero ── */
.ft-hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding-top: 15vh; /* Reverted to 15vh to push text slightly down */
}

.ft-hero__text-layer {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 1000px;
    width: 100%;
    padding: 0 var(--layout-padding, 40px);
}

.ft-hero__title {
    font-size: clamp(34px, 10vw, 110px); /* Tuned for tiny mobiles */
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin-bottom: 24px;
}
.ft-hero__title .line { display: block; overflow: hidden; }

.ft-hero__sub {
    font-size: clamp(18px, 4vw, 28px);
    color: var(--ft-text-muted);
    font-weight: 400;
}

.ft-hero__image-layer {
    position: absolute;
    bottom: -20vh; /* Tease it lower to increase gap from text */
    left: 50%;
    width: 86vw;
    height: auto;
    aspect-ratio: 16 / 10; /* Perfect ratio for MacBook screenshots, no cropping */
    max-height: 86vh;
    z-index: 20;
    border-radius: 40px;
    overflow: hidden;
    /* FIX: Force hardware acceleration to respect border-radius during GSAP scale transforms (Webkit Bug) */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
    mask-image: radial-gradient(white, black);
    isolation: isolate;
    
    box-shadow: 0 40px 120px rgba(0,0,0,0.15);
}
.ft-hero__image-layer img,
.ft-hero__image-layer picture {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover is safe now because container has exact aspect ratio */
    object-position: center; /* Center to ensure roundings apply evenly */
    display: block;
    border-radius: 40px; /* Force border radius on Imagify pictures */
    transform: translateZ(0); /* Extra safeguard for clipping */
}

/* ── Quote Section ── */
.ft-quote {
    padding: 160px var(--layout-padding, 40px) 40px;
    text-align: center;
    background-color: var(--ft-bg);
    transition: background-color 1.2s ease, color 1.2s ease;
}

.ft-quote__inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ft-quote__icon {
    width: 40px;
    height: 40px;
    color: var(--ft-accent);
    margin-bottom: 40px;
    opacity: 0.9;
}
body:not(.theme-dark) .ft-quote__icon {
    color: var(--ft-brand);
}

.ft-quote blockquote {
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--ft-text);
    margin: 0 0 40px 0;
}

.ft-quote__author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.ft-quote__author strong {
    font-size: 20px;
    font-weight: 700;
    color: var(--ft-text);
    letter-spacing: -0.01em;
}

.ft-quote__author span {
    font-size: 16px;
    font-weight: 500;
    color: var(--ft-text-muted);
}

/* ── 2. Statement Reveal ── */
.ft-statement {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px var(--layout-padding, 40px);
    text-align: center;
}
.ft-statement h2 {
    font-size: clamp(40px, 6vw, 80px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--ft-text);
}
.ft-statement h2 .word {
    opacity: 0.2; /* Will be scrubbed to 1 by GSAP */
}

/* ── 3. Horizontal Scroll (Scrollytelling) ── */
.ft-horizontal {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background-color: var(--ft-bg);
    transition: background-color 1.2s ease, color 1.2s ease;
    position: relative;
}

.ft-horizontal__container {
    display: flex;
    height: 100vh;
    width: max-content;
    align-items: center;
    /* Center the first 800px panel exactly in the middle of the screen */
    padding-left: calc(50vw - 400px);
    /* Center the last 900px panel exactly in the middle when scroll ends.
       (50vw - 450px for half the panel width, minus the 60px panel internal padding) */
    padding-right: calc(50vw - 510px);
}

/* Fallback for smaller screens where calc might be negative */
@media (max-width: 800px) {
    .ft-horizontal__container {
        padding-left: var(--layout-padding, 40px);
        flex-direction: column;
        width: 100%;
        height: auto;
    }
    .ft-horizontal {
        height: auto;
        overflow: visible;
    }
}

.ft-horizontal__panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 60px;
    height: 100vh;
}

/* Massive Explainer Text */
.ft-huge-explainer {
    width: 800px; /* Fixed width for perfect centering math */
    flex-shrink: 0;
}
.ft-huge-explainer h2 {
    font-size: clamp(50px, 6vw, 100px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin: 0;
}
@media (max-width: 800px) {
    .ft-huge-explainer {
        width: 100%;
        height: auto;
        padding: 80px 0 40px;
    }
}

/* Desktop Media Cards */
.ft-horizontal__panel--media {
    width: 900px;
    flex-shrink: 0;
    position: relative; /* For absolutely positioned overlapping elements */
}
.media-card {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}
body:not(.theme-dark) .media-card {
    border: 1px solid rgba(0,0,0,0.05);
}
.media-card img,
.media-card video {
    width: 100%;
    display: block;
    border-radius: 24px;
}
@media (max-width: 800px) {
    .ft-horizontal__panel--media {
        width: 100%;
        height: auto;
        padding: 0;
        margin-bottom: 40px;
    }
}

/* Animated Neon Glow Border for specific media cards */
.media-card--glowing-border {
    position: relative;
    border: none !important;
    padding: 3px; /* Thickness of the glowing line */
    background: transparent;
    z-index: 1;
    overflow: hidden;
    max-width: 500px;
    box-shadow: 0 30px 80px rgba(212, 255, 63, 0.15); /* Soft neon aura */
}
.media-card--glowing-border::after {
    /* Inner backdrop so the card isn't transparent inside the border */
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--ft-bg);
    border-radius: 21px;
    z-index: -1;
}
.media-card--glowing-border::before {
    /* The rotating conic gradient */
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 60%,
        var(--ft-brand) 80%,
        var(--ft-accent) 100%
    );
    animation: rotateNeon 3.5s linear infinite;
    z-index: -2;
}
.media-card--glowing-border img {
    border-radius: 20px;
    position: relative;
    z-index: 2;
}

@keyframes rotateNeon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Glassy Pill Overlay */
.ft-glass-pill {
    position: absolute;
    bottom: 40px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 28px;
    background: rgba(25, 25, 25, 0.6);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 100px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    opacity: 0; /* Animated by GSAP */
    pointer-events: none;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
body:not(.theme-dark) .ft-glass-pill {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--ft-text);
}
.pill-icon svg { width: 24px; height: 24px; }

/* Overlapping Phone Slide-In */
.ft-overlapping-phone {
    position: absolute;
    bottom: -60px;
    right: -20px;
    z-index: 50;
    /* transform: translateY(100vh); Animated by GSAP */
}
.ft-overlapping-phone .mobile-frame {
    width: 260px;
    height: 563px; /* proportional 19.5:9 ratio */
    border-radius: 32px;
    border-width: 7px;
}
.mobile-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #111;
    color: #888;
    font-size: 16px;
    text-align: center;
    padding: 40px;
}

/* Mobile Screens Flow */
.ft-horizontal__panel--mobile-flow {
    display: flex;
    flex-direction: row; /* Side by side stacked phones */
    gap: 40px;
    width: max-content;
    padding: 0 80px;
    align-items: center;
}
.mobile-frame {
    width: 260px;
    height: 563px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,0.2);
    border: 8px solid #1d1d1f;
    background: #000;
    position: relative;
}
.mobile-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* GIF: hidden on desktop */
.mobile-flow-gif {
    display: none;
}

@media (max-width: 800px) {
    .ft-horizontal__panel--mobile-flow {
        position: relative;
        height: auto;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 40px 0 0;
    }
    /* Hide individual frames on mobile */
    .ft-horizontal__panel--mobile-flow .desktop-only-flow {
        display: none !important;
    }
    /* Show GIF on mobile — wide with sharp bottom cutoff */
    .mobile-flow-gif {
        display: block !important;
        width: 100% !important;
        margin: 0 auto;
        max-height: 80vh;
        overflow: hidden;
        border-radius: 20px 20px 0 0;
    }
    .mobile-flow-gif img {
        width: 100%;
        height: auto;
        display: block;
    }
    .ft-horizontal__panel--mobile-flow {
        filter: drop-shadow(0 20px 40px rgba(0,0,0,0.15));
    }
}


/* ── Swap Section (3 Felder + Dashboard) — Simple Stacked ── */
.ft-swap-section {
    background-color: #fff;
}
.ft-swap-stack {
    max-width: var(--layout-max-width, 1600px);
    margin: 0 auto;
    padding: clamp(60px, 10vw, 120px) var(--layout-padding, 40px);
    display: flex;
    flex-direction: row;
    gap: clamp(24px, 3vw, 48px);
    align-items: flex-start;
}
.ft-swap__block {
    flex: 1;
    min-width: 0;
}
.ft-swap__title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 0.95;
    margin: 0 0 24px;
    color: #111;
}
.ft-swap__title-fade {
    opacity: 0.25;
}
.ft-swap__media {
    border-radius: 20px;
    overflow: hidden;
}
.ft-swap__media img {
    width: 100%;
    display: block;
}
@media (max-width: 800px) {
    .ft-swap-stack {
        flex-direction: column;
        gap: clamp(48px, 8vw, 80px);
    }
    .ft-swap__media {
        border-radius: 16px;
    }
    .desktop-only-text {
        display: none;
    }
}

/* ── 4. Dark Section (Dashboard) ── */
.ft-dark-section {
    padding: 200px var(--layout-padding, 40px);
    text-align: center;
    background-color: #000;
}

.ft-huge-title {
    font-size: clamp(40px, 7vw, 90px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.ft-glow-container {
    position: relative;
    max-width: 1200px;
    margin: 80px auto 0;
    perspective: 1000px;
}
.ft-glow-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, var(--ft-accent) 0%, rgba(212,255,63,0) 70%);
    opacity: 0.15;
    filter: blur(60px);
    z-index: 1;
}
.ft-glow-img {
    position: relative;
    z-index: 2;
    width: 100%;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    display: block;
    overflow: hidden;
}
.ft-glow-img img,
.ft-glow-img picture {
    display: block;
    width: 100%;
    border-radius: 24px;
}

/* ── 5. Massive Performance Section ── */
.ft-performance {
    padding: 100px var(--layout-padding, 40px) 200px;
    max-width: var(--layout-max-width, 1600px);
    margin: 0 auto;
    text-align: center;
}

.ft-perf-header { margin-bottom: 80px; }
.ft-perf-header h2 { font-size: clamp(40px, 5vw, 64px); font-weight: 700; letter-spacing: -0.02em; }
.ft-perf-subtitle { font-size: 14px; font-weight: 500; color: #86868b; letter-spacing: 0.02em; margin: 0 0 8px; }

.ps-massive-flex { 
    display: inline-flex; 
    align-items: baseline; 
    justify-content: center;
    gap: 0; 
    margin-bottom: 32px; 
    padding: 0;
    background: none;
    border: none;
    border-radius: 0;
}
body:not(.theme-dark) .ps-massive-flex {
    background: none;
    border: none;
}

.ps-massive-score { 
    font-size: clamp(40px, 7vw, 90px); 
    font-weight: 200; 
    color: #1d1d1f;
    line-height: 1; 
    letter-spacing: -4px;
    font-variant-numeric: tabular-nums;
}
body:not(.theme-dark) .ps-massive-score { color: #1d1d1f; }
.ps-massive-score.divider { 
    color: #d2d2d7; 
    font-weight: 100; 
    opacity: 1; 
    font-size: clamp(28px, 4vw, 60px); 
    padding: 0 clamp(4px, 1vw, 14px);
    letter-spacing: 0;
}

.ft-perf-image {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 100px;
    border-radius: 40px;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    display: block;
}
body:not(.theme-dark) .ft-perf-image { border: 1px solid rgba(0,0,0,0.05); }
.ft-perf-image img,
.ft-perf-image picture,
.ft-perf-image video {
    width: 100%;
    display: block;
    border-radius: 40px;
}

/* ── Tech Logo Strip ── */
.ft-tech-strip {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    padding-top: 40px;
    border-top: 1px solid rgba(0,0,0,0.08);
}
.ft-tech-label {
    font-size: 13px;
    font-weight: 500;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin: 0 0 40px;
}
.ft-tech-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(30px, 5vw, 80px);
    flex-wrap: wrap;
}
.ft-tech-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
}
.ft-tech-logo:hover {
    transform: translateY(-4px);
}
.ft-tech-logo img {
    height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.5;
    transition: filter 0.3s ease, opacity 0.3s ease;
}
.ft-tech-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
}
.ft-tech-logo span {
    font-size: 12px;
    font-weight: 500;
    color: #86868b;
    letter-spacing: 0.02em;
}
/* Sticky CTA → shared component: assets/css/components/ref-sticky-cta.css */

/* ── Utility Animations ── */
.js-fade-up { opacity: 0; transform: translateY(40px); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .ft-bento__grid { grid-template-columns: repeat(2, 1fr); }
    .bento-card--large { grid-column: span 2; grid-row: span 1; }
}

@media (max-width: 768px) {
    /* 1. Hero Mobile Fix */
    .ft-hero {
        height: auto;
        min-height: auto;
        padding-top: 15vh;
        padding-bottom: 0; /* Remove bottom padding to pull the next section up */
    }
    .ft-hero__image-layer {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none !important; /* GSAP will only scale/opacity on mobile */
        width: 100%;
        margin-top: 40px;
        border-radius: 0; /* No border radius on mobile */
        max-height: none; /* Let the image flow naturally */
    }
    .ft-hero__image-layer img,
    .ft-hero__image-layer picture {
        border-radius: 0; /* No border radius on mobile */
    }
    
    /* 2. Typography Normalization & Spacing */
    .ft-statement {
        min-height: auto;
        padding: 60px var(--layout-padding, 24px) 100px;
    }
    .ft-hero__title {
        font-size: clamp(36px, 11vw, 80px) !important;
    }
    .ft-huge-explainer,
    .ft-statement {
        position: sticky;
        top: 20vh;
        z-index: 10;
    }
    .ft-huge-explainer h2,
    .ft-statement h2 {
        font-size: clamp(40px, 10vw, 64px) !important;
        line-height: 1.1;
        letter-spacing: -0.02em;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    .mobile-only-text {
        display: block;
        margin-top: 16px;
        font-size: 16px;
        color: var(--ft-text-muted);
        line-height: 1.5;
        font-weight: 500;
        max-width: 95%;
        word-break: break-word;
    }

    /* 3. Horizontal Scroll / Pinning Fix */
    .ft-horizontal { height: auto; overflow: visible; background: var(--wp--preset--color--bg, #F5F4F0); padding: 0; overflow-x: clip; }
    .ft-horizontal__container { 
        display: block; 
        width: 100%; 
        height: auto; 
        padding: 0 var(--layout-padding, 24px); 
        box-sizing: border-box;
    }
    .ft-horizontal__panel { 
        width: 100%; 
        height: auto; 
        padding: 0; 
        padding-bottom: 12vh; 
        margin-bottom: 0; 
        box-sizing: border-box;
    }
    .ft-horizontal__panel--mobile-flow {
        padding-bottom: 0;
        margin-bottom: 0;
    }
    
    /* 4. Solid Background Cut (First Message) */
    .ft-horizontal__panel--intro,
    .ft-horizontal__panel--intro + .pin-spacer,
    .ft-horizontal__panel--media.ft-horizontal__panel--interactive {
        background-color: #ffffff;
    }
    body.theme-dark .ft-horizontal__panel--intro,
    body.theme-dark .ft-horizontal__panel--intro + .pin-spacer,
    body.theme-dark .ft-horizontal__panel--media.ft-horizontal__panel--interactive {
        background-color: #050505;
    }
    
    .ft-horizontal__panel--intro {
        width: calc(100% + var(--layout-padding, 24px) * 2);
        max-width: none;
        margin-left: calc(var(--layout-padding, 24px) * -1);
        margin-right: calc(var(--layout-padding, 24px) * -1);
        padding-left: var(--layout-padding, 24px);
        padding-right: 40px; /* Force title to break early, at least 25px from right edge */
        padding-top: 80px;
        padding-bottom: 40px;
        margin-bottom: 0;
        box-sizing: border-box;
    }
    
    .ft-horizontal__panel--media.ft-horizontal__panel--interactive {
        width: calc(100% + var(--layout-padding, 24px) * 2);
        max-width: none;
        margin-left: calc(var(--layout-padding, 24px) * -1);
        margin-right: calc(var(--layout-padding, 24px) * -1);
        padding-bottom: 0; /* Flush with bottom */
        margin-bottom: 9vh;
        box-sizing: border-box;
    }
    
    .ft-horizontal__panel--interactive .media-card,
    .ft-horizontal__panel--interactive .media-card img,
    .ft-horizontal__panel--interactive .media-card video {
        border-radius: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    
    /* Pre-dark explainer panels: full-width */
    .ft-huge-explainer:not(.ft-dark-start) {
        width: calc(100% + var(--layout-padding, 24px) * 2) !important;
        margin-left: calc(var(--layout-padding, 24px) * -1) !important;
        margin-right: calc(var(--layout-padding, 24px) * -1) !important;
        padding-left: var(--layout-padding, 24px) !important;
        padding-right: var(--layout-padding, 24px) !important;
    }
    .ft-huge-explainer.ml-16 {
        padding-bottom: 4vh !important;
    }
    
    /* Floating Widget for the GIF (Focus-Card) — Full width on mobile */
    .media-card--glowing-border {
        width: calc(100% + var(--layout-padding, 24px) * 2) !important;
        margin-left: calc(var(--layout-padding, 24px) * -1) !important;
        margin-right: calc(var(--layout-padding, 24px) * -1) !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 0 !important;
        border: none !important;
    }
    .media-card--glowing-border::before,
    .media-card--glowing-border::after {
        display: none !important; /* Kill the glow effect */
    }
    .media-card--glowing-border img {
        border-radius: 0 !important;
        width: 100%;
    }
    
    .ft-overlapping-phone {
        position: relative;
        top: auto;
        bottom: auto;
        right: auto;
        transform: none;
        width: 100%;
        margin: 160px auto 0;
        display: flex;
        justify-content: center;
        /* The Mask */
        height: calc((100vw - 120px) * (2532 / 1170) * 0.50); /* 50% of the child's height */
        overflow: hidden;
    }
    .ft-overlapping-phone .mobile-frame {
        width: calc(100vw - 120px); /* 60px spacing on left and right */
        height: auto;
        aspect-ratio: 1170/2532; /* Original iPhone ratio */
        
        /* The phone bezel */
        border: 10px solid #000;
        border-bottom: none; /* Flat at the bottom */
        border-radius: 36px 36px 0 0; /* Rounded top only */
        box-shadow: none; /* No shadow */
        background-color: #000;
    }
    .ft-overlapping-phone .mobile-frame img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 26px 26px 0 0; /* Inner border radius matches outer minus border width */
    }
    
    /* 5. Glassy Pill Format */
    .ft-glass-pill {
        white-space: nowrap;
        padding: 12px 20px;
        font-size: 13px;
        bottom: 30px;
    }
    .pill-icon svg { width: 18px; height: 18px; }
    
    /* 6. GIF panel: no bottom margin */
    .ft-horizontal__panel--media:has(.media-card--glowing-border) {
        margin-bottom: 0 !important;
        padding-bottom: 60px !important;
    }
    
    /* 7. Dark Theme Transition — Apple Style */
    .ft-dark-start {
        margin-top: 0 !important;
        padding-top: 15vh !important;
        padding-bottom: 10vh !important;
        background-color: #000 !important;
        color: #fff !important;
        width: calc(100% + var(--layout-padding, 24px) * 2) !important;
        margin-left: calc(var(--layout-padding, 24px) * -1) !important;
        margin-right: calc(var(--layout-padding, 24px) * -1) !important;
        padding-left: var(--layout-padding, 24px) !important;
        padding-right: var(--layout-padding, 24px) !important;
    }
    .ft-dark-start h2 {
        color: #fff !important;
    }
    .ft-dark-start .text-brand {
        color: var(--ft-accent) !important;
    }
    
    /* Everything after .ft-dark-start stays dark */
    .ft-dark-start ~ .ft-horizontal__panel {
        background-color: #000 !important;
        color: #fff !important;
        width: calc(100% + var(--layout-padding, 24px) * 2) !important;
        margin-left: calc(var(--layout-padding, 24px) * -1) !important;
        margin-right: calc(var(--layout-padding, 24px) * -1) !important;
        padding-left: var(--layout-padding, 24px) !important;
        padding-right: var(--layout-padding, 24px) !important;
    }
    .ft-dark-start ~ .ft-horizontal__panel h2 {
        color: #fff !important;
    }
    .ft-dark-start ~ .ft-horizontal__panel .text-brand {
        color: var(--ft-accent) !important;
    }
    .ft-dark-start ~ .ft-horizontal__panel .mobile-frame {
        border-color: #333 !important;
    }
    
    .ft-bento__grid { grid-template-columns: 1fr; grid-auto-rows: auto; min-height: 240px; }
    .bento-card--large { grid-column: span 1; grid-row: span 1; }
    
    /* Massive Performance Counters */
    .ps-massive-flex {
        display: inline-flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0;
        padding: 0;
    }
    .ps-massive-score.divider { display: inline; font-size: clamp(20px, 5vw, 36px); padding: 0 3px; }
    .ps-massive-score { font-size: clamp(36px, 10vw, 60px); letter-spacing: -2px; }

    /* PageSpeed video — full bleed */
    .ft-perf-image {
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        margin-left: calc(-1 * var(--layout-padding, 40px));
        margin-right: calc(-1 * var(--layout-padding, 40px));
        max-width: none;
        width: calc(100% + 2 * var(--layout-padding, 40px));
    }
    .ft-perf-image video,
    .ft-perf-image img {
        border-radius: 0 !important;
    }
    
    /* Tech Logo Strip */
    .ft-tech-logos {
        gap: 24px;
    }
    .ft-tech-logo img {
        height: 30px;
    }
}
