/* ==========================================================================
   SocialHub — Public surface (landing, auth, static pages)
   Phone: single column, hero above the fold, form card below.
   Desktop: two-up hero with the form card sitting on the right.
   ========================================================================== */

.sh-public {
    background: var(--sh-surface);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   Public header
   ========================================================================== */

.sh-pub-header {
    position: sticky;
    top: 0;
    z-index: var(--sh-z-header);
    background: var(--sh-surface-veil);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--sh-border);
}

.sh-pub-header-inner {
    display: flex;
    align-items: center;
    gap: var(--sh-sp-3);
    height: 62px;
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--sh-gutter);
}

.sh-pub-nav {
    display: none;
}

.sh-pub-header-actions {
    display: flex;
    align-items: center;
    gap: var(--sh-sp-2);
    margin-inline-start: auto;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.sh-hero {
    position: relative;
    background: var(--sh-brand-gradient-soft);
    overflow: hidden;
}

.sh-hero-inner {
    max-width: 1280px;
    margin-inline: auto;
    padding: var(--sh-sp-8) var(--sh-gutter) var(--sh-sp-10);
    display: grid;
    gap: var(--sh-sp-6);
    align-items: center;
}

.sh-hero-kicker {
    font-size: var(--sh-fs-xs);
    font-weight: var(--sh-fw-bold);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sh-text-muted);
    margin-bottom: var(--sh-sp-3);
}

.sh-hero-title {
    font-size: var(--sh-fs-4xl);
    font-weight: var(--sh-fw-extrabold);
    line-height: 1.08;
    letter-spacing: -0.035em;
    color: var(--sh-text-strong);
}

.sh-hero-title em {
    font-style: normal;
    color: var(--sh-brand-purple);
}

.sh-hero-text {
    margin-top: var(--sh-sp-4);
    font-size: var(--sh-fs-lg);
    line-height: var(--sh-lh-relaxed);
    color: var(--sh-text-muted);
    max-width: 52ch;
}

.sh-hero-cta {
    display: flex;
    gap: var(--sh-sp-3);
    flex-wrap: wrap;
    margin-top: var(--sh-sp-6);
}

.sh-hero-proof {
    display: flex;
    align-items: center;
    gap: var(--sh-sp-3);
    margin-top: var(--sh-sp-6);
}

.sh-hero-proof-value {
    font-size: var(--sh-fs-xl);
    font-weight: var(--sh-fw-extrabold);
    color: var(--sh-text-strong);
    line-height: 1.1;
}

.sh-hero-proof-label {
    font-size: var(--sh-fs-xs);
    color: var(--sh-text-muted);
}

.sh-hero-art {
    border-radius: var(--sh-radius-2xl);
    overflow: hidden;
}

/* -- Benefit list inside the hero (Connect / Share / Explore / Grow) ----- */

.sh-benefits {
    display: flex;
    flex-direction: column;
    gap: var(--sh-sp-3);
    margin-top: var(--sh-sp-6);
}

.sh-benefit {
    display: flex;
    align-items: center;
    gap: var(--sh-sp-3);
}

.sh-benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: var(--sh-radius);
    flex-shrink: 0;
}

.sh-benefit-icon svg { width: 20px; height: 20px; }

.sh-benefit-title {
    font-size: var(--sh-fs-md);
    font-weight: var(--sh-fw-bold);
    color: var(--sh-text-strong);
    line-height: 1.3;
}

.sh-benefit-text {
    font-size: var(--sh-fs-sm);
    color: var(--sh-text-muted);
    line-height: 1.35;
}

/* ==========================================================================
   Auth card
   ========================================================================== */

.sh-auth-card {
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    border-radius: var(--sh-radius-xl);
    box-shadow: var(--sh-shadow-lg);
    padding: var(--sh-sp-6) var(--sh-sp-5);
    width: 100%;
}

.sh-auth-title {
    font-size: var(--sh-fs-2xl);
    font-weight: var(--sh-fw-extrabold);
    letter-spacing: -0.025em;
    color: var(--sh-text-strong);
}

.sh-auth-sub {
    margin-top: 6px;
    margin-bottom: var(--sh-sp-5);
    font-size: var(--sh-fs-base);
    color: var(--sh-text-muted);
}

/* Social sign-in buttons stack on phones, sit side by side on register. */
.sh-auth-social {
    display: grid;
    gap: var(--sh-sp-2);
    margin-bottom: var(--sh-sp-4);
}

.sh-auth-social-2 {
    grid-template-columns: 1fr;
}

.sh-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--sh-sp-2);
    height: 46px;
    border-radius: var(--sh-radius-sm);
    border: 1px solid var(--sh-border-strong);
    background: var(--sh-surface);
    font-size: var(--sh-fs-base);
    font-weight: var(--sh-fw-semibold);
    color: var(--sh-text);
    transition: background var(--sh-dur-fast) var(--sh-ease),
        border-color var(--sh-dur-fast) var(--sh-ease);
}

.sh-social-btn:hover {
    background: var(--sh-surface-alt);
    border-color: var(--sh-gray-400);
    color: var(--sh-text);
}

.sh-social-btn svg,
.sh-social-btn img {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* "OR" rule */
.sh-auth-divider {
    display: flex;
    align-items: center;
    gap: var(--sh-sp-3);
    margin: var(--sh-sp-4) 0;
    font-size: var(--sh-fs-xs);
    font-weight: var(--sh-fw-semibold);
    color: var(--sh-text-subtle);
}

.sh-auth-divider::before,
.sh-auth-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: var(--sh-border);
}

.sh-auth-foot {
    margin-top: var(--sh-sp-5);
    text-align: center;
    font-size: var(--sh-fs-base);
    color: var(--sh-text-muted);
}

.sh-auth-foot a {
    font-weight: var(--sh-fw-bold);
    color: var(--sh-brand-purple);
}

.sh-auth-legal {
    margin-top: var(--sh-sp-4);
    text-align: center;
    font-size: var(--sh-fs-xs);
    color: var(--sh-text-subtle);
    line-height: var(--sh-lh-snug);
}

/* Password strength meter */
.sh-strength {
    display: flex;
    gap: 5px;
    margin-top: var(--sh-sp-2);
}

.sh-strength-seg {
    flex: 1 1 0;
    height: 4px;
    border-radius: var(--sh-radius-pill);
    background: var(--sh-gray-200);
    transition: background var(--sh-dur) var(--sh-ease);
}

.sh-strength-seg.is-weak { background: var(--sh-danger-500); }
.sh-strength-seg.is-medium { background: var(--sh-warning-500); }
.sh-strength-seg.is-strong { background: var(--sh-success-500); }

.sh-strength-label {
    margin-top: 6px;
    font-size: var(--sh-fs-xs);
    color: var(--sh-text-muted);
}

.sh-strength-label strong {
    font-weight: var(--sh-fw-bold);
}

/* ==========================================================================
   Marketing sections
   ========================================================================== */

.sh-section {
    padding: var(--sh-sp-10) 0;
}

.sh-section-alt {
    background: var(--sh-surface-alt);
}

.sh-section-inner {
    max-width: 1280px;
    margin-inline: auto;
    padding-inline: var(--sh-gutter);
}

.sh-section-lead {
    max-width: 62ch;
    margin-bottom: var(--sh-sp-6);
}

.sh-section-lead p {
    font-size: var(--sh-fs-md);
    color: var(--sh-text-muted);
    margin-top: 6px;
}

/* Feature strip below the hero */
.sh-feature-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--sh-sp-4);
    padding: var(--sh-sp-6) 0;
    border-bottom: 1px solid var(--sh-border);
}

.sh-feature-strip > * {
    min-width: 0;
}

/* Trending post tile with stats overlaid on the image */
.sh-tile {
    position: relative;
    border-radius: var(--sh-radius);
    overflow: hidden;
    background: var(--sh-surface-sunken);
}

.sh-tile-stats {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    gap: var(--sh-sp-3);
    padding: var(--sh-sp-4) var(--sh-sp-3) var(--sh-sp-2);
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85), transparent);
    color: var(--sh-white);
    font-size: var(--sh-fs-xs);
    font-weight: var(--sh-fw-semibold);
}

.sh-tile-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.sh-tile-stat svg { width: 14px; height: 14px; }

/* ==========================================================================
   Tablet
   ========================================================================== */


/* A single-purpose auth card — the two-factor challenge and the verify-email
   notice have no marketing column beside them. */
.sh-hero-auth-narrow {
    justify-content: center;
}

.sh-auth-card-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--sh-sp-4);
    border-radius: var(--sh-radius);
}

.sh-auth-card-icon svg {
    width: 24px;
    height: 24px;
}

/* A one-time code is read back digit by digit, so it is spaced and large. */
.sh-input-code {
    font-size: var(--sh-fs-xl);
    font-family: var(--sh-font-mono);
    letter-spacing: 0.35em;
    text-align: center;
}

@media (min-width: 768px) {
    .sh-auth-card {
        padding: var(--sh-sp-8);
    }

    .sh-auth-social-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .sh-hero-title {
        font-size: var(--sh-fs-5xl);
    }
}

/* ==========================================================================
   Desktop
   ========================================================================== */

@media (min-width: 1024px) {
    .sh-pub-nav {
        display: flex;
        align-items: center;
        gap: var(--sh-sp-1);
        margin-inline-start: var(--sh-sp-6);
    }

    .sh-pub-nav-item {
        padding: var(--sh-sp-2) var(--sh-sp-3);
        border-radius: var(--sh-radius-sm);
        font-size: var(--sh-fs-md);
        font-weight: var(--sh-fw-semibold);
        color: var(--sh-text-muted);
    }

    .sh-pub-nav-item:hover {
        color: var(--sh-text);
        background: var(--sh-surface-alt);
    }

    .sh-pub-nav-item.is-active {
        color: var(--sh-brand-purple);
    }

    .sh-hero-inner {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--sh-sp-10);
        padding-block: var(--sh-sp-12) var(--sh-sp-16);
    }

    /* Auth pages put the form card in the right column at a fixed width. */
    .sh-hero-auth {
        grid-template-columns: minmax(0, 1fr) 430px;
        align-items: center;
    }

    .sh-feature-strip {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .sh-section {
        padding: var(--sh-sp-12) 0;
    }
}

/* ==========================================================================
   Demo credentials panel
   Only rendered when the demo.enabled setting is on, so it never ships to a
   production install that skipped the demo seeder.
   ========================================================================== */

.sh-demo {
    padding: var(--sh-sp-3);
    margin-bottom: var(--sh-sp-4);
    border: 1px dashed var(--sh-border-strong);
    border-radius: var(--sh-radius);
    background: var(--sh-surface-alt);
}

.sh-demo-head {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 var(--sh-sp-2);
    font-size: var(--sh-fs-sm);
    font-weight: var(--sh-fw-bold);
    color: var(--sh-text-strong);
}

.sh-demo-head svg {
    width: 15px;
    height: 15px;
    color: var(--sh-warning-600);
}

.sh-demo-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Phones stack the columns; from tablet each row reads as a table line. */
.sh-demo-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px var(--sh-sp-2);
    width: 100%;
    padding: var(--sh-sp-2);
    border-radius: var(--sh-radius-xs);
    background: var(--sh-surface);
    border: 1px solid var(--sh-border);
    text-align: start;
    cursor: pointer;
    transition: border-color var(--sh-dur-fast) var(--sh-ease),
        background var(--sh-dur-fast) var(--sh-ease);
}

.sh-demo-row:hover {
    border-color: var(--sh-primary-400);
    background: var(--sh-primary-50);
}

.sh-demo-role {
    grid-column: 1;
    font-size: var(--sh-fs-sm);
    font-weight: var(--sh-fw-bold);
    color: var(--sh-text-strong);
}

.sh-demo-login,
.sh-demo-pass {
    grid-column: 1;
    font-size: var(--sh-fs-xs);
    color: var(--sh-text-muted);
    overflow-wrap: anywhere;
}

.sh-demo-use {
    grid-column: 2;
    grid-row: 1 / -1;
    align-self: center;
    padding: 4px 10px;
    border-radius: var(--sh-radius-pill);
    background: var(--sh-primary-50);
    color: var(--sh-primary-700);
    font-size: var(--sh-fs-xs);
    font-weight: var(--sh-fw-bold);
    white-space: nowrap;
}

.sh-demo-note {
    margin: var(--sh-sp-2) 0 0;
    font-size: var(--sh-fs-xs);
    color: var(--sh-text-subtle);
}

@media (min-width: 768px) {
    /* Role over email on the left, password and the Use pill on the right.
       The card is only ~430px wide, so a four-across row wraps the address
       mid-word. */
    .sh-demo-row {
        grid-template-columns: minmax(0, 1fr) auto auto;
        align-items: center;
    }

    .sh-demo-role { grid-column: 1; grid-row: 1; }
    .sh-demo-login { grid-column: 1; grid-row: 2; }

    .sh-demo-pass {
        grid-column: 2;
        grid-row: 1 / -1;
        align-self: center;
        margin-inline-end: var(--sh-sp-2);
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    }

    .sh-demo-use {
        grid-column: 3;
        grid-row: 1 / -1;
    }
}

/* ==========================================================================
   Maintenance screen
   ========================================================================== */

.sh-maint {
    max-width: 46ch;
    margin-inline: auto;
    text-align: center;
}

.sh-maint-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: var(--sh-sp-4);
    border-radius: 50%;
    background: var(--sh-surface);
    color: var(--sh-primary-600);
    box-shadow: var(--sh-shadow-md);
}

.sh-maint-icon svg { width: 28px; height: 28px; }

.sh-maint .sh-hero-cta {
    justify-content: center;
}
