@import "tailwindcss";

/* ─── Design Tokens ─────────────────────────────────────────── */

@theme {
  /* Background layers */
  --color-bg-deep: #0a0e1a;
  --color-bg-surface: #111827;
  --color-bg-card: #1a2236;
  --color-bg-card-hover: #1f2a42;

  /* Borders */
  --color-border-glass: rgba(212, 175, 55, 0.12);
  --color-border-subtle: rgba(255, 255, 255, 0.06);

  /* Gold accents */
  --color-gold-bright: #d4af37;
  --color-gold-muted: #a8872a;
  --color-gold-glow: rgba(212, 175, 55, 0.25);

  /* Text */
  --color-text-primary: #e8e0d0;
  --color-text-secondary: #8b9bb4;
  --color-text-dim: #4a5568;

  /* Semantic */
  --color-danger: #ef4444;
  --color-success: #22c55e;
  --color-info: #3b82f6;

  /* Fonts */
  --font-heading: "Cinzel", serif;
  --font-sans: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ─── Self-Hosted Fonts ─────────────────────────────────────── */
/* TODO: download woff2 files to public/fonts/ for offline-first */
/* For now, load from Google Fonts during development */
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/cinzel/v25/8vIJ7ww63mViL4j6N6R2lQ.woff2") format("woff2");
}
@font-face {
  font-family: "Cinzel";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/cinzel/v25/8vIK7ww63mVnVhR0LQRJNg.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrY.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrY.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/inter/v19/UcCO3FwrK3iLTeHuS_nVMrY.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/jetbrainsmono/v21/tDbY2o-flEEny0FZhsfKx5Q.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("https://fonts.gstatic.com/s/jetbrainsmono/v21/tDbY2o-flEEny0FZhsfKx5Q.woff2") format("woff2");
}

/* ─── Base Styles ───────────────────────────────────────────── */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--color-gold-muted) transparent;
}

html,
body,
#root {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--color-bg-deep);
  background: radial-gradient(ellipse at 50% 0%, #141e33 0%, var(--color-bg-deep) 70%);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Glassmorphism Card ─────────────────────────────────────── */

.glass-card {
  background: rgba(26, 34, 54, 0.55);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid rgba(212, 175, 55, 0.12);
  border-radius: 16px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition:
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.glass-card:hover {
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow:
    0 0 20px rgba(212, 175, 55, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.glass-card-active {
  border-color: var(--color-gold-bright) !important;
  box-shadow:
    0 0 24px rgba(212, 175, 55, 0.15),
    0 4px 16px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
}

/* ─── Utility Classes ────────────────────────────────────────── */

.font-heading {
  font-family: var(--font-heading);
}

.font-mono {
  font-family: var(--font-mono);
}

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

.border-gold {
  border-color: var(--color-gold-bright);
}

.bg-deep {
  background-color: var(--color-bg-deep);
}

.bg-surface {
  background-color: var(--color-bg-surface);
}

.bg-card {
  background-color: var(--color-bg-card);
}

/* Gold glowing focus ring */
*:focus-visible {
  outline: 2px solid var(--color-gold-bright);
  outline-offset: 2px;
}

/* ─── Animations ──────────────────────────────────────────────── */

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}