/* Bin Night — shared styles
   Night-sky background + menu + footer. Page-specific styles live in each file. */

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

:root {
    --bin-teal: #40AFAC;
    --bin-amber: #E8A838;
    /* Gradient stops match the iOS app exactly (BinNight/Model.swift NightSkyBackground). */
    --sky-top: #0a1433;
    --sky-mid: #03050f;
    --sky-bot: #000000;
}

html, body { height: 100%; }

/* Black backstop so any uncovered area still reads as night-sky bottom, not browser white. */
html { background: var(--sky-bot); }

body {
    min-height: 100vh;
    min-height: 100dvh;
    /* No background here — body::before paints the fixed gradient.
       html has the black backstop for overflow areas. Setting a body
       background would paint over the gradient and hide it. */
    color: white;
    font-family: ui-rounded, 'Nunito', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    overflow-x: hidden;
}

/* Gradient on a fixed pseudo-element so it stays put while content scrolls
   above it. background-attachment: fixed is unreliable on iOS Safari. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, var(--sky-top) 0%, var(--sky-mid) 50%, var(--sky-bot) 100%);
    pointer-events: none;
}

/* Stars layer — fixed so it stays put while content scrolls. */
.stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.star {
    position: absolute;
    border-radius: 50%;
    background: white;
}

@keyframes twinkle {
    0%, 100% { opacity: var(--base-opacity, 0.3); }
    50%      { opacity: calc(var(--base-opacity, 0.3) * 0.3); }
}

/* Footer — small, low-contrast, every page. */
.footer {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1.5rem 1rem calc(1.25rem + env(safe-area-inset-bottom));
    color: rgba(255, 255, 255, 0.35);
    font-family: ui-rounded, 'Nunito', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: -0.005em;
}

.footer a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    margin: 0 0.4rem;
}

.footer a:hover { color: rgba(255, 255, 255, 0.8); }

/* Page content wrapper — sits above the stars. */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

/* ───────────────────────────────────────────────────────────────────
   HOME PAGE
   All styles scoped under .page-home so support/privacy are unaffected.
   ─────────────────────────────────────────────────────────────────── */

.page-home {
    --content-max: 1100px;
    --teal: var(--bin-teal);
    --amber: var(--bin-amber);
}

.page-home h1,
.page-home h2,
.page-home h3 {
    font-family: ui-rounded, 'Nunito', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    letter-spacing: -0.02em;
    color: white;
}

.page-home h2 {
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
}

.page-home h3 {
    font-size: 1.15rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.page-home p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.55;
    font-size: 1.05rem;
}

.page-home section {
    width: 100%;
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 4rem 1.5rem;
}

.page-home .section-sub {
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

/* App Store badge — used in hero + final CTA */
.page-home .app-store-badge {
    display: inline-block;
    transition: transform 120ms ease, opacity 120ms ease;
}
.page-home .app-store-badge:hover { opacity: 0.85; }
.page-home .app-store-badge:active { transform: scale(0.97); }
.page-home .app-store-badge img {
    width: 246px;
    height: 82px;
    vertical-align: middle;
    object-fit: contain;
    display: block;
}

/* ── HERO ─────────────────────────────────────────────── */
.page-home .hero {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
    padding-top: clamp(3rem, 8vh, 5rem);
    padding-bottom: 3rem;
    text-align: center;
}

.page-home .hero h1 {
    font-size: clamp(2rem, 6.5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.page-home .hero .lede {
    font-size: clamp(1.05rem, 2.4vw, 1.25rem);
    color: rgba(255, 255, 255, 0.85);
    margin: 0 auto 1.75rem;
    max-width: 28em;
}

.page-home .hero .trial-note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.9rem;
}

.page-home .hero-visual img {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 20px 60px rgba(64, 175, 172, 0.18));
}

@media (min-width: 800px) {
    .page-home .hero {
        grid-template-columns: 1.1fr 0.9fr;
        text-align: left;
        gap: 4rem;
    }
    .page-home .hero .lede {
        margin-left: 0;
    }
    .page-home .hero-visual img {
        max-width: 320px;
        margin: 0;
    }
}

/* ── COUNCIL SEARCH ──────────────────────────────────── */
.page-home .council-search {
    text-align: center;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.page-home .search-box {
    position: relative;
    max-width: 460px;
    margin: 0 auto;
}

.page-home #councilInput {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.05rem;
    font-family: inherit;
    font-weight: 600;
    color: white;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    outline: none;
    transition: border-color 150ms ease, background 150ms ease;
}

.page-home #councilInput::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 500;
}

.page-home #councilInput:focus {
    border-color: var(--teal);
    background: rgba(255, 255, 255, 0.09);
}

.page-home .search-results {
    list-style: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow-y: auto;
    background: rgba(15, 25, 50, 0.96);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    padding: 0.4rem 0;
    z-index: 10;
    text-align: left;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.page-home .search-results li {
    padding: 0.75rem 1.25rem;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    transition: background 100ms ease;
}

.page-home .search-results li:hover,
.page-home .search-results li[aria-selected="true"] {
    background: rgba(64, 175, 172, 0.18);
    color: white;
}

.page-home .search-results .no-match {
    cursor: default;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 500;
    font-style: italic;
}

.page-home .search-results .no-match:hover {
    background: transparent;
}

.page-home .search-answer {
    margin: 1.5rem auto 0;
    max-width: 460px;
    padding: 1.25rem 1.5rem;
    background: rgba(64, 175, 172, 0.12);
    border: 1px solid rgba(64, 175, 172, 0.4);
    border-radius: 14px;
    text-align: center;
}

.page-home .search-answer.unsupported {
    background: rgba(232, 168, 56, 0.10);
    border-color: rgba(232, 168, 56, 0.35);
}

.page-home .search-answer .check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.page-home .search-answer h3 {
    margin-bottom: 0.5rem;
}

.page-home .search-answer p {
    font-size: 0.95rem;
    margin-bottom: 0.9rem;
}

.page-home .search-answer .app-store-badge {
    margin-top: 0.5rem;
}

.page-home .search-foot {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
}

/* ── PROBLEM ──────────────────────────────────────────── */
.page-home .problem {
    max-width: 680px;
    text-align: center;
    padding: 4rem 1.5rem;
}

.page-home .problem p {
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.92);
    line-height: 1.4;
    margin-bottom: 0.5rem;
}

.page-home .problem .problem-resolve {
    margin-top: 1.5rem;
    color: var(--teal);
    font-weight: 800;
}

/* ── FEATURES ─────────────────────────────────────────── */
.page-home .features {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.page-home .feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-top: 2rem;
}

@media (min-width: 700px) {
    .page-home .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

.page-home .feature {
    padding: 1.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    transition: border-color 200ms ease, background 200ms ease;
}

.page-home .feature:hover {
    border-color: rgba(64, 175, 172, 0.35);
    background: rgba(255, 255, 255, 0.06);
}

.page-home .feature-icon {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
    line-height: 1;
}

.page-home .feature p {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.7);
}

/* ── HOW IT WORKS ─────────────────────────────────────── */
.page-home .how {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.page-home .steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .page-home .steps {
        grid-template-columns: 1fr 0.6fr 1fr 0.6fr 1fr;
        gap: 2rem;
    }
}

.page-home .step {
    text-align: center;
    padding: 0 1rem;
}

.page-home .step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--teal);
    color: white;
    font-weight: 900;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-family: ui-rounded, 'Nunito', sans-serif;
}

.page-home .step p {
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.7);
}

.page-home .step-visual {
    display: none;
}

.page-home .step-visual img {
    width: 100%;
    max-width: 200px;
    height: auto;
    margin: 0 auto;
    display: block;
    filter: drop-shadow(0 15px 40px rgba(64, 175, 172, 0.15));
}

@media (min-width: 900px) {
    .page-home .step-visual {
        display: block;
    }
}

/* ── COVERAGE ─────────────────────────────────────────── */
.page-home .coverage {
    text-align: center;
    padding-top: 3rem;
    padding-bottom: 3rem;
    max-width: 820px;
}

.page-home .coverage-lede {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.page-home .coverage-cities {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.7;
}

.page-home .coverage-cities strong {
    color: white;
    font-weight: 700;
}

.page-home .coverage-cta {
    margin-top: 1.5rem;
}

.page-home .coverage-cta a {
    color: var(--teal);
    text-decoration: none;
    font-weight: 700;
}

.page-home .coverage-cta a:hover {
    text-decoration: underline;
}

/* ── FAQ ──────────────────────────────────────────────── */
.page-home .faq {
    max-width: 720px;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.page-home .faq details {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 0;
}

.page-home .faq details:last-of-type {
    border-bottom: none;
}

.page-home .faq summary {
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    color: white;
    list-style: none;
    position: relative;
    padding-right: 2rem;
    user-select: none;
}

.page-home .faq summary::-webkit-details-marker {
    display: none;
}

.page-home .faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--teal);
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1;
    transition: transform 200ms ease;
}

.page-home .faq details[open] summary::after {
    content: "−";
}

.page-home .faq details p {
    margin-top: 0.75rem;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.98rem;
}

.page-home .faq details a {
    color: var(--teal);
}

/* ── FINAL CTA ────────────────────────────────────────── */
.page-home .final-cta {
    text-align: center;
    padding: 4rem 1.5rem 5rem;
}

.page-home .final-fox {
    width: 140px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    opacity: 0.95;
}

.page-home .final-cta h2 {
    margin-bottom: 0.75rem;
}

.page-home .final-cta p {
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.65);
}

.page-home .final-cta .app-store-badge {
    margin: 0 auto;
}

