/* --- Design tokens --- */
:root {
    --bg-main: #080510;
    --bg-elevated: #120C22;
    --bg-soft: #1A1230;
    --bg-card: #140E26;
    --primary: #A78BFA;
    --primary-hover: #C4B5FD;
    --primary-soft: rgba(167, 139, 250, 0.14);
    --primary-glow: rgba(157, 78, 221, 0.35);
    --secondary: #C4B5FD;
    --ink: #F8FAFC;
    --text-main: #F8FAFC;
    --text-muted: #A1A1AA;
    --border-color: rgba(167, 139, 250, 0.14);
    --border-strong: rgba(167, 139, 250, 0.24);
    --nav-bg: rgba(8, 5, 16, 0.72);
    --btn-bg: #8B5CF6;
    --btn-bg-hover: #A78BFA;
    --btn-text: #FFFFFF;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 12px 40px rgba(88, 28, 180, 0.25);
    --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.5);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 999px;
    --font-sans: 'Public Sans', sans-serif;
    --font-serif: 'Public Sans', sans-serif;
    --font-stack: var(--font-sans);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --max-w: 1200px;
    --nav-h: 76px;
    --stage: linear-gradient(155deg, #4C1D95 0%, #2E1065 48%, #1E0B45 100%);
}

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

button, .btn, input, select, textarea {
    font-family: 'Public Sans', sans-serif;
}
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
    transition: background-color 0.3s ease, color 0.3s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(ellipse 75% 45% at 50% -10%, rgba(88, 28, 135, 0.16), transparent 55%),
        radial-gradient(ellipse 35% 30% at 100% 35%, rgba(76, 29, 149, 0.08), transparent 50%),
        linear-gradient(180deg, rgba(8, 4, 16, 0.52) 0%, rgba(5, 3, 12, 0.68) 100%),
        url('images/brokerbotics-background-purple.jpg') center / cover no-repeat;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 48px; }
.p-4 { padding: 24px; }
.p-5 { padding: 48px; }
.pb-0 { padding-bottom: 0 !important; }
.border-b { border-bottom: 1px solid var(--border-color); }
.border-0 { border: none !important; }
.position-relative { position: relative; }
.z-10 { z-index: 10; }
.w-100 { width: 100%; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 28px;
}

.section { padding: 100px 0; }
.section[id] { scroll-margin-top: 100px; }
#extension { scroll-margin-top: 110px; }

.eyebrow { display: none; }

.text-gradient {
    color: inherit;
    background: none;
    -webkit-text-fill-color: unset;
}

.accent { color: var(--primary); }

/* --- Surfaces --- */
.glass-panel,
.surface {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* --- Typography --- */
h1, h2 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--text-main);
}

h1 {
    font-size: clamp(3rem, 6.5vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 3.8vw, 2.75rem);
    line-height: 1.12;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
    font-weight: 600;
}

h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-main);
    font-family: var(--font-sans);
}

h4 {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-family: var(--font-sans);
}

p {
    color: var(--text-muted);
    font-size: 1.0625rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.subtitle {
    font-size: 1.1rem;
    max-width: 480px;
    color: var(--text-muted);
    line-height: 1.65;
    font-weight: 400;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1000;
    background: var(--nav-bg);
    border-bottom: 1px solid transparent;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: border-color 0.25s ease;
}

.navbar.scrolled {
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 28px;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.theme-toggle,
#theme-toggle,
.sun-icon,
.moon-icon {
    display: none !important;
}

.logo {
    height: 38px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    display: block;
}

.footer-logo {
    height: 42px;
    width: auto;
    max-width: 270px;
    margin-bottom: 14px;
    object-fit: contain;
    display: block;
}

.theme-asset { filter: invert(100%); }

.nav-links {
    display: flex;
    gap: 2px;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: var(--radius-full);
}

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

/* --- Buttons: brand purple, white label always --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 0.925rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
    font-family: 'Public Sans', sans-serif;
    line-height: 1.2;
}

.btn:active { transform: scale(0.98); }

.btn-primary,
.btn-glow {
    background: var(--btn-bg);
    color: var(--btn-text) !important;
    border-color: var(--btn-bg);
    box-shadow: 0 8px 24px var(--primary-glow);
    animation: none;
}

.btn-primary:hover,
.btn-glow:hover {
    background: var(--btn-bg-hover);
    border-color: var(--btn-bg-hover);
    color: var(--btn-text) !important;
    box-shadow: 0 12px 32px var(--primary-glow);
    filter: none;
}

.btn-outline {
    background: transparent;
    color: var(--text-main) !important;
    border: 1.5px solid var(--border-strong);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--primary-soft);
    color: var(--primary) !important;
    border-color: var(--primary);
}

.nav-cta {
    padding: 10px 18px;
    font-size: 0.875rem;
}

/* --- Hero: wide split --- */
.hero {
    padding: calc(var(--nav-h) + 48px) 0 72px;
    display: flex;
    align-items: center;
    min-height: min(92vh, 900px);
}

.hero-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 56px;
    align-items: center;
    width: 100%;
}

.hero-copy {
    width: 100%;
    max-width: 520px;
    text-align: left;
}

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

.hero-copy .subtitle {
    margin-bottom: 28px;
    max-width: 440px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.hero-visual {
    width: 100%;
    position: relative;
}

.hero-visual::before {
    content: '';
    position: absolute;
    inset: 22% 6% 4% 10%;
    border-radius: 24px;
    background: var(--stage);
    box-shadow: 0 24px 60px var(--primary-glow);
    z-index: 0;
    opacity: 0.55;
}

.device-laptop {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
    overflow: visible;
    transition: transform 0.35s var(--ease);
}

.device-laptop:hover,
.device-laptop:focus-visible {
    transform: translateY(-6px) scale(1.02);
    outline: none;
}

.device-laptop-lid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 12px 14px;
    background: linear-gradient(180deg, #2a2a32 0%, #16161c 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px 18px 10px 10px;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
}

.device-laptop-trace {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 3;
}

.device-laptop-trace-idle {
    fill: none;
    stroke: rgba(167, 139, 250, 0.28);
    stroke-width: 1.5;
    vector-effect: non-scaling-stroke;
}

.device-laptop-trace-run {
    fill: none;
    stroke: url(#laptop-trace-grad);
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
    stroke-dasharray: 120 380 120 380;
    animation: laptop-trace 6s linear infinite;
    filter: drop-shadow(0 0 5px #A78BFA) drop-shadow(0 0 12px rgba(139, 92, 246, 0.85));
}

@keyframes laptop-trace {
    to { stroke-dashoffset: -1000; }
}

.device-laptop-camera {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #0c0c10;
    box-shadow: inset 0 0 0 1.5px #3a3a44;
    flex-shrink: 0;
}

.device-laptop-screen {
    position: relative;
    width: 100%;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    line-height: 0;
}

.device-laptop-screen img {
    width: 100%;
    height: auto;
    display: block;
}

.device-laptop-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(8, 6, 18, 0.55) 100%);
    pointer-events: none;
}

.device-laptop-hint {
    position: absolute;
    left: 50%;
    bottom: 16px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateX(-50%);
    padding: 10px 16px 10px 12px;
    border-radius: var(--radius-full);
    background: var(--btn-bg);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 10px 28px rgba(88, 28, 180, 0.45);
    animation: demo-hint-pulse 2.4s ease-in-out infinite;
}

.device-laptop-play {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.device-laptop-play::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    margin: 6px 0 0 8px;
    border-style: solid;
    border-width: 5px 0 5px 8px;
    border-color: transparent transparent transparent #fff;
}

.device-laptop:hover .device-laptop-hint,
.device-laptop:focus-visible .device-laptop-hint {
    background: var(--btn-bg-hover);
    animation: none;
}

@keyframes demo-hint-pulse {
    0%, 100% { transform: translateX(-50%) scale(1); box-shadow: 0 10px 28px rgba(88, 28, 180, 0.45); }
    50% { transform: translateX(-50%) scale(1.04); box-shadow: 0 14px 36px rgba(139, 92, 246, 0.6); }
}

@media (prefers-reduced-motion: reduce) {
    .device-laptop-hint { animation: none; }
    .device-laptop-trace-run { animation: none; stroke-dasharray: none; }
}

body.hero-demo-open {
    overflow: hidden;
}

.demo-computer {
    display: none;
    position: fixed;
    z-index: 2001;
    inset: 2.4vh 1.6vw 2.2vh;
    flex-direction: column;
}

.demo-computer.is-open {
    display: flex;
}

.demo-computer-lid {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 14px 16px 16px;
    background: linear-gradient(180deg, #2a2a32 0%, #16161c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 22px 22px 12px 12px;
}

.demo-computer-camera {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0c0c10;
    box-shadow: inset 0 0 0 1.5px #3a3a44;
    flex-shrink: 0;
}

.demo-computer-screen {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background: #050508;
}

.demo-computer-base {
    position: relative;
    flex-shrink: 0;
    height: 18px;
    margin: -1px -1.4% 0;
    background: linear-gradient(180deg, #4a4a54 0%, #2a2a32 38%, #141418 100%);
    clip-path: polygon(1.2% 0, 98.8% 0, 96% 100%, 4% 100%);
}

.demo-computer-indent {
    position: absolute;
    left: 50%;
    top: 5px;
    width: 16%;
    height: 4px;
    border-radius: 4px;
    background: #0d0d12;
    transform: translateX(-50%);
}

.demo-phone-stage {
    display: none;
    position: fixed;
    z-index: 2001;
    inset: 0;
    box-sizing: border-box;
    padding: max(8px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(8px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    align-items: center;
    justify-content: center;
    container-type: size;
    pointer-events: none;
}

.demo-phone-cluster {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    width: min(380px, 100%);
    max-width: 100%;
    max-height: 100%;
    pointer-events: none;
}

@supports (width: 1cqw) {
    .demo-phone-cluster {
        width: min(380px, 100cqw, calc((100cqh - 48px) * 9 / 19.4));
    }
}

.demo-phone-toolbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    width: 100%;
    flex: 0 0 auto;
    pointer-events: none;
}

.demo-phone {
    display: flex;
    position: relative;
    flex-direction: column;
    width: 100%;
    height: auto;
    max-height: calc(100cqh - 48px);
    aspect-ratio: 9 / 19.4;
    min-height: 0;
    padding: 12px 10px 14px;
    background: linear-gradient(180deg, #2a2a32 0%, #16161c 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 40px;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    pointer-events: auto;
}

.demo-phone-notch {
    width: 28%;
    height: 7px;
    border-radius: 8px;
    background: #0c0c10;
    box-shadow: inset 0 0 0 1px #3a3a44;
    margin: 0 auto 10px;
    flex-shrink: 0;
}

.demo-phone-screen {
    position: relative;
    flex: 1;
    min-height: 0;
    width: 100%;
    border-radius: 26px;
    overflow: hidden;
    background: #050508;
}

.device-laptop-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #050508;
}

.hero-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(8, 6, 18, 0);
    pointer-events: none;
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

.hero-zoom-overlay.active {
    background: rgba(8, 6, 18, 0.82);
    pointer-events: auto;
}

.hero-zoom-shot {
    position: fixed;
    z-index: 2001;
    object-fit: fill;
    opacity: 0;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55);
    pointer-events: none;
}

.hero-zoom-overlay.active .hero-zoom-shot {
    opacity: 1;
    pointer-events: auto;
    transition:
        left 0.55s var(--ease),
        top 0.55s var(--ease),
        width 0.55s var(--ease),
        height 0.55s var(--ease),
        border-radius 0.55s var(--ease);
}

.hero-zoom-overlay.active .hero-zoom-close {
    opacity: 1;
    pointer-events: auto;
}

.hero-zoom-close {
    position: fixed;
    top: 14px;
    right: 16px;
    z-index: 2003;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(20, 14, 38, 0.72);
    color: #fff;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.hero-zoom-close.is-visible {
    opacity: 1;
    pointer-events: auto;
    z-index: 2003;
}

.demo-phone-toolbar .hero-zoom-close {
    position: relative;
    top: auto;
    right: auto;
    opacity: 1;
    pointer-events: auto;
}

.device-phone {
    display: none;
    position: relative;
    z-index: 1;
    width: min(280px, 78vw);
    margin: 0 auto;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    overflow: visible;
    transition: transform 0.35s var(--ease);
}

.device-phone:hover,
.device-phone:focus-visible {
    transform: translateY(-6px) scale(1.02);
    outline: none;
}

.device-phone-bezel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 12px 18px;
    background: linear-gradient(180deg, #2a2a32 0%, #16161c 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 36px;
    box-shadow: 0 28px 56px rgba(0, 0, 0, 0.42);
}

.device-phone-notch {
    width: 30%;
    height: 7px;
    border-radius: 8px;
    background: #0c0c10;
    box-shadow: inset 0 0 0 1px #3a3a44;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.device-phone-screen {
    position: relative;
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
    background: #000;
    line-height: 0;
}

.device-phone-screen img {
    width: 100%;
    height: auto;
    display: block;
}

.device-phone-screen::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 48%, rgba(8, 6, 18, 0.5) 100%);
    pointer-events: none;
}

.device-phone .device-laptop-trace-run {
    stroke: url(#phone-trace-grad);
}

.device-phone .device-laptop-hint {
    bottom: 18px;
    font-size: 0.8rem;
    padding: 8px 12px 8px 10px;
}

.device-laptop-base {
    position: relative;
    height: 16px;
    margin: -1px -3.5% 0;
    background: linear-gradient(180deg, #4a4a54 0%, #2a2a32 38%, #141418 100%);
    clip-path: polygon(1.2% 0, 98.8% 0, 95.5% 100%, 4.5% 100%);
    border-radius: 0 0 10px 10px;
}

.device-laptop-indent {
    position: absolute;
    left: 50%;
    top: 4px;
    width: 18%;
    height: 4px;
    border-radius: 4px;
    background: #0d0d12;
    transform: translateX(-50%);
}

.floating { animation: none; }

.hero-stack { display: contents; }
.hero-text { width: 100%; }

/* --- Features: full-width cards --- */
.features {
    border-top: 1px solid var(--border-color);
    padding-top: 88px;
    background: linear-gradient(180deg, transparent 0%, var(--primary-soft) 45%, transparent 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
}

.feature-card {
    padding: 32px 28px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: left;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.feature-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.feature-card h3 {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 12px;
    letter-spacing: -0.015em;
    color: var(--text-main);
}

.feature-card p {
    margin: 0;
    font-size: 1.02rem;
    line-height: 1.65;
}

/* legacy */
.features-list { width: 100%; }
.feature-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    padding: 36px 0;
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    margin-bottom: 48px;
    max-width: 560px;
    margin-inline: auto;
}

.section-lead {
    text-align: center;
    max-width: 480px;
    margin: -28px auto 48px;
    color: var(--text-muted);
}

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

.card {
    padding: 28px 24px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}

.card:hover {
    border-color: var(--border-strong);
    transform: none;
    box-shadow: none;
}

.card-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--primary-soft);
    color: var(--primary);
}

.card-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.card p {
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- Split layouts --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
    width: 100%;
}

.shifted-text { padding-left: 8px; }
.text-content { text-align: left; width: 100%; }
.text-content h2 { max-width: 480px; }
.text-content p { max-width: 480px; }
.extension-subtext {
    max-width: 480px;
    margin-bottom: 20px;
}

/* Three.js monitor stage */
.monitor-stage {
    position: relative;
    height: 560px;
    min-height: 520px;
    width: 100%;
    max-width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.extension-monitor-canvas {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    cursor: pointer;
    touch-action: pan-y;
}

/* Phone Spline stage */
.phones-stage {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 560px;
    height: 560px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: transparent;
}

.spline-placeholder-phones {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
    background: transparent;
    -webkit-mask-image: radial-gradient(ellipse 72% 82% at 48% 50%, #000 34%, rgba(0,0,0,0.55) 52%, transparent 74%);
    mask-image: radial-gradient(ellipse 72% 82% at 48% 50%, #000 34%, rgba(0,0,0,0.55) 52%, transparent 74%);
}

.phones-stage::after {
    display: none;
}

#canvas3d-wrapper {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 2000px;
    height: 2000px;
    transform: translate(-50%, -50%) scale(0.3);
    transform-origin: center center;
}

#canvas3d {
    width: 100%;
    height: 100%;
    display: block;
    outline: none;
    border: none;
    background: transparent;
}

#extension,
#app,
.contact {
    border-top: 1px solid var(--border-color);
}

/* --- Contact --- */
.contact-wrapper {
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    border-radius: 0;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    align-items: stretch;
    width: 100%;
}

.contact-text {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.contact-text h2 { margin-bottom: 12px; }
.contact-text > p {
    margin-bottom: 28px;
    max-width: 340px;
}

.discord-card {
    margin-top: auto;
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    text-align: left;
}

.discord-card img {
    width: auto;
    height: 28px;
    max-width: 120px;
    object-fit: contain;
    object-position: left center;
    display: block;
    margin-bottom: 14px;
}

.discord-card h3 {
    font-size: 1rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.discord-card p {
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.btn-discord {
    background: #5865F2 !important;
    color: #FFFFFF !important;
    border-color: #5865F2 !important;
    width: 100%;
    box-shadow: 0 8px 22px rgba(88, 101, 242, 0.35);
}

.btn-discord:hover {
    background: #4752C4 !important;
    border-color: #4752C4 !important;
    color: #FFFFFF !important;
    box-shadow: 0 12px 28px rgba(88, 101, 242, 0.4);
}

.newsletter-block {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 28px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

.newsletter-block h3 {
    font-family: var(--font-sans);
    font-size: 1.45rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.newsletter-desc {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.newsletter-form .form-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.newsletter-email,
.form-control.newsletter-email {
    flex: 1;
    width: 100%;
    padding: 13px 18px;
    border-radius: var(--radius-full);
    font-size: 0.925rem;
    font-family: inherit;
    background: var(--bg-soft) !important;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.newsletter-email::placeholder {
    color: var(--text-muted);
    opacity: 0.85;
}

.newsletter-email:focus,
.form-control.newsletter-email:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
    background: var(--bg-main) !important;
}

.newsletter-form .btn-primary {
    color: #FFFFFF !important;
}

.socials-container {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.socials-container p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.social-links {
    display: flex;
    gap: 8px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: var(--btn-bg);
    color: #FFFFFF;
    border-color: var(--btn-bg);
    box-shadow: 0 6px 16px var(--primary-glow);
    transform: translateY(-1px);
}

.form-group { margin-bottom: 16px; text-align: left; }
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-family: inherit;
}

.form-status {
    font-size: 0.875rem;
    min-height: 1.2em;
}

/* --- Footer --- */
.footer {
    padding: 56px 0 28px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand p {
    font-size: 0.925rem;
    max-width: 260px;
    margin-bottom: 0;
}

.footer-links ul { list-style: none; }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    margin-bottom: 10px;
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--text-main); }

.footer-bottom {
    text-align: left;
    color: var(--text-muted);
    font-size: 0.825rem;
    border-top: 1px solid var(--border-color);
    padding-top: 22px;
}

.footer-bottom p { margin: 0; font-size: 0.825rem; }

.newsletter-input { display: flex; gap: 8px; }
.newsletter-input input {
    flex: 1;
    padding: 12px 16px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-main);
    font-family: inherit;
}

/* --- Reveal --- */
.reveal-up {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
}
.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}
.delay-1 { transition-delay: 0.07s; }
.delay-2 { transition-delay: 0.14s; }
.delay-3 { transition-delay: 0.21s; }

/* --- About --- */
.about-page {
    max-width: 720px;
    padding-bottom: 100px;
}

.page-header {
    padding: calc(var(--nav-h) + 72px) 0 28px;
    text-align: left;
    max-width: none;
}

.page-header h1 { margin-bottom: 0; }

.about-page .reveal-up { transition-duration: 0.7s; }
.about-page > .reveal-up:nth-child(1) { transition-delay: 0.06s; }
.about-page > .reveal-up:nth-child(2) { transition-delay: 0.18s; }
.about-page > .reveal-up:nth-child(3) { transition-delay: 0.32s; }
.about-page > .reveal-up:nth-child(4) { transition-delay: 0.46s; }
.about-points .reveal-up:nth-child(1) { transition-delay: 0.58s; }
.about-points .reveal-up:nth-child(2) { transition-delay: 0.72s; }
.about-points .reveal-up:nth-child(3) { transition-delay: 0.86s; }
.about-page > .reveal-up:nth-child(6) { transition-delay: 1.00s; }
.about-page > .reveal-up:nth-child(7) { transition-delay: 1.14s; }
.about-page > .reveal-up:nth-child(8) { transition-delay: 1.28s; }
.about-cta.reveal-up { transition-delay: 1.42s; }

.about-page p {
    font-size: 1.08rem;
    line-height: 1.7;
    margin-bottom: 0;
    color: #fff;
    font-weight: 400;
}

.about-lead {
    font-size: 1.18rem;
    line-height: 1.65;
    margin-bottom: 36px;
}

.about-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 28px 0;
    border-top: 1px solid var(--border-color);
}

.about-break,
.about-close {
    font-size: 1.55rem;
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: -0.03em;
    padding: 36px 0;
}

.about-points {
    border-top: 1px solid var(--border-color);
}

.about-points p {
    padding: 22px 0;
    border-bottom: 1px solid var(--border-color);
}

.about-mission {
    padding: 28px 0;
}

.mission-block { display: none; }
.mission-pillars { display: none; }

.about-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    text-align: left;
    padding: 8px 0 0;
    border: none;
    background: transparent;
    margin: 8px 0 40px;
}

/* --- Modal --- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.45);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    width: 90%;
    max-width: 420px;
    padding: 36px 28px 28px;
    border-radius: var(--radius-lg);
    position: relative;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover { color: var(--text-main); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; padding: 0 24px 64px; }
.stat-box { text-align: center; padding: 32px; border-radius: var(--radius-md); }
.faq-grid { max-width: 800px; margin: 0 auto; display: grid; gap: 20px; }
.faq-item { padding-bottom: 20px; border-bottom: 1px solid var(--border-color); }

/* --- Responsive --- */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1101;
    padding: 8px;
}

.hamburger span {
    width: 20px;
    height: 1.5px;
    background-color: var(--text-main);
    transition: 0.3s;
    border-radius: 2px;
}

@media (max-width: 1024px) {
    .hero-split {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-copy {
        max-width: 100%;
        text-align: center;
        margin-inline: auto;
    }

    .hero-copy .subtitle {
        margin-inline: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .feature-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .grid { grid-template-columns: 1fr; }

    .split-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .text-content h2,
    .text-content p,
    .extension-subtext {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .shifted-text { padding-left: 0; }

    .image-content,
    .text-content {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-text > p { max-width: 100%; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .social-links { justify-content: flex-start; }

    .page-header,
    .mission-block,
    .about-cta {
        text-align: left;
    }
}

@media (max-width: 900px) {
    :root { --nav-h: 68px; }

    .hamburger { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 78%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-elevated);
        flex-direction: column !important;
        justify-content: center;
        align-items: center;
        gap: 4px;
        transition: right 0.35s var(--ease);
        z-index: 1000;
        box-shadow: var(--shadow-lg);
        border-left: 1px solid var(--border-color);
        display: flex;
        padding: 24px;
    }

    .nav-links.active { right: 0; }
    .nav-right { margin-left: auto; }
    .navbar .nav-links li { width: 100%; text-align: center; }
    .nav-links a { display: block; padding: 12px 16px; }

    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

    .section { padding: 72px 0; }
    .hero {
        padding: calc(var(--nav-h) + 36px) 0 48px;
        min-height: auto;
    }

    .device-laptop { display: none; }
    .device-phone { display: block; }
    .hero-visual::before { display: none; }
    .hero, .hero-visual, .section, .container, .footer {
        max-width: 100%;
        overflow-x: hidden;
    }
    img, svg, video, iframe {
        max-width: 100%;
    }
    .demo-computer.is-open { display: none; }
    .demo-phone-stage.is-open { display: flex; }
    body.hero-demo-open > .hero-zoom-close { display: none; }
    .nav-container { padding: 12px 18px; }
    .logo { height: 32px; max-width: 200px; }
    .footer-logo { height: 36px; max-width: 230px; }
    .nav-right .nav-cta { padding: 9px 14px; font-size: 0.825rem; }


    .monitor-stage { height: 400px; min-height: 380px; }
    .phones-stage { min-height: 420px; height: 420px; }
    #canvas3d-wrapper { transform: translate(-50%, -50%) scale(0.22); }
}

@media (max-width: 768px) {
    .newsletter-form .form-row { flex-direction: column; }
    .newsletter-form .form-row .btn { width: 100%; }
}

@media (max-width: 600px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.85rem; }
    .container { padding: 0 20px; }
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-brand p { margin-inline: auto; }
    .footer-bottom { text-align: center; }
    .social-links { justify-content: center; }
    .modal-content { padding: 36px 20px 24px; }
    .app-buttons { justify-content: center; }
    .feature-card h3 { font-size: 1.25rem; }
    .hero-visual::before { display: none; }
}
