/* =============================================
   NEO BASE CSS — Reset + Base Typography
   Layer 2 of 4: bootstrap-grid → neo-base → neo-custom → neo-settings
   This file is STATIC and never modified by AI.
   ============================================= */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

[dir="rtl"] body {
    line-height: 1.7;
}

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

input, button, textarea, select {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

ul, ol {
    list-style: none;
}

/* --- Base Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--neo-font-heading, inherit);
    font-weight: 700;
    line-height: 1.2;
    /* Inherit color from parent so dark sections (color:#fff) get white headings automatically.
       Body sets the default color from --neo-text. */
    color: inherit;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1.1rem, 2vw, 1.25rem); }
h6 { font-size: clamp(1rem, 1.5vw, 1.1rem); }

p {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    /* Inherit so dark sections get light paragraph text automatically. */
    color: inherit;
    max-width: 70ch;
}

/* Dark sectors: AI puts color:#fff on .s-{type} root or section.
   Children inherit. Helper classes for explicit overrides: */
.neo-on-dark, .neo-on-dark h1, .neo-on-dark h2, .neo-on-dark h3,
.neo-on-dark h4, .neo-on-dark h5, .neo-on-dark h6, .neo-on-dark p {
    color: #ffffff;
}
.neo-on-dark p { color: rgba(255,255,255,0.85); }

/* --- Bootstrap Missing Utilities --- */
.img-fluid {
    max-width: 100%;
    height: auto;
}

.text-center { text-align: center; }
[dir="rtl"] .text-start { text-align: right; }
[dir="ltr"] .text-start { text-align: left; }

/* --- Utility Classes --- */
.neo-section {
    padding: clamp(3rem, 6vw, 6rem) 0;
}

.neo-section--compact {
    padding: clamp(2rem, 4vw, 4rem) 0;
}

.neo-text-center { text-align: center; }

[dir="rtl"] .neo-text-start { text-align: right; }
[dir="ltr"] .neo-text-start { text-align: left; }

/* --- Button Base --- */
.neo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--neo-radius, 8px);
    font-weight: 600;
    font-size: 1rem;
    line-height: 1;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.neo-btn--primary {
    background: var(--neo-primary);
    color: #fff;
}

.neo-btn--primary:hover {
    filter: brightness(0.9);
}

.neo-btn--outline {
    background: transparent;
    color: var(--neo-primary);
    border-color: var(--neo-primary);
}

.neo-btn--outline:hover {
    background: var(--neo-primary);
    color: #fff;
}

/* --- Visibility for GSAP autoAlpha --- */
/* Elements animated by GSAP should be visible by default.
   GSAP's autoAlpha handles visibility+opacity together.
   NEVER add opacity:0 to animated elements in CSS. */

/* Safety net: if GSAP never runs (error, slow net), reveal content after 2.5s */
@keyframes neoSafetyReveal { to { visibility: visible; opacity: 1; } }
.neo-sector [style*="visibility: hidden"],
.neo-sector [style*="visibility:hidden"] {
    animation: neoSafetyReveal 0s linear 3s forwards;
}

/* --- Responsive Images in Sectors --- */
.neo-main img {
    border-radius: var(--neo-radius, 8px);
}

/* --- Focus Accessibility --- */
:focus-visible {
    outline: 2px solid var(--neo-primary, #4F46E5);
    outline-offset: 2px;
}

/* --- Smooth Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--neo-surface, #F9FAFB);
}

::-webkit-scrollbar-thumb {
    background: var(--neo-text-secondary, #6B7280);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neo-text, #1F2937);
}
