/* =============================================================
   Mental 3 — main.css
   Reset, design tokens, base typography, utilities, container,
   section base, tables, service pages.
   ============================================================= */

/* -------------------------------------------------------------
   1. DESIGN TOKENS (CSS Custom Properties)
   ------------------------------------------------------------- */
:root {
    /* Color palette */
    --color-bg: #0A0A0A;
    --color-surface: #141414;
    --color-surface-light: #1F1F1F;
    --color-surface-elevated: #2A2A2A;
    --color-text: #E8E8E8;
    --color-text-muted: #9E9E9E;
    --color-text-bright: #FFFFFF;
    --color-primary: #1B5E20;
    --color-primary-light: #2E7D32;
    --color-accent: #B71C1C;
    --color-accent-light: #E53935;
    --color-fire: #FF6F00;
    --color-fire-bright: #FFB300;
    --color-gold: #FFD700;
    --color-border: rgba(255, 255, 255, 0.08);
    --color-border-strong: rgba(255, 255, 255, 0.15);
    --color-shadow: rgba(0, 0, 0, 0.5);
    --color-glow-fire: rgba(255, 111, 0, 0.3);
    --color-glow-red: rgba(183, 28, 28, 0.3);

    /* Gradients */
    --gradient-fire: linear-gradient(135deg, #FF6F00 0%, #FFB300 100%);
    --gradient-fire-hover: linear-gradient(135deg, #FFB300 0%, #FF6F00 100%);
    --gradient-blood: linear-gradient(135deg, #B71C1C 0%, #7B0000 100%);
    --gradient-surface: linear-gradient(180deg, #1F1F1F 0%, #141414 100%);
    --gradient-hero: radial-gradient(ellipse at top, rgba(183, 28, 28, 0.25) 0%, rgba(10, 10, 10, 0.95) 60%, var(--color-bg) 100%);

    /* Layout dimensions */
    --header-height: 64px;
    --sticky-nav-height: 56px;
    --container-max: 1200px;
    --container-padding: 1.5rem;

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 999px;

    /* Typography */
    --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Montserrat', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.35s ease;

    /* Z-index scale */
    --z-header: 100;
    --z-sticky-nav: 99;
    --z-dropdown: 1000;
    --z-lightbox: 2000;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);
    --shadow-glow-fire: 0 0 24px var(--color-glow-fire);
    --shadow-glow-red: 0 0 24px var(--color-glow-red);
}

/* -------------------------------------------------------------
   2. RESET & NORMALIZE
   ------------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

* {
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-height) + var(--sticky-nav-height) + 1rem);
}

body {
    min-height: 100vh;
    background-color: var(--color-bg);
    background-image:
        radial-gradient(ellipse 800px 400px at 20% 0%, rgba(183, 28, 28, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 600px 400px at 80% 60%, rgba(27, 94, 32, 0.06) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    overflow-x: hidden;
}

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

input,
button,
textarea,
select {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    outline: none;
}

button {
    cursor: pointer;
    -webkit-appearance: none;
}

a {
    color: var(--color-fire-bright);
    text-decoration: none;
    transition: color var(--transition-base);
}

a:hover {
    color: var(--color-fire);
}

ul,
ol {
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--color-fire-bright);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

::selection {
    background-color: var(--color-accent);
    color: var(--color-text-bright);
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface-elevated);
    border-radius: var(--radius-full);
    border: 2px solid var(--color-bg);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

/* -------------------------------------------------------------
   3. TYPOGRAPHY BASE
   ------------------------------------------------------------- */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-bright);
    letter-spacing: -0.01em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
}

h3 {
    font-size: clamp(1.25rem, 2.2vw, 1.5rem);
    font-weight: 600;
}

h4 {
    font-size: 1.125rem;
    font-weight: 600;
}

p {
    color: var(--color-text);
    line-height: 1.7;
}

p + p {
    margin-top: 1rem;
}

strong,
b {
    color: var(--color-text-bright);
    font-weight: 600;
}

em,
i {
    font-style: italic;
    color: var(--color-fire-bright);
}

small {
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

code,
kbd,
samp,
pre {
    font-family: var(--font-mono);
    font-size: 0.95em;
}

code {
    padding: 0.15em 0.4em;
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-fire-bright);
}

/* -------------------------------------------------------------
   4. CONTAINER
   ------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* -------------------------------------------------------------
   5. SECTION BASE
   ------------------------------------------------------------- */
main {
    display: block;
    padding-top: var(--header-height);
}

section {
    padding: 4.5rem 0;
    position: relative;
}

section + section {
    border-top: 1px solid var(--color-border);
}

/* -------------------------------------------------------------
   6. TABLES (shared base)
   ------------------------------------------------------------- */
table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    font-size: 0.95rem;
}

thead {
    background: linear-gradient(180deg, var(--color-surface-light) 0%, var(--color-surface) 100%);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-bright);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 2px solid var(--color-border-strong);
}

td {
    padding: 0.85rem 1rem;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-border);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background-color var(--transition-base);
}

tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

tbody tr:nth-child(odd) {
    background-color: rgba(255, 255, 255, 0.015);
}

/* -------------------------------------------------------------
   7. UTILITIES
   ------------------------------------------------------------- */
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-bright { color: var(--color-text-bright); }
.text-accent { color: var(--color-fire-bright); }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* Badges / small utility labels */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--radius-sm);
    background-color: var(--color-surface-elevated);
    color: var(--color-text-bright);
    line-height: 1.2;
}

.badge--new {
    background: var(--gradient-fire);
    color: #1a0f00;
}

.badge--hot {
    background: var(--gradient-blood);
    color: var(--color-text-bright);
    box-shadow: 0 0 12px var(--color-glow-red);
}

/* -------------------------------------------------------------
   8. ANIMATIONS
   ------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 111, 0, 0.5); }
    50%      { box-shadow: 0 0 24px 4px rgba(255, 111, 0, 0.35); }
}

@keyframes pulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(183, 28, 28, 0.5); }
    50%      { box-shadow: 0 0 24px 4px rgba(183, 28, 28, 0.35); }
}

@keyframes shimmer {
    0%   { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* -------------------------------------------------------------
   9. SERVICE PAGES (privacy, cookies, sitemap, responsible-gambling)
   ------------------------------------------------------------- */
.service-page {
    padding: calc(var(--header-height) + 2.5rem) 0 4rem;
    min-height: 100vh;
}

.service-page h1 {
    margin-bottom: 2rem;
    font-size: clamp(2rem, 4vw, 2.75rem);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-accent);
    display: inline-block;
}

.service-page__content {
    max-width: 72ch;
    margin-top: 2rem;
    color: var(--color-text);
}

.service-page__content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: var(--color-fire-bright);
}

.service-page__content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.service-page__content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.service-page__content ul,
.service-page__content ol {
    margin: 1rem 0 1.25rem 1.5rem;
}

.service-page__content ul {
    list-style: disc;
}

.service-page__content ol {
    list-style: decimal;
}

.service-page__content li {
    margin-bottom: 0.5rem;
    line-height: 1.65;
}

.service-page__content a {
    color: var(--color-fire-bright);
    text-decoration: underline;
    text-decoration-color: rgba(255, 179, 0, 0.35);
    text-underline-offset: 3px;
}

.service-page__content a:hover {
    color: var(--color-fire);
    text-decoration-color: var(--color-fire);
}

.service-page__updated {
    margin-top: 2rem;
    padding: 1rem 1.25rem;
    background-color: var(--color-surface);
    border-left: 3px solid var(--color-fire);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

/* Sitemap list */
.sitemap__list {
    list-style: none !important;
    margin: 1rem 0 2rem !important;
    padding: 0 !important;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.5rem;
}

.sitemap__list li {
    margin: 0;
    padding: 0;
}

.sitemap__list a {
    display: block;
    padding: 0.75rem 1rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text);
    text-decoration: none;
    transition: all var(--transition-base);
}

.sitemap__list a:hover {
    background-color: var(--color-surface-light);
    border-color: var(--color-fire);
    color: var(--color-fire-bright);
    transform: translateX(4px);
}
