/* base.css — reset + global typography + utility classes */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  line-height: 1.6;
  color: var(--clr-text);
  background: var(--clr-bg);
  -webkit-font-smoothing: antialiased;
}

/* ── Links ── */
a { color: var(--clr-blue); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--clr-orange); }

/* ── Images ── */
img { max-width: 100%; height: auto; display: block; }

/* ── Headings ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--clr-text);
}
h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }

/* ── Lists ── */
ul, ol { padding-left: var(--space-6); }

/* ── Forms ── */
input, select, textarea, button {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
}
button { cursor: pointer; }

/* ── Container ── */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

/* ── Screen-reader only ── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Utility: flex shortcuts ── */
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between{ display: flex; align-items: center; justify-content: space-between; }
.flex-col    { display: flex; flex-direction: column; }
.gap-2       { gap: var(--space-2); }
.gap-3       { gap: var(--space-3); }
.gap-4       { gap: var(--space-4); }
.gap-6       { gap: var(--space-6); }

/* ── Utility: text ── */
.text-sm     { font-size: var(--font-size-sm); }
.text-xs     { font-size: var(--font-size-xs); }
.text-muted  { color: var(--clr-text-muted); }
.text-orange { color: var(--clr-orange); }
.text-blue   { color: var(--clr-blue); }
.font-bold   { font-weight: 700; }
.font-medium { font-weight: 500; }

/* ── Utility: spacing ── */
.mt-auto { margin-top: auto; }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.mb-8    { margin-bottom: var(--space-8); }

/* ── Buttons (reusable) ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem var(--space-5);
  border-radius: var(--radius-md);
  font-size: var(--font-size-sm);
  font-weight: 600;
  border: 2px solid transparent;
  transition: all var(--transition-fast);
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}
.btn-primary {
  background: var(--clr-orange);
  color: var(--clr-white);
  border-color: var(--clr-orange);
}
.btn-primary:hover {
  background: var(--clr-orange-dark);
  border-color: var(--clr-orange-dark);
  color: var(--clr-white);
}
.btn-secondary {
  background: var(--clr-white);
  color: var(--clr-blue);
  border-color: var(--clr-blue);
}
.btn-secondary:hover {
  background: var(--clr-blue);
  color: var(--clr-white);
}
.btn-ghost {
  background: transparent;
  color: var(--clr-text-muted);
  border-color: var(--clr-border);
}
.btn-ghost:hover {
  background: var(--clr-surface);
  color: var(--clr-text);
}
.btn-sm {
  padding: 0.4rem var(--space-3);
  font-size: var(--font-size-xs);
}
.btn-lg {
  padding: 0.875rem var(--space-8);
  font-size: var(--font-size-base);
}
.btn-full { width: 100%; justify-content: center; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  line-height: 1.5;
}
.badge-orange { background: var(--clr-orange-light); color: var(--clr-orange-dark); }
.badge-blue   { background: var(--clr-blue-light);   color: var(--clr-blue-dark); }
.badge-yellow { background: var(--clr-yellow-light);  color: var(--clr-yellow-dark); }
.badge-success{ background: var(--clr-success-bg);   color: var(--clr-success); }
.badge-error  { background: var(--clr-error-bg);     color: var(--clr-error); }

/* ── Card ── */
.card {
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--clr-border);
  overflow: hidden;
}

/* ── Divider ── */
.divider {
  border: none;
  border-top: 1px solid var(--clr-border);
  margin-block: var(--space-6);
}

/* ── Page wrapper ── */
.site { display: flex; flex-direction: column; min-height: 100vh; }
.site-main { flex: 1; padding-top: var(--header-height); }

/* ── Breadcrumbs ── */
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--clr-text-muted);
  padding-block: var(--space-4);
}
.breadcrumbs a { color: var(--clr-text-muted); }
.breadcrumbs a:hover { color: var(--clr-orange); }
.breadcrumbs .sep { opacity: 0.4; }
.breadcrumbs .current { color: var(--clr-text); font-weight: 500; }

/* ── Section heading ── */
.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}
.section-title {
  font-size: var(--font-size-2xl);
  font-weight: 700;
}
.section-link {
  font-size: var(--font-size-sm);
  color: var(--clr-orange);
  font-weight: 600;
}
.section-link:hover { color: var(--clr-orange-dark); }

/* ── Loading skeleton ── */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
.skeleton {
  background: var(--clr-surface);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.4s ease infinite;
}

/* ── Responsive media queries ── */
@media (max-width: 1024px) {
  :root { --container-padding: var(--space-4); }
  h1 { font-size: var(--font-size-3xl); }
  h2 { font-size: var(--font-size-2xl); }
}
@media (max-width: 768px) {
  :root { --container-padding: var(--space-4); --sidebar-width: 100%; }
}
