/* ==========================================================================
   Z MAX — Digital Studio Design System
   Brand: Z MAX
   Tagline: Websites That Make an Impact.
   Palette: Deep Black, Pure White, Off-White, Electric Lime
   Modes: Dark Mode (Default) & Light Mode
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Space+Grotesk:wght@400;500;600;700&family=Syne:wght@500;600;700;800&display=swap');

:root,
[data-theme="light"] {
  /* Color Tokens (Light Mode Default) */
  --bg-primary: #f7f7f5;
  --bg-secondary: #ffffff;
  --bg-tertiary: #ebebe7;
  --bg-elevated: #e2e2dc;
  --bg-card: #ffffff;
  --bg-header: rgba(247, 247, 245, 0.88);
  --bg-modal: rgba(15, 15, 18, 0.65);
  --bg-footer: #ededeb;
  --bg-contact-form: rgba(255, 255, 255, 0.92);
  --bg-direct-card: rgba(255, 255, 255, 0.88);

  --surface-light: #f0f0ec;
  --surface-light-subtle: #e6e6e0;
  --surface-light-card: #ffffff;

  --text-primary: #09090b;
  --text-secondary: #474752;
  --text-muted: #747482;
  --text-dark-primary: #09090b;
  --text-dark-secondary: #474752;
  --text-dark-muted: #747482;

  --lime: #84b800;
  --lime-bright: #93cc00;
  --lime-glow: rgba(132, 184, 0, 0.25);
  --lime-subtle: rgba(132, 184, 0, 0.14);
  --lime-dark: #f0f8db;
  --lime-contrast-text: #ffffff;
  --lime-headline-text: #6b9900;

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-light: rgba(0, 0, 0, 0.15);
  --border-focus: rgba(0, 0, 0, 0.6);
  --border-dark-subtle: rgba(0, 0, 0, 0.08);
  --border-dark-light: rgba(0, 0, 0, 0.16);

  --footer-watermark: #deded8;
  --footer-watermark-hover: #cecec6;
  --about-watermark: rgba(0, 0, 0, 0.04);
  --shadow-card: 0 15px 40px rgba(0, 0, 0, 0.06);
  --shadow-modal: 0 30px 80px rgba(0, 0, 0, 0.25);
  --grain-opacity: 0.02;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-mono: 'Space Grotesk', -apple-system, monospace;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout & Spacing */
  --max-width: 1440px;
  --container-padding: clamp(1.25rem, 5vw, 4rem);
  --section-padding: clamp(4rem, 8vw, 8rem);
  --radius-xs: 2px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-pill: 9999px;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-bounce: 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  --theme-transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-primary: #080808;
  --bg-secondary: #0f0f12;
  --bg-tertiary: #16161a;
  --bg-elevated: #1c1c22;
  --bg-card: #0f0f12;
  --bg-header: rgba(8, 8, 8, 0.85);
  --bg-modal: rgba(0, 0, 0, 0.85);
  --bg-footer: #040405;
  --bg-contact-form: rgba(15, 15, 18, 0.85);
  --bg-direct-card: rgba(15, 15, 18, 0.8);

  --surface-light: #f5f5f2;
  --surface-light-subtle: #ecece8;
  --surface-light-card: #ffffff;

  --text-primary: #ffffff;
  --text-secondary: #a1a1aa;
  --text-muted: #6b6b76;
  --text-dark-primary: #0a0a0c;
  --text-dark-secondary: #52525b;
  --text-dark-muted: #8e8e93;

  --lime: #ccff00;
  --lime-bright: #d4ff00;
  --lime-glow: rgba(204, 255, 0, 0.35);
  --lime-subtle: rgba(204, 255, 0, 0.12);
  --lime-dark: #0a0e00;
  --lime-contrast-text: #000000;
  --lime-headline-text: #ccff00;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-light: rgba(255, 255, 255, 0.15);
  --border-focus: rgba(204, 255, 0, 0.6);
  --border-dark-subtle: rgba(0, 0, 0, 0.09);
  --border-dark-light: rgba(0, 0, 0, 0.18);

  --footer-watermark: #0d0d10;
  --footer-watermark-hover: #16161c;
  --about-watermark: rgba(255, 255, 255, 0.03);
  --shadow-card: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-modal: 0 30px 100px rgba(0, 0, 0, 0.9), 0 0 50px var(--lime-glow);
  --grain-opacity: 0.035;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: var(--theme-transition);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
  overflow-x: hidden;
  transition: var(--theme-transition);
  -webkit-tap-highlight-color: transparent;
}

/* Selection */
::selection {
  background-color: var(--lime);
  color: #000000;
}

/* Custom Film Grain Overlay */
.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9990;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  transition: opacity 0.35s ease;
}

/* Utility Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container-full {
  width: 100%;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Typography Classes */
.font-display {
  font-family: var(--font-display);
}

.font-mono {
  font-family: var(--font-mono);
}

.lime-text {
  color: var(--lime);
  text-shadow: 0 0 25px var(--lime-glow);
  transition: color 0.35s ease, text-shadow 0.35s ease;
}

[data-theme="light"] .lime-text {
  color: var(--lime-headline-text);
  text-shadow: none;
}

.lime-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  background: var(--lime-subtle);
  border: 1px solid var(--lime);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  transition: var(--theme-transition);
}

[data-theme="light"] .lime-badge {
  color: var(--lime-headline-text);
  border-color: var(--lime);
  background: var(--lime-subtle);
}

.lime-dot {
  width: 6px;
  height: 6px;
  background-color: var(--lime);
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px var(--lime);
  animation: pulse-dot 2s infinite ease-in-out;
}

@keyframes pulse-dot {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.6;
  }
}

/* Section Common Styling */
.section {
  padding-top: var(--section-padding);
  padding-bottom: var(--section-padding);
  position: relative;
  transition: var(--theme-transition);
}

.section-dark {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

.section-dark-elevated {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-light {
  background-color: var(--surface-light);
  color: var(--text-dark-primary);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
}

.section-light .section-eyebrow {
  color: var(--text-dark-secondary);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.section-description {
  font-size: clamp(1rem, 1.25vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 680px;
  margin-top: 1.25rem;
  line-height: 1.6;
}

.section-light .section-description {
  color: var(--text-dark-secondary);
}

/* Links & Interactive resets */
a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  touch-action: manipulation;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: 3px;
}

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