:root {
    color-scheme: dark;
    --bg: #0b0d10;
    --bg-2: #0f1217;
    --text: #f2f4f7;
    --muted: #9aa3ad;
    --accent: #c9ff6b;
    --accent-2: #6be4ff;
    --card: rgba(16, 20, 26, 0.88);
    --card-border: rgba(255, 255, 255, 0.08);
    --shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
    --metal: linear-gradient(120deg, #4e5359, #a7b0b8 30%, #f5f7f9 50%, #a7b0b8 70%, #43484e);
}

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

body {
    font-family: "Manrope", "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.page {
    position: relative;
    overflow-x: hidden;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.bg-blur {
    position: absolute;
    width: 420px;
    height: 420px;
    border-radius: 50%;
    filter: blur(0px);
    opacity: 0.35;
}

.bg-blur-1 {
    top: -120px;
    left: -120px;
    background: radial-gradient(circle, rgba(201, 255, 107, 0.65), transparent 70%);
}

.bg-blur-2 {
    bottom: -140px;
    right: 8%;
    background: radial-gradient(circle, rgba(107, 228, 255, 0.6), transparent 68%);
}

.bg-blur-3 {
    top: 25%;
    right: -160px;
    background: radial-gradient(circle, rgba(255, 141, 107, 0.5), transparent 68%);
}

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    opacity: 0.15;
}

.ticker-wall {
    position: absolute;
    inset: -20% -10%;
    display: grid;
    grid-template-rows: repeat(6, minmax(44px, 1fr));
    gap: 22px;
    transform: rotate(-12deg);
    opacity: 0.18;
    pointer-events: none;
}

.ticker-row {
    display: flex;
    gap: 28px;
    width: 100%;
    overflow: hidden;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: clamp(4.2rem, 12vw, 18rem);
    font-weight: 700;
    text-transform: uppercase;
    color: transparent;
    -webkit-text-fill-color: transparent;
    background: var(--metal);
    -webkit-background-clip: text;
    background-clip: text;
    white-space: nowrap;
}

.ticker-row.alt .ticker-marquee {
    animation: driftLeft 62s linear infinite;
}

.ticker-marquee {
    display: flex;
    gap: 28px;
    width: max-content;
    animation: driftRight 55s linear infinite;
}

.ticker-track {
    display: flex;
    gap: 28px;
    min-width: max-content;
}

@keyframes driftRight {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@keyframes driftLeft {
    from { transform: translateX(-50%); }
    to { transform: translateX(0); }
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 6vw;
    background: rgba(8, 10, 13, 0.82);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    background: linear-gradient(135deg, rgba(201, 255, 107, 0.95), rgba(107, 228, 255, 0.5));
    color: #0a0f10;
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.brand-subtitle {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.24em;
    color: var(--muted);
}

.nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.nav a,
.nav button {
    font-size: 0.95rem;
    color: var(--muted);
    background: transparent;
    border: none;
    cursor: pointer;
}

.nav a:hover,
.nav button:hover {
    color: var(--text);
}

.nav-cta {
    padding: 10px 18px;
    border-radius: 999px;
    background: var(--accent);
    color: #0b0d10;
    font-weight: 700;
}

.nav-group {
    position: relative;
}

.nav-group__menu {
    position: absolute;
    top: 130%;
    left: 0;
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 180px;
    padding: 14px;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.nav-group:hover .nav-group__menu {
    display: flex;
}

.nav-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 18, 22, 0.7);
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
}

.nav-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 999px;
}

.content {
    position: relative;
    z-index: 2;
    padding: 40px 6vw 80px;
    display: flex;
    flex-direction: column;
    gap: 90px;
}

.hero {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.3em;
    font-size: 0.7rem;
    color: var(--muted);
    margin-bottom: 14px;
}

h1,
h2,
h3 {
    font-family: "Space Grotesk", "Segoe UI", sans-serif;
}

h1 {
    font-size: clamp(2.4rem, 4vw, 3.8rem);
    line-height: 1.05;
    margin-bottom: 18px;
}

h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    margin-bottom: 12px;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.lead {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-actions {
    margin-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    padding: 12px 22px;
    border-radius: 999px;
    font-weight: 600;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn.primary {
    background: var(--accent);
    color: #0b0d10;
}

.btn.ghost {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: var(--text);
}

.btn.small {
    padding: 8px 16px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.1);
}

.hero-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.hero-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--muted);
}

.hero-card__header .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.hero-card__title {
    font-weight: 600;
    font-size: 1.1rem;
}

.hero-card__list {
    display: grid;
    gap: 12px;
}

.hero-card__list .label {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.section {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.section-header p {
    color: var(--muted);
    max-width: 560px;
}

.feature-grid,
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
}

.mk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.clean-list {
    list-style: none;
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

.clean-list strong {
    color: var(--text);
    font-weight: 600;
}

.feature-card,
.project-card,
.status-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 22px;
    box-shadow: var(--shadow);
}

.project-card .tag {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    margin-bottom: 12px;
}

.status-section .status-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.usage-card {
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 12px;
}

.usage-header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.usage-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.usage-summary {
    color: var(--muted);
}

.usage-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.9rem;
}

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

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.panel-title {
    font-weight: 600;
}

.footer {
    position: relative;
    z-index: 2;
    padding: 30px 6vw 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 920px) {
    .nav {
        position: absolute;
        top: 100%;
        right: 6vw;
        background: var(--card);
        border: 1px solid var(--card-border);
        border-radius: 16px;
        padding: 18px;
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
        min-width: 220px;
        box-shadow: var(--shadow);
    }

    .nav.is-open {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-group__menu {
        position: static;
        display: flex;
        padding: 0;
        border: none;
        box-shadow: none;
        background: transparent;
    }

    .status-section .status-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .footer {
        flex-direction: column;
        gap: 8px;
    }
}

/* Curtain control page */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.status-grid .label {
    display: block;
    color: var(--muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 6px;
}

.control-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.control-row input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.control-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.input {
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    font-family: inherit;
}

.form-field {
    display: grid;
    gap: 8px;
    font-size: 0.85rem;
}

.form-field span {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.7rem;
}

.list {
    display: grid;
    gap: 10px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid var(--card-border);
    background: rgba(255, 255, 255, 0.04);
}

.list-actions {
    display: flex;
    gap: 8px;
}

.muted {
    color: var(--muted);
    font-size: 0.9rem;
}