/**
 * ============================================
 * UNGGUL AXIOM GROUP - GLOBAL DESIGN SYSTEM
 * ============================================
 * Phase 2: Sovereign-level institutional styling
 * Phase 15: Performance hardening & GPU acceleration
 * Phase 16: Mobile deep-dive & tactile dossier
 * Benchmarked against: kkr.com, berjaya.com
 * ============================================
 */

/* ============================================ */
/* CSS RESET & NORMALIZATION */
/* ============================================ */

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

html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    scroll-behavior: smooth;
}

body {
    min-height: 100dvh;
    line-height: 1.65;
    overflow-x: hidden;
}

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

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

/* ============================================ */
/* FLUID TYPOGRAPHY - MOBILE TO DESKTOP */
/* ============================================ */

h1, .text-hero {
    font-size: clamp(2.5rem, 8vw, 5rem);
}

h2, .text-section-heading {
    font-size: clamp(2rem, 6vw, 3.5rem);
}

h3, .text-pillar-heading {
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.text-stat-massive {
    font-size: clamp(3rem, 10vw, 7rem);
}

/* ============================================ */
/* HARDWARE ACCELERATION - GPU LAYERING */
/* ============================================ */

.split-hero-title,
.hero-subheadline,
.hero-description,
.hero-cta,
.reveal-mask,
.pillar-item,
.entity-item,
.axiom-card,
[data-gsap-fade-up],
[data-gsap-clip-reveal] {
    will-change: transform, opacity, clip-path;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

#hero-network,
#framework-circuit {
    will-change: transform;
    transform: translateZ(0);
}

/* ============================================ */
/* MOBILE TOUCH OPTIMIZATION */
/* ============================================ */

@media (max-width: 768px) {
    body {
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: none;
    }

    .container-sovereign {
        overflow-x: hidden;
    }

    /* Touch-friendly tap targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
    }
}

/* Haptic feedback flash on touch */
.touch-feedback {
    position: relative;
}

.touch-feedback::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(201, 169, 97, 0.15);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.1s ease-out;
}

.touch-feedback:active::after {
    opacity: 1;
}

/* ============================================ */
/* LENIS SMOOTH SCROLL FOUNDATION */
/* ============================================ */

html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* ============================================ */
/* REDUCED MOTION - ACCESSIBILITY COMPLIANCE */
/* ============================================ */

@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;
    }

    html.lenis {
        scroll-behavior: auto;
    }

    .lenis.lenis-smooth {
        scroll-behavior: auto;
    }

    #hero-network,
    #framework-circuit {
        display: none;
    }
}

/* ============================================ */
/* INSTITUTIONAL TYPOGRAPHY SYSTEM */
/* ============================================ */

.text-sovereign-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
    color: #FAFBFC;
}

.text-sovereign-subheading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 500;
    letter-spacing: 0.03em;
    line-height: 1.35;
    color: #F5F7F9;
}

.text-editorial-body {
    font-family: 'Inter', system-ui, sans-serif;
    font-weight: 400;
    letter-spacing: 0.01em;
    line-height: 1.75;
    color: #E8ECEF;
}

.text-meta-label {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    line-height: 1.2;
    text-transform: uppercase;
    color: #C9A961;
}

.text-institutional-caption {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    line-height: 1.4;
    color: #9B9DA3;
}

/* ============================================ */
/* PREMIUM INTERACTIVE ELEMENTS */
/* ============================================ */

.sovereign-link {
    position: relative;
    color: #C9A961;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sovereign-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #C9A961;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.sovereign-link:hover {
    color: #D4B876;
}

.sovereign-link:hover::after {
    width: 100%;
}

/* ============================================ */
/* EDITORIAL DIVIDERS & ACCENTS */
/* ============================================ */

.sovereign-divider {
    width: 64px;
    height: 1px;
    background: linear-gradient(90deg, #C9A961 0%, transparent 100%);
    margin: 2rem 0;
}

.sovereign-border-accent {
    border-color: rgba(201, 169, 97, 0.2);
}

/* ============================================ */
/* SELECTION STYLING */
/* ============================================ */

::selection {
    background-color: rgba(201, 169, 97, 0.3);
    color: #FAFBFC;
}

::-moz-selection {
    background-color: rgba(201, 169, 97, 0.3);
    color: #FAFBFC;
}

/* ============================================ */
/* FOCUS STATES - ACCESSIBILITY */
/* ============================================ */

:focus-visible {
    outline: 2px solid #C9A961;
    outline-offset: 4px;
}

/* ============================================ */
/* UTILITY CLASSES */
/* ============================================ */

.container-sovereign {
    max-width: 1440px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 2rem;
    padding-right: 2rem;
}

@media (min-width: 768px) {
    .container-sovereign {
        padding-left: 4rem;
        padding-right: 4rem;
    }
}

@media (min-width: 1280px) {
    .container-sovereign {
        padding-left: 6rem;
        padding-right: 6rem;
    }
}

/* ============================================ */
/* MOBILE VIEWPORT HEIGHT FIX */
/* ============================================ */

.min-h-screen {
    min-height: 100dvh;
}
