/* ── home.css — Homepage-only styles ──────────────────────────────────────── */

/* Override body defaults from style.css */
body.home {
    background: #0a0a0a;
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif;
    height: auto;
    display: block;
    margin: 0;
    overflow-x: hidden;

    /* Design tokens */
    --bg:         #0a0a0a;
    --bg-2:       #111111;
    --surface:    #1c1c1e;
    --border:     rgba(255, 255, 255, 0.08);
    --accent:     #ff3b30;
    --accent-glow: rgba(255, 59, 48, 0.28);
    --text:       #ffffff;
    --text-2:     #8e8e93;
    --text-3:     #3a3a3c;
    --radius:     20px;
}

/* ── Container ───────────────────────────────────────────────────────────── */
body.home .container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ── Navigation ──────────────────────────────────────────────────────────── */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 10, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text);
}

.nav-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
}

.nav-title {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.nav-download {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 100px;
    letter-spacing: -0.01em;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.nav-download:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    position: relative;
    padding: 96px 0 64px;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 700px;
    background: radial-gradient(ellipse at center, rgba(255, 59, 48, 0.1) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.hero .container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 56px;
}

.hero-text {
    text-align: center;
    max-width: 740px;
}

.hero-heading {
    font-size: clamp(52px, 8.5vw, 92px);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.04em;
    margin: 0 0 24px;
}

.hero-accent {
    font-style: normal;
    color: var(--accent);
}

.hero-sub {
    font-size: clamp(17px, 2.2vw, 20px);
    color: var(--text-2);
    line-height: 1.65;
    margin: 0 auto 36px;
    max-width: 540px;
}

.btn-appstore {
    display: inline-block;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-appstore img {
    display: block;
    transition: opacity 0.2s ease;
}

.btn-appstore:hover {
    transform: translateY(-3px);
}

.btn-appstore:hover img {
    opacity: 0.85;
}

.hero-image {
    width: 100%;
    text-align: center;
}

.hero-image img {
    max-width: 900px;
    width: 100%;
    filter:
        drop-shadow(0 48px 120px rgba(0, 0, 0, 0.75))
        drop-shadow(0 0 80px rgba(255, 59, 48, 0.06));
    border-radius: 16px;
}

/* ── Proof strip ─────────────────────────────────────────────────────────── */
.proof-strip {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-2);
    padding: 18px 0;
}

.proof-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 28px;
    flex-wrap: wrap;
}

.proof-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.stars {
    color: var(--accent);
    font-size: 15px;
    letter-spacing: 3px;
}

.proof-label {
    color: var(--text-2);
    font-size: 14px;
    font-weight: 400;
}

.proof-sep {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
}

/* ── Feature sections ────────────────────────────────────────────────────── */
.feature {
    padding: 104px 0;
}

.feature-a {
    background: var(--bg);
}

.feature-b {
    background: var(--bg-2);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

/* On reversed layouts (feature-b), text is first in markup on mobile —
   keep visual order: image right, text left on desktop */
.feature-grid-reversed .feature-media {
    order: 2;
}

.feature-grid-reversed .feature-body {
    order: 1;
}

/* Screenshot frame with ambient red glow */
.screen-frame {
    position: relative;
    height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.screen-frame::before {
    content: '';
    position: absolute;
    inset: -24px;
    background: radial-gradient(ellipse at center, var(--accent-glow) 0%, transparent 68%);
    border-radius: 32px;
    opacity: 0.55;
    z-index: -1;
    pointer-events: none;
}

.screen-frame img {
    max-height: 100%;
    width: auto;
    max-width: 100%;
    border-radius: var(--radius);
    box-shadow: 0 24px 72px rgba(0, 0, 0, 0.65);
    display: block;
}

/* Feature copy */
.label {
    display: inline-block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.feature-heading {
    font-size: clamp(32px, 4.2vw, 50px);
    font-weight: 700;
    letter-spacing: -0.028em;
    line-height: 1.08;
    margin: 0 0 20px;
}

.feature-text {
    font-size: 18px;
    color: var(--text-2);
    line-height: 1.72;
    margin: 0;
}

/* ── Platform marquee ────────────────────────────────────────────────────── */
.platforms-section {
    padding: 104px 0 0;
    background: var(--bg);
    overflow: hidden;
}

.platforms-section .container {
    text-align: center;
    margin-bottom: 52px;
}

.platforms-sub {
    font-size: 18px;
    color: var(--text-2);
    line-height: 1.65;
    max-width: 480px;
    margin: 14px auto 0;
}

.marquee-outer {
    position: relative;
    overflow: hidden;
    padding: 16px 0 100px;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.marquee-track {
    display: flex;
    gap: 10px;
    width: max-content;
    animation: marquee 35s linear infinite;
}

.platform-pill {
    display: inline-flex;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 13px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: 100px;
    white-space: nowrap;
    letter-spacing: 0.01em;
    transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.marquee-outer:hover .platform-pill {
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.14);
}

@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ── CTA section ─────────────────────────────────────────────────────────── */
.cta-section {
    padding: 104px 0;
    background: var(--bg-2);
    text-align: center;
}

.cta-heading {
    font-size: clamp(36px, 5.5vw, 64px);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.06;
    margin: 0 0 16px;
}

.cta-sub {
    font-size: 18px;
    color: var(--text-2);
    margin: 0 0 36px;
    line-height: 1.6;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 36px 0;
    background: var(--bg);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.footer-icon {
    width: 22px;
    height: 22px;
    border-radius: 5px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--text);
}

.footer-copy {
    color: var(--text-3);
    font-size: 12px;
}

.footer-mastodon {
    color: var(--text-3);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-mastodon:hover {
    color: var(--text-2);
}

/* ── Content pages (pp.php, etc.) ────────────────────────────────────────── */
.content-page {
    padding: 60px 28px 100px;
    max-width: 720px;
    line-height: 1.7;
}

.content-page h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 700;
    letter-spacing: -0.025em;
    margin: 0 0 48px;
}

.content-page h2 {
    font-size: 18px;
    font-weight: 600;
    margin: 36px 0 10px;
    color: var(--text);
}

.content-page p {
    color: var(--text-2);
    font-size: 16px;
    margin: 0 0 16px;
}

.content-page a {
    color: var(--accent);
    text-decoration: none;
}

.content-page a:hover {
    text-decoration: underline;
}

.content-page strong {
    color: var(--text);
    font-weight: 600;
}

/* ── Scroll reveal ───────────────────────────────────────────────────────── */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.reveal-delay {
    transition-delay: 0.14s;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    /* Reset order overrides so DOM order is: image then text */
    .feature-grid-reversed .feature-media,
    .feature-grid-reversed .feature-body {
        order: unset;
    }

    .feature-body {
        text-align: center;
    }

    .feature,
    .platforms-section,
    .cta-section {
        padding: 72px 0;
    }

    .platforms-section {
        padding-bottom: 0;
    }

    .marquee-outer {
        padding-bottom: 72px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 60px 0 40px;
    }

    .proof-sep {
        display: none;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

/* ── Unlock page ─────────────────────────────────────────────────────────── */
.unlock-hero {
    position: relative;
    padding: 96px 0 72px;
    text-align: center;
    overflow: hidden;
}

.unlock-hero .container {
    position: relative;
    z-index: 1;
}

.unlock-hero-text {
    max-width: 680px;
    margin: 0 auto;
}

.unlock-heading {
    font-size: clamp(46px, 7.5vw, 80px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin: 12px 0 24px;
}

.unlock-sub {
    font-size: clamp(16px, 2vw, 19px);
    color: var(--text-2);
    line-height: 1.65;
    max-width: 480px;
    margin: 0 auto;
}

.unlock-compare-section {
    padding: 40px 0 96px;
}

/* Comparison table — minimal, no background */
.unlock-table {
    display: grid;
    grid-template-columns: 1fr 110px 130px;
    max-width: 560px;
    margin: 0 auto 36px;
}

.utc {
    padding: 18px 0;
    display: flex;
    align-items: center;
    font-size: 16px;
    border-bottom: 1px solid var(--border);
}

/* Last data row — no separator */
.utc:nth-last-child(-n+3) {
    border-bottom: none;
}

/* Header row */
.utc.utc-head {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-2);
    padding: 0 0 18px;
}

/* Feature label column */
.utc.utc-feature {
    color: var(--text-2);
    padding-right: 16px;
}

/* Free column */
.utc.utc-free {
    justify-content: center;
    color: var(--text-2);
}

/* Unlock column */
.utc.utc-unlock {
    justify-content: center;
    font-weight: 700;
    color: var(--text);
}

.utc.utc-head.utc-unlock {
    color: var(--accent);
}

/* Checkmark / cross */
.utc.utc-yes,
.utc.utc-no {
    font-size: 18px;
}

.utc.utc-yes {
    color: var(--text);
    font-weight: 600;
}

.utc.utc-no {
    color: var(--text-3);
}

/* Plans note below the table */
.unlock-plans-note {
    text-align: center;
    color: var(--text-2);
    font-size: 15px;
    margin: 0;
}

.unlock-plans-note strong {
    color: var(--text);
    font-weight: 600;
}

@media (max-width: 480px) {
    .unlock-table {
        grid-template-columns: 1fr 80px 90px;
    }

    .utc {
        font-size: 15px;
    }
}

/* ── Nav link ────────────────────────────────────────────────────────────── */
.nav-links {
    display: flex;
    gap: 16px;
    margin-left: 32px;
}

.nav-link {
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

/* ── Reduced motion ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .marquee-track {
        animation: none;
    }

    .btn-appstore:hover,
    .nav-download:hover {
        transform: none;
    }
}

/* ── Journal listing page ─────────────────────────────────────────────────── */
.journal-section {
    padding: 80px 0 120px;
}

.journal-header {
    text-align: center;
    margin-bottom: 64px;
}

.journal-title {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    letter-spacing: -0.04em;
    margin: 0 0 16px;
}

.journal-sub {
    font-size: 18px;
    color: var(--text-2);
    margin: 0;
}

.journal-empty {
    text-align: center;
    color: var(--text-2);
    font-size: 16px;
    padding: 80px 0;
}

/* ── News grid ────────────────────────────────────────────────────────────── */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* ── News card ────────────────────────────────────────────────────────────── */
.news-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.news-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-2);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.03);
}

.news-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-2) 0%, var(--surface) 100%);
}

.news-card-body {
    padding: 20px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.news-card-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin: 0;
}

.news-card-excerpt {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.55;
    margin: 0;
    flex: 1;
}

.news-card-date {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 4px;
}

/* ── Post page ────────────────────────────────────────────────────────────── */
.post-page {
    padding: 64px 0 120px;
}

.post-header {
    max-width: 720px;
    margin: 0 auto 48px;
}

.post-back {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.post-back::before {
    content: "← ";
}

.post-back:hover {
    opacity: 0.8;
}

.post-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin: 0 0 16px;
}

.post-date {
    display: block;
    font-size: 14px;
    color: var(--text-2);
}

.post-cover {
    max-width: 720px;
    margin: 0 auto 48px;
    border-radius: var(--radius);
    overflow: hidden;
}

.post-cover img {
    width: 100%;
    display: block;
    border-radius: var(--radius);
}

.post-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 17px;
    line-height: 1.75;
    color: var(--text);
}

.post-content img {
    display: block;
    max-width: 100%;
    margin: 32px auto;
}

.post-content img.img-rounded {
    border-radius: var(--radius);
}

.post-content h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin: 48px 0 16px;
    color: var(--text);
}

.post-content h3 {
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.02em;
    margin: 36px 0 12px;
    color: var(--text);
}

.post-content p {
    margin: 0 0 20px;
    color: var(--text-2);
}

.post-content a {
    color: var(--accent);
    text-decoration: none;
}

.post-content a:hover {
    text-decoration: underline;
}

.post-content ul,
.post-content ol {
    margin: 0 0 20px;
    padding-left: 24px;
    color: var(--text-2);
}

.post-content li {
    margin-bottom: 8px;
}

.post-content strong {
    color: var(--text);
    font-weight: 600;
}

.post-content code {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 2px 6px;
    font-size: 0.88em;
    font-family: "SF Mono", "Fira Code", monospace;
}

.post-content pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
    overflow-x: auto;
    margin: 0 0 24px;
}

.post-content pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: 14px;
}
