/* djust-start — landing page styles
   Uses djust-theming CSS variables: hsl(var(--background)), hsl(var(--foreground)),
   hsl(var(--muted)), hsl(var(--muted-foreground)), hsl(var(--primary)),
   hsl(var(--accent)), hsl(var(--accent-foreground)), hsl(var(--border)),
   hsl(var(--card)). All theme-pack switchable. */

/* ─── Site chrome ────────────────────────────────────────────────────── */
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 Oxygen, Ubuntu, Cantarell, sans-serif;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}
.site-brand {
    font-weight: 700;
    text-decoration: none;
    color: hsl(var(--foreground));
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.presence-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.3rem 0.7rem;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 500;
}
.presence-chip::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: hsl(var(--primary));
}

/* ─── Sync banner ────────────────────────────────────────────────────── */
.sync-banner {
    display: block;
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    padding: 0.65rem 1rem;
    text-align: center;
    font-size: 0.88rem;
    border-bottom: 1px solid hsl(var(--border));
    text-decoration: none;
    transition: filter 0.1s;
}
.sync-banner:hover {
    filter: brightness(0.95);
}
.sync-banner--hidden {
    display: none;
}
.sync-arrow {
    margin-right: 0.4rem;
    font-weight: 700;
    display: inline-block;
}

/* ─── Page wrapper ───────────────────────────────────────────────────── */
.home-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

/* ─── Hero header ────────────────────────────────────────────────────── */
.hero-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.hero-logo {
    height: 64px;
    width: auto;
    margin-bottom: 1.25rem;
}
.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}
.hero-tagline {
    color: hsl(var(--muted-foreground));
    font-size: 1.05rem;
    margin: 0;
}

/* ─── Hero demo (code | live) ────────────────────────────────────────── */
.hero-demo {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border: 1px solid hsl(var(--border));
    border-radius: 12px;
    overflow: hidden;
    background: hsl(var(--card));
    margin-bottom: 2.5rem;
}
.demo-code, .demo-live {
    padding: 1.25rem;
}
.demo-code {
    background: hsl(var(--muted));
    border-right: 1px solid hsl(var(--border));
}
.demo-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
}
.demo-code pre {
    margin: 0;
    overflow-x: auto;
}
.demo-code code,
.show-code code {
    font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 0.8rem;
    line-height: 1.55;
    color: hsl(var(--foreground));
    white-space: pre;
}

/* ─── Reactions row ─────────────────────────────────────────────────── */
.reactions {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 0.5rem;
}
.reaction-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 0.9rem 0.4rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, background 0.15s;
    font: inherit;
    color: inherit;
}
.reaction-btn:hover {
    background: hsl(var(--muted));
}
.reaction-btn:active {
    transform: scale(0.94);
}
.reaction-btn .emoji {
    font-size: 1.6rem;
    line-height: 1;
}
.reaction-btn .count {
    font-size: 0.85rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ─── Supporting cards grid ─────────────────────────────────────────── */
.supporting-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}
/* .supporting-card is a class we hand to {% card %} via class= so the dj-card
   wrapper participates in the grid layout. djust-components owns the visual
   styling (.card, .card-header, .card-title, .card-body) — bootstrap-style. */

/* ─── Poll ───────────────────────────────────────────────────────────── */
.poll {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.poll-row {
    display: grid;
    grid-template-columns: 100px 1fr 40px;
    gap: 0.75rem;
    align-items: center;
    background: none;
    border: none;
    padding: 0.45rem 0.4rem;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
}
.poll-row:hover {
    background: hsl(var(--muted));
}
.poll-label {
    font-size: 0.88rem;
    font-weight: 500;
}
.poll-bar {
    display: block;
    height: 8px;
    background: hsl(var(--muted));
    border-radius: 4px;
    overflow: hidden;
}
.poll-fill {
    display: block;
    height: 100%;
    background: hsl(var(--primary));
    border-radius: 4px;
    transition: width 0.3s ease-out;
}
.poll-count {
    font-size: 0.82rem;
    color: hsl(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
    text-align: right;
}

/* ─── Guestbook ──────────────────────────────────────────────────────── */
.guestbook-form input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.75rem;
    border: 1px solid hsl(var(--border));
    border-radius: 6px;
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-family: inherit;
}
.guestbook-form input:focus {
    outline: 2px solid hsl(var(--primary));
    outline-offset: -1px;
}
.guestbook-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-height: 100px;
}
.guestbook-list li {
    padding: 0.5rem 0.7rem;
    background: hsl(var(--muted));
    border-radius: 6px;
    font-size: 0.88rem;
}
.guestbook-list li.empty {
    background: none;
    color: hsl(var(--muted-foreground));
    font-style: italic;
    padding-left: 0;
}

/* ─── Show-code disclosure ──────────────────────────────────────────── */
.show-code {
    margin-top: 1rem;
    font-size: 0.85rem;
}
.show-code summary {
    cursor: pointer;
    color: hsl(var(--muted-foreground));
    user-select: none;
    list-style: none;
    padding: 0.25rem 0;
}
.show-code summary::-webkit-details-marker { display: none; }
.show-code summary::before {
    content: "▸";
    display: inline-block;
    margin-right: 0.4rem;
    transition: transform 0.15s;
}
.show-code[open] summary::before {
    transform: rotate(90deg);
}
.show-code pre {
    background: hsl(var(--muted));
    padding: 0.75rem;
    border-radius: 6px;
    margin: 0.5rem 0 0;
    overflow-x: auto;
}

/* ─── Footer ─────────────────────────────────────────────────────────── */
.home-footer {
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-size: 0.85rem;
}
.home-footer a {
    color: hsl(var(--muted-foreground));
    text-decoration: none;
}
.home-footer a:hover {
    color: hsl(var(--foreground));
}
.home-footer .sep {
    margin: 0 0.6rem;
}
.home-footer code {
    background: hsl(var(--muted));
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.82rem;
}
/* Reset button styling comes from {% dj_button variant="danger" %} which
   djust-components maps to djust-theming's .btn-destructive class. */

/* ─── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .hero-demo, .supporting-grid {
        grid-template-columns: 1fr;
    }
    .demo-code {
        border-right: none;
        border-bottom: 1px solid hsl(var(--border));
    }
    .reactions {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero-title {
        font-size: 2rem;
    }
}
