/* ============================================================
   Howler Design System, Core Tokens
   colors_and_type.css
   ------------------------------------------------------------
   Source of truth for color, type, radii, spacing, shadows.
   Derived from brand assets (Howler_Gradients-*.jpg, spark PNGs,
   logo SVGs) sampled programmatically.
   ============================================================ */

/* ---------- Fonts ---------- */
/* Howler uses Open Sans across every product surface. */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("fonts/OpenSans-Light.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/OpenSans-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/OpenSans-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/OpenSans-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/OpenSans-Bold.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("fonts/OpenSans-ExtraBold.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/OpenSans-Italic.ttf") format("truetype");
}
@font-face {
  font-family: "Open Sans";
  font-style: italic;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/OpenSans-BoldItalic.ttf") format("truetype");
}

:root {
  /* =======================================================
     BRAND PALETTE, the six brand sparks + black/white
     Named after the spark PNGs in /assets/sparks/
     ======================================================= */

  /* Primary brand colors, the six-point palette used in gradients */
  --howler-midnight:  #161E6F;  /* deep indigo, most-used ground */
  --howler-sapphire:  #1E2A9E;  /* mid indigo, transitional */
  --howler-violet:    #5E6AFE;  /* electric periwinkle, highlight */
  --howler-ember:     #FF1A4D;  /* hot pink-red, energy accent */
  --howler-coral:     #FC875D;  /* sunset coral */
  --howler-yellow:    #FFB200;  /* gold / amber, warm edge */

  /* Neutrals */
  --howler-black:     #000000;  /* true black, primary brand ground */
  --howler-white:     #FFFFFF;
  --howler-off-black: #0B0B10;  /* subtle near-black for surfaces */
  --howler-ink:       #111318;

  /* Grayscale (cool-tinted to sit on black) */
  --gray-50:   #F7F8FA;
  --gray-100:  #ECEDF2;
  --gray-200:  #D9DBE4;
  --gray-300:  #B6B9C6;
  --gray-400:  #8B8FA3;
  --gray-500:  #60647A;
  --gray-600:  #3F4357;
  --gray-700:  #272A3A;
  --gray-800:  #161826;
  --gray-900:  #0B0C14;

  /* =======================================================
     SIGNATURE GRADIENTS
     Always span the brand spectrum Midnight → Violet → Ember → Yellow.
     Prefer the full-spectrum diagonal; use partial variants sparingly.
     ======================================================= */
  --howler-gradient:
    linear-gradient(135deg,
      var(--howler-midnight) 0%,
      var(--howler-sapphire) 18%,
      var(--howler-violet) 32%,
      var(--howler-ember) 62%,
      var(--howler-coral) 82%,
      var(--howler-yellow) 100%);

  --howler-gradient-radial:
    radial-gradient(120% 100% at 110% 110%,
      var(--howler-yellow) 0%,
      var(--howler-coral) 15%,
      var(--howler-ember) 35%,
      var(--howler-violet) 65%,
      var(--howler-midnight) 100%);

  --howler-gradient-violet:
    linear-gradient(135deg, var(--howler-midnight) 0%, var(--howler-violet) 100%);
  --howler-gradient-ember:
    linear-gradient(135deg, var(--howler-ember) 0%, var(--howler-yellow) 100%);
  --howler-gradient-cosmos:
    linear-gradient(135deg, var(--howler-midnight) 0%, var(--howler-ember) 100%);

  /* =======================================================
     SEMANTIC COLORS
     ======================================================= */
  /* Foreground */
  --fg-1: var(--howler-ink);        /* primary text on light */
  --fg-2: var(--gray-600);          /* secondary text */
  --fg-3: var(--gray-500);          /* tertiary, meta */
  --fg-disabled: var(--gray-300);
  --fg-on-dark-1: var(--howler-white);
  --fg-on-dark-2: rgba(255,255,255,0.72);
  --fg-on-dark-3: rgba(255,255,255,0.48);

  /* Background surfaces */
  --bg-canvas: var(--howler-white);
  --bg-surface: var(--howler-white);
  --bg-raised: var(--gray-50);
  --bg-sunken: var(--gray-100);

  --bg-canvas-dark: var(--howler-black);
  --bg-surface-dark: #0F1020;       /* slight indigo tint on black */
  --bg-raised-dark: #1A1C2E;
  --bg-sunken-dark: #07070E;

  /* Borders */
  --border-subtle: var(--gray-100);
  --border-default: var(--gray-200);
  --border-strong: var(--gray-400);
  --border-on-dark: rgba(255,255,255,0.10);

  /* Accent / brand action */
  --accent: var(--howler-ember);     /* primary CTA color */
  --accent-pressed: #D40E3C;
  --accent-ink: var(--howler-white);
  --focus-ring: var(--howler-violet);

  /* Semantic status */
  --success: #16A34A;
  --warning: var(--howler-yellow);
  --danger:  var(--howler-ember);
  --info:    var(--howler-violet);

  /* =======================================================
     TYPE SCALE
     Open Sans across the system. Tight-tracked display sizes,
     generous line-height on body.
     ======================================================= */
  --font-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --font-display: var(--font-sans);

  /* Sizes, mobile-first, work at 1280+ too */
  --fs-12: 0.75rem;
  --fs-13: 0.8125rem;
  --fs-14: 0.875rem;
  --fs-15: 0.9375rem;
  --fs-16: 1rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-28: 1.75rem;
  --fs-32: 2rem;
  --fs-40: 2.5rem;
  --fs-48: 3rem;
  --fs-60: 3.75rem;
  --fs-72: 4.5rem;

  /* Weights */
  --fw-light: 300; /* @kind font */
  --fw-regular: 400; /* @kind font */
  --fw-medium: 500; /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold: 700; /* @kind font */
  --fw-extrabold: 800; /* @kind font */

  /* Line heights */
  --lh-tight: 1.08; /* @kind font */
  --lh-snug: 1.2; /* @kind font */
  --lh-normal: 1.45; /* @kind font */
  --lh-relaxed: 1.6; /* @kind font */

  /* Tracking */
  --tracking-tight: -0.02em; /* @kind font */
  --tracking-snug: -0.01em; /* @kind font */
  --tracking-normal: 0; /* @kind font */
  --tracking-wide: 0.04em; /* @kind font */
  --tracking-caps: 0.08em; /* @kind font */

  /* =======================================================
     SPACING (4 px base)
     ======================================================= */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* =======================================================
     RADII, Howler is soft-rounded, never pill-everywhere.
     Cards use 16-24. Chips/pills use full.
     ======================================================= */
  --radius-0: 0;
  --radius-1: 4px;
  --radius-2: 8px;
  --radius-3: 12px;
  --radius-4: 16px;
  --radius-5: 20px;
  --radius-6: 24px;
  --radius-pill: 999px;

  /* =======================================================
     SHADOWS, soft, cool-tinted. Never harsh.
     ======================================================= */
  --shadow-xs: 0 1px 2px rgba(22, 30, 111, 0.06);
  --shadow-sm: 0 2px 6px rgba(22, 30, 111, 0.08);
  --shadow-md: 0 8px 24px rgba(22, 30, 111, 0.10);
  --shadow-lg: 0 16px 48px rgba(22, 30, 111, 0.16);
  --shadow-xl: 0 24px 72px rgba(22, 30, 111, 0.22);
  --shadow-glow-ember: 0 0 40px rgba(255, 26, 77, 0.45);
  --shadow-glow-violet: 0 0 40px rgba(94, 106, 254, 0.45);

  /* =======================================================
     MOTION
     ======================================================= */
  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1); /* @kind other */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* @kind other */
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* @kind other */

  --dur-fast: 120ms; /* @kind other */
  --dur-base: 200ms; /* @kind other */
  --dur-slow: 360ms; /* @kind other */
  --dur-slower: 640ms; /* @kind other */
}

/* ============================================================
   SEMANTIC TYPE CLASSES
   Use these as shortcuts; they just bundle the tokens above.
   ============================================================ */

html { font-family: var(--font-sans); color: var(--fg-1); }
body { font-family: var(--font-sans); }

.h-display {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, var(--fs-72));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.h1 {
  font-size: clamp(2rem, 4vw, var(--fs-48));
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  letter-spacing: var(--tracking-tight);
}
.h2 {
  font-size: var(--fs-32);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}
.h3 {
  font-size: var(--fs-24);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--tracking-snug);
}
.h4 {
  font-size: var(--fs-20);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}
.h5 {
  font-size: var(--fs-16);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-snug);
}

.body-lg { font-size: var(--fs-18); line-height: var(--lh-relaxed); font-weight: var(--fw-regular); }
.body    { font-size: var(--fs-16); line-height: var(--lh-relaxed); font-weight: var(--fw-regular); }
.body-sm { font-size: var(--fs-14); line-height: var(--lh-normal);  font-weight: var(--fw-regular); }
.caption { font-size: var(--fs-13); line-height: var(--lh-normal);  font-weight: var(--fw-regular); color: var(--fg-2); }
.micro   { font-size: var(--fs-12); line-height: var(--lh-normal);  font-weight: var(--fw-medium); }

.eyebrow {
  font-size: var(--fs-12);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--fg-2);
}

.code {
  font-family: var(--font-mono);
  font-size: var(--fs-13);
  background: var(--bg-sunken);
  padding: 2px 6px;
  border-radius: var(--radius-1);
}

/* Gradient text helper, use on display headings for brand moments only */
.text-gradient {
  background: var(--howler-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
