/* =========================================================
   CHATNEX
   MAIN PLATFORM STYLESHEET
   =========================================================

   File:
   /css/main.css

   Purpose:
   - Global design system
   - Theme system
   - Typography
   - Global reset
   - Containers
   - Shared buttons
   - Shared navigation
   - Shared UI components
   - Global accessibility
   - Shared header/footer
   - Shared hero primitives

   Architecture:
   - Page/component CSS:
     /css/components/

   - Template-system CSS:
     /css/templates.css

   - Responsive CSS:
     /css/responsive.css

   IMPORTANT:
   Page-specific styling must NOT be added here.
   ========================================================= */


/* =========================================================
   01. ROOT DESIGN SYSTEM
   ========================================================= */

:root {

    /* -----------------------------------------------------
       Brand Colors
       ----------------------------------------------------- */

    --brand-blue: #3b82f6;
    --brand-blue-dark: #2563eb;
    --brand-blue-light: #60a5fa;

    --brand-cyan: #22d3ee;
    --brand-cyan-dark: #06b6d4;
    --brand-cyan-light: #67e8f9;

    --brand-purple: #8b5cf6;
    --brand-purple-dark: #7c3aed;
    --brand-purple-light: #a78bfa;

    --brand-green: #22c55e;
    --brand-green-light: #4ade80;


    /* -----------------------------------------------------
       Dark Theme Backgrounds
       ----------------------------------------------------- */

    --bg-primary: #070b14;
    --bg-secondary: #0a1020;
    --bg-tertiary: #0e1628;
    --bg-card: #111a2d;
    --bg-card-hover: #16213a;
    --bg-elevated: #151f35;
    --bg-footer: #050811;


    /* -----------------------------------------------------
       Text
       ----------------------------------------------------- */

    --text-primary: #f8fafc;
    --text-secondary: #a7b1c2;
    --text-muted: #718096;
    --text-dark: #0f172a;
    --text-white: #ffffff;


    /* -----------------------------------------------------
       Borders
       ----------------------------------------------------- */

    --border-color: rgba(148, 163, 184, 0.14);
    --border-light: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(96, 165, 250, 0.3);


    /* -----------------------------------------------------
       Gradients
       ----------------------------------------------------- */

    --gradient-brand:
        linear-gradient(
            135deg,
            var(--brand-blue),
            var(--brand-cyan)
        );

    --gradient-purple:
        linear-gradient(
            135deg,
            var(--brand-purple),
            var(--brand-blue)
        );

    --gradient-text:
        linear-gradient(
            90deg,
            var(--brand-cyan),
            var(--brand-blue),
            var(--brand-purple)
        );

    --gradient-hero:
        radial-gradient(
            circle at 15% 20%,
            rgba(59, 130, 246, 0.17),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 30%,
            rgba(139, 92, 246, 0.16),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #070b14 0%,
            #0a1020 100%
        );


    /* -----------------------------------------------------
       Shadows
       ----------------------------------------------------- */

    --shadow-xs:
        0 2px 8px rgba(0, 0, 0, 0.18);

    --shadow-sm:
        0 6px 20px rgba(0, 0, 0, 0.22);

    --shadow-md:
        0 12px 35px rgba(0, 0, 0, 0.28);

    --shadow-lg:
        0 20px 60px rgba(0, 0, 0, 0.35);

    --shadow-blue:
        0 0 35px rgba(59, 130, 246, 0.18);

    --shadow-cyan:
        0 0 35px rgba(34, 211, 238, 0.16);

    --shadow-purple:
        0 0 35px rgba(139, 92, 246, 0.18);


    /* -----------------------------------------------------
       Layout
       ----------------------------------------------------- */

    --container-width: 1200px;
    --container-wide: 1320px;

    --header-height: 78px;


    /* -----------------------------------------------------
       Radius
       ----------------------------------------------------- */

    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 999px;


    /* -----------------------------------------------------
       Spacing
       ----------------------------------------------------- */

    --section-padding: 110px;


    /* -----------------------------------------------------
       Transitions
       ----------------------------------------------------- */

    --transition-fast: 0.18s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;


    /* -----------------------------------------------------
       Typography
       ----------------------------------------------------- */

    --font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;

    --font-mono:
        "SFMono-Regular",
        Consolas,
        "Liberation Mono",
        monospace;
}


/* =========================================================
   02. LIGHT THEME
   ========================================================= */

body.light-mode {

    --bg-primary: #f7f9fc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef3f9;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fbff;
    --bg-elevated: #ffffff;
    --bg-footer: #eef2f7;

    --text-primary: #101827;
    --text-secondary: #526174;
    --text-muted: #718096;
    --text-dark: #0f172a;
    --text-white: #ffffff;

    --border-color: rgba(15, 23, 42, 0.1);
    --border-light: rgba(15, 23, 42, 0.07);
    --border-strong: rgba(37, 99, 235, 0.25);

    --gradient-hero:
        radial-gradient(
            circle at 15% 20%,
            rgba(59, 130, 246, 0.09),
            transparent 34%
        ),
        radial-gradient(
            circle at 85% 30%,
            rgba(139, 92, 246, 0.08),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #f7f9fc 0%,
            #ffffff 100%
        );

    --shadow-xs:
        0 2px 8px rgba(15, 23, 42, 0.06);

    --shadow-sm:
        0 6px 20px rgba(15, 23, 42, 0.08);

    --shadow-md:
        0 12px 35px rgba(15, 23, 42, 0.1);

    --shadow-lg:
        0 20px 60px rgba(15, 23, 42, 0.12);
}


/* =========================================================
   03. GLOBAL RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + 20px);
}

body {
    min-height: 100vh;
    overflow-x: hidden;

    background: var(--bg-primary);
    color: var(--text-primary);

    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    transition:
        background-color var(--transition-normal),
        color var(--transition-normal);
}

body.no-scroll {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

svg {
    display: block;
    max-width: 100%;
}

button,
input,
textarea,
select {
    font: inherit;
}

button {
    border: 0;
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
}

a {
    color: inherit;
    text-decoration: none;
}

ul,
ol {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    line-height: 1.15;
}

p {
    color: var(--text-secondary);
}

::selection {
    background: rgba(59, 130, 246, 0.3);
    color: var(--text-white);
}


/* =========================================================
   04. ACCESSIBILITY
   ========================================================= */

:focus-visible {
    outline: 3px solid var(--brand-cyan);
    outline-offset: 4px;
}

.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;
}


/* =========================================================
   05. CONTAINERS
   ========================================================= */

.container {
    width: min(
        calc(100% - 40px),
        var(--container-width)
    );

    margin-inline: auto;
}

.container-wide {
    width: min(
        calc(100% - 40px),
        var(--container-wide)
    );

    margin-inline: auto;
}


/* =========================================================
   06. SHARED SECTION FOUNDATION
   ========================================================= */

.section {
    position: relative;

    padding:
        var(--section-padding)
        0;

    background: var(--bg-primary);
}

.section-header {
    max-width: 760px;
    margin: 0 auto 55px;

    text-align: center;
}

.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    max-width: none;

    text-align: left;
}

.section-label {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 15px;

    color: var(--brand-cyan);

    font-size: 0.76rem;
    font-weight: 800;

    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.section-label::before {
    content: "";

    width: 24px;
    height: 2px;

    border-radius: var(--radius-pill);

    background: var(--gradient-brand);
}

.section-title {
    margin-bottom: 16px;

    font-size: clamp(
        2rem,
        4vw,
        3rem
    );

    font-weight: 800;

    letter-spacing: -0.035em;
}

.section-description {
    max-width: 680px;

    margin-inline: auto;

    color: var(--text-secondary);

    font-size: 1.05rem;
    line-height: 1.75;
}

.section-header-row .section-description {
    margin-inline: 0;
}


/* =========================================================
   07. SHARED BUTTON SYSTEM
   ========================================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    min-height: 44px;

    padding: 11px 20px;

    border: 1px solid transparent;
    border-radius: var(--radius-sm);

    font-size: 0.92rem;
    font-weight: 700;

    white-space: nowrap;

    transition:
        transform var(--transition-normal),
        background var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        color var(--transition-normal);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-brand);

    color: var(--text-white);

    box-shadow:
        0 8px 25px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    box-shadow:
        0 12px 35px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    border-color: var(--border-color);

    background: var(--bg-card);

    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--border-strong);

    background: var(--bg-card-hover);

    box-shadow: var(--shadow-sm);
}

.btn-large {
    min-height: 52px;

    padding: 14px 25px;

    border-radius: var(--radius-md);

    font-size: 0.98rem;
}


/* =========================================================
   08. SHARED TEXT LINKS
   ========================================================= */

.text-link {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: var(--brand-cyan);

    font-size: 0.92rem;
    font-weight: 700;

    white-space: nowrap;

    transition:
        gap var(--transition-normal),
        color var(--transition-normal);
}

.text-link:hover {
    gap: 12px;
    color: var(--brand-blue-light);
}


/* =========================================================
   09. SITE HEADER
   ========================================================= */

.site-header {
    position: sticky;
    top: 0;

    z-index: 1000;

    height: var(--header-height);

    border-bottom:
        1px solid var(--border-color);

    background:
        color-mix(
            in srgb,
            var(--bg-primary) 86%,
            transparent
        );

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    transition:
        background var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal);
}

.site-header.scrolled {
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.15);
}

.top-header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 100%;
}


/* =========================================================
   10. BRAND
   ========================================================= */

.brand-logo {
    display: inline-flex;
    align-items: center;

    gap: 11px;

    flex-shrink: 0;

    font-weight: 800;
}

.logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    border:
        1px solid rgba(96, 165, 250, 0.35);

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            rgba(59, 130, 246, 0.2),
            rgba(139, 92, 246, 0.24)
        );

    color: var(--text-white);

    font-size: 0.8rem;
    font-weight: 900;

    letter-spacing: -0.04em;

    box-shadow:
        inset 0 0 20px rgba(59, 130, 246, 0.1),
        0 8px 25px rgba(59, 130, 246, 0.1);
}

.logo-text {
    color: var(--text-primary);

    font-size: 1.35rem;
    font-weight: 850;

    letter-spacing: -0.04em;
}

.logo-text span {
    background: var(--gradient-text);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}


/* =========================================================
   11. MAIN NAVIGATION
   ========================================================= */

.main-navigation {
    margin-left: auto;
    margin-right: 28px;
}

.nav-links {
    display: flex;
    align-items: center;

    gap: 5px;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    padding: 8px 11px;

    border-radius: var(--radius-sm);

    background: transparent;

    color: var(--text-secondary);

    font-size: 0.9rem;
    font-weight: 650;

    transition:
        color var(--transition-fast),
        background var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    background:
        rgba(59, 130, 246, 0.07);

    color:
        var(--text-primary);
}

.nav-link.active {
    color:
        var(--brand-cyan);
}

.dropdown-arrow {
    font-size: 0.7rem;

    transition:
        transform var(--transition-normal);
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   12. TEMPLATES DROPDOWN
   ========================================================= */

.dropdown-menu {
    position: absolute;

    top: calc(100% + 13px);
    left: 50%;

    width: 285px;

    padding: 8px;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-md);

    background:
        color-mix(
            in srgb,
            var(--bg-elevated) 96%,
            transparent
        );

    box-shadow:
        var(--shadow-lg);

    backdrop-filter:
        blur(20px);

    -webkit-backdrop-filter:
        blur(20px);

    opacity: 0;
    visibility: hidden;

    transform:
        translate(-50%, -8px);

    pointer-events: none;

    transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal),
        transform var(--transition-normal);
}

.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;

    transform:
        translate(-50%, 0);

    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;

    gap: 12px;

    padding: 12px;

    border-radius:
        var(--radius-sm);

    color:
        var(--text-primary);

    transition:
        background var(--transition-fast),
        transform var(--transition-fast);
}

.dropdown-item:hover {
    background:
        rgba(59, 130, 246, 0.08);

    transform:
        translateX(2px);
}

.dropdown-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    flex-shrink: 0;

    border-radius: 9px;

    background:
        linear-gradient(
            135deg,
            rgba(59, 130, 246, 0.15),
            rgba(139, 92, 246, 0.12)
        );

    color:
        var(--brand-cyan);

    font-size: 0.9rem;
}

.dropdown-item strong {
    display: block;

    margin-bottom: 2px;

    color:
        var(--text-primary);

    font-size: 0.86rem;
}

.dropdown-item small {
    display: block;

    color:
        var(--text-muted);

    font-size: 0.74rem;

    line-height: 1.45;
}


/* =========================================================
   13. HEADER ACTIONS
   ========================================================= */

.header-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}

.header-login {
    padding: 8px 10px;

    color:
        var(--text-secondary);

    font-size: 0.9rem;
    font-weight: 700;

    transition:
        color var(--transition-fast);
}

.header-login:hover {
    color:
        var(--text-primary);
}


/* =========================================================
   14. THEME TOGGLE
   ========================================================= */

.theme-toggle {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 40px;
    height: 40px;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-sm);

    background:
        var(--bg-card);

    color:
        var(--text-primary);

    transition:
        background var(--transition-normal),
        border-color var(--transition-normal),
        transform var(--transition-normal);
}

.theme-toggle:hover {
    border-color:
        var(--border-strong);

    background:
        var(--bg-card-hover);

    transform:
        translateY(-1px);
}

.theme-icon {
    position: absolute;

    font-size: 1rem;

    transition:
        opacity var(--transition-normal),
        transform var(--transition-normal);
}

.theme-icon-light {
    opacity: 0;

    transform:
        rotate(-30deg)
        scale(0.7);
}

.theme-icon-dark {
    opacity: 1;

    transform:
        rotate(0)
        scale(1);
}

body.light-mode .theme-icon-dark {
    opacity: 0;

    transform:
        rotate(30deg)
        scale(0.7);
}

body.light-mode .theme-icon-light {
    opacity: 1;

    transform:
        rotate(0)
        scale(1);
}


/* =========================================================
   15. MOBILE MENU BUTTON
   ========================================================= */

.mobile-menu-btn {
    display: none;

    flex-direction: column;
    justify-content: center;

    gap: 5px;

    width: 42px;
    height: 42px;

    padding: 9px;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-sm);

    background:
        var(--bg-card);

    color:
        var(--text-primary);
}

.mobile-menu-btn span {
    display: block;

    width: 100%;
    height: 2px;

    border-radius:
        var(--radius-pill);

    background:
        currentColor;

    transition:
        transform var(--transition-normal),
        opacity var(--transition-normal);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform:
        translateY(7px)
        rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform:
        translateY(-7px)
        rotate(-45deg);
}


/* =========================================================
   16. SHARED HERO FOUNDATION
   ========================================================= */

.hero-section {
    position: relative;

    min-height: 720px;

    display: flex;
    align-items: center;

    overflow: hidden;

    padding:
        100px 0 110px;

    background:
        var(--gradient-hero);
}

.hero-background-glow {
    position: absolute;

    top: -180px;
    left: -160px;

    width: 500px;
    height: 500px;

    border-radius: 50%;

    background:
        rgba(59, 130, 246, 0.12);

    filter:
        blur(80px);

    pointer-events: none;
}

.hero-grid-overlay {
    position: absolute;

    inset: 0;

    background-image:
        linear-gradient(
            rgba(148, 163, 184, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(148, 163, 184, 0.035) 1px,
            transparent 1px
        );

    background-size:
        60px 60px;

    mask-image:
        linear-gradient(
            to bottom,
            black,
            transparent 85%
        );

    pointer-events: none;
}

.hero-container {
    position: relative;

    z-index: 2;

    display: grid;

    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.05fr);

    align-items: center;

    gap: 65px;
}


/* =========================================================
   17. SHARED HERO CONTENT
   ========================================================= */

.hero-content {
    max-width: 660px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;

    gap: 9px;

    margin-bottom: 22px;

    padding: 7px 12px;

    border:
        1px solid rgba(34, 211, 238, 0.18);

    border-radius:
        var(--radius-pill);

    background:
        rgba(34, 211, 238, 0.06);

    color:
        var(--brand-cyan-light);

    font-size: 0.78rem;
    font-weight: 700;
}

.status-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background:
        var(--brand-green);

    box-shadow:
        0 0 12px rgba(34, 197, 94, 0.65);
}

.hero-title {
    margin-bottom: 24px;

    font-size:
        clamp(
            3rem,
            6vw,
            5.25rem
        );

    font-weight: 900;

    letter-spacing:
        -0.065em;

    line-height:
        0.98;
}

.gradient-text {
    display: inline-block;

    background:
        var(--gradient-text);

    -webkit-background-clip: text;
    background-clip: text;

    color: transparent;
}

.hero-description {
    max-width: 620px;

    margin-bottom: 27px;

    color:
        var(--text-secondary);

    font-size:
        clamp(
            1rem,
            2vw,
            1.14rem
        );

    line-height:
        1.75;
}

.hero-category-pills {
    display: flex;
    flex-wrap: wrap;

    gap: 9px;

    margin-bottom: 30px;
}

.category-pill {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    padding: 8px 13px;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-pill);

    background:
        rgba(255, 255, 255, 0.025);

    color:
        var(--text-secondary);

    font-size: 0.82rem;
    font-weight: 700;

    transition:
        color var(--transition-fast),
        border-color var(--transition-fast),
        background var(--transition-fast),
        transform var(--transition-fast);
}

.category-pill:hover {
    transform:
        translateY(-2px);

    border-color:
        var(--border-strong);

    background:
        rgba(59, 130, 246, 0.07);

    color:
        var(--text-primary);
}

.category-pill span {
    color:
        var(--brand-cyan);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 12px;

    margin-bottom: 42px;
}

.hero-stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 20px;

    padding-top: 28px;

    border-top:
        1px solid var(--border-color);
}

.hero-stat {
    display: flex;
    flex-direction: column;

    gap: 3px;
}

.hero-stat strong {
    color:
        var(--text-primary);

    font-size: 1.15rem;
    font-weight: 800;
}

.hero-stat span {
    color:
        var(--text-muted);

    font-size: 0.72rem;
    font-weight: 650;
}


/* =========================================================
   18. SHARED HERO VISUAL FOUNDATION
   ========================================================= */

.hero-visual {
    position: relative;

    min-height: 540px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-glow {
    position: absolute;

    width: 390px;
    height: 390px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(59, 130, 246, 0.18),
            rgba(139, 92, 246, 0.08) 42%,
            transparent 72%
        );

    filter:
        blur(25px);

    pointer-events: none;
}


/* =========================================================
   19. SHARED PREVIEW CARD FOUNDATION
   ========================================================= */

.template-preview-card {
    position: absolute;

    overflow: hidden;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-lg);

    background:
        rgba(17, 26, 45, 0.92);

    box-shadow:
        var(--shadow-lg);

    backdrop-filter:
        blur(14px);

    -webkit-backdrop-filter:
        blur(14px);

    transition:
        transform var(--transition-slow),
        box-shadow var(--transition-slow);
}

.template-preview-card:hover {
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.42);
}

.preview-window-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 34px;

    padding:
        0 11px;

    border-bottom:
        1px solid rgba(148, 163, 184, 0.1);

    background:
        rgba(255, 255, 255, 0.035);
}

.preview-window-dots {
    display: flex;

    gap: 4px;
}

.preview-window-dots span {
    width: 6px;
    height: 6px;

    border-radius: 50%;

    background:
        rgba(255, 255, 255, 0.22);
}

.preview-window-title {
    color:
        rgba(255, 255, 255, 0.42);

    font-size: 0.56rem;
    font-weight: 700;
}


/* =========================================================
   20. SHARED CARD FOUNDATION
   ========================================================= */

.ui-card {
    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-lg);

    background:
        var(--bg-card);

    box-shadow:
        var(--shadow-xs);

    transition:
        transform var(--transition-normal),
        border-color var(--transition-normal),
        box-shadow var(--transition-normal),
        background var(--transition-normal);
}

.ui-card:hover {
    transform:
        translateY(-4px);

    border-color:
        var(--border-strong);

    background:
        var(--bg-card-hover);

    box-shadow:
        var(--shadow-md);
}


/* =========================================================
   21. SHARED BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 26px;

    padding:
        4px 9px;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-pill);

    background:
        rgba(255, 255, 255, 0.025);

    color:
        var(--text-secondary);

    font-size: 0.68rem;
    font-weight: 800;

    letter-spacing: 0.04em;

    white-space: nowrap;
}

.badge-blue {
    border-color:
        rgba(59, 130, 246, 0.2);

    background:
        rgba(59, 130, 246, 0.08);

    color:
        var(--brand-blue-light);
}

.badge-cyan {
    border-color:
        rgba(34, 211, 238, 0.2);

    background:
        rgba(34, 211, 238, 0.08);

    color:
        var(--brand-cyan-light);
}

.badge-purple {
    border-color:
        rgba(139, 92, 246, 0.2);

    background:
        rgba(139, 92, 246, 0.08);

    color:
        var(--brand-purple-light);
}

.badge-green {
    border-color:
        rgba(34, 197, 94, 0.2);

    background:
        rgba(34, 197, 94, 0.08);

    color:
        var(--brand-green-light);
}


/* =========================================================
   22. SHARED FORM ELEMENTS
   ========================================================= */

.form-group {
    display: flex;
    flex-direction: column;

    gap: 8px;
}

.form-label {
    color:
        var(--text-primary);

    font-size: 0.84rem;
    font-weight: 700;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;

    border:
        1px solid var(--border-color);

    border-radius:
        var(--radius-sm);

    background:
        var(--bg-card);

    color:
        var(--text-primary);

    outline: none;

    transition:
        border-color var(--transition-fast),
        box-shadow var(--transition-fast),
        background var(--transition-fast);
}

.form-input,
.form-select {
    min-height: 46px;

    padding:
        10px 13px;
}

.form-textarea {
    min-height: 120px;

    padding:
        12px 13px;

    resize: vertical;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color:
        var(--text-muted);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color:
        var(--brand-blue);

    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.1);
}


/* =========================================================
   23. SHARED CTA FOUNDATION
   ========================================================= */

.cta-section {
    position: relative;

    overflow: hidden;

    padding:
        105px 0;

    background:
        linear-gradient(
            135deg,
            #081021,
            #0d1224
        );

    border-top:
        1px solid var(--border-color);

    border-bottom:
        1px solid var(--border-color);
}

body.light-mode .cta-section {
    background:
        linear-gradient(
            135deg,
            #eef5ff,
            #f5f0ff
        );
}

.cta-background-glow {
    position: absolute;

    top: 50%;
    left: 50%;

    width: 500px;
    height: 300px;

    transform:
        translate(-50%, -50%);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(59, 130, 246, 0.17),
            rgba(139, 92, 246, 0.08),
            transparent 70%
        );

    filter:
        blur(25px);

    pointer-events: none;
}

.cta-content {
    position: relative;

    z-index: 1;

    max-width: 760px;

    margin-inline: auto;

    text-align: center;
}

.cta-content .section-label {
    justify-content: center;
}

.cta-content h2 {
    margin-bottom: 16px;

    font-size:
        clamp(
            2rem,
            4vw,
            3.4rem
        );

    font-weight: 850;

    letter-spacing:
        -0.045em;
}

.cta-content p {
    max-width: 620px;

    margin:
        0 auto 30px;

    font-size: 1rem;

    line-height: 1.75;
}

.cta-actions {
    display: flex;

    justify-content: center;

    flex-wrap: wrap;

    gap: 11px;
}


/* =========================================================
   24. FAQ SHARED FOUNDATION
   ========================================================= */

.faq-section {
    background:
        var(--bg-primary);
}

.faq-list {
    max-width: 850px;

    margin-inline: auto;

    border-top:
        1px solid var(--border-color);
}

.faq-item {
    border-bottom:
        1px solid var(--border-color);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    width: 100%;

    padding:
        22px 2px;

    background:
        transparent;

    color:
        var(--text-primary);

    text-align: left;

    font-size: 0.96rem;
    font-weight: 720;
}

.faq-question:hover {
    color:
        var(--brand-cyan);
}

.faq-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 27px;
    height: 27px;

    flex-shrink: 0;

    border:
        1px solid var(--border-color);

    border-radius: 50%;

    color:
        var(--text-secondary);

    font-size: 1rem;

    transition:
        transform var(--transition-normal),
        background var(--transition-normal),
        color var(--transition-normal);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform:
        rotate(45deg);

    background:
        rgba(59, 130, 246, 0.1);

    color:
        var(--brand-cyan);
}

.faq-answer {
    display: grid;

    grid-template-rows:
        0fr;

    overflow: hidden;

    transition:
        grid-template-rows var(--transition-normal);
}

.faq-answer p {
    min-height: 0;

    overflow: hidden;

    padding-right: 55px;

    font-size: 0.86rem;

    line-height: 1.75;
}

.faq-item.open .faq-answer {
    grid-template-rows:
        1fr;
}

.faq-item.open .faq-answer p {
    padding-bottom: 22px;
}


/* =========================================================
   25. FOOTER
   ========================================================= */

.site-footer {
    background:
        var(--bg-footer);

    border-top:
        1px solid var(--border-color);
}

.footer-main {
    display: grid;

    grid-template-columns:
        1.5fr
        repeat(3, 1fr);

    gap: 50px;

    padding:
        70px 0 55px;
}

.footer-brand {
    max-width: 330px;
}

.footer-brand .brand-logo {
    margin-bottom: 16px;
}

.footer-brand > p:first-of-type {
    margin-bottom: 8px;

    color:
        var(--brand-cyan);

    font-size: 0.83rem;
    font-weight: 750;
}

.footer-description {
    color:
        var(--text-muted);

    font-size: 0.8rem;

    line-height: 1.7;
}

.footer-column h3 {
    margin-bottom: 17px;

    color:
        var(--text-primary);

    font-size: 0.84rem;
    font-weight: 800;
}

.footer-column ul {
    display: flex;

    flex-direction: column;

    gap: 9px;
}

.footer-column li,
.footer-column a,
.footer-column span {
    color:
        var(--text-muted);

    font-size: 0.78rem;
}

.footer-column a {
    transition:
        color var(--transition-fast);
}

.footer-column a:hover {
    color:
        var(--text-primary);
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding:
        22px 0;

    border-top:
        1px solid var(--border-color);
}

.footer-bottom p {
    color:
        var(--text-muted);

    font-size: 0.7rem;
}

.footer-bottom p:first-child {
    display: flex;

    flex-wrap: wrap;

    gap: 7px;
}


/* =========================================================
   26. BACK TO TOP
   ========================================================= */

.back-to-top {
    position: fixed;

    right: 24px;
    bottom: 24px;

    z-index: 900;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;

    border:
        1px solid var(--border-strong);

    border-radius:
        var(--radius-sm);

    background:
        var(--bg-card);

    color:
        var(--brand-cyan);

    box-shadow:
        var(--shadow-md);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(12px);

    transition:
        opacity var(--transition-normal),
        visibility var(--transition-normal),
        transform var(--transition-normal),
        background var(--transition-normal);
}

.back-to-top.visible {
    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}

.back-to-top:hover {
    background:
        var(--bg-card-hover);

    transform:
        translateY(-3px);
}


/* =========================================================
   27. SHARED UTILITY STATES
   ========================================================= */

.is-hidden {
    display: none !important;
}

.is-visible {
    display: block !important;
}

.text-center {
    text-align: center;
}

.no-transition {
    transition: none !important;
}

.no-pointer {
    pointer-events: none !important;
}

.full-width {
    width: 100%;
}


/* =========================================================
   28. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* =========================================================
   END OF MAIN.CSS
   ========================================================= */