/* ==========================================================================
   AURAX — Design System & Global Alignment System
   Mobile-First Architectural & Developer System (Zero Wasted Space)
   ========================================================================== */

/* Modern CSS Reset & Native App Touch Foundation */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    background-color: #080808;
    color: #F8F7F5;
    font-size: 16px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    touch-action: manipulation;
}

body {
    min-height: 100vh;
    font-family: var(--font-body, 'Inter', -apple-system, BlinkMacSystemFont, sans-serif);
    font-weight: 400;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--color-black);
    color: var(--color-white);
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

ul, ol {
    list-style: none;
}

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

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

button {
    background: transparent;
    border: none;
    cursor: pointer;
    touch-action: manipulation;
}

a {
    text-decoration: none;
    color: inherit;
    touch-action: manipulation;
    transition: var(--transition-fast);
}

/* ==========================================================================
   Design Tokens
   ========================================================================== */

:root {
    /* Architectural Palette */
    --color-black: #080808;
    --color-dark: #0E0E0E;
    --color-charcoal: #141414;
    --color-graphite: #1C1C1C;
    --color-slate: #282828;
    --color-border-subtle: rgba(255, 255, 255, 0.08);
    --color-border-light: rgba(0, 0, 0, 0.08);
    --color-ash: #707070;
    --color-stone: #A0A0A0;
    --color-cement: #D5D2CB;
    --color-sand: #E8E5DF;
    --color-ivory: #F6F4EF;
    --color-paper: #EDE9E3;
    --color-white: #F8F7F5;
    --color-pure-white: #FFFFFF;
    
    /* Architectural Green Accent */
    --color-green: #2D5A3D;
    --color-green-deep: #1A3A26;
    --color-green-light: #4A7A57;
    --color-green-accent: #5E824C;
    --color-green-glow: rgba(94, 130, 76, 0.25);
    
    --color-bronze: #8B7355;
    --color-bronze-light: #A89070;
    
    --color-success: #2D7A4F;
    --color-error: #B73232;
    --color-warning: #B8860B;

    /* Tight, Compact Spacing Scale (Zero Wasted Space) */
    --space-3xs: 2px;
    --space-2xs: 4px;
    --space-xs: 6px;
    --space-sm: 10px;
    --space-md: 14px;
    --space-lg: 18px;
    --space-xl: 24px;
    --space-2xl: clamp(1.5rem, 2.5vw, 2.25rem);
    --space-3xl: clamp(2rem, 3.5vw, 3rem);
    --space-4xl: clamp(2.5rem, 4.5vw, 3.75rem);

    /* Typography */
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

    /* Mobile-First Fluid Typographic Scale */
    --text-hero: clamp(2.35rem, 1.4rem + 4.8vw, 5.25rem);         /* 38px -> 84px */
    --text-display: clamp(1.95rem, 1.4rem + 3.2vw, 3.85rem);      /* 31px -> 62px */
    --text-h1: clamp(1.75rem, 1.3rem + 2.2vw, 3rem);              /* 28px -> 48px */
    --text-h2: clamp(1.5rem, 1.15rem + 1.5vw, 2.35rem);           /* 24px -> 38px */
    --text-h3: clamp(1.25rem, 1.05rem + 0.9vw, 1.85rem);          /* 20px -> 30px */
    --text-h4: clamp(1.1rem, 0.98rem + 0.5vw, 1.35rem);           /* 17.5px -> 21.5px */
    --text-h5: clamp(0.98rem, 0.92rem + 0.25vw, 1.15rem);         /* 15.5px -> 18.5px */
    --text-body-lg: clamp(1.05rem, 0.98rem + 0.25vw, 1.2rem);     /* 16.8px -> 19.2px */
    --text-body: clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);        /* 15.2px -> 16.8px */
    --text-sm: clamp(0.85rem, 0.82rem + 0.1vw, 0.925rem);          /* 13.6px -> 14.8px */
    --text-xs: clamp(0.775rem, 0.75rem + 0.08vw, 0.825rem);       /* 12.4px -> 13.2px */
    --text-meta: clamp(0.725rem, 0.7rem + 0.06vw, 0.775rem);      /* 11.6px -> 12.4px */
    --text-base: var(--text-body);
    --text-lg: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
    --text-xl: clamp(1.35rem, 1.2rem + 0.6vw, 1.65rem);
    
    /* Line Heights */
    --leading-normal: 1.5;
    --leading-relaxed: 1.65;

    /* General Spacing */
    --container-padding: clamp(20px, 4vw, 40px);

    /* Letter Spacing */
    --tracking-tighter: -0.035em;
    --tracking-tight: -0.02em;
    --tracking-normal: 0em;
    --tracking-wide: 0.06em;
    --tracking-wider: 0.12em;
    --tracking-widest: 0.2em;

    /* Motion */
    --transition-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-base: 280ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 500ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Alignment & Grid System */
    --container-max: 1320px;
    --container-padding-mobile: 20px;
    --container-padding-tablet: 32px;
    --container-padding-desktop: 40px;
    
    /* Section Spacing (Zero Wasted Space, 32-44px Mobile, 56-76px Desktop) */
    --section-padding-mobile: clamp(32px, 5vw, 44px);
    --section-padding-desktop: clamp(56px, 6vw, 76px);
    --header-height: 72px;
    --header-height-mobile: 58px;
    --mobile-cta-height: 52px;
}

/* ==========================================================================
   Global Container System
   ========================================================================== */

.container {
    width: min(var(--container-max), calc(100% - (var(--container-padding-mobile) * 2)));
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .container {
        width: min(var(--container-max), calc(100% - (var(--container-padding-tablet) * 2)));
    }
}

@media (min-width: 1024px) {
    .container {
        width: min(var(--container-max), calc(100% - (var(--container-padding-desktop) * 2)));
    }
}

.container-narrow {
    max-width: 900px;
}

/* ==========================================================================
   Vertical Rhythm System (Zero Wasted Space)
   ========================================================================== */

.section {
    padding-top: var(--section-padding-mobile);
    padding-bottom: var(--section-padding-mobile);
    position: relative;
    width: 100%;
    overflow: hidden;
}

@media (min-width: 768px) {
    .section {
        padding-top: var(--section-padding-desktop);
        padding-bottom: var(--section-padding-desktop);
    }
}

.section-sm {
    padding-top: clamp(28px, 4vw, 40px);
    padding-bottom: clamp(28px, 4vw, 40px);
}

/* Section Labels & Headings */
.section-label {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-body);
    font-size: var(--text-meta);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    color: var(--color-green-accent);
    margin-bottom: var(--space-xs);
}

.tech-crosshair {
    color: var(--color-green-accent);
    font-weight: 700;
    font-size: 1.1em;
    line-height: 1;
}

.section-heading {
    font-family: var(--font-heading);
    font-size: var(--text-h2);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: var(--tracking-tight);
    color: var(--color-pure-white);
    margin-top: 0;
    margin-bottom: var(--space-sm);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.section-lead {
    font-size: var(--text-body-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-sand);
    max-width: 65ch;
    margin-top: 0;
    margin-bottom: var(--space-lg);
}

/* Typography Hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: var(--tracking-tight);
    color: var(--color-white);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-display {
    font-size: var(--text-hero);
    font-weight: 700;
    line-height: 0.96;
    letter-spacing: var(--tracking-tighter);
    text-transform: uppercase;
}

.h1 {
    font-size: var(--text-h1);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: var(--tracking-tight);
}

.h2 {
    font-size: var(--text-h2);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: var(--tracking-tight);
}

.h3 {
    font-size: var(--text-h3);
    font-weight: 600;
    line-height: 1.25;
}

.h4 {
    font-size: var(--text-h4);
    font-weight: 600;
    line-height: 1.3;
}

p {
    font-size: var(--text-body);
    line-height: 1.55;
    color: var(--color-sand);
    max-width: 65ch;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

p.lead {
    font-size: var(--text-body-lg);
    line-height: 1.45;
    color: var(--color-white);
    font-weight: 400;
}

/* Eyebrows & Metadata */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: var(--font-body);
    font-size: var(--text-meta);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-widest);
    color: var(--color-green-accent);
    margin-bottom: 4px;
}

.eyebrow::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 1px;
    background-color: currentColor;
}

.mono-meta {
    font-family: var(--font-mono);
    font-size: var(--text-meta);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
    color: var(--color-ash);
}

/* Safe Selection */
::selection {
    background-color: var(--color-green-accent);
    color: var(--color-pure-white);
}

/* Accessibility Focus States */
:focus-visible {
    outline: 2px solid var(--color-green-accent);
    outline-offset: 3px;
}

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

/* Performance Optimization: Content-Visibility for Below-the-Fold Sections */
#services-section,
#portfolio-section,
#process-section,
#team-section,
#contact-section {
    content-visibility: auto;
    contain-intrinsic-size: 1px 600px;
}

