/* ==========================================================================
   ADIFFIC DIGITAL BRANDING AGENCY - BASE STYLES & RESET
   ========================================================================== */

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--color-on-background);
  background-color: var(--color-background);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  position: relative;
}

/* Global Top Scroll Progress Bar (GPU Composite Accelerated) */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-primary-container);
  z-index: 10001;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.08s ease-out;
  pointer-events: none;
  will-change: transform;
}

/* Custom Selection */
::selection {
  background-color: var(--color-primary-container);
  color: var(--color-on-primary);
}

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

::-webkit-scrollbar-track {
  background: var(--color-surface-variant);
}

::-webkit-scrollbar-thumb {
  background: var(--color-on-background);
  border-radius: var(--radius-xs);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary-container);
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast), transform var(--transition-fast);
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button {
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   TYPOGRAPHY SYSTEM (Bricolage Grotesque & Inter)
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-on-background);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.font-display-lg {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw + 0.5rem, 4.4rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  word-break: break-word;
}

.font-headline-lg {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.2vw + 0.4rem, 2.85rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.font-headline-md {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.8vw + 0.2rem, 1.85rem);
  font-weight: 600;
  line-height: 1.25;
}

.font-headline-sm {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.2vw + 0.2rem, 1.35rem);
  font-weight: 600;
  line-height: 1.35;
}

.font-body-lg {
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.9vw + 0.25rem, 1.15rem);
  font-weight: 400;
  line-height: 1.65;
}

.font-body-md {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.55;
}

.font-label-bold {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.font-label-sm {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

/* Text Colors */
.text-primary { color: var(--color-primary); }
.text-primary-container { color: var(--color-primary-container); }
.text-on-background { color: var(--color-on-background); }
.text-on-surface-variant { color: var(--color-on-surface-variant); }
.text-secondary { color: var(--color-secondary); }
.text-white { color: #ffffff; }
.text-surface-dim { color: var(--color-surface-dim); }

/* Backgrounds */
.bg-surface { background-color: var(--color-surface); }
.bg-surface-low { background-color: var(--color-surface-container-low); }
.bg-surface-container { background-color: var(--color-surface-container); }
.bg-surface-high { background-color: var(--color-surface-container-high); }
.bg-surface-variant { background-color: var(--color-surface-variant); }
.bg-inverse { background-color: var(--color-inverse-surface); color: var(--color-inverse-on-surface); }
.bg-dark { background-color: var(--color-on-background); color: #ffffff; }
.bg-orange { background-color: var(--color-primary-container); color: var(--color-on-primary-container); }
.bg-white { background-color: #ffffff; }

/* ==========================================================================
   CONTAINER & GRID UTILITIES
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--margin-mobile);
  padding-right: var(--margin-mobile);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--margin-desktop);
    padding-right: var(--margin-desktop);
  }
}

.grid-12 {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gutter);
}

@media (max-width: 860px) {
  .grid-12 {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }
}

/* Text & Alignment Utilities */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
.mx-auto { margin-left: auto !important; margin-right: auto !important; }
.w-full { width: 100% !important; }
.flex-center { display: flex !important; align-items: center !important; justify-content: center !important; }
.flex-col-center { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }

/* Flex Utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-grow { flex-grow: 1; }

.gap-xs { gap: var(--space-xs); }
.gap-sm { gap: var(--space-sm); }
.gap-md { gap: var(--space-md); }
.gap-lg { gap: var(--space-lg); }
.gap-xl { gap: var(--space-xl); }

/* Spacing Utilities - Protected Hero Padding to prevent header overlap */
.page-hero {
  padding-top: clamp(100px, 10vw + 20px, 140px);
  padding-bottom: clamp(48px, 6vw, 80px);
  position: relative;
}

.section-padding {
  padding-top: clamp(56px, 7vw, 100px);
  padding-bottom: clamp(56px, 7vw, 100px);
}

.section-padding-lg {
  padding-top: clamp(80px, 9vw, 140px);
  padding-bottom: clamp(80px, 9vw, 140px);
}

/* Responsive Visibility Utilities & Mobile Padding */
@media (max-width: 900px) {
  body {
    padding-bottom: 68px; /* Offset for mobile bottom navigation bar */
  }

  .hidden-mobile {
    display: none !important;
  }
}

@media (min-width: 901px) {
  .hidden-desktop {
    display: none !important;
  }
}

/* Brutalist Border & Shadow Utilities */
.brutalist-border {
  border: 2px solid var(--color-on-background);
}

.brutalist-shadow {
  box-shadow: 4px 4px 0px 0px var(--color-on-background);
}

.brutalist-shadow-hover {
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.brutalist-shadow-hover:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0px 0px var(--color-on-background);
}

.brutalist-shadow-active:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px 0px transparent;
}

/* No-Scrollbar for horizontal swipeable chips */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* ==========================================================================
   GRAIN OVERLAY & SPECIAL EFFECTS (GPU Hardware Accelerated)
   ========================================================================== */

.grain-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.02;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAMAAAA5vhvfAAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMAM2xV5QAAACVJREFUeNpjYMQHGBkYGJgI4YMBjgwMDIRwQUb1j+of1T+qf1QPhAEAqygAl4NymecAAAAASUVORK5CYII=");
  background-repeat: repeat;
  z-index: 9999;
}

/* Glassmorphism Panel (Optimized GPU layer) */
.glass-panel {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(26, 28, 28, 0.12);
}

.glass-panel-dark {
  background: rgba(26, 28, 28, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ==========================================================================
   SCROLL REVEAL ANIMATIONS & KEYFRAMES (High-Performance GPU Transitions)
   ========================================================================== */

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-6px) rotate(-1deg);
  }
}

@keyframes pulseSubtle {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

@keyframes spinSlow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes marquee {
  0% {
    transform: translate3d(0%, 0, 0);
  }
  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.animate-float {
  animation: floatSlow 5s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spinSlow 20s linear infinite;
}

/* Scroll Reveal Initial States */
.reveal-on-scroll {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.96) translate3d(0, 16px, 0);
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.is-revealed {
  opacity: 1;
  transform: scale(1) translate3d(0, 0, 0);
}

/* Stagger delays for child items */
.reveal-delay-1 { transition-delay: 0.06s; }
.reveal-delay-2 { transition-delay: 0.12s; }
.reveal-delay-3 { transition-delay: 0.18s; }
.reveal-delay-4 { transition-delay: 0.24s; }

/* Off-screen section optimization for 120 FPS scrolling */
.section-lazy-render {
  content-visibility: auto;
  contain-intrinsic-size: 1px 650px;
}

/* Material Symbols icon helper */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  vertical-align: middle;
}

/* Margin bottom utility helpers */
.mb-xs { margin-bottom: 8px; }
.mb-sm { margin-bottom: 16px; }
.mb-md { margin-bottom: 24px; }
.mb-lg { margin-bottom: clamp(36px, 4vw, 48px); }
.mb-xl { margin-bottom: clamp(48px, 6vw, 72px); }

