/* ============================================
   POKE-FIX DESIGN SYSTEM
   Inspired by PSA/BGS premium aesthetic
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
  --color-primary: #0f172a;
  --color-primary-light: #1e293b;
  --color-accent: #d4a853;
  --color-accent-hover: #c49a48;
  --color-text: #0f172a;
  --color-text-muted: #64748b;
  --color-text-light: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-light: #f1f5f9;
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-muted: #f1f5f9;
  --color-success: #22c55e;
  --color-error: #ef4444;
  --color-white: #ffffff;

  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);

  --max-width: 1200px;
  --max-width-narrow: 800px;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
html, body { overflow-x: hidden; max-width: 100vw; }
body {
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
.t-display {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.t-heading {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.t-subheading {
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.t-body { font-size: 1rem; line-height: 1.7; color: var(--color-text-muted); }
.t-small { font-size: 0.875rem; line-height: 1.6; }
.t-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}
.t-accent { color: var(--color-accent); }

/* ---------- Layout ---------- */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.container--narrow { max-width: var(--max-width-narrow); margin: 0 auto; padding: 0 2rem; }

.section {
  padding: 6rem 2rem;
}
.section--dark {
  background: var(--color-primary);
  color: var(--color-white);
}
.section--subtle {
  background: var(--color-bg-subtle);
}
.section--muted {
  background: var(--color-bg-muted);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}
.section-header .t-label {
  margin-bottom: 1rem;
  display: block;
}
.section-header h2 {
  font-size: 2.75rem;
  margin-bottom: 1.25rem;
}
.section-header p {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-md);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.4;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn--primary {
  background: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
}
.btn--primary:hover:not(:disabled) {
  background: #0c1322;
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--accent {
  background: var(--color-accent);
  color: var(--color-primary);
  border-color: var(--color-accent);
  font-weight: 700;
}
.btn--accent:hover:not(:disabled) {
  background: var(--color-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 168, 83, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-border);
}
.btn--outline:hover:not(:disabled) {
  border-color: var(--color-primary);
  background: var(--color-bg-subtle);
}

.btn--white {
  background: var(--color-white);
  color: var(--color-primary);
  border-color: var(--color-white);
  font-weight: 700;
}
.btn--white:hover:not(:disabled) {
  background: var(--color-bg-subtle);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn--lg { padding: 1rem 2.5rem; font-size: 1.0625rem; }
.btn--sm { padding: 0.625rem 1.25rem; font-size: 0.875rem; }
.btn--full { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  transition: all 0.2s ease;
}
.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: #cbd5e1;
}
.card--elevated {
  box-shadow: var(--shadow-md);
  border: none;
}
.card--featured {
  border: 2px solid var(--color-accent);
  position: relative;
}
.card--dark {
  background: var(--color-primary-light);
  border-color: #334155;
  color: var(--color-white);
}

/* ---------- Form Elements ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}
.form-label--required::after {
  content: '*';
  color: var(--color-error);
  margin-left: 0.25rem;
}
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: var(--font-primary);
  color: var(--color-text);
  background: var(--color-white);
  transition: all 0.2s ease;
}
.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}
.form-input--error { border-color: var(--color-error); }
.form-error {
  color: var(--color-error);
  font-size: 0.75rem;
  margin-top: 0.25rem;
  display: none;
}
.form-error.show { display: block; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge--gold { background: rgba(212, 168, 83, 0.15); color: var(--color-accent); }
.badge--green { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.badge--blue { background: rgba(59, 130, 246, 0.1); color: #2563eb; }

/* ---------- Divider ---------- */
.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

/* ---------- Grid ---------- */
.grid { display: grid; gap: 2rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Spinner ---------- */
.spinner {
  border: 2px solid var(--color-border);
  border-top: 2px solid var(--color-primary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* ---------- Enforced Type Scale ---------- */
/* These override page-specific font sizes for consistency */
h1, .h1 { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h2, .h2 { font-size: 2rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
h3, .h3 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
h4, .h4 { font-size: 1.0625rem; font-weight: 600; line-height: 1.4; }
p, li { font-size: 1rem; line-height: 1.7; }
small, .text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }

@media (max-width: 968px) {
  h1, .h1 { font-size: 2.25rem; }
  h2, .h2 { font-size: 1.75rem; }
}
@media (max-width: 640px) {
  h1, .h1 { font-size: 1.75rem; }
  h2, .h2 { font-size: 1.5rem; }
  h3, .h3 { font-size: 1.125rem; }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-white { color: var(--color-white); }
.text-accent { color: var(--color-accent); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.hidden { display: none !important; }

/* ---------- Responsive ---------- */
@media (max-width: 968px) {
  .section { padding: 4rem 1.5rem; }
  .section-header h2 { font-size: 2.25rem; }
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .section { padding: 3rem 1rem; }
  .section-header { margin-bottom: 2.5rem; }
  .section-header h2 { font-size: 1.75rem; }
  .section-header p { font-size: 1rem; }
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .container { padding: 0 1rem; }
  .btn--lg { padding: 0.875rem 2rem; font-size: 1rem; }
}
