:root {
    --bg: #f8f6f1;
    --bg-soft: #efeae0;
    --surface: #fffdf8;
    --surface-strong: #fff7ea;
    --ink: #18212b;
    --ink-soft: #4a5a6a;
    --accent: #d4572a;
    --accent-2: #0f7b6c;
    --line: #dfd6c8;
    --shadow: 0 12px 30px rgba(31, 32, 37, 0.08);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background:
        radial-gradient(circle at 12% 10%, #ffe6bf 0, transparent 34%),
        radial-gradient(circle at 88% 16%, #dff5ef 0, transparent 30%),
        var(--bg);
    font-family: 'Sora', sans-serif;
    line-height: 1.5;
}

.page-noise {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.12;
    background-image: radial-gradient(rgba(18, 22, 28, 0.15) 0.45px, transparent 0.45px);
    background-size: 3px 3px;
    z-index: -1;
}

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

.shell {
    width: min(1160px, calc(100% - 2.4rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0.9rem;
    z-index: 20;
    margin: 0.9rem auto 0;
    width: min(1160px, calc(100% - 2.4rem));
    border: 1px solid var(--line);
    background: rgba(255, 252, 244, 0.85);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-family: 'Fraunces', serif;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}

.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    background: linear-gradient(140deg, var(--accent), #f09b48);
    box-shadow: 0 6px 16px rgba(212, 87, 42, 0.35);
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.nav-link {
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    font-size: 0.88rem;
    color: var(--ink-soft);
    transition: background-color 180ms ease, color 180ms ease;
}

.nav-link:hover,
.nav-link[aria-current='page'] {
    background: #f4ede1;
    color: var(--ink);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 0.62rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button-main {
    background: var(--ink);
    color: #fff;
}

.button-main:hover {
    background: #283748;
}

.button-soft {
    border-color: var(--line);
    background: var(--surface);
    color: var(--ink);
}

.button-soft:hover {
    background: #f2ece3;
}

.hero {
    padding: 5.2rem 0 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1.25rem;
    align-items: stretch;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.panel-hero {
    padding: 2.2rem;
    background: linear-gradient(180deg, #fffdf8 0%, #fff6e9 100%);
}

.kicker {
    display: inline-block;
    background: #fce6d5;
    color: #9a431f;
    border: 1px solid #efc5ad;
    border-radius: 999px;
    padding: 0.25rem 0.7rem;
    font-size: 0.74rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-weight: 700;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

h1 {
    margin-top: 1rem;
    font-size: clamp(2rem, 4vw, 3.4rem);
    font-family: 'Fraunces', serif;
}

.hero p {
    color: var(--ink-soft);
    margin: 1rem 0 1.4rem;
    max-width: 62ch;
}

.hero-points {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 1.3rem;
}

.point {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
}

.demo-card {
    padding: 1.1rem;
    background: linear-gradient(180deg, #fcfaf4 0, #f3ebde 100%);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.metric {
    border: 1px solid #dccdb8;
    border-radius: 12px;
    padding: 0.75rem;
    background: #fff;
}

.metric-label {
    display: block;
    font-size: 0.74rem;
    color: var(--ink-soft);
}

.metric-value {
    display: block;
    margin-top: 0.3rem;
    font-size: 1.2rem;
    font-family: 'Fraunces', serif;
}

.section {
    padding: 2rem 0;
}

.section h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(1.4rem, 2vw, 2.1rem);
}

.steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.step {
    padding: 1rem;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.step h3 {
    font-size: 1.04rem;
    margin-bottom: 0.5rem;
}

.step p {
    margin: 0.35rem 0 0.7rem;
    color: var(--ink-soft);
    font-size: 0.9rem;
}

.code {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.8rem;
    border-radius: 10px;
    border: 1px solid #e4d6c2;
    background: #f8f0e4;
    padding: 0.8rem;
    color: #263445;
}

.warning {
    border-left: 4px solid var(--accent);
    padding: 0.7rem 0.8rem;
    border-radius: 10px;
    background: #fef2e8;
    font-size: 0.9rem;
    color: #7d4228;
}

.dashboard {
    padding: 2rem 0 2.2rem;
}

.dashboard-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 1rem;
}

.dash-sidebar,
.dash-main {
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.dash-sidebar {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-link {
    cursor: pointer;
    border-radius: 10px;
    padding: 0.64rem 0.7rem;
    color: var(--ink-soft);
    transition: background-color 170ms ease, color 170ms ease;
}

.dash-link:hover,
.dash-link.is-active {
    background: #f2e8db;
    color: var(--ink);
}

.dash-main {
    padding: 1.15rem;
}

.dash-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.stat-card,
.feed-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 0.9rem;
}

.stat-card strong {
    display: block;
    margin-top: 0.45rem;
    font-size: 1.6rem;
    font-family: 'Fraunces', serif;
}

.feed-grid {
    margin-top: 0.75rem;
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 0.75rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    text-align: left;
    border-bottom: 1px solid #ece2d3;
    padding: 0.55rem 0.1rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.18rem 0.52rem;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-ok {
    background: #dff4ef;
    color: #11584f;
}

.badge-wait {
    background: #fdeccf;
    color: #8d5a08;
}

.badge-stop {
    background: #f8dede;
    color: #7e2020;
}

.reveal {
    animation: reveal 620ms ease both;
}

.reveal-delay {
    animation: reveal 800ms ease both;
}

@keyframes reveal {
    from {
        transform: translateY(10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .hero-grid,
    .dashboard-layout,
    .feed-grid,
    .steps,
    .stats-grid,
    .hero-points,
    .metric-grid {
        grid-template-columns: 1fr;
    }

    .topbar {
        top: 0.5rem;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .topbar-nav {
        justify-content: space-between;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
