/* ==========================================================
   FalhenMedia - Transition Portal Design System
   Consolidated Design Tokens & Visual Hierarchy
   ========================================================== */

:root {
    /* Primary Brand Colors */
    --brand-orange: #FF4612;
    --brand-orange-hover: #e03a0a;
    --brand-orange-text: #C83204;
    /* WCAG 2.1 AA compliant: 4.8:1 contrast on #ffffff */
    --brand-orange-light: rgba(255, 70, 18, 0.08);
    --brand-orange-border: rgba(255, 70, 18, 0.25);
    --brand-orange-glow: rgba(255, 70, 18, 0.38);

    /* Surfaces & Backgrounds */
    --bg-page: #ffffff;
    --bg-surface: #ffffff;
    --bg-surface-subtle: #f8fafc;
    --bg-surface-hover: #f1f5f9;

    /* Typography Colors */
    --text-primary: #111111;
    --text-secondary: #333333;
    --text-body: #444444;
    --text-muted: #595959;
    /* WCAG 2.1 AA compliant: 4.5:1 contrast on #ffffff */
    --text-subtle: #737373;

    /* Borders & Dividers */
    --border-subtle: #f0f0f0;
    --border-card: #e5e5e5;
    --border-control: #cbd5e1;
    --border-control-hover: #94a3b8;

    /* Elevation / Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 14px 34px -6px rgba(0, 0, 0, 0.12);
    --shadow-orange: 0 6px 20px -2px rgba(255, 70, 18, 0.40);
    --shadow-orange-hover: 0 8px 24px -2px rgba(255, 70, 18, 0.55);

    /* Radius Scale */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 16px;
    --radius-pill: 9999px;

    /* Spacing & Transitions */
    --transition-fast: 0.15s ease;
    --transition-smooth: 0.2s cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-heading: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html,
body {
    min-height: 100vh;
    background-color: var(--bg-page);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.5;
    overflow-x: hidden;
}

body {
    display: flex;
    position: relative;
    width: 100vw;
}

/* ---------------- Page Wrapper (Full Width) ---------------- */
.page-wrapper {
    margin-left: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    background-color: var(--bg-page);
    background-image:
        radial-gradient(circle at 90% 30%, rgba(255, 70, 18, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 10% 80%, rgba(0, 0, 0, 0.02) 0%, transparent 40%);
}

.page-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 65%;
    height: 100%;
    background: url('ribbon_bg.jpg') center right / cover no-repeat;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
}

/* ---------------- Navbar ---------------- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 3.5rem 0.5rem;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.old-brand-logo {
    height: 36px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.old-brand-logo:hover {
    transform: scale(1.02);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    color: var(--text-secondary);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-item:hover {
    color: var(--brand-orange-text);
}

.nav-arrow {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.highlight-nav {
    background: var(--brand-orange-light);
    color: var(--brand-orange-text);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--brand-orange-border);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-smooth);
}

.highlight-nav:hover {
    background: var(--brand-orange);
    color: #ffffff;
    border-color: var(--brand-orange);
    box-shadow: 0 4px 14px rgba(255, 70, 18, 0.25);
}

/* Mobile Menu Navigation State */
.nav-links.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 1.5rem;
    background: var(--bg-surface);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-card);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-lg);
    gap: 1rem;
    z-index: 99;
    animation: fadeInDown var(--transition-smooth);
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 6px;
    padding: 6px;
}

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-smooth);
}

.menu-toggle:hover span {
    background-color: var(--brand-orange);
}

/* ---------------- Hero Section (Even 50/50 Split) ---------------- */
.main-hero {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3.5rem;
    padding: 1rem 3.5rem;
    position: relative;
    z-index: 1;
    align-items: center;
    min-height: 0;
    width: 100%;
}

/* Left Hero Typography (Exactly 50% Column) */
.hero-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-width: 0;
}

.massive-headings {
    display: flex;
    flex-direction: column;
    user-select: none;
    white-space: nowrap;
    width: 100%;
}

.heading-line {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 4.3vw, 4.75rem);
    font-weight: 900;
    line-height: 0.90;
    letter-spacing: -0.045em;
    text-transform: uppercase;
}

.black-text {
    color: var(--text-primary);
}

.orange-text {
    color: var(--brand-orange);
}

/* Right Hero: Migration Banner (Exactly 50% Column) */
.hero-right {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 1.25rem;
    position: relative;
    width: 100%;
    min-width: 0;
}

.migration-banner {
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-left: 4px solid var(--brand-orange);
    border-radius: var(--radius-xl);
    padding: 1.75rem 2rem;
    box-shadow: var(--shadow-md);
    width: 100%;
    animation: fadeInUp 0.6s ease-out;
}

.banner-top {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.5rem;
}

.pulse-orange-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 70, 18, 0.25);
    animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 2px rgba(255, 70, 18, 0.4);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(255, 70, 18, 0);
    }
}

.banner-tag {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--brand-orange-text);
    text-transform: uppercase;
}

.banner-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.45rem;
    line-height: 1.25;
}

.orange-accent {
    color: var(--brand-orange-text);
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 3px;
}

.banner-desc {
    font-size: 0.90rem;
    color: var(--text-body);
    line-height: 1.55;
    margin-bottom: 1.25rem;
}

/* Timer & Progress Bar */
.redirect-timer-container {
    background: var(--bg-surface-subtle);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 0.85rem 1.15rem;
    margin-bottom: 1.35rem;
}

.timer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
}

.timer-text {
    color: var(--text-secondary);
}

.timer-text strong {
    color: var(--brand-orange-text);
    font-size: 1rem;
    font-weight: 700;
}

.btn-pause {
    background: var(--bg-surface);
    border: 1px solid var(--border-control);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.76rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-pause:hover {
    border-color: var(--border-control-hover);
    color: var(--text-primary);
    background: var(--bg-surface-hover);
}

.btn-pause.is-paused {
    color: var(--brand-orange-text);
    border-color: var(--brand-orange-text);
    background: var(--brand-orange-light);
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: var(--border-control);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar-fill {
    width: 100%;
    height: 100%;
    background: var(--brand-orange);
    border-radius: var(--radius-pill);
    transition: width 0.1s linear;
}

/* Banner Actions */
.banner-actions {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-orange-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 46px;
    background-color: var(--brand-orange);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 0 1.6rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    box-shadow: var(--shadow-orange);
    transition: all var(--transition-smooth);
}

.btn-orange-primary:hover {
    background-color: var(--brand-orange-hover);
    box-shadow: var(--shadow-orange-hover);
    transform: translateY(-2px);
}

.btn-arrow {
    transition: transform var(--transition-fast);
}

.btn-orange-primary:hover .btn-arrow {
    transform: translate(2px, -2px);
}

.btn-clean-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 46px;
    background: var(--bg-surface);
    border: 1px solid var(--border-control);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    padding: 0 1.35rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.btn-clean-secondary:hover {
    background: var(--bg-surface-hover);
    border-color: var(--border-control-hover);
    color: var(--text-primary);
}

/* Floating Cluster */
.floating-cta-cluster {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 1.15rem;
    position: relative;
    z-index: 5;
}

.chat-bubble-pill {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-md);
    padding: 0.6rem 1.15rem;
    border-radius: var(--radius-lg);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    animation: bounceSlow 3s infinite ease-in-out;
}

.wave-emoji {
    font-size: 1.05rem;
}

@keyframes bounceSlow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

.circular-orange-badge {
    width: 108px;
    height: 108px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    flex-shrink: 0;
}

.rotating-text-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    animation: rotateCircle 16s linear infinite;
    transform-origin: center center;
}

@keyframes rotateCircle {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.badge-center-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--brand-orange);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-orange);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color var(--transition-fast);
    z-index: 2;
}

.circular-orange-badge:hover .badge-center-icon {
    transform: scale(1.1) rotate(15deg);
    background-color: var(--brand-orange-hover);
    box-shadow: var(--shadow-orange-hover);
}

/* ---------------- Footer ---------------- */
.bottom-footer {
    padding: 0.85rem 3.5rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    position: relative;
    z-index: 10;
    background: var(--bg-surface);
    flex-shrink: 0;
}

.bottom-footer a {
    color: var(--brand-orange-text);
    text-decoration: none;
    font-weight: 600;
}

.bottom-footer a:hover {
    text-decoration: underline;
}

/* ---------------- Toast Notification ---------------- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--text-primary);
    color: #ffffff;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transform: translateY(15px);
    transition: all var(--transition-smooth);
    z-index: 999;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------------- Responsive Design ---------------- */

/* Medium Tablets & Small Desktops (<= 1024px) */
@media (max-width: 1024px) {
    .navbar {
        padding: 1.15rem 2rem 0.5rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .main-hero {
        grid-template-columns: 1fr;
        gap: 2.25rem;
        padding: 1.5rem 2.5rem 2rem;
    }

    .hero-right {
        order: 1;
    }

    .hero-left {
        order: 2;
        align-items: center;
        text-align: center;
    }

    .massive-headings {
        align-items: center;
    }

    .heading-line {
        font-size: clamp(2.8rem, 6vw, 4.2rem);
    }

    .floating-cta-cluster {
        justify-content: center;
    }
}

/* Tablet Portrait & Handhelds (<= 860px) */
@media (max-width: 860px) {
    .page-wrapper {
        margin-left: 0;
        width: 100%;
        min-height: 100vh;
    }

    .page-wrapper::before {
        width: 100%;
        opacity: 0.20;
    }

    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-links.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: calc(100% + 0.5rem);
        left: 1.25rem;
        right: 1.25rem;
        width: calc(100% - 2.5rem);
        background: var(--bg-surface);
        box-shadow: var(--shadow-lg);
        border: 1px solid var(--border-card);
        padding: 1.25rem 1.5rem;
        border-radius: var(--radius-lg);
        gap: 0.85rem;
        z-index: 999;
        animation: fadeInDown var(--transition-smooth);
    }

    .nav-links.is-open .nav-item {
        padding: 0.65rem 0.5rem;
        font-size: 1rem;
        border-bottom: 1px solid var(--border-subtle);
    }

    .nav-links.is-open .highlight-nav {
        margin-top: 0.5rem;
        text-align: center;
        justify-content: center;
        padding: 0.75rem 1.25rem;
        border-bottom: none;
    }

    .menu-toggle {
        display: flex;
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .main-hero {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        padding: 1rem 1.5rem 2rem;
    }

    .hero-right {
        order: 1;
        width: 100%;
    }

    .hero-left {
        order: 2;
        width: 100%;
        align-items: center;
        text-align: center;
    }

    .heading-line {
        font-size: clamp(2.2rem, 7vw, 3.4rem);
        line-height: 0.92;
    }

    .floating-cta-cluster {
        order: 3;
        justify-content: center;
        margin-top: 0.5rem;
    }

    .bottom-footer {
        flex-direction: column;
        gap: 0.65rem;
        text-align: center;
        padding: 1.25rem 1.5rem;
    }
}

/* Smartphones & Small Viewports (<= 540px) */
@media (max-width: 540px) {
    .navbar {
        padding: 0.85rem 1rem;
    }

    .old-brand-logo {
        height: 30px;
    }

    .main-hero {
        padding: 0.75rem 1rem 1.75rem;
        gap: 1.5rem;
    }

    .migration-banner {
        padding: 1.35rem 1.15rem;
        border-radius: var(--radius-lg);
        border-left-width: 3px;
    }

    .banner-top {
        margin-bottom: 0.35rem;
    }

    .banner-tag {
        font-size: 0.70rem;
        letter-spacing: 0.06em;
    }

    .banner-title {
        font-size: 1.2rem;
        line-height: 1.3;
        margin-bottom: 0.4rem;
    }

    .banner-desc {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    .redirect-timer-container {
        padding: 0.75rem 0.95rem;
        margin-bottom: 1.15rem;
        border-radius: var(--radius-md);
    }

    .timer-meta {
        font-size: 0.82rem;
    }

    .timer-text strong {
        font-size: 0.95rem;
    }

    .btn-pause {
        min-height: 36px;
        padding: 0.35rem 0.75rem;
    }

    .banner-actions {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .btn-orange-primary,
    .btn-clean-secondary {
        width: 100%;
        height: 48px;
        font-size: 0.95rem;
        padding: 0 1rem;
    }

    .heading-line {
        font-size: clamp(1.8rem, 8.5vw, 2.4rem);
        letter-spacing: -0.03em;
        line-height: 0.94;
    }

    .floating-cta-cluster {
        flex-direction: column;
        align-items: center;
        gap: 0.85rem;
    }

    .chat-bubble-pill {
        padding: 0.5rem 0.95rem;
        font-size: 0.82rem;
    }

    .circular-orange-badge {
        width: 92px;
        height: 92px;
    }

    .badge-center-icon {
        width: 44px;
        height: 44px;
    }

    .badge-center-icon svg {
        width: 22px;
        height: 22px;
    }

    .toast {
        bottom: 1.25rem;
        left: 1.25rem;
        right: 1.25rem;
        max-width: calc(100% - 2.5rem);
        margin: 0 auto;
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
        text-align: center;
    }

    .bottom-footer {
        padding: 1rem 1rem;
        font-size: 0.76rem;
    }
}

/* Ultra-Compact Screens (<= 360px) */
@media (max-width: 360px) {
    .navbar {
        padding: 0.75rem 0.85rem;
    }

    .banner-title {
        font-size: 1.1rem;
    }

    .heading-line {
        font-size: 1.6rem;
    }

    .chat-bubble-pill {
        display: none;
        /* Hide chat pill to give breathing room */
    }
}

/* Accessibility: Screen Reader Only & Skip Link */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link:focus {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 9999;
    width: auto;
    height: auto;
    padding: 0.8rem 1.4rem;
    background: var(--brand-orange-text);
    color: #ffffff;
    font-weight: 700;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    clip: auto;
    outline: 2px solid #ffffff;
}

/* Accessibility: Unified High-Visibility Focus Indicators (WCAG 2.4.7) */
:focus-visible {
    outline: 2px solid var(--brand-orange-text);
    outline-offset: 3px;
    border-radius: var(--radius-xs);
}

.btn-orange-primary:focus-visible,
.btn-clean-secondary:focus-visible,
.btn-pause:focus-visible,
.circular-orange-badge:focus-visible,
.menu-toggle:focus-visible {
    border-radius: var(--radius-md);
}

/* Performance: Hardware Acceleration GPU Compositing */
.rotating-text-svg,
.badge-center-icon,
.pulse-orange-dot {
    will-change: transform;
}

/* Accessibility: Reduced Motion (WCAG 2.3.3) */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .rotating-text-svg,
    .pulse-orange-dot,
    .chat-bubble-pill,
    .migration-banner {
        animation: none !important;
        transform: none !important;
    }

    .progress-bar-fill {
        transition: none !important;
    }
}