/**
 * Web Pages Styling
 * Consistent styling for public-facing web pages
 * Uses the same design system as auth pages
 */

/* ==========================================================================
   Base Layout
   ========================================================================== */

.web-page {
    min-height: 100vh;
    background-color: var(--fp-color-surface-page);
    margin: 0;
    padding: 0;
}

.web-container {
    display: flex;
    min-height: 100vh;
}

/* ==========================================================================
   Branding Panel (Left/Top)
   ========================================================================== */

.web-branding {
    /* Signal mode ground — deep-teal gradient with a corner glow, never a flat fill */
    background: var(--fp-color-gradient-signal-glow);
    color: var(--fp-color-text-on-primary);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    padding: var(--fp-size-space-12) var(--fp-size-space-10);
    flex: 0 0 40%;
    max-width: 500px;
    position: relative;
}

.web-branding-content {
    text-align: left;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: var(--fp-size-space-5);
}

/* Mono kicker — uppercase, letter-spaced, Electric Sky. Signature brand device. */
.web-kicker {
    font-family: var(--fp-typography-font-family-mono);
    font-size: var(--fp-size-font-xs);
    font-weight: var(--fp-typography-font-weight-medium);
    letter-spacing: var(--fp-typography-letter-spacing-kicker);
    text-transform: uppercase;
    color: var(--fp-color-brand-electric-sky);
    margin: 0;
}

/* The positioning line carries the panel. */
.web-statement {
    font-size: var(--fp-size-font-5xl);
    font-weight: var(--fp-typography-font-weight-semibold);
    letter-spacing: var(--fp-typography-letter-spacing-tight);
    line-height: var(--fp-typography-line-height-tight);
    color: var(--fp-color-text-on-primary);
    margin: 0;
    text-wrap: pretty;
}

/* Back-compat: the old centred service title now renders as the kicker. */
.web-service-title,
.web-service-name {
    font-family: var(--fp-typography-font-family-mono);
    font-size: var(--fp-size-font-xs);
    font-weight: var(--fp-typography-font-weight-medium);
    letter-spacing: var(--fp-typography-letter-spacing-kicker);
    text-transform: uppercase;
    color: var(--fp-color-brand-electric-sky);
    margin: 0;
}

.web-branding-footer {
    text-align: left;
}

/* Dark panel — use the NEGATIVE lockup (FP_Logo_Horiz_NEG.svg), sat top-left.
   Never re-colour the mark with a filter.

   If you cannot swap the asset yet, uncomment the rule below: it inverts a dark
   lockup to white as a TEMPORARY bridge. The 2023 PNG is dark teal, so with no
   filter at all it disappears into this ground.
   .web-logo { filter: brightness(0) invert(1); }
*/
.web-logo {
    max-width: 168px;
    height: auto;
    margin: 0;
}

.web-tagline {
    font-size: var(--fp-size-font-base);
    color: #9cc2d0; /* muted text on Signal surfaces */
    line-height: var(--fp-typography-line-height-relaxed);
    margin: 0;
}

/* ==========================================================================
   Content Panel (Right/Bottom)
   ========================================================================== */

.web-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--fp-size-space-8);
    background-color: var(--fp-color-surface-body);
    position: relative;
}

.web-content-inner {
    width: 100%;
    max-width: 600px;
}

.web-content-wide {
    max-width: 800px;
}

/* Footer */
.web-footer {
    position: absolute;
    bottom: var(--fp-size-space-6);
    left: 0;
    right: 0;
    text-align: center;
    font-size: var(--fp-size-font-sm);
    color: var(--fp-color-text-muted);
}

.web-footer a {
    color: var(--fp-color-text-muted);
    text-decoration: none;
}

.web-footer a:hover {
    color: var(--fp-color-semantic-primary);
    text-decoration: underline;
}

/* ==========================================================================
   Card Styling
   ========================================================================== */

.web-card {
    background: var(--fp-color-surface-card);
    border-radius: var(--fp-border-radius-xl);
    box-shadow: var(--fp-shadow-card);
    padding: var(--fp-spacing-component-card-padding-y) var(--fp-spacing-component-card-padding-x);
}

.web-card-title {
    font-size: var(--fp-size-font-2xl);
    font-weight: var(--fp-typography-font-weight-semibold);
    color: var(--fp-color-text-primary);
    margin-bottom: var(--fp-size-space-4);
}

.web-card-subtitle {
    color: var(--fp-color-text-muted);
    margin-bottom: var(--fp-size-space-4);
    line-height: var(--fp-typography-line-height-relaxed);
}

/* ==========================================================================
   Status Icons
   ========================================================================== */

/* No tinted tile behind the glyph — the card is already the container, and a
   second filled shape inside it reads as a stray box. The status colour lives
   on the glyph itself, so success/error/warning/info stay distinguishable.
   (The tile also rendered square: border-radius-full is not a token in
   tokens.css, so the radius resolved to nothing.) */
.web-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    margin-bottom: var(--fp-size-space-5);
}

.web-status-icon.success {
    color: var(--fp-color-semantic-success);
}

.web-status-icon.error {
    color: var(--fp-color-semantic-danger);
}

.web-status-icon.warning {
    color: var(--fp-color-semantic-warning);
}

.web-status-icon.info {
    color: var(--fp-color-semantic-primary);
}

/* ==========================================================================
   Action Buttons
   ========================================================================== */

.web-actions {
    display: flex;
    flex-direction: column;
    gap: var(--fp-size-space-3);
    margin-top: var(--fp-size-space-6);
}

.web-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--fp-size-space-2);
    padding: var(--fp-size-space-3) var(--fp-size-space-6);
    font-weight: var(--fp-typography-font-weight-medium);
    border-radius: var(--fp-border-radius-md);
}

/* The primary web action is the CTA: Signal Red, fully round — same treatment
   as .auth-card .btn-primary. Bootstrap's gradient sky-blue is off-system. */
.web-actions .btn-primary {
    font-weight: var(--fp-typography-font-weight-semibold);
    border-radius: var(--fp-border-radius-pill);
    color: var(--fp-color-text-on-primary) !important;
    border: 0 !important;
    background-color: var(--fp-color-semantic-cta) !important;
    background-image: none !important;
    box-shadow: none !important;
    outline: 0 !important;
    text-shadow: none !important;
    cursor: pointer;
    transition: var(--fp-transition-presets-button);
}

.web-actions .btn-primary:hover,
.web-actions .btn-primary:focus {
    background-color: var(--fp-color-semantic-cta-hover) !important;
}

.web-actions .btn-primary:active {
    background-color: var(--fp-color-semantic-cta-press) !important;
}

/* Gap handles icon spacing in either position — a margin would double up. */
.web-actions .btn svg {
    flex: 0 0 auto;
}

/* ==========================================================================
   Integration Guide Styling
   ========================================================================== */

.web-guide-header {
    margin-bottom: var(--fp-size-space-6);
    padding-bottom: var(--fp-size-space-4);
    border-bottom: 1px solid var(--fp-color-border-muted);
}

.web-guide-title {
    font-size: var(--fp-size-font-3xl);
    font-weight: var(--fp-typography-font-weight-bold);
    color: var(--fp-color-text-primary);
    margin-bottom: var(--fp-size-space-3);
}

.web-guide-intro {
    color: var(--fp-color-text-muted);
    font-size: var(--fp-size-font-lg);
    line-height: var(--fp-typography-line-height-relaxed);
}

.web-step-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.web-step-item {
    position: relative;
    padding-left: var(--fp-size-space-14);
    padding-bottom: var(--fp-size-space-8);
    border-left: 2px solid var(--fp-color-border-muted);
    margin-left: var(--fp-size-space-4);
}

.web-step-item::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: calc(var(--fp-size-space-4) * -1 - 1px);
    top: 0;
    width: 32px;
    height: 32px;
    background: var(--fp-color-semantic-primary);
    color: white;
    border-radius: var(--fp-border-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--fp-typography-font-weight-semibold);
    font-size: var(--fp-size-font-sm);
}

.web-step-item:last-child {
    border-left: 2px solid transparent;
    padding-bottom: 0;
}

.web-step-title {
    font-weight: var(--fp-typography-font-weight-semibold);
    color: var(--fp-color-text-primary);
    margin-bottom: var(--fp-size-space-3);
    font-size: var(--fp-size-font-lg);
}

.web-step-content {
    color: var(--fp-color-text-secondary);
    line-height: var(--fp-typography-line-height-relaxed);
}

.web-step-image {
    margin-top: var(--fp-size-space-4);
    border-radius: var(--fp-border-radius-lg);
    overflow: hidden;
    box-shadow: var(--fp-shadow-card);
    border: 1px solid var(--fp-color-border-muted);
}

.web-step-image img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   Troubleshooting List
   ========================================================================== */

.web-troubleshoot-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.web-troubleshoot-item {
    display: flex;
    gap: var(--fp-size-space-3);
    padding: var(--fp-size-space-4);
    background: var(--fp-color-surface-secondary);
    border-radius: var(--fp-border-radius-lg);
    margin-bottom: var(--fp-size-space-3);
}

.web-troubleshoot-item:last-child {
    margin-bottom: 0;
}

.web-troubleshoot-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    color: var(--fp-color-semantic-primary);
    margin-top: 2px;
}

.web-troubleshoot-content {
    flex: 1;
}

.web-troubleshoot-title {
    font-weight: var(--fp-typography-font-weight-semibold);
    color: var(--fp-color-text-primary);
    margin-bottom: var(--fp-size-space-2);
}

.web-troubleshoot-text {
    color: var(--fp-color-text-muted);
    font-size: var(--fp-size-font-sm);
    line-height: var(--fp-typography-line-height-relaxed);
    margin: 0;
}

/* ==========================================================================
   Responsive: Narrow Screens (< 768px)
   ========================================================================== */

@media (max-width: 767.98px) {
    .web-container {
        flex-direction: column;
    }

    .web-branding {
        flex: 0 0 auto;
        max-width: none;
        gap: var(--fp-size-space-6);
        padding: var(--fp-size-space-8) var(--fp-size-space-6);
    }

    .web-statement {
        font-size: var(--fp-size-font-4xl);
    }

    .web-branding-content {
        max-width: none;
    }

    .web-branding-footer {
        position: static;
        margin-top: var(--fp-size-space-4);
    }

    .web-service-title {
        font-size: var(--fp-size-font-xl);
    }

    .web-logo {
        max-width: 132px;
    }

    .web-tagline {
        font-size: var(--fp-size-font-base);
    }

    .web-content {
        padding: var(--fp-size-space-6);
    }

    .web-content-inner {
        max-width: none;
    }

    .web-card {
        padding: var(--fp-size-space-6);
    }

    .web-step-item {
        padding-left: var(--fp-size-space-10);
    }

    .web-step-item::before {
        width: 28px;
        height: 28px;
        font-size: var(--fp-size-font-xs);
    }

    .web-guide-title {
        font-size: var(--fp-size-font-2xl);
    }
}

