﻿/* =========================================
   site.css (Project-wide base styles)
   - Global reset
   - Typography & colors
   - Container sizing
   - Accessibility helpers
   - Global dropdown system (.selectx)
   ========================================= */

/* Fonts */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap");
/* Optional: keep (fallback) */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap");

:root {
    color-scheme: dark;
    --site-bg: #0b0b0f;
    --site-bg-2: #0a0a0d;
    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.70);
    --red: #ff2a2a;
    --red2: #ff4b4b;
    --border: rgba(255, 255, 255, 0.12);
    --container: 1180px;
    --gutter: clamp(14px, 3.5vw, 24px);
    --ease: cubic-bezier(.2, .8, .2, 1);
    --ease-fast: cubic-bezier(.2, .9, .2, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Roboto, Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    /* No gradients */
    background: var(--site-bg);
    color: var(--text);
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

/* Ensure form controls also use Roboto */
button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

.container {
    width: min(var(--container), 100%);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* Page inner defaults */
.page__inner {
    padding-block: clamp(22px, 3vw, 34px);
}

/* Strong focus for keyboard users */
:focus-visible {
    outline: none;
}

/* Text selection */
::selection {
    background: rgba(255, 42, 42, 0.28);
    color: rgba(255, 255, 255, 0.95);
}

/* Utility: screen reader only */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Optional helper */
.hr {
    height: 1px;
    background: rgba(255,255,255,0.10);
    border: 0;
    margin: 22px 0;
}

/* =========================================
   Global Dropdown System (Theme: Red/White/Black)
   Usage:
     <div class="selectx">
        <select class="selectx__native">...</select>
     </div>

   Notes:
   - Closed-state is fully styled (your screenshot look)
   - Opened option list is browser-native (limited styling cross-browser)
   ========================================= */

.selectx {
    position: relative;
    display: block;
    width: 100%;
    isolation: isolate;
}

    .selectx::before {
        content: "";
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 18px;
        height: 18px;
        border-radius: 999px;
        /* No gradients */
        background: rgba(255, 42, 42, 0.35);
        border: 1px solid rgba(255,255,255,0.14);
        box-shadow: 0 10px 22px rgba(0,0,0,0.28);
        pointer-events: none;
        z-index: 2;
    }

    .selectx::after {
        content: "";
        position: absolute;
        right: 18px;
        top: 50%;
        width: 10px;
        height: 10px;
        border-right: 2px solid rgba(255,255,255,0.75);
        border-bottom: 2px solid rgba(255,255,255,0.75);
        transform: translateY(-55%) rotate(45deg);
        pointer-events: none;
        z-index: 2;
        opacity: 0.95;
    }

.selectx__native {
    width: 100%;
    height: 46px;
    border-radius: 16px;
    padding-left: 48px;
    padding-right: 44px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.92);
    font-weight: 800;
    letter-spacing: 0.2px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    transition: border-color 160ms var(--ease-fast), box-shadow 160ms var(--ease-fast), background 160ms var(--ease-fast);
}

.selectx:hover .selectx__native {
    border-color: rgba(255,255,255,0.16);
    background: rgba(0,0,0,0.20);
}

.selectx:focus-within .selectx__native {
    border-color: rgba(255,255,255,0.18);
    background: rgba(0,0,0,0.22);
    box-shadow: 0 0 0 4px rgba(255,42,42,0.16);
}

/* Best-effort styling for option list (not guaranteed on every browser) */
.selectx__native option {
    background: #0b0b0f;
    color: rgba(255,255,255,0.92);
}

/* Disabled */
.selectx__native:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .selectx__native {
        transition: none !important;
    }
}
