/* /assets/css/global.css
 * Poetic.io Inspired Aesthetic
 * Dark Mode First, Minimalist, High-Contrast, Professional
 */

/* ============================================
   CSS VARIABLES & DESIGN TOKENS
   ============================================ */
:root {
    /* Dark Mode Palette (Hero / Landing) */
    --dark-bg: #eff6ff;
    --dark-surface: #ffffff;
    --dark-border: #e2e8f0;
    --dark-text: #1e293b;
    --dark-muted: #64748b;

    /* Light Mode Palette (Post-Login / Forms) */
    --color-surface: #ffffff;
    --color-background: #f8fafc;
    --color-text-main: #334155;
    --color-text-muted: #94a3b8;
    --color-border: #e2e8f0;

    /* Brand / Dynamic Tenant Colors (overridden post-login) */
    --color-brand-primary: #7dd3fc;
    --color-brand-secondary: #fce7f3;
    --color-accent: #fb923c;
    --color-accent-hover: #f97316;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Shapes */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-pill: 999px;
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

/* ============================================
   GLOBAL RESET
   ============================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================
   LANDING PAGE BODY
   ============================================ */
.landing-body {
    background-color: var(--color-background);
}

/* ============================================
   HERO CURTAIN
   ============================================ */
.hero-curtain {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--dark-bg);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    /* Allow internal scrolling */
    overflow-y: auto;
    cursor: default;
    /* Poetic.io signature bezier easing */
    transition: transform 0.9s cubic-bezier(0.77, 0, 0.175, 1);
    /* Custom scrollbar for dark mode */
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.hero-curtain::-webkit-scrollbar {
    width: 4px;
}

.hero-curtain::-webkit-scrollbar-track {
    background: transparent;
}

.hero-curtain::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

.hero-curtain.slide-up {
    transform: translateY(-100%);
    pointer-events: none;
}

/* NAV */
.hero-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3rem;
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 1px solid var(--dark-border);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    flex-shrink: 0;
}

/* Navigation Menu Links */
.hero-nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.hero-nav-links a {
    color: var(--dark-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: color 0.2s;
}

.hero-nav-links a:hover {
    color: var(--dark-text);
}

.hero-nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.hero-nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: default;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--color-accent), #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.85rem;
    color: white;
    letter-spacing: -0.02em;
}

.logo-wordmark {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-text);
    letter-spacing: -0.02em;
}

.btn-enter {
    background: transparent;
    color: var(--dark-text);
    border: 1px solid var(--dark-border);
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-pill);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-enter:hover {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.12);
}

/* HERO STAGE */
.hero-stage {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 3rem 3rem 2rem;
    gap: 3rem;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* LEFT COLUMN */
.hero-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.hero-eyebrow {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-accent);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.1s;
}

.hero-headline {
    font-size: clamp(2.8rem, 5vw, 5rem);
    font-weight: 900;
    line-height: 1.0;
    letter-spacing: -0.04em;
    color: var(--dark-text);
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.25s;
}

.hero-headline em {
    font-style: italic;
    background: linear-gradient(135deg, var(--color-accent) 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--dark-muted);
    max-width: 480px;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 2rem;
    opacity: 0;
    animation: fadeUp 0.8s ease forwards 0.55s;
}

.btn-hero-primary {
    background: var(--color-accent);
    color: white;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-pill);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 24px rgba(251, 146, 60, 0.35);
}

.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(251, 146, 60, 0.45);
}

.hero-scroll-hint {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dark-muted);
    font-size: 0.85rem;
}

.scroll-arrow {
    display: inline-block;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* RIGHT COLUMN — Phone Mockup */
.hero-right {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    opacity: 0;
    animation: fadeUp 0.9s ease forwards 0.3s;
}

.phone-mockup {
    position: relative;
    z-index: 1;
}

.phone-shell {
    width: 280px;
    height: 540px;
    background: linear-gradient(145deg, #ffffff, #f8fafc, #ffffff);
    border-radius: 40px;
    border: 2px solid rgba(0, 0, 0, 0.05);
    padding: 20px 16px;
    box-shadow:
        0 40px 80px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

/* Notch */
.phone-shell::before {
    content: '';
    display: block;
    width: 80px;
    height: 6px;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 3px;
    margin: 0 auto 20px;
}

.phone-screen {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mock-header {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.mock-card {
    background: var(--color-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: 16px;
}

.mock-card.accent {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(249, 115, 22, 0.25));
    border-color: rgba(251, 146, 60, 0.3);
}

.mock-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--dark-muted);
    margin-bottom: 4px;
}

.mock-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-text);
    letter-spacing: -0.02em;
}

/* Glowing orbs behind phone */
.phone-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    z-index: -1;
}

.glow-blue {
    width: 300px;
    height: 300px;
    background: rgba(186, 230, 253, 0.8);
    top: 50%;
    left: 50%;
    transform: translate(-60%, -40%);
}

.glow-purple {
    width: 200px;
    height: 200px;
    background: rgba(254, 215, 170, 0.8);
    bottom: 0;
    right: 0;
    transform: translate(30%, 30%);
}

/* FOOTER HINT — sticky at the bottom of first viewport */
.hero-footer-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.25rem;
    color: var(--dark-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--dark-border);
    cursor: pointer;
    animation: pulse 2.5s ease-in-out infinite;
    background-color: var(--dark-bg);
    flex-shrink: 0;
}

.caret-up {
    font-size: 1.1rem;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ============================================
   SCROLLABLE HERO SECTIONS
   ============================================ */
.hero-section {
    padding: 5rem 3rem;
    width: 100%;
}

.hero-section-light {
    background-color: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
}

.hero-section-dark {
    background-color: var(--dark-bg);
    border-top: 1px solid var(--dark-border);
}

.hero-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 1.25rem;
}

.section-heading {
    font-size: clamp(2rem, 4vw, 3.5rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--dark-text);
    margin-bottom: 1.5rem;
}

.section-heading em {
    font-style: italic;
    background: linear-gradient(135deg, var(--color-accent) 0%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-body {
    font-size: 1.1rem;
    line-height: 1.75;
    color: var(--dark-muted);
    max-width: 620px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
}

.feature-icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.feature-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--dark-muted);
}

/* Roles Grid */
.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-top: 3rem;
}

.role-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: 2rem;
}

.role-card.accent-role {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(249, 115, 22, 0.12));
    border-color: rgba(251, 146, 60, 0.25);
}

.role-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 0.6rem;
    letter-spacing: -0.02em;
}

.role-card p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--dark-muted);
}

/* ============================================
   FADE-UP ANIMATION (Used throughout)
   ============================================ */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(22px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   LOGIN PAGE (Revealed after slide-up)
   ============================================ */
.login-page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-background);
    background-image: radial-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px);
    background-size: 30px 30px;
    padding: 2rem;
}

.login-container {
    background: var(--color-surface);
    width: 100%;
    max-width: 420px;
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--color-border);
}

.brand-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-logo-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-accent), #f97316);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 0.9rem;
    color: white;
    flex-shrink: 0;
}

.login-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-text-main);
    line-height: 1.1;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-top: 0.2rem;
}

/* Form */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-main);
    margin-bottom: 0.4rem;
    letter-spacing: 0.01em;
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--color-text-main);
    background: var(--color-background);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--color-accent);
    background: var(--color-surface);
    box-shadow: 0 0 0 3px rgba(251, 146, 60, 0.12);
}

.form-actions {
    margin-top: 1.75rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
    box-shadow: 0 4px 14px rgba(251, 146, 60, 0.3);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(251, 146, 60, 0.4);
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-family: var(--font);
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s;
}

.btn-text:hover {
    color: var(--color-text-main);
}

/* Error Banner */
.error-banner {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1.25rem;
    text-align: center;
}

/* Back hint */
.login-back-hint {
    margin-top: 1.5rem;
    text-align: center;
}

/* ============================================
   DASHBOARD / POST-LOGIN LAYOUT
   ============================================ */
body:not(.landing-body) {
    background: var(--color-background);
    color: var(--color-text-main);
}