/* ============================================
   SignumEssentials v30 - Base Styles
   ============================================ */

/* ========================================
   CSS RESET - Modern & Complete
   ======================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  hanging-punctuation: first last;
  color-scheme: light;
}

/* Lenis smooth scroll base */
html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

.lenis.lenis-scrolling iframe {
  pointer-events: none;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  color: var(--text-primary);
  background-color: var(--bg-pure);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Smooth scrollbar */
html {
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-primary-lighter) var(--bg-cloud);
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-cloud);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--violet-400), var(--cyan-400));
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-cloud);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--violet-500), var(--cyan-500));
}

/* Remove default styles */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

/* ========================================
   TYPOGRAPHY - Elegant & Refined
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--text-primary);
  text-wrap: balance;
}

h1 {
  font-size: var(--text-h1);
  font-weight: var(--weight-extrabold);
  letter-spacing: var(--tracking-tighter);
}

h2 {
  font-size: var(--text-h2);
  font-weight: var(--weight-bold);
}

h3 {
  font-size: var(--text-h3);
  font-weight: var(--weight-semibold);
}

h4 {
  font-size: var(--text-h4);
  font-weight: var(--weight-semibold);
}

h5 {
  font-size: var(--text-h5);
  font-weight: var(--weight-medium);
}

p {
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  text-wrap: pretty;
}

p + p {
  margin-top: var(--space-4);
}

strong, b {
  font-weight: var(--weight-semibold);
  color: var(--text-primary);
}

em, i {
  font-style: italic;
}

small {
  font-size: var(--text-small);
}

/* ========================================
   HERO TYPOGRAPHY - Dramatic Display
   ======================================== */

.text-mega {
  font-family: var(--font-display);
  font-size: var(--text-mega);
  font-weight: var(--weight-black);
  line-height: var(--leading-mega);
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.text-hero {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--weight-black);
  line-height: var(--leading-display);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.text-display {
  font-family: var(--font-display);
  font-size: var(--text-display);
  font-weight: var(--weight-extrabold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tighter);
}

/* ========================================
   GRADIENT TEXT - The Signature Look
   ======================================== */

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
}

.text-gradient-vivid {
  background: var(--gradient-vivid);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% 300%;
  animation: gradientShift 6s ease infinite;
}

.text-gradient-aurora {
  background: var(--gradient-aurora);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 400% 400%;
  animation: auroraShift 10s ease infinite;
}

.text-gradient-static {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes auroraShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Accent color text */
.text-primary-accent { color: var(--accent-primary); }
.text-secondary-accent { color: var(--accent-secondary); }
.text-tertiary-accent { color: var(--accent-tertiary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ========================================
   MONOSPACE
   ======================================== */

.font-mono {
  font-family: var(--font-mono);
  font-feature-settings: "liga" 0;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

code {
  padding: var(--space-1) var(--space-2);
  background: var(--bg-cloud);
  border-radius: var(--radius-md);
  color: var(--accent-primary-dark);
}

pre {
  padding: var(--space-4);
  background: var(--bg-cloud);
  border-radius: var(--radius-xl);
  overflow-x: auto;
}

/* ========================================
   LAYOUT
   ======================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }
.container-3xl { max-width: var(--container-3xl); }
.container-full { max-width: 100%; }

/* ========================================
   DISPLAY UTILITIES
   ======================================== */

.hidden { display: none; }
.block { display: block; }
.inline { display: inline; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

/* Flexbox */
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-1 { flex: 1; }
.flex-auto { flex: auto; }
.flex-none { flex: none; }

.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-stretch { align-items: stretch; }
.items-baseline { align-items: baseline; }

.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-evenly { justify-content: space-evenly; }

.self-start { align-self: flex-start; }
.self-center { align-self: center; }
.self-end { align-self: flex-end; }

/* Gap */
.gap-0 { gap: 0; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.gap-10 { gap: var(--space-10); }
.gap-12 { gap: var(--space-12); }
.gap-16 { gap: var(--space-16); }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.static { position: static; }

.inset-0 { inset: 0; }
.top-0 { top: 0; }
.right-0 { right: 0; }
.bottom-0 { bottom: 0; }
.left-0 { left: 0; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-visible { overflow: visible; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto { overflow-y: auto; }

/* Width/Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.h-full { height: 100%; }
.h-auto { height: auto; }
.min-h-screen { min-height: 100vh; }
.max-w-full { max-width: 100%; }

/* ========================================
   VISIBILITY & A11Y
   ======================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ========================================
   FOCUS STYLES - Accessible & Beautiful
   ======================================== */

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ========================================
   BACKGROUNDS
   ======================================== */

.bg-pure { background-color: var(--bg-pure); }
.bg-soft { background-color: var(--bg-soft); }
.bg-cloud { background-color: var(--bg-cloud); }
.bg-mist { background-color: var(--bg-mist); }

/* Gradient Mesh Background */
.bg-mesh {
  background:
    var(--gradient-mesh-violet),
    var(--gradient-mesh-cyan),
    var(--gradient-mesh-indigo),
    var(--gradient-mesh-gold),
    var(--bg-soft);
}

/* Hero Background */
.bg-hero {
  background:
    var(--gradient-mesh-violet),
    var(--gradient-mesh-cyan),
    var(--gradient-mesh-indigo),
    var(--bg-pure);
}

/* Section Background */
.bg-section {
  background: linear-gradient(180deg, var(--bg-pure) 0%, var(--bg-soft) 100%);
}

/* Gradient Backgrounds */
.bg-gradient-brand {
  background: var(--gradient-brand);
}

.bg-gradient-soft {
  background: var(--gradient-soft);
}

.bg-gradient-aurora {
  background: var(--gradient-aurora);
  background-size: 400% 400%;
  animation: auroraShift 10s ease infinite;
}

/* Noise Texture Overlay */
.bg-noise::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  opacity: 0.015;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Grid Pattern */
.bg-grid {
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* Dot Pattern */
.bg-dots {
  background-image: radial-gradient(var(--border-default) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ========================================
   SECTION SPACING
   ======================================== */

.section {
  position: relative;
  padding: var(--space-24) 0;
}

.section-sm {
  padding: var(--space-16) 0;
}

.section-lg {
  padding: var(--space-32) 0;
}

.section-xl {
  padding: var(--space-40) 0;
}

.section-2xl {
  padding: var(--space-48) 0;
}

/* ========================================
   DIVIDERS
   ======================================== */

.divider {
  width: 100%;
  height: 1px;
  background: var(--border-light);
}

.divider-gradient {
  background: var(--gradient-brand);
  height: 2px;
  opacity: 0.5;
}

.divider-fade {
  background: linear-gradient(90deg, transparent, var(--border-default), transparent);
}

/* ========================================
   CURSOR & POINTER
   ======================================== */

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-not-allowed { cursor: not-allowed; }

.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* ========================================
   USER SELECT
   ======================================== */

.select-none { user-select: none; }
.select-text { user-select: text; }
.select-all { user-select: all; }

/* ========================================
   OPACITY
   ======================================== */

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

/* ========================================
   Z-INDEX
   ======================================== */

.z-behind { z-index: var(--z-behind); }
.z-base { z-index: var(--z-base); }
.z-above { z-index: var(--z-above); }
.z-dropdown { z-index: var(--z-dropdown); }
.z-sticky { z-index: var(--z-sticky); }
.z-fixed { z-index: var(--z-fixed); }
.z-overlay { z-index: var(--z-overlay); }
.z-modal { z-index: var(--z-modal); }
.z-tooltip { z-index: var(--z-tooltip); }
.z-max { z-index: var(--z-max); }

/* ========================================
   TRANSITIONS
   ======================================== */

.transition-all { transition: all var(--transition-normal); }
.transition-colors { transition: color var(--transition-fast), background-color var(--transition-fast), border-color var(--transition-fast); }
.transition-opacity { transition: opacity var(--transition-normal); }
.transition-transform { transition: transform var(--transition-normal); }
.transition-shadow { transition: box-shadow var(--transition-normal); }

/* ========================================
   TRANSFORMS
   ======================================== */

.transform-gpu {
  transform: translateZ(0);
  will-change: transform;
}

.backface-hidden {
  backface-visibility: hidden;
}

/* ========================================
   ASPECT RATIOS
   ======================================== */

.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video { aspect-ratio: 16 / 9; }
.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-3-2 { aspect-ratio: 3 / 2; }

/* ========================================
   REDUCED MOTION
   ======================================== */

@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;
  }

  .text-gradient,
  .text-gradient-vivid,
  .text-gradient-aurora,
  .bg-gradient-aurora {
    animation: none;
  }
}
