/* ============================================
   KingKiosk Marketing Website - Styles
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #0a0a0f;
    --bg-elevated: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);
    --text: #e4e4ed;
    --text-muted: #8888a0;
    --text-dim: #55556a;
    --accent: #f59e0b;
    --accent-light: #fbbf24;
    --accent-glow: rgba(245, 158, 11, 0.15);
    --gradient-1: #f59e0b;
    --gradient-2: #ef4444;
    --gradient-3: #8b5cf6;
    --success: #4ade80;
    --radius: 12px;
    --radius-lg: 20px;
    --radius-sm: 8px;
    --nav-height: 64px;
    --container: 1200px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; }

/* === Typography === */
h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.02em; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { color: var(--text-muted); }
.muted { color: var(--text-dim); font-size: 0.9rem; }
code { font-family: 'JetBrains Mono', monospace; }

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center { text-align: center; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 16px 32px; font-size: 1rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--gradient-2));
    color: #fff;
    box-shadow: 0 4px 20px rgba(245, 158, 11, 0.25);
}
.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.4);
    transform: translateY(-2px);
}
.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--border-hover);
}

/* === Navigation === */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    backdrop-filter: blur(20px);
    background: rgba(10, 10, 15, 0.8);
    border-bottom: 1px solid var(--border);
    transition: all var(--transition);
}
.nav.scrolled {
    background: rgba(10, 10, 15, 0.95);
}
.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    object-fit: cover;
}
.nav-links {
    display: flex;
    gap: 32px;
}
.nav-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color var(--transition);
}
.nav-links a:hover { color: #fff; }
.nav-links a.active {
    color: var(--accent);
    position: relative;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    transition: all var(--transition);
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-links.open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.98);
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
    }
}

/* === Sections === */
.section {
    padding: 120px 0;
    position: relative;
}
.section-dark {
    background: var(--bg-elevated);
}
.section-label {
    display: inline-block;
    padding: 6px 16px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}
.section-title {
    margin-bottom: 20px;
    color: #fff;
}
.section-subtitle {
    font-size: 1.15rem;
    max-width: 680px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

/* === Reveal Animations === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* === Hero === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 0 80px;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}
.grid-overlay {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}
.glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    animation: float 8s ease-in-out infinite;
}
.glow-1 {
    width: 600px; height: 600px;
    background: rgba(245, 158, 11, 0.08);
    top: -200px; left: -100px;
}
.glow-2 {
    width: 400px; height: 400px;
    background: rgba(139, 92, 246, 0.06);
    bottom: -100px; right: -100px;
    animation-delay: -3s;
}
.glow-3 {
    width: 300px; height: 300px;
    background: rgba(239, 68, 68, 0.05);
    top: 50%; left: 50%;
    animation-delay: -5s;
}
@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 1;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 32px;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
.hero-title { margin-bottom: 24px; color: #fff; }
.hero-subtitle {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.stat-number::after { content: '+'; color: var(--accent); }
.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* Hero visual / Device mockup */
.hero-visual {
    margin-top: 60px;
    display: flex;
    justify-content: center;
}
.device-frame {
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16/10;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.5),
        0 0 120px rgba(245, 158, 11, 0.05);
    position: relative;
}
.device-screen {
    width: 100%;
    height: 100%;
    position: relative;
    padding: 8px;
}
.mock-window {
    position: absolute;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    animation: mockFloat 6s ease-in-out infinite;
}
.mock-w1 { left: 2%; top: 2%; width: 47%; height: 55%; animation-delay: 0s; }
.mock-w2 { left: 51%; top: 2%; width: 47%; height: 35%; animation-delay: -1.5s; }
.mock-w3 { left: 51%; top: 39%; width: 47%; height: 59%; animation-delay: -3s; }
.mock-w4 { left: 2%; top: 59%; width: 47%; height: 39%; animation-delay: -4.5s; }
@keyframes mockFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}
.mock-titlebar {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
    font-size: 0.65rem;
    color: var(--text-dim);
}
.mock-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
}
.mock-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100% - 28px);
    padding: 12px;
}
.mock-temp { font-size: 2.5rem; font-weight: 800; color: var(--accent); line-height: 1; }
.mock-condition { font-size: 0.75rem; color: var(--text-dim); }
.mock-cam-feed {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(139,92,246,0.1), rgba(59,130,246,0.1));
    border-radius: 4px;
}
.mock-time { font-size: 2rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.mock-date { font-size: 0.7rem; color: var(--text-dim); }
.gauge-svg { width: 100%; max-width: 120px; }
.gauge-fill { stroke-dasharray: 0 200; animation: gaugeFill 3s ease-out forwards; animation-delay: 1s; }
@keyframes gaugeFill { to { stroke-dasharray: 120 200; } }

.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}
.scroll-line {
    width: 2px; height: 40px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    border-radius: 2px;
    animation: scrollBounce 2s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 1; transform: translateY(10px); }
}

/* === Problem Section === */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.problem-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.problem-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.problem-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
    color: var(--accent);
}
.problem-icon svg { width: 32px; height: 32px; }
.problem-card h3 { color: #fff; margin-bottom: 12px; }
.problem-card p { font-size: 0.95rem; }

@media (max-width: 768px) {
    .problem-grid { grid-template-columns: 1fr; }
}

/* === Feature Showcase (Tabs) === */
.feature-showcase {
    margin-top: 48px;
}
.feature-tabs {
    display: flex;
    justify-content: center;
    gap: 4px;
    background: var(--bg-card);
    padding: 4px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    width: fit-content;
    margin: 0 auto 32px;
}
.feature-tab {
    padding: 10px 24px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
}
.feature-tab.active {
    background: var(--accent);
    color: #000;
    font-weight: 600;
}
.feature-tab:hover:not(.active) { color: #fff; }

.feature-panel {
    display: none;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: center;
}
.feature-panel.active { display: grid; }

.panel-visual {
    aspect-ratio: 16/10;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.panel-info h3 { color: #fff; margin-bottom: 12px; font-size: 1.5rem; }
.panel-info p { margin-bottom: 20px; }

.feature-list {
    list-style: none;
}
.feature-list li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
}

/* Tiling Demo */
.tiling-demo {
    position: absolute;
    inset: 8px;
}
.tile-box {
    position: absolute;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
}
.tile-box span {
    font-size: 0.75rem;
    color: var(--accent);
    font-weight: 600;
}
.tile-a { background: rgba(245, 158, 11, 0.08); border-color: rgba(245, 158, 11, 0.2); }
.tile-b { background: rgba(139, 92, 246, 0.08); border-color: rgba(139, 92, 246, 0.2); }
.tile-b span { color: #8b5cf6; }
.tile-c { background: rgba(59, 130, 246, 0.08); border-color: rgba(59, 130, 246, 0.2); }
.tile-c span { color: #3b82f6; }
.tile-d { background: rgba(74, 222, 128, 0.08); border-color: rgba(74, 222, 128, 0.2); }
.tile-d span { color: #4ade80; }
.tile-e { background: rgba(244, 114, 182, 0.08); border-color: rgba(244, 114, 182, 0.2); }
.tile-e span { color: #f472b6; }

/* Presets Demo */
.presets-demo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px;
}
.preset-card {
    width: 120px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    transition: all var(--transition);
}
.preset-card span { font-size: 0.8rem; color: var(--text-muted); margin-top: 8px; display: block; }
.preset-active {
    border-color: var(--accent);
    background: var(--accent-glow);
}
.preset-active span { color: var(--accent); }
.preset-mini {
    width: 100%;
    aspect-ratio: 16/10;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    display: grid;
    gap: 2px;
    padding: 3px;
    margin-bottom: 8px;
}
.preset-mini div {
    background: rgba(245,158,11,0.2);
    border-radius: 2px;
}
.preset-card:nth-child(1) .preset-mini { grid-template-columns: 1fr 1fr; }
.preset-card:nth-child(2) .preset-mini { grid-template-columns: 1fr 1fr 1fr; }
.preset-card:nth-child(3) .preset-mini { grid-template-columns: 1fr; }
.preset-card:nth-child(4) .preset-mini { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.preset-card:nth-child(2) .preset-mini div { background: rgba(139,92,246,0.2); }
.preset-card:nth-child(3) .preset-mini div { background: rgba(59,130,246,0.2); }
.preset-card:nth-child(4) .preset-mini div { background: rgba(74,222,128,0.2); }

/* Schedule Demo */
.schedule-demo {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 32px;
}
.schedule-timeline {
    width: 100%;
    height: 60px;
    position: relative;
}
.schedule-block {
    position: absolute;
    top: 0;
    height: 100%;
    padding: 0 4px;
}
.schedule-label {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.schedule-bar {
    height: 36px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(0,0,0,0.8);
}
.schedule-morning { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.schedule-work { background: linear-gradient(90deg, #60a5fa, #3b82f6); color: #fff; }
.schedule-evening { background: linear-gradient(90deg, #a78bfa, #8b5cf6); color: #fff; }
.schedule-night { background: linear-gradient(90deg, #475569, #334155); color: rgba(255,255,255,0.6); }

@media (max-width: 768px) {
    .feature-panel { grid-template-columns: 1fr; }
    .feature-tabs { flex-wrap: wrap; width: 100%; }
    .presets-demo { flex-wrap: wrap; gap: 8px; }
    .preset-card { width: 80px; padding: 8px; }
}

/* === Split Sections === */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}
.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }

@media (max-width: 900px) {
    .split-section { grid-template-columns: 1fr; gap: 48px; }
    .split-section.reverse { direction: ltr; }
}

/* === Code Blocks === */
.code-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-top: 20px;
}
.code-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
}
.code-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
}
.code-dot.red { background: #ef4444; }
.code-dot.yellow { background: #f59e0b; }
.code-dot.green { background: #4ade80; }
.code-title {
    margin-left: 8px;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}
.code-block pre {
    padding: 20px;
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}
.code-block code {
    color: var(--text);
}
.code-comment { color: var(--text-dim); }
.code-string { color: #4ade80; }
.code-keyword { color: #a78bfa; }
.code-number { color: #f59e0b; }

/* === MQTT Flow Diagram === */
.mqtt-flow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 40px;
}
.mqtt-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.mqtt-icon {
    width: 64px; height: 64px;
    background: var(--accent-glow);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    animation: pulseGlow 3s ease-in-out infinite;
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 20px rgba(245,158,11,0.2); }
    50% { box-shadow: 0 0 40px rgba(245,158,11,0.4); }
}
.mqtt-icon svg { width: 28px; height: 28px; }
.mqtt-node span { font-size: 0.85rem; font-weight: 600; color: var(--accent); }

.mqtt-connections {
    display: flex;
    gap: 40px;
    height: 40px;
    align-items: center;
}
.mqtt-line {
    width: 2px;
    height: 40px;
    background: linear-gradient(to bottom, var(--accent), rgba(245,158,11,0.1));
    animation: dataFlow 1.5s ease-in-out infinite;
}
.mqtt-line:nth-child(2) { animation-delay: 0.3s; }
.mqtt-line:nth-child(3) { animation-delay: 0.6s; }
.mqtt-line:nth-child(4) { animation-delay: 0.9s; }
@keyframes dataFlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.mqtt-devices {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.mqtt-device {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.mqtt-device-icon {
    width: 48px; height: 48px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: all var(--transition);
}
.mqtt-device-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}
.mqtt-device-icon svg { width: 22px; height: 22px; }
.mqtt-device span { font-size: 0.75rem; color: var(--text-dim); }

/* === Platform Grid === */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}
.platform-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
    position: relative;
}
.platform-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}
.platform-featured {
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(245,158,11,0.05), rgba(239,68,68,0.03));
}
.platform-icon {
    width: 40px; height: 40px;
    color: var(--accent);
    margin-bottom: 16px;
}
.platform-icon svg { width: 32px; height: 32px; }
.platform-card h3 { color: #fff; margin-bottom: 8px; }
.platform-card p { font-size: 0.9rem; margin-bottom: 16px; }
.platform-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}
.platform-badge-special {
    background: var(--accent-glow);
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 900px) {
    .platform-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .platform-grid { grid-template-columns: 1fr; }
}

/* === Widget Grid === */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 48px;
}
.widget-card {
    padding: 24px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    transition: all var(--transition);
}
.widget-card:hover {
    border-color: var(--accent);
    background: var(--accent-glow);
    transform: translateY(-2px);
}
.widget-icon-wrap {
    width: 40px; height: 40px;
    margin: 0 auto 12px;
    color: var(--text-muted);
    transition: color var(--transition);
}
.widget-card:hover .widget-icon-wrap { color: var(--accent); }
.widget-icon-wrap svg { width: 32px; height: 32px; }
.widget-card h4 { color: #fff; font-size: 0.95rem; margin-bottom: 4px; }
.widget-card p { font-size: 0.8rem; color: var(--text-dim); }

@media (max-width: 900px) { .widget-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .widget-grid { grid-template-columns: repeat(2, 1fr); } }

/* === Server Features === */
.server-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}
.server-card {
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.server-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.server-card-icon {
    width: 48px; height: 48px;
    color: var(--accent);
    margin-bottom: 20px;
}
.server-card-icon svg { width: 32px; height: 32px; }
.server-card h3 { color: #fff; margin-bottom: 12px; }
.server-card p { font-size: 0.9rem; margin-bottom: 16px; }
.server-tech {
    display: inline-block;
    padding: 6px 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
}

@media (max-width: 900px) { .server-features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .server-features { grid-template-columns: 1fr; } }

/* Deploy Options */
.server-deploy {
    margin-top: 64px;
    text-align: center;
}
.server-deploy h3 {
    color: #fff;
    margin-bottom: 24px;
    font-size: 1.3rem;
}
.deploy-options {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.deploy-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.deploy-option:hover {
    border-color: var(--accent);
}
.deploy-icon {
    width: 32px; height: 32px;
    color: var(--accent);
}
.deploy-icon svg { width: 28px; height: 28px; }
.deploy-option span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* === Integration Features === */
.integration-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
}
.int-feature {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}
.int-check {
    width: 24px; height: 24px;
    min-width: 24px;
    background: rgba(74, 222, 128, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--success);
    margin-top: 2px;
}
.int-check svg { width: 14px; height: 14px; }
.int-feature strong { color: #fff; display: block; font-size: 0.95rem; }
.int-feature p { font-size: 0.85rem; margin-top: 2px; }

/* HA Visual Card */
.ha-visual {
    display: flex;
    justify-content: center;
}
.ha-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.ha-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}
.ha-header svg { color: #60a5fa; }
.ha-entities { padding: 8px 0; }
.ha-entity {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
}
.ha-entity:last-child { border-bottom: none; }
.ha-entity:hover { background: rgba(255,255,255,0.02); }
.ha-entity-name { flex: 1; font-size: 0.85rem; color: var(--text); }
.ha-entity-state {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.ha-online { color: var(--success); }
.ha-active { color: var(--accent); }

/* === SDK Features === */
.sdk-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.sdk-feature {
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.sdk-feature:hover { border-color: var(--accent); }
.sdk-feature h4 {
    color: var(--accent);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    margin-bottom: 4px;
}
.sdk-feature p { font-size: 0.85rem; }

/* === OS Widget Phone Mockup === */
.os-widget-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}
.phone-frame {
    width: 280px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 36px;
    padding: 16px;
    position: relative;
}
.phone-notch {
    width: 80px; height: 24px;
    background: var(--bg);
    border-radius: 0 0 16px 16px;
    margin: -16px auto 12px;
}
.phone-screen {
    padding: 12px;
}
.phone-time {
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
    text-align: center;
    margin-bottom: 24px;
    font-variant-numeric: tabular-nums;
}
.phone-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.phone-widget {
    padding: 14px;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    text-align: center;
}
.pw-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 6px;
}
.pw-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
}
.pw-btn-icon {
    color: var(--accent);
    margin-bottom: 4px;
}
.pw-mini-chart {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    justify-content: center;
}
.pw-mini-chart .bar {
    width: 8px;
    background: linear-gradient(to top, var(--accent), var(--gradient-2));
    border-radius: 2px;
}
.os-widget-info {
    max-width: 500px;
    text-align: center;
}
.os-widget-info code {
    padding: 2px 8px;
    background: rgba(245,158,11,0.1);
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--accent);
}

/* === Security Grid === */
.security-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 48px;
}
.security-item {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all var(--transition);
}
.security-item:hover { border-color: var(--border-hover); }
.security-icon {
    width: 36px; height: 36px;
    min-width: 36px;
    color: var(--accent);
}
.security-icon svg { width: 24px; height: 24px; }
.security-item h4 { color: #fff; font-size: 0.95rem; margin-bottom: 4px; }
.security-item p { font-size: 0.8rem; color: var(--text-muted); }

@media (max-width: 900px) { .security-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .security-grid { grid-template-columns: 1fr; } }

/* === Pricing === */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
    align-items: start;
}
.pricing-grid-4 {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.pricing-grid-5 {
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}
.pricing-version {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 4px;
}
.pricing-card {
    padding: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
}
.pricing-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.pricing-featured {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(245,158,11,0.06) 0%, var(--bg-card) 40%);
    box-shadow: 0 8px 32px rgba(245,158,11,0.1);
}
.pricing-featured:hover {
    border-color: var(--accent-light);
    box-shadow: 0 16px 48px rgba(245,158,11,0.2);
}
.pricing-popular {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 20px;
    background: linear-gradient(135deg, var(--accent), var(--gradient-2));
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 100px;
    white-space: nowrap;
}
.pricing-header {
    margin-bottom: 24px;
}
.pricing-header h3 {
    color: #fff;
    font-size: 1.4rem;
    margin-bottom: 6px;
}
.pricing-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
}
.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}
.price-currency {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-muted);
    align-self: flex-start;
    margin-top: 8px;
}
.price-amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.price-decimal {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    align-self: flex-start;
    margin-top: 8px;
}
.price-period {
    font-size: 1rem;
    color: var(--text-dim);
    margin-left: 4px;
}
.pricing-price-custom {
    justify-content: center;
}
.price-custom {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}
.pricing-features {
    list-style: none;
    margin-bottom: 32px;
}
.pricing-features li {
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.pricing-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%234ade80' stroke-width='2.5' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    top: 10px;
}
.pricing-btn {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1400px) {
    .pricing-grid-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1100px) {
    .pricing-grid-4 { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid-5 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .pricing-grid, .pricing-grid-4, .pricing-grid-5 { grid-template-columns: 1fr; max-width: 420px; margin-left: auto; margin-right: auto; }
}

/* === CTA Section === */
.section-cta {
    background: linear-gradient(135deg, rgba(245,158,11,0.05), rgba(139,92,246,0.05));
    border-top: 1px solid var(--border);
}
.cta-content {
    text-align: center;
}
.cta-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
}
.cta-platforms {
    margin-top: 48px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.cta-platforms > span {
    font-size: 0.85rem;
    color: var(--text-dim);
}
.cta-platform-icons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}
.cta-platform-icons span {
    padding: 6px 14px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* === Footer === */
.footer {
    padding: 64px 0 32px;
    border-top: 1px solid var(--border);
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: 64px;
    margin-bottom: 48px;
}
.footer-brand p {
    margin-top: 12px;
    font-size: 0.9rem;
    max-width: 300px;
}
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}
.footer-col h4 {
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.footer-col a {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 4px 0;
    transition: color var(--transition);
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid var(--border);
    text-align: center;
}
.footer-bottom p {
    font-size: 0.85rem;
    color: var(--text-dim);
}

@media (max-width: 768px) {
    .footer-inner { grid-template-columns: 1fr; gap: 48px; }
    .footer-links { grid-template-columns: repeat(2, 1fr); }
}

/* === Demo Reel Video === */
.demo-reel {
    padding: 80px 0 100px;
    background: var(--bg);
}

.demo-reel-player {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.demo-reel-frame {
    position: relative;
    width: 100%;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
    background: #000;
    box-shadow:
        0 0 60px -12px var(--accent-glow),
        0 4px 32px rgba(0, 0, 0, 0.5);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.demo-reel-frame:hover {
    border-color: var(--border-hover);
    box-shadow:
        0 0 80px -8px var(--accent-glow),
        0 4px 40px rgba(0, 0, 0, 0.6);
}

.demo-reel-frame video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.demo-reel-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    transition: opacity 0.4s ease, transform 0.3s ease;
    z-index: 2;
}

.demo-reel-play svg {
    width: 80px;
    height: 80px;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.demo-reel-play:hover svg {
    transform: scale(1.1);
}

.demo-reel-play.hidden {
    opacity: 0;
    pointer-events: none;
}

@media (max-width: 768px) {
    .demo-reel-frame {
        border-radius: var(--radius);
    }
    .demo-reel-play svg {
        width: 60px;
        height: 60px;
    }
}

/* === Responsive === */
@media (max-width: 600px) {
    .section { padding: 80px 0; }
    .hero { padding: 100px 0 60px; }
    .hero-stats { gap: 20px; }
    .stat-number { font-size: 2rem; }
    .stat-divider { height: 30px; }
    .demo-reel { padding: 60px 0 80px; }
    .demo-reel-play svg { width: 48px; height: 48px; }
}
