/* ============================================================
   AYVA DESIGN SYSTEM — Design Tokens
   Direction: Clean Navy (Light Minimal)
   Version: 4.0.0
   ============================================================ */

:root {

  /* ── COLOR: Primitive — Navy scale (anchored to logo #2D4A6E) ── */

  --navy-950:  #0A1525;
  --navy-900:  #0F1D30;
  --navy-850:  #15273E;
  --navy-800:  #1B314D;
  --navy-750:  #223C5D;
  --navy-700:  #2D4A6E;   /* ← logo color */
  --navy-600:  #3D5F85;
  --navy-500:  #50749B;
  --navy-400:  #6B8DB3;
  --navy-300:  #8FA9C8;
  --navy-200:  #B5C9DE;
  --navy-100:  #D9E4EF;
  --navy-50:   #EDF2F8;

  /* ── COLOR: Primitive — Blue (primary accent — trust, competence) ── */

  --blue-700:  #2E4BD0;
  --blue-600:  #3B5EE8;
  --blue-500:  #4F6EF7;
  --blue-400:  #7B94FF;
  --blue-300:  #A6B6FF;
  --blue-200:  #C7D1FF;
  --blue-100:  #E4E9FF;

  /* ── COLOR: Primitive — Status ── */

  --green-400:  #4ADE80;
  --green-500:  #22C55E;
  --green-600:  #16A34A;

  --amber-400:  #FCD34D;
  --amber-500:  #FBBF24;
  --amber-600:  #D97706;

  --red-400:    #FCA5A5;
  --red-500:    #F87171;
  --red-600:    #EF4444;

  --sky-400:    #93C5FD;
  --sky-500:    #60A5FA;
  --sky-600:    #3B82F6;


  /* ── COLOR: Semantic (use these in components) ────────── */

  /* Background layers — light minimal */
  --color-bg:           #FFFFFF;
  --color-bg-subtle:    #F8FAFB;
  --color-surface:      #FFFFFF;
  --color-elevated:     #F3F5F7;
  --color-overlay:      var(--navy-50);    /* #EDF2F8 */

  /* Borders — subtle dark on light */
  --color-border:         rgba(15, 29, 48, 0.08);
  --color-border-subtle:  rgba(15, 29, 48, 0.04);
  --color-border-strong:  rgba(15, 29, 48, 0.15);
  --color-border-accent:  rgba(45, 74, 110, 0.25);

  /* Text — navy on white */
  --color-text:           var(--navy-900);  /* #0F1D30 */
  --color-text-secondary: var(--navy-500);  /* #50749B */
  --color-text-muted:     var(--navy-400);  /* #6B8DB3 */
  --color-text-disabled:  var(--navy-300);  /* #8FA9C8 */
  --color-text-inverse:   #FFFFFF;

  /* Brand accent — Logo Navy */
  --color-accent:         var(--navy-700);   /* #2D4A6E */
  --color-accent-hover:   var(--navy-800);   /* #1B314D */
  --color-accent-subtle:  rgba(45, 74, 110, 0.06);
  --color-accent-glow:    rgba(45, 74, 110, 0.10);

  /* Semantic status — darker shades for light bg */
  --color-success:        var(--green-600);
  --color-success-subtle: rgba(22, 163, 74, 0.06);
  --color-success-text:   var(--green-600);

  --color-warning:        var(--amber-600);
  --color-warning-subtle: rgba(217, 119, 6, 0.06);
  --color-warning-text:   var(--amber-600);

  --color-error:          var(--red-600);
  --color-error-subtle:   rgba(239, 68, 68, 0.06);
  --color-error-text:     var(--red-600);

  --color-info:           var(--sky-600);
  --color-info-subtle:    rgba(59, 130, 246, 0.06);
  --color-info-text:      var(--sky-600);


  /* ── TYPOGRAPHY ───────────────────────────────────────── */

  /* Single font family — consistency = reliability */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:    'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

  /* ── Font sizes — STATIC scale ── */
  --text-2xs:  10px;
  --text-xs:   12px;
  --text-sm:   14px;
  --text-base: 16px;
  --text-md:   18px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  28px;
  --text-3xl:  36px;
  --text-4xl:  48px;
  --text-5xl:  60px;
  --text-6xl:  72px;
  --text-7xl:  88px;

  /* ── Font sizes — FLUID scale ── */
  --text-fluid-xs:   clamp(0.75rem,  2vw,   0.875rem);
  --text-fluid-sm:   clamp(0.875rem, 2.2vw, 1rem);
  --text-fluid-base: clamp(1rem,     2.5vw, 1.125rem);
  --text-fluid-md:   clamp(1.125rem, 2.8vw, 1.25rem);
  --text-fluid-lg:   clamp(1.25rem,  3vw,   1.5rem);
  --text-fluid-xl:   clamp(1.375rem, 3.5vw, 1.75rem);
  --text-fluid-2xl:  clamp(1.5rem,   4vw,   2.25rem);
  --text-fluid-3xl:  clamp(1.875rem, 5vw,   2.75rem);
  --text-fluid-4xl:  clamp(2.25rem,  6vw,   3.5rem);
  --text-fluid-5xl:  clamp(2.75rem,  7.5vw, 5rem);
  --text-fluid-hero: clamp(2.5rem,   9vw,   5.5rem);

  /* Font weights */
  --weight-light:    300;
  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;
  --weight-extrabold:800;

  /* Line heights */
  --leading-none:   1.0;
  --leading-tight:  1.15;
  --leading-snug:   1.3;
  --leading-normal: 1.5;
  --leading-relaxed:1.65;
  --leading-loose:  1.8;

  /* Letter spacings */
  --tracking-tighter: -0.03em;
  --tracking-tight:   -0.02em;
  --tracking-snug:    -0.01em;
  --tracking-normal:   0em;
  --tracking-wide:     0.02em;
  --tracking-wider:    0.06em;
  --tracking-widest:   0.10em;


  /* ── SPACING — 4px base grid ──────────────────────────── */

  --space-0:   0px;
  --space-px:  1px;
  --space-0-5: 2px;
  --space-1:   4px;
  --space-1-5: 6px;
  --space-2:   8px;
  --space-2-5: 10px;
  --space-3:   12px;
  --space-3-5: 14px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-7:   28px;
  --space-8:   32px;
  --space-9:   36px;
  --space-10:  40px;
  --space-12:  48px;
  --space-14:  56px;
  --space-16:  64px;
  --space-20:  80px;
  --space-24:  96px;
  --space-32:  128px;
  --space-40:  160px;
  --space-48:  192px;
  --space-64:  256px;


  /* ── BORDER RADIUS ────────────────────────────────────── */

  --radius-none: 0px;
  --radius-xs:   4px;
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  20px;
  --radius-3xl:  24px;
  --radius-4xl:  32px;
  --radius-full: 9999px;


  /* ── SHADOWS ──────────────────────────────────────────── */

  --shadow-xs:  0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:  0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:  0 4px 12px rgba(0, 0, 0, 0.07);
  --shadow-lg:  0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl:  0 16px 48px rgba(0, 0, 0, 0.10);
  --shadow-2xl: 0 24px 64px rgba(0, 0, 0, 0.12);

  /* Accent shadow — subtle navy */
  --shadow-accent-sm: 0 1px 4px rgba(45, 74, 110, 0.12);
  --shadow-accent-md: 0 4px 16px rgba(45, 74, 110, 0.15);
  --shadow-accent-lg: 0 8px 32px rgba(45, 74, 110, 0.20);


  /* ── TRANSITIONS ──────────────────────────────────────── */

  --duration-instant: 80ms;
  --duration-fast:    150ms;
  --duration-normal:  200ms;
  --duration-slow:    300ms;
  --duration-slower:  500ms;
  --duration-slowest: 800ms;

  --ease-linear:   linear;
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);
  --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:   cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Composite transitions */
  --transition-fast:   all var(--duration-fast)   var(--ease-out);
  --transition-normal: all var(--duration-normal) var(--ease-out);
  --transition-slow:   all var(--duration-slow)   var(--ease-out);


  /* ── Z-INDEX ──────────────────────────────────────────── */

  --z-below:    -1;
  --z-base:      0;
  --z-raised:    10;
  --z-dropdown:  100;
  --z-sticky:    200;
  --z-overlay:   300;
  --z-modal:     400;
  --z-toast:     500;
  --z-tooltip:   600;
  --z-top:       9999;


  /* ── BLUR ─────────────────────────────────────────────── */

  --blur-sm:  4px;
  --blur-md:  8px;
  --blur-lg:  12px;
  --blur-xl:  20px;
  --blur-2xl: 40px;


  /* ── BREAKPOINTS (as reference) ─────────────────────── */
  /* xs:  390px  — base mobile          */
  /* sm:  480px  — large phones         */
  /* md:  768px  — tablet portrait      */
  /* lg:  1024px — tablet landscape     */
  /* xl:  1280px — desktop              */
  /* 2xl: 1536px — wide desktop         */


  /* ── CONTAINER ─────────────────────────────────────────── */

  --container-padding-mobile:  var(--space-4);
  --container-padding-sm:      var(--space-6);
  --container-padding-md:      var(--space-8);
  --container-padding-lg:      var(--space-10);
  --container-max:             1160px;

  --content-narrow:  520px;
  --content-normal:  720px;
  --content-wide:    960px;


  /* ── TOUCH TARGETS ──────────────────────────────────────── */

  --touch-target-min:  44px;
  --touch-target-sm:   44px;
  --touch-target-md:   48px;
  --touch-target-lg:   56px;
  --touch-target-xl:   64px;


  /* ── SAFE AREAS ───────────────────────────────────────── */

  --safe-area-top:    env(safe-area-inset-top,    0px);
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
  --safe-area-left:   env(safe-area-inset-left,   0px);
  --safe-area-right:  env(safe-area-inset-right,  0px);


  /* ── FLUID SECTION SPACING ──────────────────────────────── */

  --section-space-sm:  clamp(var(--space-10), 6vw,  var(--space-16));
  --section-space-md:  clamp(var(--space-12), 8vw,  var(--space-24));
  --section-space-lg:  clamp(var(--space-16), 10vw, var(--space-32));
  --section-space-xl:  clamp(var(--space-20), 12vw, var(--space-40));

  --gap-fluid-sm:  clamp(var(--space-4),  3vw, var(--space-6));
  --gap-fluid-md:  clamp(var(--space-5),  4vw, var(--space-8));
  --gap-fluid-lg:  clamp(var(--space-6),  5vw, var(--space-12));
  --gap-fluid-xl:  clamp(var(--space-8),  6vw, var(--space-16));


  /* ── FOCUS RING ──────────────────────────────────────────── */

  --focus-ring-width:        2px;
  --focus-ring-color:        var(--color-accent);
  --focus-ring-offset:       3px;
  --focus-ring:              var(--focus-ring-width) solid var(--focus-ring-color);
  --focus-ring-inset:        0 0 0 var(--focus-ring-width) var(--focus-ring-color);
  --focus-ring-on-accent:    var(--focus-ring-width) solid rgba(255, 255, 255, 0.85);

}


/* ════════════════════════════════════════════════════════════
   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;
  }
}


/* ════════════════════════════════════════════════════════════
   DARK MODE (opt-in via .dark class or prefers-color-scheme)
   Default is light. Dark mode available for future use.
════════════════════════════════════════════════════════════ */
/* @media (prefers-color-scheme: dark) { :root { ... } } */


/* ════════════════════════════════════════════════════════════
   LINE-CLAMP UTILITIES
════════════════════════════════════════════════════════════ */

.line-clamp-1,
.line-clamp-2,
.line-clamp-3,
.line-clamp-4,
.line-clamp-5,
.line-clamp-6,
[class*="line-clamp-"] {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.line-clamp-1 { -webkit-line-clamp: 1; line-clamp: 1; }
.line-clamp-2 { -webkit-line-clamp: 2; line-clamp: 2; }
.line-clamp-3 { -webkit-line-clamp: 3; line-clamp: 3; }
.line-clamp-4 { -webkit-line-clamp: 4; line-clamp: 4; }
.line-clamp-5 { -webkit-line-clamp: 5; line-clamp: 5; }
.line-clamp-6 { -webkit-line-clamp: 6; line-clamp: 6; }

.line-clamp {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: var(--clamp-lines, 3);
  line-clamp: var(--clamp-lines, 3);
}

.truncate {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-width: 0;
}


/* ════════════════════════════════════════════════════════════
   GLOBAL FOCUS-VISIBLE RESET
════════════════════════════════════════════════════════════ */

*:focus { outline: none; }

*:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-xs);
}

button:focus-visible,
[role="button"]:focus-visible,
a:focus-visible {
  border-radius: inherit;
}


/* ════════════════════════════════════════════════════════════
   PRINT STYLES
════════════════════════════════════════════════════════════ */

@media print {
  *,
  *::before,
  *::after {
    background: transparent !important;
    color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  body { font-size: 12pt; line-height: 1.5; }

  a[href]::after { content: ' (' attr(href) ')'; font-size: 0.85em; color: #444 !important; }
  a[href^="#"]::after, a[href^="javascript:"]::after { content: ''; }

  h1, h2, h3, h4, h5, h6 { page-break-after: avoid; break-after: avoid; }
  img, table, figure { page-break-inside: avoid; break-inside: avoid; }

  .hero-visual, .mesh-gradient, .noise-layer, .hero-orb,
  nav, footer, .header, .cta-section { display: none !important; }
}
