/* ============================================================
   MEET DGITAL — main.css
   Design Tokens • Reset • Typography • Utilities
   Theme: Pearl White Wave • Royal Blue • Gold Luxury
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* ── Brand Colors (derived from md-bg.png logo palette) ── */
  --primary: #2A3A8B;
  /* Deep Royal Blue — logo text */
  --primary-dark: #1A2A6C;
  /* Deeper navy for hover */
  --primary-light: #4A5FBF;
  /* Softer blue for accents */
  --secondary: #B8922A;
  /* Warm Gold — ornamental borders */
  --secondary-dark: #8A6A1A;
  /* Deep gold for hover */
  --secondary-light: #D4AF50;
  /* Bright gold for highlights */
  --accent: #E63946;
  /* CMYK Red dot from logo icon */
  --accent-blue: #4CC9F0;
  /* CMYK Cyan dot from logo icon */
  --gold: #C9A227;
  /* Pure gold utility */

  /* ── Backgrounds ── */
  --bg-image: url('../images/md-bg.png');
  --bg: #F8F8F8;
  /* Near-white fallback */
  --bg-card: rgba(255, 255, 255, 0.80);
  /* Translucent white card */
  --bg-card-solid: #FFFFFF;
  /* Pure white for form inputs */
  --bg-subtle: #F0EFE9;
  /* Very light warm gray */
  --bg-section-alt: #EEF0F7;
  /* Light blue-tinted alternate section */
  --dark: #1A1A2E;
  /* Deep dark navy */
  --dark-2: #252540;
  --dark-3: #2E2E55;

  /* ── Text ── */
  --text-primary: #1C1C3A;
  /* Deep navy charcoal — on white bg */
  --text-secondary: #3A3A5C;
  /* Slightly lighter for body text */
  --text-muted: #7A7A9A;
  /* Muted gray-blue */
  --text-on-dark: lch(0% 0 0);
  /* Light text on dark/navy sections */
  --text-gold: #B8922A;
  /* Gold text */

  /* ── Glass ── */
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(42, 58, 139, 0.15);
  --glass-dark-bg: rgba(42, 58, 139, 0.12);

  /* ── Shadows ── */
  --shadow-sm: 0 2px 8px rgba(42, 58, 139, 0.08);
  --shadow-md: 0 8px 32px rgba(42, 58, 139, 0.12);
  --shadow-lg: 0 20px 60px rgba(42, 58, 139, 0.16);
  --shadow-xl: 0 32px 80px rgba(42, 58, 139, 0.22);
  --shadow-gold: 0 8px 24px rgba(184, 146, 42, 0.30);
  --shadow-blue: 0 8px 32px rgba(42, 58, 139, 0.35);

  /* ── Borders ── */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;
  --radius-full: 9999px;

  /* ── Spacing Scale ── */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* ── Typography Scale ── */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 1.875rem;
  --text-4xl: 2.25rem;
  --text-5xl: 3rem;
  --text-6xl: 3.75rem;
  --text-7xl: 4.5rem;

  /* ── Transitions ── */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ── Z-Index Scale ── */
  --z-below: -1;
  --z-base: 0;
  --z-above: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-modal: 1000;
  --z-toast: 2000;

  /* ── Section Padding ── */
  --section-py: clamp(60px, 8vw, 120px);
  --section-px: clamp(16px, 4vw, 40px);

  /* ── Container ── */
  --container-max: 1280px;
  --container-wide: 1440px;
}

/* ── Dark Mode Variables ── */
[data-theme="dark"] {
  --bg: #0E0E1C;
  --bg-card: rgba(26, 26, 46, 0.90);
  --bg-card-solid: #1A1A2E;
  --bg-subtle: #141428;
  --bg-section-alt: #16162A;
  --text-primary: #000000;
  --text-secondary: #ABABCC;
  --text-muted: #6868A8;
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.10);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.50);
}

/* ══════════════════════════════════════════
   MODERN RESET
══════════════════════════════════════════ */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* ── Body with md-bg.png as the global background ── */
body {
  font-family: 'Poppins', system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center top;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-base), color var(--transition-base);
}

[data-theme="dark"] body {
  background-image: none;
  background-color: var(--bg);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* ══════════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════════ */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--primary);
  /* Royal Blue headings on white bg */
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2rem, 5vw, var(--text-6xl));
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, var(--text-5xl));
}

h3 {
  font-size: clamp(1.25rem, 2.5vw, var(--text-3xl));
}

h4 {
  font-size: clamp(1.1rem, 2vw, var(--text-2xl));
}

h5 {
  font-size: var(--text-xl);
}

h6 {
  font-size: var(--text-lg);
}

p {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* Dark sections & hero need white headings */
.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4,
.section-dark h5,
.section-dark h6,
.hero h1,
.hero h2,
.page-hero h1,
.page-hero h2,
.cta-section h1,
.cta-section h2,
.footer h1,
.footer h2,
.footer h3 {
  color: #FFFFFF !important;
}

.section-dark p,
.hero p,
.page-hero p,
.cta-section p {
  color: rgba(255, 255, 255, 0.80) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: var(--text-primary);
}

/* ── Section Labels ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--secondary);
  /* Gold label */
  margin-bottom: var(--space-4);
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background: var(--secondary);
  border-radius: var(--radius-full);
}

.section-title {
  margin-bottom: var(--space-4);
}

.section-title span {
  color: var(--secondary);
  /* Gold highlight spans */
}

[data-theme="dark"] .section-title span {
  color: var(--secondary-light);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  max-width: 640px;
  line-height: 1.8;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

.container-wide {
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--section-px);
}

/* ── Section ── */
.section {
  padding-block: var(--section-py);
}

/* Light sections get a subtle white glassmorphism overlay so
   the wave texture underneath shows through beautifully */
.section:not(.section-dark):not(.cta-section):not(.hero) {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(1px);
}

[data-theme="dark"] .section:not(.section-dark):not(.cta-section):not(.hero) {
  background: rgba(14, 14, 28, 0.70);
  backdrop-filter: none;
}

.section-header {
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-label {
  justify-content: center;
}

.section-header.centered .section-subtitle {
  margin-inline: auto;
}

/* ── Section Variants ── */
.section-gray {
  background: rgba(238, 240, 247, 0.80);
}

[data-theme="dark"] .section-gray {
  background: rgba(20, 20, 40, 0.80);
}

.section-dark {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #3A1A6C 100%);
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../images/md-bg.png') center/cover no-repeat;
  opacity: 0.05;
  pointer-events: none;
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Highlight ── */
.highlight {
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 6px;
  background: var(--secondary);
  opacity: 0.35;
  border-radius: var(--radius-full);
  z-index: -1;
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-primary {
  background: rgba(42, 58, 139, 0.10);
  color: var(--primary);
}

.badge-secondary {
  background: rgba(184, 146, 42, 0.12);
  color: var(--secondary);
}

.badge-success {
  background: rgba(16, 185, 129, 0.10);
  color: #059669;
}

.badge-dark {
  background: var(--dark);
  color: #fff;
}

/* ── Divider ── */
.divider {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(42, 58, 139, 0.15), transparent);
  margin-block: var(--space-8);
}

/* ── Overflow Helpers ── */
.overflow-hidden {
  overflow: hidden;
}

.relative {
  position: relative;
}

.absolute {
  position: absolute;
}

/* ── Text Utilities ── */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.text-muted {
  color: var(--text-muted);
}

.text-primary-color {
  color: var(--primary);
}

.text-secondary-color {
  color: var(--secondary);
}

.text-gold {
  color: var(--secondary);
}

.text-white {
  color: #fff;
}

.text-sm {
  font-size: var(--text-sm);
}

.text-lg {
  font-size: var(--text-lg);
}

.font-medium {
  font-weight: 500;
}

.font-semibold {
  font-weight: 600;
}

.font-bold {
  font-weight: 700;
}

/* ── Flex/Grid Utilities ── */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-2 {
  gap: var(--space-2);
}

.gap-4 {
  gap: var(--space-4);
}

.gap-6 {
  gap: var(--space-6);
}

.gap-8 {
  gap: var(--space-8);
}

.flex-wrap {
  flex-wrap: wrap;
}

/* ── Margin Utilities ── */
.mt-2 {
  margin-top: var(--space-2);
}

.mt-4 {
  margin-top: var(--space-4);
}

.mt-6 {
  margin-top: var(--space-6);
}

.mt-8 {
  margin-top: var(--space-8);
}

.mb-2 {
  margin-bottom: var(--space-2);
}

.mb-4 {
  margin-bottom: var(--space-4);
}

.mb-6 {
  margin-bottom: var(--space-6);
}

.mb-8 {
  margin-bottom: var(--space-8);
}

/* ── Visually Hidden (Accessibility) ── */
.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;
}

/* ── Focus Styles ── */
:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Selection ── */
::selection {
  background: var(--primary);
  color: #fff;
}

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

::-webkit-scrollbar-track {
  background: #F0EFE9;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--primary), var(--secondary));
  border-radius: var(--radius-full);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #0E0E1C;
}