/* =========================================================
   STRATIX — Colors & Type
   Single source of truth for the design system.
   Import this once at the top of any page that styles Stratix UI.
   ========================================================= */

/* ---------- Fonts ---------- */
@font-face { font-family: "Poppins"; font-weight: 100; font-style: normal; font-display: swap; src: url("fonts/Poppins-Thin.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 200; font-style: normal; font-display: swap; src: url("fonts/Poppins-ExtraLight.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 300; font-style: normal; font-display: swap; src: url("fonts/Poppins-Light.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 300; font-style: italic;  font-display: swap; src: url("fonts/Poppins-LightItalic.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/Poppins-Regular.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 400; font-style: italic;  font-display: swap; src: url("fonts/Poppins-Italic.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: italic;  font-display: swap; src: url("fonts/Poppins-MediumItalic.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/Poppins-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-style: italic;  font-display: swap; src: url("fonts/Poppins-SemiBoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/Poppins-Bold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: italic;  font-display: swap; src: url("fonts/Poppins-BoldItalic.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 800; font-style: normal; font-display: swap; src: url("fonts/Poppins-ExtraBold.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 900; font-style: normal; font-display: swap; src: url("fonts/Poppins-Black.ttf") format("truetype"); }

:root {
  /* =========================================================
     COLORS — primitives
     ========================================================= */

  /* Brand */
  --stx-teal-500:        #0DA4AB; /* primary brand teal — sampled from logo */
  --stx-teal-600:        #088B92;
  --stx-teal-700:        #066F75;
  --stx-teal-400:        #2EBDC4;
  --stx-teal-300:        #6CD4D9;
  --stx-teal-200:        #B3EAEC;
  --stx-teal-100:        #E1F6F7;
  --stx-teal-050:        #F2FBFB;

  /* Neutrals — pure black/grey/white system from the brand */
  --stx-black:           #0A0A0B; /* signage black, near-pure */
  --stx-ink:             #14161A; /* core copy color on light bg */
  --stx-graphite:        #232427;
  --stx-slate-800:       #2E3034;
  --stx-slate-700:       #43464C;
  --stx-slate-600:       #5C6068;
  --stx-slate-500:       #80858E;
  --stx-slate-400:       #A6ABB3;
  --stx-slate-300:       #C9CDD2;
  --stx-slate-200:       #E2E5E9;
  --stx-slate-100:       #EFF1F3;
  --stx-slate-050:       #F7F8F9;
  --stx-white:           #FFFFFF;

  /* Semantic accents (kept restrained — brand is mono+teal) */
  --stx-success:         #1B9E6D;
  --stx-warn:            #D6A012;
  --stx-danger:          #C8442B;
  --stx-info:            var(--stx-teal-500);

  /* =========================================================
     COLORS — semantic tokens (LIGHT — default)
     ========================================================= */
  --bg:                  var(--stx-white);
  --bg-elevated:         var(--stx-white);
  --bg-muted:            var(--stx-slate-050);
  --bg-subtle:           var(--stx-slate-100);
  --bg-inverse:          var(--stx-black);

  --fg:                  var(--stx-ink);          /* primary text */
  --fg-strong:           var(--stx-black);        /* headlines / wordmark */
  --fg-muted:            var(--stx-slate-600);    /* secondary text */
  --fg-subtle:           var(--stx-slate-500);    /* tertiary / labels */
  --fg-disabled:         var(--stx-slate-400);
  --fg-on-accent:        var(--stx-white);
  --fg-on-inverse:       var(--stx-white);

  --border:              var(--stx-slate-200);
  --border-strong:       var(--stx-slate-300);
  --border-subtle:       var(--stx-slate-100);
  --border-inverse:      rgba(255,255,255,0.12);

  --accent:              var(--stx-teal-500);
  --accent-hover:        var(--stx-teal-600);
  --accent-press:        var(--stx-teal-700);
  --accent-soft:         var(--stx-teal-100);
  --accent-on:           var(--stx-white);

  --focus-ring:          color-mix(in oklab, var(--stx-teal-500) 60%, transparent);

  /* =========================================================
     RADII
     ========================================================= */
  --radius-0:  0px;
  --radius-1:  2px;
  --radius-2:  4px;     /* default control radius — brand is geometric, restrained */
  --radius-3:  6px;
  --radius-4:  8px;     /* cards */
  --radius-5:  12px;
  --radius-6:  16px;
  --radius-pill: 999px;

  /* =========================================================
     SPACING (4pt grid)
     ========================================================= */
  --space-0:  0px;
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-7:  32px;
  --space-8:  40px;
  --space-9:  48px;
  --space-10: 64px;
  --space-11: 80px;
  --space-12: 96px;
  --space-13: 128px;

  /* =========================================================
     SHADOWS (flat-leaning; reserved use)
     ========================================================= */
  --shadow-1: 0 1px 2px rgba(10,10,11,0.06), 0 1px 1px rgba(10,10,11,0.04);
  --shadow-2: 0 2px 6px rgba(10,10,11,0.06), 0 1px 2px rgba(10,10,11,0.05);
  --shadow-3: 0 8px 24px rgba(10,10,11,0.08), 0 2px 6px rgba(10,10,11,0.05);
  --shadow-4: 0 16px 40px rgba(10,10,11,0.12), 0 4px 12px rgba(10,10,11,0.06);
  --shadow-glow-teal: 0 0 0 3px color-mix(in oklab, var(--stx-teal-500) 25%, transparent);

  /* =========================================================
     TYPOGRAPHY — primitives
     ========================================================= */
  --font-sans:           "Poppins", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display:        var(--font-sans);
  --font-mono:           "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;

  /* Weight — Stratix leans LIGHT for display, REGULAR/MEDIUM for body */
  --weight-thin:        100;
  --weight-extralight:  200;
  --weight-light:       300; /* hero / wordmark feel */
  --weight-regular:     400;
  --weight-medium:      500;
  --weight-semibold:    600;
  --weight-bold:        700;
  --weight-extrabold:   800;
  --weight-black:       900;

  /* Tracking — wide for the brand; the wordmark itself is tracked ~0.3em */
  --tracking-mark:       0.32em;  /* logo-style */
  --tracking-eyebrow:    0.18em;  /* uppercase eyebrow */
  --tracking-wide:       0.06em;
  --tracking-normal:     0;
  --tracking-tight:      -0.01em;
  --tracking-tighter:    -0.02em;

  /* Line height */
  --lh-tight:   1.05;
  --lh-snug:    1.2;
  --lh-normal:  1.45;
  --lh-relaxed: 1.6;

  /* Type scale (modular ~1.2) */
  --fs-12: 12px;
  --fs-13: 13px;
  --fs-14: 14px;
  --fs-15: 15px;
  --fs-16: 16px;
  --fs-18: 18px;
  --fs-20: 20px;
  --fs-24: 24px;
  --fs-28: 28px;
  --fs-32: 32px;
  --fs-40: 40px;
  --fs-48: 48px;
  --fs-56: 56px;
  --fs-72: 72px;
  --fs-96: 96px;

  /* Motion */
  --ease-standard: cubic-bezier(.2,.0,.0,1);
  --ease-out:      cubic-bezier(.16,1,.3,1);
  --ease-in:       cubic-bezier(.4,0,1,1);
  --dur-fast:   120ms;
  --dur-base:   180ms;
  --dur-slow:   320ms;
}

/* =========================================================
   DARK THEME — Stratix is naturally dark-friendly
   Add `data-theme="dark"` on <html> or any container.
   ========================================================= */
[data-theme="dark"] {
  --bg:            var(--stx-black);
  --bg-elevated:   #131418;
  --bg-muted:      #1A1C20;
  --bg-subtle:     #20232A;
  --bg-inverse:    var(--stx-white);

  --fg:            #F2F4F7;
  --fg-strong:     var(--stx-white);
  --fg-muted:      #B0B5BD;
  --fg-subtle:     #80858E;
  --fg-disabled:   #5C6068;
  --fg-on-accent:  var(--stx-black);
  --fg-on-inverse: var(--stx-black);

  --border:        rgba(255,255,255,0.10);
  --border-strong: rgba(255,255,255,0.18);
  --border-subtle: rgba(255,255,255,0.06);
  --border-inverse: var(--stx-slate-200);

  --accent:        var(--stx-teal-400);
  --accent-hover:  var(--stx-teal-300);
  --accent-press:  var(--stx-teal-500);
  --accent-soft:   rgba(46, 189, 196, 0.14);

  --shadow-1: 0 1px 2px rgba(0,0,0,0.5);
  --shadow-2: 0 2px 8px rgba(0,0,0,0.55);
  --shadow-3: 0 8px 28px rgba(0,0,0,0.6);
  --shadow-4: 0 16px 48px rgba(0,0,0,0.7);
}

/* =========================================================
   SEMANTIC TYPE STYLES
   Use these directly OR mix them in via @extend-style classes.
   ========================================================= */

html, body {
  font-family: var(--font-sans);
  font-size: var(--fs-16);
  line-height: var(--lh-normal);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Display — hero usage; thin & wide, echoing the wordmark */
.stx-display {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  font-size: clamp(48px, 7vw, 96px);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}

/* Wordmark — for the literal STRATIX lockup recreation */
.stx-wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-light);
  letter-spacing: var(--tracking-mark);
  text-transform: uppercase;
  color: var(--fg-strong);
}

/* Headings */
.stx-h1, h1 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-48);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}
.stx-h2, h2 {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-32);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-tight);
  color: var(--fg-strong);
}
.stx-h3, h3 {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-24);
  line-height: var(--lh-snug);
  color: var(--fg-strong);
}
.stx-h4, h4 {
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--fs-20);
  line-height: var(--lh-snug);
  color: var(--fg-strong);
}
.stx-h5, h5 {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--fs-16);
  line-height: var(--lh-snug);
  color: var(--fg-strong);
}

/* Eyebrow — uppercase, tracked. Brand-defining. */
.stx-eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--fs-12);
  line-height: 1;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--fg-muted);
}
.stx-eyebrow--accent { color: var(--accent); }

/* Body */
.stx-body, p {
  font-family: var(--font-sans);
  font-weight: var(--weight-regular);
  font-size: var(--fs-16);
  line-height: var(--lh-relaxed);
  color: var(--fg);
  text-wrap: pretty;
}
.stx-body-lg {
  font-size: var(--fs-18);
  line-height: var(--lh-relaxed);
}
.stx-body-sm {
  font-size: var(--fs-14);
  line-height: var(--lh-normal);
}
.stx-caption {
  font-size: var(--fs-12);
  line-height: var(--lh-normal);
  color: var(--fg-muted);
  letter-spacing: var(--tracking-wide);
}

/* Label — for form labels, table headers */
.stx-label {
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--fs-13);
  line-height: 1.2;
  letter-spacing: var(--tracking-wide);
  color: var(--fg-strong);
}

/* Code / Mono */
.stx-code, code {
  font-family: var(--font-mono);
  font-size: 0.92em;
  background: var(--bg-subtle);
  padding: 0.1em 0.35em;
  border-radius: var(--radius-2);
  color: var(--fg-strong);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; text-underline-offset: 0.18em; }

::selection { background: var(--accent); color: var(--accent-on); }

*:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =========================================================
   MASONRY GRID — Editorial gallery with dense packing
   ========================================================= */

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  grid-auto-rows: 180px;
  grid-auto-flow: dense;
}

@media (min-width: 640px) {
  .masonry-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
}

@media (min-width: 768px) {
  .masonry-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 200px;
  }
}

@media (min-width: 1280px) {
  .masonry-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
  }
}

/* =========================================================
   PULSE RING — "Needs attention" signal for action buttons
   ========================================================= */

@keyframes stx-pulse-ring {
  0%   { transform: scale(1);    opacity: 0.6; }
  70%  { transform: scale(1.08); opacity: 0; }
  100% { transform: scale(1.08); opacity: 0; }
}

.stx-pulse-ring::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: var(--stx-teal-500);
  animation: stx-pulse-ring 2s ease-out infinite;
  pointer-events: none;
  z-index: 0;
}
