:root {
    --demo-ink: #101d2c;
    --demo-ink-soft: #2b3a4a;
    --demo-muted: #63707f;
    --demo-line: #dde3ea;
    --demo-bg: #f6f4ef;
    --demo-panel: #ffffff;
    --demo-teal: #0f766e;
    --demo-teal-dark: #0a5a54;
    --demo-amber: #d97706;
    --demo-radius: 18px;
    --demo-shadow: 0 18px 50px rgba(16, 29, 44, .09);
    --demo-wrap: 1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--demo-bg);
    color: var(--demo-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, "Noto Sans", sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--demo-teal-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }

h1, h2, h3 { letter-spacing: -.025em; line-height: 1.12; margin: 0 0 12px; }

h1 { font-size: clamp(36px, 6vw, 64px); }
h2 { font-size: clamp(26px, 3.4vw, 40px); }
h3 { font-size: 19px; }

p { margin: 0 0 14px; }

.demo-wrap { width: min(var(--demo-wrap), calc(100% - 40px)); margin: 0 auto; }

.demo-muted { color: var(--demo-muted); }
.demo-fineprint { color: var(--demo-muted); font-size: 13px; }

.demo-eyebrow {
    margin: 0 0 10px;
    color: var(--demo-teal);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

/* Header */
.demo-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(246, 244, 239, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--demo-line);
}

.demo-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 66px;
}

.demo-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--demo-ink);
    font-size: 17px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.demo-brand em { color: var(--demo-teal); font-style: normal; }

.demo-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--demo-teal);
    color: #fff;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .04em;
}

.demo-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    font-size: 14px;
    font-weight: 600;
}

.demo-nav a { color: var(--demo-ink-soft); text-decoration: none; }
.demo-nav a:hover { color: var(--demo-teal); }

/* Buttons */
.demo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid var(--demo-teal);
    border-radius: 999px;
    background: var(--demo-teal);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, transform .16s ease;
}

.demo-btn:hover { background: var(--demo-teal-dark); border-color: var(--demo-teal-dark); transform: translateY(-1px); }

.demo-btn-ghost { background: transparent; color: var(--demo-ink); border-color: #b9c4cf; }
.demo-btn-ghost:hover { background: #fff; color: var(--demo-teal-dark); border-color: var(--demo-teal); }

.demo-btn-small { min-height: 38px; padding: 0 16px; font-size: 13px; }

.demo-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }

/* Hero */
.demo-hero {
    padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
    background:
        radial-gradient(100% 80% at 85% 0%, rgba(15, 118, 110, .12) 0%, transparent 60%),
        radial-gradient(80% 60% at 0% 100%, rgba(217, 119, 6, .10) 0%, transparent 60%);
}

.demo-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}

.demo-lead { max-width: 620px; color: var(--demo-ink-soft); font-size: clamp(16px, 1.7vw, 19px); }

.demo-hero-card {
    overflow: hidden;
    border-radius: 24px;
    box-shadow: var(--demo-shadow);
    transform: rotate(1.2deg);
}

.demo-credential {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 8px;
    padding: 10px 14px;
    border: 1px solid var(--demo-line);
    border-radius: 12px;
    background: #fff;
    color: var(--demo-muted);
    font-size: 13px;
}

.demo-credential code {
    padding: 2px 7px;
    border-radius: 6px;
    background: #eef3f2;
    color: var(--demo-teal-dark);
    font-weight: 700;
}

.demo-credential a { margin-left: 4px; font-weight: 700; }

/* Sections and cards */
.demo-section { padding: clamp(36px, 6vw, 72px) 0; }

.demo-section-head { max-width: 760px; margin: 0 auto clamp(24px, 4vw, 40px); text-align: center; }
.demo-section-head-left { margin-left: 0; text-align: left; }
.demo-section-head p { color: var(--demo-muted); }

.demo-grid { display: grid; gap: 22px; }
.demo-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.demo-grid > * { min-width: 0; }

.demo-card {
    padding: 24px;
    border: 1px solid var(--demo-line);
    border-radius: var(--demo-radius);
    background: var(--demo-panel);
    box-shadow: 0 8px 24px rgba(16, 29, 44, .04);
}

.demo-card-num {
    margin-bottom: 14px;
    color: var(--demo-teal);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
}

.demo-card p { margin: 0; color: var(--demo-muted); font-size: 14px; }

.demo-product {
    overflow: hidden;
    border: 1px solid var(--demo-line);
    border-radius: 22px;
    background: var(--demo-panel);
    box-shadow: var(--demo-shadow);
}

.demo-product-media { aspect-ratio: 16 / 9; overflow: hidden; background: #0d1b2a; }
.demo-product-media img { width: 100%; height: 100%; object-fit: cover; }

.demo-product-body { padding: clamp(20px, 3vw, 30px); }
.demo-product-body p { color: var(--demo-muted); }

.demo-list { margin: 0 0 20px; padding: 0 0 0 18px; color: var(--demo-ink-soft); font-size: 14px; }
.demo-list li { margin-bottom: 5px; }

/* Weather art on the product card */
.demo-product-media-weather {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #dbeafe 0%, #eff6ff 45%, #fef3c7 100%);
}

.demo-weather-art { position: relative; width: 100%; height: 100%; overflow: hidden; }
.demo-sun {
    position: absolute; top: 18%; right: 18%; width: 110px; height: 110px; border-radius: 50%;
    background: radial-gradient(circle, #fbbf24 0%, rgba(251, 191, 36, .2) 60%, transparent 70%);
    box-shadow: 0 0 60px rgba(251, 191, 36, .55);
}
.demo-cloud {
    position: absolute; display: block; height: 44px; border-radius: 999px;
    background: rgba(255, 255, 255, .92); filter: blur(1px);
}
.demo-cloud-a { top: 46%; left: 12%; width: 48%; }
.demo-cloud-b { top: 60%; left: 38%; width: 38%; height: 32px; opacity: .8; }
.demo-rain {
    position: absolute; inset: 40% 8% 0 8%;
    background: repeating-linear-gradient(105deg, transparent 0 18px, rgba(59, 130, 246, .35) 18px 20px, transparent 20px 38px);
    mask-image: linear-gradient(to bottom, transparent, #000 30%);
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 30%);
}

/* Screenshots */
.demo-shots figure { margin: 0; overflow: hidden; border-radius: 16px; border: 1px solid var(--demo-line); background: #fff; box-shadow: var(--demo-shadow); }
.demo-shots img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.demo-shots figcaption { padding: 12px 14px; color: var(--demo-muted); font-size: 13px; }

/* Panels for components */
.demo-panel {
    max-width: 820px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 34px);
    border: 1px solid var(--demo-line);
    border-radius: 22px;
    background: var(--demo-panel);
    box-shadow: var(--demo-shadow);
}

.demo-panel-soft { background: #fbfaf7; }
.demo-panel-poll { max-width: 860px; }
.demo-panel-poll .baba-poll { max-width: none; }
.demo-panel .bk-widget { max-width: none; }

.demo-page-hero {
    padding: clamp(42px, 7vw, 76px) 0 clamp(16px, 3vw, 28px);
    background: linear-gradient(180deg, #eef5f3 0%, transparent 100%);
}
.demo-page-hero p { max-width: 760px; color: var(--demo-muted); font-size: 16px; }

.demo-note {
    padding-top: 12px;
    color: var(--demo-muted);
    font-size: 14px;
}

.demo-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 32px;
    padding: clamp(24px, 4vw, 38px);
    border-radius: 22px;
    background: #0d1b2a;
    color: #fff;
}
.demo-cta h2 { margin-bottom: 4px; }
.demo-cta p { margin: 0; color: #b9c6d3; }
.demo-cta a { color: #fff; }
.demo-cta .demo-btn { background: #fff; border-color: #fff; color: #0d1b2a; }
.demo-cta .demo-btn:hover { background: #e8f0ef; }
.demo-cta .demo-btn-ghost { background: transparent; color: #fff; border-color: #5d7184; }
.demo-cta .demo-btn-ghost:hover { background: rgba(255,255,255,.08); color: #fff; }

/* Weather grid: plugin card fills column */
.demo-weather-grid { align-items: start; }
.demo-weather-grid .wx-widget { width: 100%; }

/* Footer */
.demo-footer { margin-top: 32px; padding: 36px 0 20px; border-top: 1px solid var(--demo-line); background: #101d2c; color: #dce4eb; }
.demo-footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1.1fr; gap: 32px; }
.demo-footer h3 { color: #fff; font-size: 15px; letter-spacing: .02em; }
.demo-footer a { color: #9ad7cf; }
.demo-footer .demo-muted { color: #93a3b2; }
.demo-brand-footer { color: #fff; margin-bottom: 12px; }
.demo-links { margin: 0; padding: 0; list-style: none; }
.demo-links li { margin-bottom: 7px; }
.demo-footer-bottom {
    display: flex; justify-content: space-between; gap: 16px;
    margin-top: 30px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12);
    color: #7f90a0; font-size: 12px;
}

/* Responsive */
@media (max-width: 960px) {
    .demo-hero-grid { grid-template-columns: minmax(0, 1fr); }
    .demo-hero-card { max-width: 640px; transform: none; }
    .demo-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .demo-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .demo-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
    .demo-header-inner { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
    .demo-nav { order: 3; width: 100%; gap: 14px; overflow-x: auto; }
    .demo-header .demo-btn { margin-left: auto; }
    .demo-grid-3 { grid-template-columns: minmax(0, 1fr); }
    .demo-footer-grid { grid-template-columns: minmax(0, 1fr); }
    .demo-cta { align-items: flex-start; }
    .demo-section { padding: 32px 0; }
    .demo-panel { border-radius: 16px; }
    .demo-credential { width: 100%; }
}

@media (max-width: 420px) {
    .demo-wrap { width: calc(100% - 28px); }
    .demo-actions .demo-btn { width: 100%; }
    .demo-nav { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .demo-btn { transition: none; }
}


/* Favorites demo */
.demo-fav-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.demo-fav-card {
    padding: 22px;
    border: 1px solid var(--demo-line);
    border-radius: 16px;
    background: var(--demo-panel);
    box-shadow: 0 8px 24px rgba(16, 29, 44, .04);
}
.demo-fav-card h2 { font-size: 21px; margin-bottom: 6px; }
.demo-fav-card p { color: var(--demo-muted); font-size: 14px; }
.demo-fav-card-actions { margin-top: 14px; }
.demo-panel-favorites { max-width: 940px; }
.demo-fav-home {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    max-width: 860px;
    margin: 0 auto;
}
.demo-fav-home h3 { margin-bottom: 4px; }
.demo-fav-home .demo-actions { margin: 0; }
@media (max-width: 860px) {
    .demo-fav-grid { grid-template-columns: minmax(0, 1fr); }
}
