/* ============================================================
   MAD PANDA CONSULTING — Foundations
   Pulled directly from the production site (Astro/Tailwind v4)
   Original source: src/styles/global.css + BUILD_PROMPT.md
   ============================================================ */

/* ─── Web fonts ─── */
@import url("https://fonts.googleapis.com/css2?family=League+Spartan:wght@400;700;800&family=Fraunces:ital,opsz,wght@0,9..144,300..900;1,9..144,300..900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;700&display=swap");

:root {
  /* ────────────────────────────────────────────────
     COLOR — core tokens (production names)
     ──────────────────────────────────────────────── */
  --color-void:     #0A0A0A;   /* page background — true near-black */
  --color-surface:  #111111;   /* slightly raised surfaces (contact bar) */
  --color-ash:      #1A1A1A;   /* cards, deeper surfaces */
  --color-smoke:    #888888;   /* secondary text, labels */
  --color-bone:     #E8E8E8;   /* primary body text */
  --color-white:    #FFFFFF;   /* hi-contrast text, inversion */

  --color-fury:     #E94C4D;   /* THE red dot — primary accent, CTAs */
  --color-ember:    #FF6B35;   /* secondary warm accent — used sparingly */
  --color-signal:   #00FF88;   /* tertiary — exclusive to Piixi product */

  /* ────────────────────────────────────────────────
     COLOR — semantic aliases
     ──────────────────────────────────────────────── */
  --bg:            var(--color-void);
  --bg-raised:     var(--color-surface);
  --bg-card:       rgba(255,255,255,0.02);   /* glassmorphic */
  --border:        rgba(255,255,255,0.05);
  --border-strong: rgba(255,255,255,0.15);

  --fg:            var(--color-bone);
  --fg-muted:      var(--color-smoke);
  --fg-faint:      rgba(136,136,136,0.4);
  --fg-strong:     var(--color-white);

  --accent:        var(--color-fury);
  --accent-soft:   rgba(233,76,77,0.2);

  /* ────────────────────────────────────────────────
     TYPE — font families
     ──────────────────────────────────────────────── */
  --font-logo:     "League Spartan", "Helvetica Neue", Arial, sans-serif;
  --font-tagline:  "Fraunces", Georgia, serif;
  --font-body:     "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-mono:     "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* ────────────────────────────────────────────────
     TYPE — semantic styles
     The brand uses fluid clamp() for display sizes.
     ──────────────────────────────────────────────── */
  --display-1-size: clamp(2.5rem, 8vw, 9rem);     /* hero headlines */
  --display-1-line: 0.92;
  --display-1-track: -0.02em;

  --display-2-size: clamp(2rem, 6vw, 7.5rem);     /* italic Fraunces lines */
  --display-2-line: 0.95;

  --h1-size:        clamp(2rem, 5vw, 4.5rem);     /* section headlines */
  --h1-line:        1.05;
  --h1-track:       -0.01em;

  --h2-size:        clamp(2rem, 5vw, 4rem);
  --h3-size:        1.5rem;                        /* card titles */
  --h3-line:        1.2;

  --body-size:      1rem;
  --body-large:     1.125rem;
  --body-line:      1.6;

  --label-size:     0.75rem;
  --label-track:    0.3em;                         /* the wide-spaced caps */

  --counter-size:   clamp(3.5rem, 6vw, 5rem);

  /* ────────────────────────────────────────────────
     SPACING — based on Tailwind 4px scale
     ──────────────────────────────────────────────── */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-32: 8rem;       /* section padding mobile */
  --space-48: 12rem;      /* section padding desktop */

  /* ────────────────────────────────────────────────
     RADII / SHADOWS / EFFECTS
     ──────────────────────────────────────────────── */
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;       /* default card */
  --radius-xl:  16px;
  --radius-2xl: 24px;       /* large feature card (Piixi) */

  --shadow-glow-fury: 0 0 0 1px rgba(233,76,77,0.2), 0 8px 32px rgba(233,76,77,0.15);
  --shadow-card:      0 4px 24px rgba(0,0,0,0.4);

  --blur-glass: 16px;       /* backdrop-filter blur on glass cards */

  /* ────────────────────────────────────────────────
     MOTION — easing + durations
     ──────────────────────────────────────────────── */
  --ease-out-expo:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart:   cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);

  --dur-fast:   150ms;
  --dur-normal: 300ms;
  --dur-slow:   500ms;
  --dur-reveal: 1200ms;
}

/* ============================================================
   SEMANTIC ELEMENT STYLES — ready-to-use defaults
   ============================================================ */

html, body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--accent);
  color: var(--fg-strong);
}

.font-logo    { font-family: var(--font-logo); font-weight: 800; letter-spacing: var(--display-1-track); }
.font-tagline { font-family: var(--font-tagline); font-style: italic; font-weight: 300; }
.font-body    { font-family: var(--font-body); }
.font-mono    { font-family: var(--font-mono); }

.display-1 {
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: var(--display-1-size);
  line-height: var(--display-1-line);
  letter-spacing: var(--display-1-track);
  color: var(--fg-strong);
}

.display-2-italic {
  font-family: var(--font-tagline);
  font-weight: 300;
  font-style: italic;
  font-size: var(--display-2-size);
  line-height: var(--display-2-line);
  color: var(--accent);
}

h1, .h1 {
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: var(--h1-size);
  line-height: var(--h1-line);
  letter-spacing: var(--h1-track);
  color: var(--fg-strong);
}

h2, .h2 {
  font-family: var(--font-logo);
  font-weight: 800;
  font-size: var(--h2-size);
  line-height: var(--h1-line);
  color: var(--fg-strong);
}

h3, .h3 {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: var(--h3-size);
  line-height: var(--h3-line);
  letter-spacing: 0.02em;
  color: var(--fg-strong);
}

p, .body {
  font-family: var(--font-body);
  font-size: var(--body-size);
  line-height: var(--body-line);
  color: var(--fg);
}

.body-large {
  font-size: var(--body-large);
  line-height: var(--body-line);
  color: var(--fg);
}

.label, .eyebrow {
  font-family: var(--font-mono);
  font-size: var(--label-size);
  letter-spacing: var(--label-track);
  text-transform: uppercase;
  color: var(--accent);
}

.counter {
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  font-size: var(--counter-size);
  font-weight: 700;
  color: var(--fg-strong);
}

/* The signature red dot — used ONLY on the logo and for accents */
.brand-dot { color: var(--accent); }

/* Glassmorphism — production card style */
.glass {
  background: rgba(255,255,255,0.02);
  backdrop-filter: blur(var(--blur-glass));
  -webkit-backdrop-filter: blur(var(--blur-glass));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: background var(--dur-slow) var(--ease-out-expo),
              border-color var(--dur-slow) var(--ease-out-expo),
              transform var(--dur-slow) var(--ease-out-expo);
}
.glass:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--accent-soft);
  transform: translateY(-4px);
}

/* The 64px red accent line that grows on hover */
.red-line {
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width 600ms var(--ease-out-expo);
}
.glass:hover .red-line,
.group:hover .red-line { width: 64px; }
