/* ════════════════════════════════════════════════
   WhingeHub – Home v2 CSS
   "Finally, someone who gets it."
   ════════════════════════════════════════════════ */

/* ── Tokens ───────────────────────────────────── */
:root {
    --bg:       #0d0d12;
    --surface:  #161620;
    --surface2: #1e1e2c;
    --border:   rgba(255,255,255,.08);
    --text:     #f0f0f5;
    --muted:    #8888a8;
    --accent:   #7c6af7;          /* purple */
    --accent2:  #e87c5a;          /* orange-red */
    --green:    #22c55e;
    --radius:   16px;
    --radius-sm: 10px;
    --radius-pill: 999px;
    --font:     'Outfit', 'Inter', system-ui, sans-serif;
    --transition: .2s ease;
}

/* ── Reset ────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: var(--font); cursor: pointer; border: none; background: none; }

/* ── Utility ──────────────────────────────────── */
.section__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}
.section__title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 800;
    text-align: center;
    letter-spacing: -.02em;
}
.section__sub {
    text-align: center;
    color: var(--muted);
    margin-top: 8px;
    font-size: 1.05rem;
}

/* ── Blobs ────────────────────────────────────── */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: .95rem;
    transition: all var(--transition);
    white-space: nowrap;
}
.btn--primary {
    background: var(--accent);
    color: #fff;
}
.btn--primary:hover { background: #6d5de8; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124,106,247,.35); }
.btn--ghost {
    background: transparent;
    color: var(--muted);
    border: 1px solid var(--border);
}
.btn--ghost:hover { color: var(--text); border-color: rgba(255,255,255,.2); }
.btn--outline {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255,255,255,.2);
}
.btn--outline:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn--whinge {
    background: var(--accent2);
    color: #fff;
    padding: 9px 20px;
    border-radius: var(--radius-pill);
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.btn--whinge:hover { background: #d96a47; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(232,124,90,.35); }
.btn--google {
    background: #fff;
    color: #333;
    border: 1px solid #e0e0e0;
}
.btn--google:hover { background: #f5f5f5; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.btn--full { width: 100%; }
.btn--lg { padding: 13px 32px; font-size: 1rem; }

/* ── Navigation ───────────────────────────────── */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: background var(--transition), backdrop-filter var(--transition), box-shadow var(--transition);
}
.nav--scrolled {
    background: rgba(13,13,18,.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--border);
}
.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.nav__brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -.02em;
    flex: 1;
}
.nav__logo { width: 32px; height: 32px; object-fit: contain; }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.nav__link { color: var(--muted); font-weight: 500; transition: color var(--transition); padding: 0 4px; }
.nav__link:hover { color: var(--text); }
.nav__burger { display: none; flex-direction: column; gap: 5px; padding: 4px; }
.nav__burger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); }
/* Authenticated user chip */
.nav__user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 999px; border: 1px solid rgba(255,255,255,.12); transition: background var(--transition), border-color var(--transition); text-decoration: none; }
.nav__user-chip:hover { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); }
.nav__user-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.nav__user-name { color: var(--text); font-size: .875rem; font-weight: 500; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Hero ─────────────────────────────────────── */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 0;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,106,247,.08) 0%, transparent 70%);
    pointer-events: none;
}
.hero__content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    width: 100%;
}
.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(124,106,247,.12);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: .85rem;
    font-weight: 600;
    color: #a99ef8;
    margin-bottom: 28px;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.badge__dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .5; transform: scale(1.3); }
}
.hero__headline {
    font-size: clamp(2.8rem, 8vw, 5.5rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.04em;
    margin-bottom: 24px;
}
.hero__highlight {
    background: white;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero__sub {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: var(--muted);
    max-width: 580px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-weight: 400;
}

/* ── Composer ─────────────────────────────────── */
.composer {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: text;
    transition: border-color var(--transition), box-shadow var(--transition);
    margin-bottom: 36px;
}
.composer:hover, .composer:focus {
    border-color: rgba(124,106,247,.4);
    box-shadow: 0 0 0 3px rgba(124,106,247,.1);
    outline: none;
}
.composer__inner {
    display: flex;
    align-items: center;
    gap: 12px;
}
.composer__avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    background: var(--surface2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    border: 1px solid var(--border);
}
.composer__avatar svg { width: 20px; height: 20px; }
.composer__input { flex: 1; text-align: left; }
.composer__placeholder {
    color: var(--muted);
    font-size: 1rem;
}

/* ── Hero stats ───────────────────────────────── */
.hero__stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}
.stat { text-align: center; }
.stat strong { display: block; font-size: 1.4rem; font-weight: 800; }
.stat span { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.stat__divider { width: 1px; height: 36px; background: var(--border); }

/* ── Marquee ──────────────────────────────────── */
.marquee-section {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    overflow: hidden;
}
.marquee__label {
    text-align: center;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--muted);
    margin-bottom: 20px;
}
.marquee__wrapper {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}
.marquee__track {
    display: flex;
    gap: 12px;
    width: max-content;
    animation: marquee 40s linear infinite;
}
.marquee__track:hover { animation-play-state: paused; }
@keyframes marquee {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}
.whinge-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 10px 20px;
    white-space: nowrap;
    font-size: .9rem;
    color: var(--text);
    transition: border-color var(--transition);
    cursor: default;
}
.whinge-chip:hover { border-color: rgba(124,106,247,.4); }

/* ── How it works ─────────────────────────────── */
.how {
    padding: 100px 0;
}
.how__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 60px;
    flex-wrap: wrap;
}
.step {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px 28px;
    text-align: center;
    max-width: 260px;
    flex: 1 1 220px;
    transition: border-color var(--transition), transform var(--transition);
}
.step:hover { border-color: rgba(124,106,247,.35); transform: translateY(-4px); }
.step__icon { font-size: 2.5rem; margin-bottom: 16px; }
.step h3 { font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.step p { color: var(--muted); font-size: .92rem; line-height: 1.6; }
.step__arrow {
    font-size: 1.6rem;
    color: var(--muted);
    flex-shrink: 0;
    align-self: center;
}

/* ── Sample posts ─────────────────────────────── */
.sample-posts {
    padding: 0 0 100px;
}
.sample-posts .section__title,
.sample-posts .section__sub { margin-bottom: 0; }
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 48px;
}
.post-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: border-color var(--transition), transform var(--transition);
}
.post-card:hover { border-color: rgba(124,106,247,.3); transform: translateY(-2px); }
.post-card--featured {
    border-color: rgba(124,106,247,.3);
    background: linear-gradient(135deg, rgba(124,106,247,.06) 0%, var(--surface) 100%);
}
.post-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.post-card__avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}
.post-card__avatar--a { background: rgba(124,106,247,.2); color: #a99ef8; }
.post-card__avatar--b { background: rgba(232,124,90,.2); color: #e87c5a; }
.post-card__avatar--c { background: rgba(34,197,94,.2);  color: #22c55e; }
.post-card__avatar--d { background: rgba(251,191,36,.2); color: #fbbf24; }
.post-card__author { font-weight: 600; font-size: .95rem; }
.post-card__time   { font-size: .8rem; color: var(--muted); }
.post-card__level  {
    margin-left: auto;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 3px 10px;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}
.level--5 { color: #ef4444; border-color: rgba(239,68,68,.3); }
.level--4 { color: #f97316; border-color: rgba(249,115,22,.3); }
.level--3 { color: #fbbf24; border-color: rgba(251,191,36,.3); }
.level--2 { color: #22c55e; border-color: rgba(34,197,94,.3); }
.post-card__body { font-size: .95rem; line-height: 1.65; color: var(--text); flex: 1; }
.post-card__footer { display: flex; gap: 10px; }
.reaction {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 6px 14px;
    font-size: .82rem;
    color: var(--muted);
    transition: all var(--transition);
}
.reaction:hover { border-color: rgba(124,106,247,.4); color: var(--text); transform: scale(1.03); }
.reaction span { font-weight: 600; color: var(--text); }
.see-more { text-align: center; margin-top: 48px; }

/* ── Categories ───────────────────────────────── */
.categories { padding: 0 0 100px; }
.cats-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 40px;
}
.cat-chip {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 10px 22px;
    font-size: .92rem;
    font-weight: 500;
    color: var(--text);
    transition: all var(--transition);
}
.cat-chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); }
.cat-chip--more { border-style: dashed; color: var(--muted); }
.cat-chip--more:hover { color: var(--accent); }

/* ── Bottom CTA ───────────────────────────────── */
.bottom-cta { padding: 0 0 120px; }
.cta-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    text-align: center;
}

.cta-card h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 900;
    letter-spacing: -.03em;
    position: relative;
    z-index: 1;
}
.cta-card p {
    color: var(--muted);
    margin: 12px auto 36px;
    max-width: 400px;
    font-size: 1.05rem;
    position: relative;
    z-index: 1;
}
.cta-card__actions {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* ── Footer ───────────────────────────────────── */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 0;
}
.footer__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.footer__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 1rem;
}
.footer__logo { width: 24px; height: 24px; object-fit: contain; }
.footer__links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    flex: 1;
}
.footer__links a { color: var(--muted); font-size: .88rem; transition: color var(--transition); }
.footer__links a:hover { color: var(--text); }
.footer__copy { color: var(--muted); font-size: .82rem; margin-left: auto; }

/* ── Auth Modal ───────────────────────────────── */
.auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    opacity: 0;
    transition: opacity .25s ease;
}
.auth-overlay--visible { opacity: 1; }
.auth-modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px 32px;
    width: 100%;
    max-width: 420px;
    position: relative;
    transform: translateY(16px);
    transition: transform .25s ease;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.auth-overlay--visible .auth-modal { transform: translateY(0); }
.auth-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--muted);
    font-size: 1.1rem;
    padding: 4px 8px;
    border-radius: 8px;
    transition: color var(--transition), background var(--transition);
}
.auth-modal__close:hover { color: var(--text); background: var(--surface2); }
.auth-modal__logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    margin: 0 auto;
}
.auth-modal__title {
    font-size: 1.5rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -.02em;
}
.auth-modal__sub { text-align: center; color: var(--muted); font-size: .92rem; }
.auth-modal__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: .82rem;
}
.auth-modal__divider::before,
.auth-modal__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-modal__footer {
    text-align: center;
    font-size: .78rem;
    color: var(--muted);
}
.auth-modal__footer a { color: var(--accent); text-decoration: underline; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 768px) {
    .nav__actions .nav__link,
    .nav__actions .btn--ghost,
    .nav__actions .nav__user-chip { display: none; }
    .nav__burger { display: flex; }

    .hero { padding-top: 100px; }
    .hero__headline { font-size: clamp(2.2rem, 10vw, 3.5rem); }

    .composer__inner { flex-wrap: wrap; }
    .composer__input { width: 100%; }
    .btn--whinge { width: 100%; }

    .step__arrow { transform: rotate(90deg); }
    .how__steps { flex-direction: column; align-items: center; }

    .posts-grid { grid-template-columns: 1fr; }

    .cta-card { padding: 48px 24px; }
    .cta-card__actions { flex-direction: column; }
    .cta-card__actions .btn { width: 100%; justify-content: center; }

    .footer__inner { flex-direction: column; text-align: center; }
    .footer__links { justify-content: center; }
    .footer__copy { margin-left: 0; }
}

@media (max-width: 480px) {
    .auth-modal { padding: 28px 20px; }
    .hero__stats { gap: 16px; }
    .stat strong { font-size: 1.1rem; }
}
