﻿:root {
    --bg-color: #050505;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --text-tertiary: #444444;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.25);
    --font-main: 'Inter', sans-serif;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Page Transition Base */
    opacity: 1;
    transition: opacity 0.4s ease-out;
}

/* Page Transition State */
body.page-transitioning {
    opacity: 0;
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}



/* Cinematic Background */
.main-bg {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background-image: url('assets/bg.png');
    background-size: cover;
    background-position: center;
    background-color: #030508;
    z-index: -2;
}

.bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Lighter dark overlay at the top so the image shows through more vividly */
    background: linear-gradient(
        to bottom, 
        rgba(5, 5, 5, 0.3) 0%, 
        var(--bg-color) 70%
    );
    z-index: -1;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 30px 0;
    z-index: 100;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 18px;
    letter-spacing: -0.5px;
}

.logo-text {
    background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-img {
    height: 55px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Hero Section */
.hero {
    height: 60vh;
    min-height: 500px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
}

.hero-content {
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
    padding: 0 40px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.hero-title {
    font-size: 56px;
    font-weight: 600;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 20px;
    max-width: 700px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 500px;
    font-weight: 400;
    line-height: 1.7;
}

/* Main Content Area */
.main-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 40px 100px;
}

/* List Sections */
.list-section {
    margin-bottom: 70px;
}

.section-header {
    margin-bottom: 30px;
    position: relative;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.section-number {
    font-size: 11px;
    color: var(--text-tertiary);
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.section-title {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: -0.5px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Lists */
.list-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px;
    background-color: #080808;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.list-item:hover {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.item-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #ffffff;
    transition: var(--transition);
}

.item-desc {
    color: var(--text-secondary);
    font-size: 14px;
}

.item-arrow {
    font-family: monospace;
    font-size: 20px;
    color: var(--text-tertiary);
    transition: var(--transition);
}

.list-item:hover .item-arrow {
    color: #ffffff;
    transform: translateX(5px);
}

/* --- Script Carousel --- */
.carousel-section {
    margin-bottom: 80px;
}

.script-carousel {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin-left: -40px; /* Overcome container padding to bleed to edges */
    margin-right: -40px;
    padding-left: 40px;
    padding-right: 40px;
    cursor: grab;
    -ms-overflow-style: none; /* IE/Edge */
    scrollbar-width: none; /* Firefox */
}

.script-carousel::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.script-carousel:active {
    cursor: grabbing;
}

.script-card {
    min-width: 340px;
    max-width: 340px;
    background-color: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    /* 3D Transform base */
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

.glare {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 60%);
    opacity: 0;
    z-index: 10;
    transition: opacity 0.3s ease;
}

.tilt-card:hover .glare {
    opacity: 1;
}

.script-img {
    height: 180px;
    background-size: cover;
    background-position: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateZ(20px); /* Pop out effect */
}

.script-info {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    transform: translateZ(30px); /* Pop out effect */
}

.script-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    line-height: 1.4;
    color: #ffffff;
}

.script-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.script-tag {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    color: #fff;
}

.script-tag.esx { background-color: rgba(255, 107, 0, 0.2); border: 1px solid rgba(255, 107, 0, 0.4); color: #ff8c33; }
.script-tag.qb { background-color: rgba(0, 163, 255, 0.2); border: 1px solid rgba(0, 163, 255, 0.4); color: #66c4ff; }
.script-tag.qbox { background-color: rgba(255, 214, 0, 0.2); border: 1px solid rgba(255, 214, 0, 0.4); color: #ffe566; }

.script-btn {
    margin-top: auto;
    display: block;
    text-align: center;
    padding: 12px;
    background-color: #ffffff;
    color: #000000;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    transition: var(--transition);
}

.script-btn:hover {
    background-color: #e0e0e0;
    transform: scale(1.02);
}

/* --- YouTube Carousel Section --- */
.yt-card {
    min-width: 320px;
    max-width: 320px;
    scroll-snap-align: start;
    position: relative;
    display: flex;
    flex-direction: column;
    transform-style: preserve-3d;
    transform: perspective(1000px);
    cursor: pointer;
}

.yt-img {
    height: 180px;
    border-radius: 12px;
    background-size: cover;
    background-position: center;
    margin-bottom: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transform: translateZ(20px);
}

.yt-info {
    padding: 0 5px;
    transform: translateZ(30px);
}

.yt-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Apple Style Product Page (reload-phone.html) --- */
.apple-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 80px 20px 40px;
}

.apple-title {
    font-size: 80px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: #f5f5f7;
    margin-bottom: 20px;
}

.apple-subtitle {
    font-size: 24px;
    font-weight: 400;
    line-height: 1.4;
    color: #86868b;
    margin-bottom: 60px;
}

.apple-phone-mockup {
    width: 100%;
    max-width: 340px;
    margin: 0 auto 50px;
}

.apple-phone-mockup .mockup-img {
    width: 100%;
    border-radius: 40px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
    border: 6px solid #2a2a2d;
}

.btn-black {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #000;
    color: white;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 15px 30px;
    border-radius: 100px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-black:hover {
    background: #1d1d1f;
    border-color: rgba(255,255,255,0.2);
}

.apple-demo {
    padding: 100px 20px;
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(10, 10, 12, 0.8));
}

.demo-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(0, 122, 255, 0.1);
    color: #2997ff;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* Footer */
.footer {
    text-align: center;
    padding: 40px;
    border-top: 1px solid var(--border-color);
    color: var(--text-tertiary);
    font-size: 12px;
}

/* Elegant Reveal Animation */
.fade-up {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container, .hero-content, .main-content {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-title {
        font-size: 38px;
    }
    
}

/* --- Project Detail Page --- */
.project-detail {
    padding-top: 80px;
    padding-bottom: 120px;
}

.project-header {
    margin-bottom: 60px;
}

.back-link {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 24px;
    transition: var(--transition);
}

.back-link:hover {
    color: #ffffff;
    transform: translateX(-4px);
}

.project-title {
    font-size: 42px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 40px;
}

.project-content {
    display: flex;
    flex-direction: column;
    gap: 80px;
    margin-top: 60px;
}

.project-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.project-text p {
    color: #b0b0b0;
    font-size: 15px;
    line-height: 1.8;
    margin-bottom: 20px;
}

.project-text p:last-child {
    margin-bottom: 0;
}

.project-media {
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background-color: #111;
    border: 1px solid rgba(255, 255, 255, 0.05);
    aspect-ratio: 16/9;
    position: relative;
}

.youtube-placeholder {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #222, #111);
    cursor: pointer;
    transition: var(--transition);
}

.youtube-placeholder:hover {
    transform: scale(1.02);
}

.play-button {
    width: 60px;
    height: 40px;
    background-color: #ff0000;
    border-radius: 8px;
    position: relative;
    margin-bottom: 16px;
}

.play-button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid white;
}

.yt-text {
    font-size: 13px;
    color: #fff;
}

@media (max-width: 768px) {
    .project-row {
        grid-template-columns: 1fr;
    }
    
    .project-row:nth-child(even) .project-media {
        order: -1;
    }
}



/* --- RLD Phone Interactive Demo --- */
.phone-demo-section {
    padding: 110px 0 40px;
}

.phone-demo-showcase {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.86fr) minmax(440px, 1.14fr);
    align-items: center;
    gap: 32px;
    min-height: 860px;
    padding: 44px 34px 34px 48px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 30px;
    background:
        radial-gradient(circle at 78% 42%, rgba(47, 123, 255, 0.16), transparent 32%),
        linear-gradient(145deg, rgba(20, 23, 30, 0.88), rgba(7, 8, 11, 0.94));
    box-shadow: 0 35px 90px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.04);
    overflow: hidden;
}

.phone-demo-showcase::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(to right, transparent, #000 45%, #000);
}

.phone-demo-copy {
    position: relative;
    z-index: 2;
    max-width: 430px;
}

.phone-demo-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
    padding: 8px 13px;
    color: #a8cfff;
    border: 1px solid rgba(78, 147, 255, 0.24);
    border-radius: 999px;
    background: rgba(47, 123, 255, 0.09);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.05px;
    text-transform: uppercase;
}

.phone-demo-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4fd38c;
    box-shadow: 0 0 0 5px rgba(79, 211, 140, 0.1), 0 0 16px rgba(79, 211, 140, 0.7);
    animation: demo-live-pulse 1.8s ease-in-out infinite;
}

.phone-demo-copy h3 {
    margin-bottom: 19px;
    color: #f5f7fb;
    font-size: clamp(31px, 4vw, 48px);
    line-height: 1.06;
    letter-spacing: -1.7px;
}

.phone-demo-copy > p {
    color: #a4a9b3;
    font-size: 15px;
    line-height: 1.75;
}

.phone-demo-notice {
    margin-top: 22px;
    padding: 15px 17px;
    color: #8e96a5;
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
    font-size: 12px;
    line-height: 1.65;
}

.phone-demo-actions,
.demo-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.phone-demo-actions { margin-top: 28px; }

.phone-demo-primary,
.phone-demo-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 45px;
    padding: 0 18px;
    border-radius: 12px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
    transition: transform .2s ease, border-color .2s ease, background .2s ease, color .2s ease;
}

.phone-demo-primary {
    color: #07101e;
    border: 1px solid #82b8ff;
    background: linear-gradient(180deg, #a9d2ff, #69a9ff);
    box-shadow: 0 10px 28px rgba(47, 123, 255, 0.24);
}

.phone-demo-secondary {
    color: #e8ebf1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.045);
    cursor: pointer;
}

.phone-demo-primary:hover,
.phone-demo-secondary:hover {
    transform: translateY(-2px);
}

.phone-demo-secondary:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(255, 255, 255, 0.075);
}

.phone-demo-device {
    position: relative;
    z-index: 1;
    display: flex;
    min-width: 0;
    min-height: 930px;
    align-items: center;
    justify-content: center;
}

.phone-demo-glow,
.standalone-demo-glow {
    position: absolute;
    width: 390px;
    height: 620px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(47, 123, 255, .25), rgba(47, 123, 255, .055) 45%, transparent 72%);
    filter: blur(12px);
    pointer-events: none;
}

.phone-demo-frame {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 560px;
    height: 930px;
    filter: saturate(1.01);
    border: 0;
    background: transparent;
    overflow: hidden;
}

.phone-demo-hint {
    position: absolute;
    z-index: 3;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: max-content;
    max-width: 90%;
    color: rgba(255, 255, 255, 0.34);
    font-size: 10px;
    letter-spacing: .25px;
}

@keyframes demo-live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .55; transform: scale(.86); }
}

/* Dedicated full-page demo */
.demo-page-body { min-height: 100vh; overflow-x: hidden; }
.demo-page-overlay {
    background:
        radial-gradient(circle at 70% 50%, rgba(29, 91, 181, .18), transparent 36%),
        linear-gradient(to bottom, rgba(5,5,5,.3), rgba(5,5,5,.88) 76%, #050505);
}
.demo-navbar { padding: 20px 0; }
.demo-logo-link { text-decoration: none; }
.demo-back-button { min-height: 40px; }

.standalone-phone-demo {
    width: min(1120px, calc(100% - 64px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 110px 0 28px;
    display: grid;
    grid-template-columns: minmax(300px, .9fr) minmax(420px, 1.1fr);
    gap: 18px;
    align-items: center;
}

.standalone-demo-copy { max-width: 430px; }
.standalone-demo-copy h1 {
    margin: 0 0 24px;
    color: #f7f8fb;
    font-size: clamp(40px, 4.8vw, 64px);
    line-height: .98;
    letter-spacing: -2.8px;
}
.standalone-demo-copy > p {
    max-width: 500px;
    color: #9ca2ad;
    font-size: 15px;
    line-height: 1.65;
}
.standalone-demo-copy .phone-demo-notice { max-width: 410px; }

.standalone-demo-device {
    position: relative;
    display: flex;
    min-height: 820px;
    align-items: center;
    justify-content: center;
}

.standalone-phone-frame {
    position: relative;
    z-index: 2;
    width: min(560px, 100%);
    height: 820px;
    filter: saturate(1.01);
    border: 0;
    background: transparent;
}

@media (max-width: 930px) {
    .phone-demo-showcase {
        grid-template-columns: 1fr;
        padding: 38px 22px 24px;
    }
    .phone-demo-copy { max-width: 680px; }
    .phone-demo-device { min-height: 870px; }
    .standalone-phone-demo {
        grid-template-columns: 1fr;
        width: min(760px, calc(100% - 36px));
        padding-top: 128px;
        text-align: center;
    }
    .standalone-demo-copy { max-width: 680px; margin: 0 auto; }
    .standalone-demo-copy .phone-demo-notice { margin-left: auto; margin-right: auto; }
    .standalone-demo-device { min-height: 760px; }
}

@media (max-width: 640px) {
    .nav-links { gap: 13px; }
    .nav-links a { font-size: 10px; }
    .phone-demo-section { padding-top: 80px; }
    .phone-demo-showcase { border-radius: 22px; }
    .phone-demo-copy h3 { font-size: 34px; letter-spacing: -1.2px; }
    .phone-demo-device { min-height: 700px; margin-left: -12px; margin-right: -12px; }
    .phone-demo-frame { height: 820px; }
    .phone-demo-hint { display: none; }
    .demo-navbar .logo-text { display: none; }
    .demo-navbar .nav-container { padding-left: 16px; padding-right: 16px; }
    .standalone-phone-demo { width: calc(100% - 20px); padding-top: 118px; }
    .standalone-demo-copy h1 { font-size: 42px; letter-spacing: -2px; }
    .standalone-demo-device { min-height: 700px; }
    .standalone-phone-frame { height: 720px; }
}


/* --- Dedicated Phone Demo Feature Grid --- */
.demo-navbar {
    padding: 16px 0;
}

.demo-navbar.navbar.scrolled {
    background: rgba(4, 9, 18, 0.72);
    border-bottom-color: rgba(98, 157, 255, 0.12);
}

.demo-nav-actions {
    gap: 12px;
}

.demo-nav-btn.phone-demo-primary,
.demo-nav-btn.phone-demo-secondary {
    min-height: 44px;
    padding: 0 20px;
    border-radius: 15px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -0.1px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.demo-nav-btn.phone-demo-primary {
    color: #edf4ff;
    border: 1px solid rgba(101, 155, 255, 0.42);
    background: linear-gradient(180deg, rgba(49, 94, 164, 0.95), rgba(24, 46, 82, 0.95));
    box-shadow: 0 14px 34px rgba(20, 48, 98, 0.25), inset 0 1px 0 rgba(255,255,255,0.08);
}

.demo-nav-btn.phone-demo-secondary {
    color: #dfe9fb;
    border: 1px solid rgba(255,255,255,0.11);
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.02));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.demo-nav-btn.phone-demo-primary:hover,
.demo-nav-btn.phone-demo-secondary:hover {
    transform: translateY(-2px);
}

.standalone-phone-demo {
    padding-bottom: 56px;
}

.standalone-demo-copy h1 {
    margin-bottom: 18px;
}

.phone-demo-features {
    position: relative;
    z-index: 2;
    width: min(1120px, calc(100% - 64px));
    margin: 0 auto 90px;
}

.phone-demo-features-inner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.demo-feature-card {
    position: relative;
    min-height: 210px;
    padding: 24px 26px;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.075);
    background: linear-gradient(180deg, rgba(5,10,18,0.88), rgba(3,5,9,0.93));
    box-shadow: 0 28px 60px rgba(0,0,0,0.20), inset 0 1px 0 rgba(255,255,255,0.04);
}

.demo-feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at top right, rgba(49, 100, 189, 0.14), transparent 34%);
}

.demo-feature-card h3 {
    margin: 4px 0 10px;
    font-size: 19px;
    line-height: 1.15;
    letter-spacing: -0.6px;
    color: #f4f7fb;
}

.demo-feature-card p {
    color: #8d97a7;
    font-size: 14px;
    line-height: 1.65;
}

.demo-feature-kicker {
    display: block;
    color: #727b88;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.demo-feature-wide { grid-column: span 2; }
.demo-feature-latency { grid-column: span 2; }
.demo-feature-process { grid-column: span 2; }

.demo-feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.demo-feature-tags span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    color: #eef2f8;
    font-size: 12px;
    font-weight: 600;
}

.tag-dot,
.console-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.tag-dot.green, .console-dot.green { background: #2de58a; }
.tag-dot.blue { background: #4f96ff; }
.tag-dot.purple { background: #9b68ff; }
.console-dot.red { background: #ff6258; }
.console-dot.yellow { background: #f8c24d; }

.demo-feature-stat {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.demo-stat-big {
    color: #f9fbff;
    font-size: clamp(44px, 5vw, 64px);
    font-weight: 750;
    line-height: 0.95;
    letter-spacing: -2.5px;
    margin-bottom: 14px;
}

.demo-stat-caption {
    max-width: 180px;
}

.demo-feature-visual {
    position: relative;
    height: 84px;
    margin-bottom: 16px;
}

.appstore-visual {
    display: flex;
    align-items: center;
    gap: 10px;
}

.visual-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    height: 44px;
    padding: 0 16px;
    border-radius: 14px;
    color: #eff6ff;
    border: 1px solid rgba(96, 162, 255, 0.18);
    background: linear-gradient(180deg, rgba(78,133,255,0.24), rgba(78,133,255,0.08));
    font-size: 13px;
    font-weight: 700;
}

.visual-mini-card {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.085), rgba(255,255,255,0.03));
}

.island-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.island-chip {
    width: 84px;
    height: 26px;
    border-radius: 999px;
    background: #07090d;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 0 1px rgba(255,255,255,0.06);
    z-index: 2;
}

.island-ring {
    position: absolute;
    width: 122px;
    height: 82px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: 0 0 0 18px rgba(255,255,255,0.015);
}

.latency-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.latency-top strong {
    color: #28f0a0;
    font-size: 20px;
    letter-spacing: -0.4px;
}

.latency-bar {
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
    margin-bottom: 8px;
}

.latency-bar i {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1af0b0, #4d8fff);
}

.latency-scale {
    display: flex;
    justify-content: space-between;
    color: #5e6772;
    font-size: 11px;
    margin-bottom: 20px;
}

.process-line {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.process-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    color: #eff4fb;
    border: 1px solid rgba(255,255,255,0.09);
    background: rgba(255,255,255,0.04);
    font-size: 13px;
    font-weight: 700;
}

.process-line b {
    width: 18px;
    height: 1px;
    background: rgba(255,255,255,0.16);
}

.console-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 18px;
}

.console-lines span {
    color: #dfe9f7;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .phone-demo-features-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 930px) {
    .phone-demo-features {
        width: min(760px, calc(100% - 36px));
        margin-bottom: 70px;
    }
}

@media (max-width: 720px) {
    .phone-demo-features-inner {
        grid-template-columns: 1fr;
    }
    .demo-feature-wide,
    .demo-feature-latency,
    .demo-feature-process {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .demo-nav-actions {
        gap: 8px;
    }
    .demo-nav-btn.phone-demo-primary,
    .demo-nav-btn.phone-demo-secondary {
        min-height: 40px;
        padding: 0 15px;
        font-size: 12px;
        border-radius: 13px;
    }
    .phone-demo-features {
        width: calc(100% - 20px);
    }
    .demo-feature-card {
        min-height: 0;
        padding: 22px 18px;
        border-radius: 22px;
    }
    .demo-stat-big {
        font-size: 42px;
    }
}

.demo-stat-unit {
    display: inline-block;
    margin-left: 6px;
    font-size: .34em;
    line-height: 1;
    letter-spacing: -.3px;
    vertical-align: middle;
    opacity: .82;
}

.latency-scale {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.latency-scale span:nth-child(2) { text-align: center; }
.latency-scale span:nth-child(3) { text-align: right; }


/* --- Dynamic Project Detail --- */
.project-detail-overlay {
    background: linear-gradient(to bottom, rgba(3,7,13,.88), rgba(4,5,8,.97) 64%, #050505);
}
.project-detail-category {
    display: inline-block;
    margin-bottom: 13px;
    color: #6f7886;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}
.project-detail-subtitle {
    max-width: 720px;
    margin-top: 20px;
    color: #8f98a6;
    font-size: 15px;
    line-height: 1.7;
}
.project-text h2 {
    margin: 0 0 15px;
    color: #f4f6fa;
    font-size: 24px;
    letter-spacing: -.7px;
}
.project-row-text-only {
    grid-template-columns: 1fr;
}
.project-row-text-only .project-text {
    max-width: 780px;
}
.project-media-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.project-youtube-card {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background-position: center;
    background-size: cover;
    text-decoration: none;
}
.project-youtube-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(1,3,8,.22), rgba(1,3,8,.68));
}
.project-youtube-play {
    position: relative;
    z-index: 2;
    width: 66px;
    height: 47px;
    border-radius: 13px;
    background: #ff0037;
    box-shadow: 0 14px 30px rgba(255,0,55,.28);
}
.project-youtube-play::after {
    content: '';
    position: absolute;
    top: 50%; left: 52%;
    transform: translate(-50%,-50%);
    border-top: 9px solid transparent;
    border-bottom: 9px solid transparent;
    border-left: 15px solid white;
}
.project-youtube-label {
    position: relative;
    z-index: 2;
    margin-top: 17px;
    color: #fff;
    font-size: 14px;
}
.project-empty-state {
    padding: 42px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    background: rgba(255,255,255,.025);
}
.project-empty-state h2 { margin-bottom: 8px; }
.project-empty-state p { color: #8d96a3; }
