:root {
    --font-display: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Mono', monospace;

    --bg-void: #020308;
    --glass-stroke: rgba(255, 255, 255, 0.14);
    --glass-highlight: rgba(255, 255, 255, 0.32);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.65);
    --text-tertiary: rgba(255, 255, 255, 0.4);

    --theme-primary: #00f2fe;
    --theme-secondary: #4facfe;
    --theme-tertiary: #f093fb;
    --status-indicator: #30d158;

    --mouse-x: 50vw;
    --mouse-y: 50vh;
    --card-mouse-x: 50%;
    --card-mouse-y: 50%;
}

body[data-state="alert"] {
    --theme-primary: #ff375f;
    --theme-secondary: #ff9f0a;
    --theme-tertiary: #bf5af2;
    --status-indicator: #ff453a;
}

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

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-sans);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    user-select: none;
}

.ui-icon {
    width: 1.15em;
    height: 1.15em;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex-shrink: 0;
}

.ui-icon[hidden] {
    display: none !important;
}

.ambient-mesh {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    filter: blur(90px);
    opacity: 0.55;
}

.orb {
    position: absolute;
    border-radius: 50%;
    transition: background 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.orb-1 {
    width: 55vw;
    height: 55vw;
    max-width: 750px;
    max-height: 750px;
    background: radial-gradient(circle, var(--theme-primary), transparent 70%);
    top: -15%;
    left: -10%;
    animation: floatOrb1 18s ease-in-out infinite alternate;
}

.orb-2 {
    width: 50vw;
    height: 50vw;
    max-width: 650px;
    max-height: 650px;
    background: radial-gradient(circle, var(--theme-tertiary), transparent 70%);
    bottom: -20%;
    right: -10%;
    animation: floatOrb2 22s ease-in-out infinite alternate;
}

.orb-3 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, var(--theme-secondary), transparent 70%);
    left: var(--mouse-x);
    top: var(--mouse-y);
    transform: translate(-50%, -50%);
    opacity: 0.45;
    transition: left 0.25s cubic-bezier(0.16, 1, 0.3, 1), top 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 1s ease;
}

@keyframes floatOrb1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(12vw, 8vh) scale(1.15); }
}

@keyframes floatOrb2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-10vw, -10vh) scale(1.2); }
}

#spatial-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.ui-layer {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
}

.dynamic-island {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.55rem 0.7rem 0.55rem 1.2rem;
    background: rgba(12, 14, 24, 0.65);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-radius: 999px;
    border: 1px solid var(--glass-stroke);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5),
                inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.dynamic-island:hover {
    transform: scale(1.02);
    border-color: var(--glass-highlight);
}

.island-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.live-indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--status-indicator);
    box-shadow: 0 0 14px var(--status-indicator);
    animation: pulseGlow 2.4s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.55; }
}

.island-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    color: var(--text-primary);
}

.island-divider {
    width: 1px;
    height: 18px;
    background: var(--glass-stroke);
}

.island-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.02em;
}

.island-status .ui-icon {
    color: var(--theme-primary);
}

.island-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-left: 0.25rem;
}

.capsule-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    font-size: 0.85rem;
}

.capsule-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--theme-primary);
    color: var(--theme-primary);
    transform: scale(1.08);
}

.spatial-stage {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1400px;
}

.vision-slab {
    position: relative;
    width: 100%;
    max-width: 680px;
    border-radius: 42px;
    padding: 3.25rem 2.75rem;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(50px) saturate(190%);
    -webkit-backdrop-filter: blur(50px) saturate(190%);
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, 0.75),
                0 0 60px -15px rgba(0, 242, 254, 0.12),
                inset 0 1px 1px rgba(255, 255, 255, 0.35),
                inset 0 -1px 1px rgba(255, 255, 255, 0.08);
    transform-style: preserve-3d;
    transition: transform 0.14s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
    overflow: hidden;
    animation: spatialReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes spatialReveal {
    0% {
        opacity: 0;
        transform: translateY(35px) scale(0.94) rotateX(8deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.specular-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(
        550px circle at var(--card-mouse-x) var(--card-mouse-y),
        rgba(255, 255, 255, 0.14),
        transparent 55%
    );
    z-index: 1;
}

.slab-border-highlight {
    position: absolute;
    inset: 0;
    border-radius: 42px;
    padding: 1.5px;
    background: radial-gradient(
        400px circle at var(--card-mouse-x) var(--card-mouse-y),
        rgba(255, 255, 255, 0.6),
        rgba(255, 255, 255, 0.12) 45%,
        rgba(255, 255, 255, 0.04) 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 2;
}

.slab-content {
    position: relative;
    z-index: 3;
    text-align: center;
    transform: translateZ(35px);
}

.pill-group {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.5rem;
}

.spatial-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-primary);
}

.spatial-pill[hidden] {
    display: none !important;
}

.spatial-pill .ui-icon {
    color: var(--theme-primary);
}

.hero-typography {
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.85rem;
}

.display-title {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(2rem, 4.5vw, 3.4rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.85) 50%, var(--theme-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 10px 25px rgba(0, 242, 254, 0.18));
}

.ios-cursor {
    display: inline-block;
    width: 4px;
    height: 0.9em;
    border-radius: 4px;
    background: var(--theme-primary);
    margin-left: 8px;
    vertical-align: baseline;
    box-shadow: 0 0 15px var(--theme-primary);
    animation: cursorPulse 0.95s infinite ease-in-out;
}

@keyframes cursorPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.2; transform: scaleY(0.85); }
}

.lead-text {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
}

.slab-footer {
    margin-top: 2rem;
}

.ios-button {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.8rem 1.6rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.35);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ios-button:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--theme-primary);
    transform: translateY(-2px) scale(1.02);
}

.spatial-dock {
    width: 100%;
    display: flex;
    justify-content: center;
}

.dock-container {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.65rem 1.35rem;
    background: rgba(12, 14, 24, 0.6);
    backdrop-filter: blur(40px) saturate(200%);
    -webkit-backdrop-filter: blur(40px) saturate(200%);
    border-radius: 28px;
    border: 1px solid var(--glass-stroke);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.6),
                inset 0 1px 0 rgba(255, 255, 255, 0.22);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dock-container:hover {
    transform: translateY(-3px);
}

.dock-metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.metric-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: grid;
    place-items: center;
    color: var(--theme-primary);
    font-size: 1rem;
}

.metric-data {
    display: flex;
    flex-direction: column;
}

.metric-numbers {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    display: flex;
    align-items: baseline;
    gap: 0.3rem;
}

.metric-sub {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-tertiary);
}

.metric-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.dock-separator {
    width: 1px;
    height: 28px;
    background: var(--glass-stroke);
}

.dock-badge {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.85);
    padding: 5px 10px;
    border-radius: 14px;
    transition: all 0.25s ease;
}

.dock-badge:hover {
    background: #ffffff;
    transform: scale(1.04);
}

.dock-badge img {
    width: 140px;
    height: auto;
    display: block;
}

@media screen and (max-width: 680px) {
    .ui-layer {
        padding: 1rem;
    }

    .dynamic-island {
        padding: 0.45rem 0.6rem 0.45rem 0.95rem;
        gap: 0.65rem;
    }

    .island-brand {
        font-size: 0.72rem;
    }

    .vision-slab {
        padding: 2.25rem 1.5rem;
        border-radius: 32px;
    }

    .slab-border-highlight {
        border-radius: 32px;
    }

    .hero-typography {
        min-height: 4rem;
    }

    .dock-container {
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.85rem;
        padding: 0.75rem 1rem;
        border-radius: 22px;
    }

    .dock-separator {
        display: none;
    }

    .dock-badge img {
        width: 120px;
    }
}