/**
 * Digivayu Theme - Main Stylesheet
 * 
 * Brand Colors:
 * - Cool Horizon Blue: #80AEE8
 * - Night Bordeaux: #5B0015
 * - Ivory Mist: #F7F2E0
 * - Black: #000000
 * - White: #FFFFFF
 *
 * @package Digivayu
 * @version 1.0.0
 */

/* ==========================================================================
   1. CSS Custom Properties (Variables) - Cinematic Blueberry & Milk Palette
   ========================================================================== */
:root {
  /* Cinematic Blueberry & Milk Master Palette */
  --color-blueberry: #02115E;
  --color-blueberry-dark: #010A38;
  --color-blueberry-light: #0D2285;
  --color-blueberry-subtle: #EBF0FF;
  
  --color-milk: #F6F1E9;
  --color-milk-light: #FAF7F2;
  --color-milk-dark: #EFE8DC;
  --color-milk-border: #E5DCCE;
  
  --color-white: #FFFFFF;
  --color-black: #0A0A0A;
  
  /* System semantic bindings */
  --color-canvas: #F6F1E9;
  --color-canvas-subtle: #FAF7F2;
  --color-blue: #02115E;
  --color-blue-dark: #010A38;
  --color-blue-light: #EBF0FF;
  --color-bordeaux: #02115E;
  --color-bordeaux-light: #0D2285;
  --color-bordeaux-accent: #02115E;
  --color-ivory: #F6F1E9;
  --color-ivory-dark: #EFE8DC;
  --color-red: #02115E;
  --color-red-light: #EBF0FF;

  /* Editorial Neutral Grays & Tones */
  --color-gray-100: #FAF7F2;
  --color-gray-200: #EFE8DC;
  --color-gray-300: #E5DCCE;
  --color-gray-400: #C8BFB0;
  --color-gray-500: #8E867A;
  --color-gray-600: #5C554B;
  --color-gray-700: #3D372F;
  --color-gray-800: #1F1C18;
  --color-gray-900: #02115E;

  /* Typography */
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-heading: 'Playfair Display', Georgia, Cambria, 'Times New Roman', serif;

  /* Border Radii (Apple-inspired) */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Subtle Layered Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.15);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.05);

  /* Transitions */
  --transition: 0.3s ease;
  --transition-fast: 0.15s ease;
  --transition-bounce: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Layout Containers & Spacing */
  --container-max: 1200px;
  --container-wide: 1400px;
  --section-padding: 100px 0;
  --section-padding-mobile: 60px 0;
}

/* ==========================================================================
   2. Modern Reset & Base Setup
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  max-width: 100vw;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--color-gray-900);
  background-color: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

#page,
.site {
  overflow-x: clip !important;
  max-width: 100vw !important;
  transform: none !important;
  position: relative;
  width: 100%;
}

main,
.site-main {
  flex: 1 0 auto;
}

/* Selection */
::selection {
  background-color: var(--color-blue);
  color: var(--color-white);
}

::-moz-selection {
  background-color: var(--color-blue);
  color: var(--color-white);
}

/* Focus styles for keyboard accessibility */
*:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: 3px;
}

/* ==========================================================================
   3. Typography System
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
  color: var(--color-gray-900);
  margin-top: 0;
  letter-spacing: -0.015em;
  text-rendering: optimizeLegibility;
}

h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-bordeaux);
  margin-bottom: 24px;
}

h2 {
  font-family: var(--font-heading);
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-bordeaux);
  margin-bottom: 20px;
}

h3 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 16px;
}

h4 {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 12px;
}

h5 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 8px;
}

h6 {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-gray-700);
  margin-bottom: 20px;
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: 0.85rem;
  color: var(--color-gray-600);
}

strong, b {
  font-weight: 600;
  color: var(--color-gray-900);
}

em, i {
  font-style: italic;
}

/* Links */
a {
  color: var(--color-blue-dark);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-bordeaux);
}

/* Lists */
ul, ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

ul.list-unstyled,
ol.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

/* Responsive Media */
img, svg, video, canvas, audio, iframe, embed, object {
  display: block;
  max-width: 100%;
  height: auto;
}

figure {
  margin: 0 0 24px;
}

figcaption {
  font-size: 0.85rem;
  color: var(--color-gray-600);
  text-align: center;
  margin-top: 8px;
}

hr {
  border: 0;
  height: 1px;
  background-color: var(--color-gray-200);
  margin: 40px 0;
}

blockquote {
  border-left: 4px solid var(--color-blue);
  padding: 12px 24px;
  margin: 24px 0;
  background: rgba(128, 174, 232, 0.08);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-gray-800);
}

/* ==========================================================================
   4. Container & Layout Utilities
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

.dv-section {
  padding: var(--section-padding);
  position: relative;
}

.dv-section-compact {
  padding: 60px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: 12px;
}

.section-heading {
  color: var(--color-bordeaux);
  margin-bottom: 16px;
}

.section-subtext {
  font-size: 1.1rem;
  color: var(--color-gray-600);
  max-width: 640px;
  margin: 0 auto 48px;
  line-height: 1.7;
}

/* ==========================================================================
   5. Buttons System
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
  text-align: center;
  white-space: nowrap;
  user-select: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background-color: var(--color-blue);
  color: var(--color-white);
  border-color: var(--color-blue);
}

.btn-primary:hover {
  background-color: var(--color-blue-dark);
  border-color: var(--color-blue-dark);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-bordeaux);
  border-color: var(--color-bordeaux);
}

.btn-secondary:hover {
  background-color: var(--color-bordeaux);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-white {
  background-color: var(--color-white);
  color: var(--color-bordeaux);
  border-color: var(--color-white);
  box-shadow: var(--shadow-sm);
}

.btn-white:hover {
  background-color: var(--color-ivory);
  border-color: var(--color-ivory);
  color: var(--color-bordeaux);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-white-outline {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

.btn-white-outline:hover {
  background-color: var(--color-white);
  color: var(--color-bordeaux);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-bordeaux {
  background-color: var(--color-bordeaux);
  color: var(--color-white);
  border-color: var(--color-bordeaux);
}

.btn-bordeaux:hover {
  background-color: var(--color-bordeaux-light);
  border-color: var(--color-bordeaux-light);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-small {
  padding: 10px 24px;
  font-size: 0.9rem;
}

.btn-large {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn-full {
  width: 100%;
}

/* ==========================================================================
   6. Card Components & Glassmorphism
   ========================================================================== */
.dv-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.dv-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  color: var(--color-white);
}

.glass-card-light {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   7. Helper & Utility Classes
   ========================================================================== */
/* Text Alignments */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Flexbox Utilities */
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

/* Colors */
.text-blue { color: var(--color-blue); }
.text-bordeaux { color: var(--color-bordeaux); }
.text-white { color: var(--color-white); }
.text-muted { color: var(--color-gray-600); }
.bg-ivory { background-color: var(--color-ivory); }
.bg-white { background-color: var(--color-white); }
.bg-bordeaux { background-color: var(--color-bordeaux); color: var(--color-white); }
.bg-black { background-color: var(--color-black); color: var(--color-white); }

/* Spacing Helpers */
.mt-0 { margin-top: 0; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* Accessibility & Screen Readers */
.sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sr-only-focusable:active,
.sr-only-focusable:focus,
.screen-reader-text:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* WordPress Core Alignment Classes */
.aligncenter {
  clear: both;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignright {
  float: right;
  margin-left: 24px;
  margin-bottom: 24px;
}

.alignleft {
  float: left;
  margin-right: 24px;
  margin-bottom: 24px;
}

.alignwide {
  width: 100vw;
  max-width: var(--container-wide);
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* ==========================================================================
   8. Reduced Motion Accessibility
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
