/* Public marketing & auth pages — aligned with app-shell tokens */
:root {
    --pub-font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --pub-navy: #0f2744;
    --pub-navy-deep: #0c1929;
    --pub-accent: #2563eb;
    --pub-accent-hover: #1d4ed8;
    --pub-page-bg: #f4f6f9;
    --pub-surface: #ffffff;
    --pub-border: #e2e8f0;
    --pub-text: #0f172a;
    --pub-muted: #64748b;
    --pub-radius: 14px;
    --pub-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.08);
    --pub-headline-weight: 800;
    --pub-headline-tracking: -0.03em;
}

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

.pub-body {
    margin: 0;
    font-family: var(--pub-font);
    background: var(--pub-page-bg);
    color: var(--pub-text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* —— Header —— */
.pub-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--pub-navy);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.12);
}

.pub-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.75rem 1.25rem;
}

.pub-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: #fff;
}

.pub-brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--pub-accent) 0%, #3b82f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.04em;
}

.pub-brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.pub-brand__name {
    font-weight: 700;
    font-size: 1.05rem;
}

.pub-brand__tagline {
    font-size: 0.7rem;
    opacity: 0.75;
    font-weight: 500;
}

.pub-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pub-nav a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
}

.pub-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.pub-btn--primary {
    background: var(--pub-accent);
    color: #fff;
}

.pub-btn--primary:hover {
    background: var(--pub-accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.pub-btn--ghost {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.pub-btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.pub-btn--lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* —— Footer —— */
.pub-footer {
    margin-top: auto;
    background: var(--pub-navy-deep);
    color: rgba(255, 255, 255, 0.75);
    padding: 2rem 1.25rem;
    text-align: center;
    font-size: 0.875rem;
}

.pub-footer p {
    margin: 0;
}

.pub-footer a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

/* —— Home hero —— */
.pub-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--pub-navy) 0%, #1e3a5f 45%, #1e40af 100%);
    color: #fff;
    padding: 4.5rem 1.25rem 5rem;
}

.pub-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 90% 20%, rgba(37, 99, 235, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 50% 40% at 10% 80%, rgba(59, 130, 246, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.pub-hero__grid {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 900px) {
    .pub-hero__grid {
        grid-template-columns: 1.1fr 0.9fr;
    }
}

.pub-hero__eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.12);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.pub-hero h1 {
    margin: 0 0 1rem;
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: var(--pub-headline-weight);
    letter-spacing: var(--pub-headline-tracking);
    line-height: 1.1;
}

.pub-hero__lead {
    margin: 0 0 1.75rem;
    font-size: 1.1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.88);
    max-width: 32rem;
}

.pub-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.pub-hero__visual {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
}

.pub-hero__tile {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--pub-radius);
    padding: 1.25rem;
    text-align: center;
}

.pub-hero__tile i {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    display: block;
    opacity: 0.95;
}

.pub-hero__tile span {
    font-size: 0.85rem;
    font-weight: 600;
}

.pub-hero__tile--wide {
    grid-column: 1 / -1;
}

/* —— Sections —— */
.pub-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3.5rem 1.25rem;
}

.pub-section__head {
    text-align: center;
    margin-bottom: 2.5rem;
}

.pub-section__head h2 {
    margin: 0 0 0.5rem;
    font-size: clamp(1.5rem, 3vw, 1.85rem);
    font-weight: var(--pub-headline-weight);
    letter-spacing: var(--pub-headline-tracking);
}

.pub-section__head p {
    margin: 0;
    color: var(--pub-muted);
    font-size: 1rem;
}

.pub-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
}

.pub-cards::-webkit-scrollbar {
    height: 6px;
}

.pub-cards::-webkit-scrollbar-thumb {
    background: var(--pub-border);
    border-radius: 999px;
}

.pub-card {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    overflow: hidden;
    box-shadow: var(--pub-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    scroll-snap-align: start;
}

.pub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.pub-card__icon {
    flex: 0 0 88px;
    width: 88px;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--pub-accent-soft, rgba(37, 99, 235, 0.12)) 0%, var(--pub-page-bg) 100%);
    color: var(--pub-accent);
}

.pub-card__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 1rem 1.15rem;
}

@media (max-width: 720px) {
    .pub-cards {
        flex-wrap: nowrap;
    }

    .pub-card {
        flex: 0 0 min(280px, 82vw);
    }
}

@media (min-width: 900px) {
    .pub-cards {
        overflow-x: visible;
    }

    .pub-card {
        flex: 1 1 0;
    }

    .pub-card__icon {
        flex-basis: 100px;
        width: 100px;
        font-size: 2.25rem;
    }
}

.pub-card__body h3 {
    margin: 0 0 0.4rem;
    font-size: 1.1rem;
    font-weight: 700;
}

.pub-card__body p {
    margin: 0;
    color: var(--pub-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* —— Features strip —— */
.pub-features {
    background: var(--pub-surface);
    border-top: 1px solid var(--pub-border);
    border-bottom: 1px solid var(--pub-border);
}

.pub-features__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
}

.pub-feature {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.pub-feature__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--pub-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.pub-feature h3 {
    margin: 0 0 0.25rem;
    font-size: 0.95rem;
    font-weight: 700;
}

.pub-feature p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--pub-muted);
    line-height: 1.45;
}

/* —— Testimonials —— */
.pub-testimonials {
    background: var(--pub-navy-deep);
    color: #fff;
    padding: 3.5rem 1.25rem;
}

.pub-testimonials__inner {
    max-width: 1200px;
    margin: 0 auto;
}

.pub-testimonials h2 {
    text-align: center;
    margin: 0 0 2rem;
    font-weight: var(--pub-headline-weight);
    letter-spacing: var(--pub-headline-tracking);
}

.pub-quote-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.pub-quote {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--pub-radius);
    padding: 1.5rem;
}

.pub-quote p {
    margin: 0 0 1rem;
    font-style: italic;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.pub-quote cite {
    font-style: normal;
    font-weight: 600;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* —— Contact —— */
.pub-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .pub-contact-grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.pub-contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pub-contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
}

.pub-contact-item i {
    font-size: 1.25rem;
    color: var(--pub-accent);
    margin-top: 0.15rem;
}

.pub-contact-item strong {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--pub-muted);
    margin-bottom: 0.2rem;
}

.pub-form-card {
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 1.5rem;
    box-shadow: var(--pub-shadow);
}

.pub-field {
    margin-bottom: 1rem;
}

.pub-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--pub-text);
}

.pub-field input,
.pub-field textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    font-size: 0.95rem;
    font-family: inherit;
    border: 1px solid var(--pub-border);
    border-radius: 10px;
    background: var(--pub-page-bg);
    color: var(--pub-text);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.pub-field input:focus,
.pub-field textarea:focus {
    outline: none;
    border-color: var(--pub-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    background: #fff;
}

.pub-field textarea {
    resize: vertical;
    min-height: 110px;
}

/* —— Auth (login) —— */
.pub-auth {
    flex: 1;
    display: flex;
    align-items: stretch;
    min-height: calc(100vh - 120px);
}

.pub-auth__brand {
    display: none;
    flex: 1;
    background: linear-gradient(160deg, var(--pub-navy) 0%, #1e3a5f 50%, #1e40af 100%);
    color: #fff;
    padding: 3rem;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@media (min-width: 900px) {
    .pub-auth__brand {
        display: flex;
    }
}

.pub-auth__brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 30%, rgba(37, 99, 235, 0.4) 0%, transparent 50%);
    pointer-events: none;
}

.pub-auth__brand-inner {
    position: relative;
    max-width: 400px;
}

.pub-auth__brand h1 {
    margin: 0 0 1rem;
    font-size: 2rem;
    font-weight: var(--pub-headline-weight);
    letter-spacing: var(--pub-headline-tracking);
    line-height: 1.15;
}

.pub-auth__brand p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
}

.pub-auth__brand-list {
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
}

.pub-auth__brand-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.pub-auth__brand-list i {
    color: #93c5fd;
}

.pub-auth__panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    background: var(--pub-page-bg);
}

.pub-auth__card {
    width: 100%;
    max-width: 420px;
    background: var(--pub-surface);
    border: 1px solid var(--pub-border);
    border-radius: var(--pub-radius);
    padding: 2rem;
    box-shadow: var(--pub-shadow);
}

.pub-auth__card h2 {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: var(--pub-headline-weight);
    letter-spacing: var(--pub-headline-tracking);
}

.pub-auth__card .pub-auth__subtitle {
    margin: 0 0 1.5rem;
    color: var(--pub-muted);
    font-size: 0.9rem;
}

.pub-alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.pub-alert--success {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
}

.pub-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.pub-field-error {
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 0.35rem;
}

.pub-auth__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.pub-auth__footer a {
    font-size: 0.875rem;
    color: var(--pub-accent);
    text-decoration: none;
    font-weight: 500;
}

.pub-auth__footer a:hover {
    text-decoration: underline;
}

.pub-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--pub-muted);
    margin-bottom: 1rem;
}

.pub-checkbox input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--pub-accent);
}

@media (max-width: 576px) {
    .pub-nav .pub-nav__link--muted {
        display: none;
    }

    .pub-auth__card {
        padding: 1.5rem;
    }
}
