/* css/base.css */

/* ===== VARIABLES ===== */
:root {
    /* Colors - Unified Palette */
    --black: #0a0a0a;
    --dark-gray: #141418;
    --gray: #1e1e24;
    --mid-gray: #2a2a32;
    --light-gray: #888890;
    --white: #ffffff;
    --accent: #ffb800;
    --accent-warm: #ff9500;
    --accent-glow: rgba(255, 184, 0, 0.2);
    --accent-gradient: linear-gradient(135deg, #ffb800 0%, #ff8c00 100%);
    --glass-bg: rgba(20, 20, 24, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --card-bg: rgba(20, 20, 24, 0.9);
    --card-bg-hover: rgba(30, 30, 36, 0.95);

    /* Typography */
    --font-heading: 'Syne', sans-serif;
    --font-body: 'Rubik', sans-serif;

    /* Spacing */
    --space-xs: 0.5rem;  /* 8px */
    --space-sm: 0.9rem;   /* ~14px */
    --space-md: 2rem;    /* 32px */
    --space-lg: 4rem;    /* 64px */
    --space-xl: 8rem;    /* 128px */

    /* Transitions - Smoother curves */
    --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Z-indices */
    --z-index-background: -1;
    --z-index-default: 1;
    --z-index-overlay: 10;
    --z-index-scrolled-nav: 100;
    --z-index-mobile-nav: 101;
    --z-index-menu-toggle: 102;
    --z-index-loader: 9999;

    /* Assets & Shared Values */
    --footer-bg-motif: url('../images/logo_bg.webp');
    --client-logo-height: 50px;

    @media (min-width: 1400px) {
        --client-logo-height: 60px;
    }
}

/* ===== RESET & BASE STYLES ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px; /* Base font size */
    scroll-behavior: smooth;
    scroll-padding-top: 70px; /* Adjust scroll target position */
}

body {
    font-family: var(--font-body);
    background-color: var(--black);
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(255, 184, 0, 0.02) 0%, transparent 50%);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

body.menu-open {
    overflow-y: hidden; /* Prevent scrolling when mobile menu is open */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast), opacity var(--transition-fast), transform var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

/* Smooth scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Stagger children animation */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.3s; }

.stagger-children.revealed > * {
    opacity: 1;
    transform: translateY(0);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    pointer-events: none; /* Prevents interaction with image */
    user-select: none;
    -webkit-user-drag: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    color: inherit;
    padding: 0;
}

iframe {
    border: none;
}

/* ===== BASE LAYOUT & TYPOGRAPHY ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

section {
    padding: var(--space-lg) 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-sm);
    letter-spacing: -0.02em;
}

h2 {
    position: relative;
}

/* Responsive Base Typography */
h1 { 
    font-size: clamp(2.2rem, 7vw, 4.5rem); 
}
h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
p {
    margin-bottom: var(--space-sm);
    max-width: 70ch;
    font-size: clamp(0.95rem, 1.5vw, 1.05rem);
}

/* Accessibility Helper */
.visually-hidden {
    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;
}

/* ===== BASE MEDIA QUERIES ===== */
@media (min-width: 768px) {
    .container {
        padding: 0 var(--space-md);
    }
}

@media (max-width: 767px) {
     section {
         padding: var(--space-md) 0; /* Reduce section padding on mobile */
     }
    h1 { font-size: clamp(2rem, 7vw, 3.5rem); }
    h2 { font-size: clamp(1.6rem, 5vw, 2.2rem); }
    h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }
    p { font-size: 0.95rem; }
}