/* ==========================================================================
   Branduals Marketing Site - Design System
   Ultra-professional, ultra-sleek aesthetic matching BrandServer.Auth
   ========================================================================== */

/* CSS Variables - Design Tokens */
:root {
    /* Colors */
    --branduals-orange: #FF6100;
    --branduals-orange-light: #ff7a2f;
    --branduals-orange-dark: #e65800;

    /* Backgrounds - Matching Auth Server */
    --bg-primary: #1A1D23;
    --bg-card: #16191F;
    --bg-card-alt: #0F1116;

    /* Borders */
    --border-primary: #2E323A;
    --border-secondary: #1E2229;

    /* Text */
    --text-primary: #FFFFFF;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --text-muted: #475569;

    /* Typography */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --font-family-brand: 'Ladislav', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;

    /* Spacing */
    --container-max-width: 1280px;

    /* Animation */
    --transition-speed: 200ms;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scrollbar-gutter: stable;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: var(--font-family-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    outline: none !important;
}

h1 {
    font-size: 80px;
    letter-spacing: normal;
}

h2 {
    font-size: 56px;
    letter-spacing: normal;
}

h3 {
    font-size: 32px;
}

p {
    margin: 0;
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
}

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--text-primary);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 80px;
    width: 100%;
}

/* ==========================================================================
   Header
   ========================================================================== */

.header {
    position: relative;
    z-index: 100;
    padding: 24px 0;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 32px;
}

.brand-logo {
    font-family: var(--font-family-brand);
    font-size: 28px;
    font-weight: 700;
    color: var(--branduals-orange);
    text-decoration: none;
}

.brand-logo:hover {
    color: var(--branduals-orange-light);
}

/* Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color var(--transition-speed);
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item.active {
    color: var(--text-primary);
    font-weight: 600;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--branduals-orange);
}

.nav-signin {
    margin-left: 24px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero {
    position: relative;
    padding: 60px 0 0;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2.5px;
    color: var(--branduals-orange);
    text-transform: uppercase;
    margin-bottom: 32px;
}

.hero-title {
    max-width: 1100px;
    margin: 0 auto 32px;
    font-size: 80px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: normal;
    color: var(--text-primary);
}

.hero-subtitle {
    max-width: 800px;
    margin: 0 auto 48px;
    font-size: 20px;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* ==========================================================================
   Email Signup Form
   ========================================================================== */

.email-signup {
    max-width: 480px;
    margin: 0 auto;
}

.email-form {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 6px;
    height: 60px;
}

.email-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 0 18px;
    font-size: 16px;
    color: var(--text-primary);
    font-family: var(--font-family-base);
}

.email-input::placeholder {
    color: var(--text-tertiary);
}

/* Autofill styling - prevent ugly white background */
.email-input:-webkit-autofill,
.email-input:-webkit-autofill:hover,
.email-input:-webkit-autofill:focus,
.email-input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-card) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    caret-color: var(--text-primary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--branduals-orange);
    color: var(--text-primary);
    border: none;
    border-radius: 8px;
    padding: 0 32px;
    height: 48px;
    font-size: 16px;
    font-weight: 700;
    font-family: var(--font-family-base);
    cursor: pointer;
    transition: background var(--transition-speed);
    white-space: nowrap;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--branduals-orange-light);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.email-note {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
}

.success-message {
    text-align: center;
    padding: 32px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
}

.success-message h3 {
    font-size: 24px;
    color: var(--branduals-orange);
    margin-bottom: 12px;
}

.success-message p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.success-message p strong {
    color: var(--text-primary);
}

.success-message .note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 16px;
}

.error-message {
    margin-top: 12px;
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: #FCA5A5;
    font-size: 14px;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    margin-top: auto;
    padding: 20px 0;
    border-top: 1px solid var(--border-primary);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-tertiary);
}

.footer a {
    color: var(--text-tertiary);
}

.footer a:hover {
    color: var(--text-secondary);
}

/* ==========================================================================
   Philosophy Page - Flow Diagram
   ========================================================================== */

.flow-diagram {
    max-width: 800px;
    margin: 0 auto 80px;
    padding: 0;
}

.flow-stage {
    background: var(--bg-card);
    border: 1px solid var(--border-primary);
    border-radius: 12px;
    padding: 28px 40px;
    text-align: center;
    margin-bottom: 0;
}

.flow-stage-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--text-tertiary);
    text-transform: uppercase;
    margin-bottom: 10px;
}

.flow-stage-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.flow-connector {
    width: 2px;
    height: 40px;
    background: var(--text-muted);
    margin: 0 auto;
}

.flow-stage-main {
    background: var(--bg-primary);
    border: 3px solid var(--branduals-orange);
    border-radius: 16px;
    padding: 44px 40px;
    margin: 0;
}

.flow-stage-main .brand-name {
    font-family: var(--font-family-brand);
    font-size: 52px;
    font-weight: 700;
    color: var(--branduals-orange);
    margin-bottom: 12px;
}

.flow-stage-main .flow-stage-title {
    font-size: 18px;
    margin-bottom: 6px;
}

.flow-stage-main .flow-stage-subtitle {
    font-size: 13px;
    color: #CBD5E1;
}

/* ==========================================================================
   Product Page - Browser Windows
   ========================================================================== */

.product-showcase {
    position: relative;
    max-width: 1200px;
    margin: 0 auto 80px;
    height: 500px;
}

.browser-window {
    position: absolute;
    background: var(--bg-card-alt);
    border: 2px solid var(--border-primary);
    border-radius: 12px;
    overflow: hidden;
}

.browser-chrome {
    height: 40px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    align-items: center;
    padding: 0 15px;
    gap: 8px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
}

.browser-dot.red {
    background: #EF4444;
}

.browser-dot.yellow {
    background: #EAB308;
}

.browser-dot.green {
    background: #22C55E;
}

.browser-content {
    height: calc(100% - 40px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border-primary);
    font-size: 22px;
    font-weight: 700;
}

.browser-window:nth-child(1) {
    width: 800px;
    height: 500px;
    left: 0;
    top: 80px;
    z-index: 1;
}

.browser-window:nth-child(2) {
    width: 800px;
    height: 500px;
    left: 400px;
    top: 0;
    z-index: 2;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.browser-badge {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(255, 97, 0, 0.1);
    color: var(--branduals-orange);
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

/* ==========================================================================
   Mobile Navigation
   ========================================================================== */

/* Hide mobile menu button by default (desktop) */
.mobile-menu-button {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: none;
    padding: 8px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all 0.3s ease;
}

/* Mobile menu overlay */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu.open {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--bg-card);
    border-left: 1px solid var(--border-primary);
    padding: 80px 0 40px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.open .mobile-nav {
    transform: translateX(0);
}

.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    display: block;
    padding: 20px 32px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-secondary);
    transition: all var(--transition-speed);
}

.mobile-nav-item:hover {
    color: var(--text-primary);
    background: rgba(255, 97, 0, 0.05);
}

.mobile-nav-item.active {
    color: var(--branduals-orange);
    font-weight: 600;
    border-left: 3px solid var(--branduals-orange);
}

.mobile-nav-signin {
    margin-top: 20px;
    background: rgba(255, 97, 0, 0.1);
    color: var(--branduals-orange);
    font-weight: 600;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .container {
        padding: 0 40px;
    }

    .hero-title {
        font-size: 64px;
    }

    h1 {
        font-size: 64px;
    }

    h2 {
        font-size: 48px;
    }

    .product-showcase {
        height: 400px;
    }

    .browser-window:nth-child(1) {
        width: 600px;
        height: 400px;
        left: 0;
        top: 60px;
    }

    .browser-window:nth-child(2) {
        width: 600px;
        height: 400px;
        left: 300px;
        top: 0;
    }
}

@media (max-width: 768px) {
    /* Container and Spacing */
    .container {
        padding: 0 20px;
    }

    /* Header - Mobile Menu */
    .header {
        padding: 16px 0;
    }

    .nav-desktop {
        display: none;
    }

    .mobile-menu-button {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    /* Typography - Mobile Optimized */
    .hero {
        padding: 40px 0 0;
    }

    .hero-title {
        font-size: 36px;
        margin-bottom: 20px;
        line-height: 1.15;
    }

    h1 {
        font-size: 36px;
    }

    h2 {
        font-size: 28px;
    }

    h3 {
        font-size: 22px;
    }

    p {
        font-size: 16px;
    }

    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 32px;
    }

    .eyebrow {
        font-size: 11px;
        margin-bottom: 20px;
    }

    /* Email Form - Stacked Layout */
    .email-signup {
        max-width: 100%;
    }

    .email-form {
        flex-direction: column;
        height: auto;
        padding: 12px;
        gap: 12px;
    }

    .email-input {
        width: 100%;
        padding: 16px;
    }

    .btn-primary {
        width: 100%;
        height: 52px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    /* Philosophy Page - Flow Diagram */
    .flow-stage {
        padding: 20px 24px;
    }

    .flow-stage-title {
        font-size: 20px;
    }

    .flow-stage-main {
        padding: 32px 24px;
    }

    .flow-stage-main .brand-name {
        font-size: 36px;
    }

    .flow-stage-main .flow-stage-title {
        font-size: 16px;
    }

    /* Product Page - Browser Windows */
    .product-showcase {
        height: 300px;
        margin-bottom: 40px;
    }

    .browser-window:nth-child(1) {
        width: 90%;
        height: 250px;
        left: 0;
        top: 50px;
    }

    .browser-window:nth-child(2) {
        width: 90%;
        height: 250px;
        left: 10%;
        top: 0;
    }

    .browser-content {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    /* Extra small devices - Even more compact */
    .container {
        padding: 0 16px;
    }

    .brand-logo {
        font-size: 24px;
    }

    .hero-title {
        font-size: 28px;
        margin-bottom: 16px;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .hero-subtitle {
        font-size: 15px;
    }

    .flow-stage-main .brand-name {
        font-size: 28px;
    }

    .product-showcase {
        height: 250px;
    }

    .browser-window:nth-child(1),
    .browser-window:nth-child(2) {
        width: 95%;
        height: 200px;
    }

    .browser-window:nth-child(2) {
        left: 5%;
    }
}

/* ==========================================================================
   Error UI
   ========================================================================== */

#blazor-error-ui {
    background: #b32121;
    color: white;
    padding: 1rem 1.5rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: none;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1.5rem;
    top: 0.75rem;
}
