:root {
    --bg: #f7fafa;
    --panel: #ffffff;
    --ink: #0e1d23;
    --muted: #5e7078;
    --subtle: #8fa3ab;
    --line: rgba(14, 29, 35, 0.08);
    --teal: #0e9bab;
    --deep: #0a7a88;
    --accent-bg: rgba(14, 155, 171, 0.07);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.04), 0 4px 12px rgba(0,0,0,0.03);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.04), 0 12px 32px rgba(0,0,0,0.06);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.04), 0 24px 48px rgba(0,0,0,0.08);
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --content-width: 1080px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

/* ─── Layout ─── */

.site-shell { min-height: 100vh; display: flex; flex-direction: column; }

.site-header {
    width: min(calc(100% - 40px), var(--content-width));
    margin: 0 auto;
    padding: 20px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    overflow: hidden;
    flex-shrink: 0;
}

.brand-mark img { width: 100%; height: 100%; object-fit: cover; }

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--ink);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.15s, background 0.15s;
}

.nav-links a:hover { color: var(--ink); background: var(--accent-bg); }

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

/* ─── Hero ─── */

.hero {
    padding: 24px 0 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.hero-copy { max-width: 520px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--accent-bg);
    color: var(--deep);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1, .page-hero h1 {
    margin: 20px 0 16px;
    font-size: clamp(2.2rem, 4.5vw, 3.4rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
    font-weight: 800;
}

.hero p, .page-hero p, .prose p, .support-grid p,
.invite-card p, .home-card p, .feature p, .policy-card p {
    color: var(--muted);
    line-height: 1.65;
    font-size: 1.05rem;
}

.cta-row {
    margin-top: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.button:hover { transform: translateY(-1px); }

.button-primary {
    color: white;
    background: var(--deep);
    box-shadow: var(--shadow-sm);
}

.button-primary:hover { box-shadow: var(--shadow-md); }

.button-secondary {
    color: var(--ink);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

/* Hero showcase */
.hero-card {
    display: flex;
    justify-content: center;
}

.hero-card-inner { display: contents; }

.logo-stage { display: none; }

.hero-showcase {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: flex-start;
}

.showcase-primary, .showcase-shot {
    margin: 0;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
}

.showcase-primary {
    max-width: 280px;
    flex-shrink: 0;
}

.showcase-primary img, .showcase-shot img {
    width: 100%;
    height: auto;
}

.showcase-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 200px;
}

.showcase-shot { max-width: 200px; }

/* ─── Sections ─── */

.section { padding: 0 0 80px; }

.section-heading {
    max-width: 640px;
    margin-bottom: 36px;
}

.section-heading.hero,
.page-hero-card.hero {
    display: block;
    padding: 40px;
    grid-template-columns: unset;
    gap: unset;
    align-items: unset;
}

.section-heading.hero {
    padding: 0;
}

.section-heading h2 {
    margin: 14px 0 10px;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    letter-spacing: -0.03em;
    font-weight: 800;
    line-height: 1.1;
}

/* ─── Cards ─── */

.stat-grid, .feature-grid, .support-grid, .policy-grid, .home-grid {
    display: grid;
    gap: 16px;
}

.feature-grid, .home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.support-grid, .policy-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.stat, .feature, .policy-card, .support-card, .home-card, .invite-card, .prose {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.feature, .home-card, .policy-card, .support-card, .invite-card {
    padding: 28px;
}

.feature h3, .home-card h3, .support-card h3, .policy-card h3, .invite-card h3 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    font-weight: 700;
}

.feature-icon, .home-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    margin-bottom: 16px;
    background: var(--accent-bg);
    color: var(--deep);
    font-weight: 800;
    font-size: 0.85rem;
}

.stat { padding: 18px; }
.stat strong { display: block; font-size: 1.4rem; margin-bottom: 6px; }
.stat span { color: var(--subtle); font-size: 0.92rem; }

/* ─── Page hero (subpages) ─── */

.page-hero { padding: 48px 0 24px; }

.page-hero-card {
    padding: 40px;
    border-radius: var(--radius-lg);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.content-wrap { padding-bottom: 64px; }

/* ─── Prose ─── */

.prose { padding: 32px; }
.prose h2, .prose h3 { letter-spacing: -0.03em; margin-top: 24px; }
.prose h2:first-child, .prose h3:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; color: var(--muted); line-height: 1.65; }
.prose li + li { margin-top: 6px; }
.muted-note { font-size: 0.9rem; color: var(--muted); }

/* ─── Invite page ─── */

.invite-hero { padding-bottom: 32px; }

.invite-card { max-width: 640px; margin: 0 auto; }

.invite-code {
    margin: 16px 0;
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    background: var(--accent-bg);
    border: 1px dashed rgba(14, 155, 171, 0.3);
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--deep);
}

.invite-list {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.invite-list div {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    border: 1px solid var(--line);
    font-size: 0.95rem;
    color: var(--muted);
}

/* ─── Footer ─── */

.site-footer { margin-top: auto; padding: 0 0 32px; }

.footer-wrap {
    border-top: 1px solid var(--line);
    padding-top: 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--subtle);
    font-size: 0.9rem;
}

.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { text-decoration: none; transition: color 0.15s; }
.footer-links a:hover { color: var(--ink); }

/* ─── Responsive ─── */

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 40px 0 56px;
        gap: 40px;
    }

    .hero-copy { max-width: none; }
    .hero-card { justify-content: flex-start; }

    .feature-grid, .home-grid { grid-template-columns: 1fr; }
    .support-grid, .policy-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }

    .showcase-primary { max-width: 240px; }
    .showcase-shot { max-width: 160px; }
}

@media (max-width: 640px) {
    .site-header { flex-direction: column; align-items: flex-start; gap: 12px; }

    .brand-mark { width: 38px; height: 38px; border-radius: 10px; }

    .nav-links { justify-content: flex-start; gap: 4px; }
    .nav-links a { padding: 6px 10px; font-size: 0.85rem; }

    .hero h1, .page-hero h1 { font-size: 2rem; }

    .hero-showcase { gap: 10px; }
    .showcase-primary { max-width: 180px; }
    .showcase-grid { max-width: 140px; gap: 10px; }
    .showcase-shot { max-width: 140px; }

    .cta-row { flex-direction: column; }
    .button { width: 100%; }

    .feature, .home-card, .policy-card, .support-card, .invite-card { padding: 20px; }
    .page-hero-card { padding: 24px; }
    .prose { padding: 20px; }
}
