/* Reset and base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-bg: #ffffff;
    --color-text: #1d1d1f;
    --color-text-secondary: #6e6e73;
    --color-primary: #0071e3;
    --color-primary-hover: #0077ed;
    --color-surface: #f5f5f7;
    --color-border: #d2d2d7;
    --max-width: 720px;
    --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-stack);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 0;
    background: var(--color-bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    max-width: 1080px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    text-decoration: none;
    white-space: nowrap;
}

.logo:hover {
    text-decoration: none;
    color: var(--color-primary);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--color-primary);
    text-decoration: none;
}

.site-nav a[target="_blank"]::after {
    content: ' \2197';
    font-size: 0.7em;
}

.site-nav .nav-cta {
    background: var(--color-primary);
    color: #fff;
    padding: 0.4rem 1rem;
    border-radius: 1rem;
    font-size: 0.85rem;
}

.site-nav .nav-cta:hover {
    background: var(--color-primary-hover);
    color: #fff;
}

/* Page content */
.page-content {
    padding: 3rem 0 4rem;
}

.page-content h1 {
    font-size: 2.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.page-content h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
}

.page-content h3 {
    font-size: 1.15rem;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.page-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}

.page-content h1 + p {
    font-size: 1.15rem;
}

.page-content ul {
    margin: 0 0 1rem 1.5rem;
}

.page-content li {
    margin-bottom: 0.4rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}

.page-content hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 3rem 0;
}

.page-content em {
    font-style: italic;
    color: var(--color-text-secondary);
}

/* Home hero */
.home-hero {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: -3rem;
    margin-bottom: 2.5rem;
    padding: 4rem 2rem;
    background-size: cover;
    background-position: 52.8% 34.4%;
    position: relative;
    border-radius: 0;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.home-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

.home-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.home-hero-content h2 {
    color: #fff;
    font-size: 2.5rem;
    margin: 0 0 1.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.15rem;
    margin: -0.75rem 0 1.5rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}

.app-store-badge img {
    height: 40px;
    width: auto;
}

/* Origin story */
.origin-story {
    max-width: var(--max-width);
    margin: 0 auto 2rem;
    padding: 2rem 1.5rem;
    background: var(--color-surface);
    border-radius: 12px;
}

.origin-story h2 {
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.origin-story p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.origin-story p:last-child {
    margin-bottom: 0;
}

/* Bottom CTA */
.bottom-cta {
    text-align: center;
}

.bottom-cta h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.bottom-cta p {
    color: var(--color-text-secondary);
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.bottom-cta a {
    font-weight: 600;
}

/* Images */
.hero-banner {
    margin-top: 0;
    margin-bottom: 2.5rem;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.features-with-screenshot {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.features-list {
    flex: 1;
}

.screenshot-column {
    flex: 0 0 250px;
    display: flex;
    align-items: flex-start;
}

.app-screenshot {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.discord-link {
    display: inline-block;
    max-width: 250px;
}

.discord-logo {
    width: 100%;
    height: auto;
}

.substack-embed {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-top: 3rem;
    margin-bottom: -4rem;
    padding: 0;
    border-radius: 0;
    overflow: hidden;
}

.substack-embed iframe {
    display: block;
}

@media (max-width: 640px) {
    .features-with-screenshot {
        flex-direction: column;
    }

    .screenshot-column {
        flex: none;
        width: 60%;
        margin: 0 auto;
    }
}

/* Footer */
.site-footer {
    text-align: center;
}

.footer-top {
    background: #2d4a3e;
    padding: 2rem 0;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.footer-links a {
    color: #c8d8d0;
    font-size: 1rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-links a[href^="mailto:"]::after,
.footer-links a[href^="http"]::after {
    content: ' \2197';
    font-size: 0.75em;
}

.footer-sep {
    color: #c8d8d0;
    margin: 0 0.5rem;
}

.footer-bottom {
    background: #23382e;
    padding: 2rem 0 0;
}

.footer-cat-img {
    height: 250px;
    width: auto;
    display: block;
    margin: 0 auto;
}

/* Responsive: Mobile */
@media (max-width: 480px) {
    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-nav {
        gap: 1rem;
    }

    .page-content h1 {
        font-size: 1.75rem;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-sep {
        display: none;
    }

    .footer-cat-img {
        height: 180px;
    }
}
