/* ═══════════════════════════════════════════════════════════
   FieldsIQ Shared Base Styles
   All subsites (qsrpro, diagpro, etc.) import this file for
   consistent branding, typography, and layout primitives.
   ═══════════════════════════════════════════════════════════ */

/* ── CSS Variables (override per-subsite via --brand-*) ── */
:root {
  /* Brand colors — subsites override these */
  --brand-primary: #007AFF;
  --brand-primary-dark: #0056b3;
  --brand-primary-light: #4A9EFF;
  --brand-gradient: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
  --brand-accent: #28a745;

  /* Neutral palette (shared across all subsites) */
  --color-text: #1f2937;
  --color-text-muted: #6b7280;
  --color-text-light: #9ca3af;
  --color-bg: #ffffff;
  --color-bg-alt: #f8fafc;
  --color-border: #e5e7eb;
  --color-error: #dc3545;
  --color-success: #28a745;

  /* Typography */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 15px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-2xl: 24px;
  --font-size-3xl: 32px;
  --font-size-4xl: 48px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 80px;

  /* Layout */
  --max-width: 1200px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 16px;
}

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--font-family);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand-primary); text-decoration: none; }
a:hover { color: var(--brand-primary-dark); }

img { max-width: 100%; height: auto; }

/* ── Layout Primitives ── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.section {
  padding: var(--space-3xl) var(--space-lg);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.section-title {
  font-size: var(--font-size-3xl);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.section-description {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 32px;
  border-radius: var(--border-radius-sm);
  font-weight: 600;
  font-size: var(--font-size-md);
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
  border: 2px solid var(--brand-primary);
  color: var(--brand-primary);
  background: transparent;
}
.btn-secondary:hover {
  background: var(--brand-primary);
  color: #fff;
}

/* ── Cards ── */
.card {
  padding: var(--space-xl);
  border-radius: var(--border-radius);
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

/* ── Grid Layouts ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
}

/* ── Forms ── */
.form-group { margin-bottom: var(--space-md); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--border-radius-sm);
  font-size: var(--font-size-base);
  font-family: var(--font-family);
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* ── Footer ── */
.shared-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2xl) var(--space-lg);
  color: var(--color-text-muted);
}

.shared-footer .footer-content {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
}

.shared-footer .footer-bottom {
  max-width: var(--max-width);
  margin: var(--space-lg) auto 0;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  text-align: center;
  font-size: var(--font-size-sm);
}

.shared-footer .footer-title {
  font-size: var(--font-size-md);
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

.shared-footer .footer-links {
  list-style: none;
}

.shared-footer .footer-links li { margin-bottom: var(--space-sm); }

.shared-footer .footer-links a {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}
.shared-footer .footer-links a:hover { color: var(--brand-primary); }

/* ── Animations ── */
.fade-in-up {
  animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .section-title { font-size: var(--font-size-2xl); }
  .section { padding: var(--space-2xl) var(--space-md); }
  .shared-footer .footer-content { grid-template-columns: 1fr; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}
