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

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  color: var(--color-primary);
  background: var(--color-surface);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  line-height: 1.2;
  font-weight: 700;
}

h1 { font-size: clamp(var(--fs-2xl), 5vw, var(--fs-4xl)); }
h2 { font-size: clamp(var(--fs-xl), 3.5vw, var(--fs-3xl)); }
h3 { font-size: clamp(var(--fs-lg), 2.5vw, var(--fs-2xl)); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

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

/* Section spacing */
.section { padding-block: var(--space-20); }
.section--sm { padding-block: var(--space-12); }
.section--lg { padding-block: var(--space-24); }

/* Section header */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header .overline {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: var(--space-3);
}
.section-header h2 { color: var(--color-primary); }
.section-header p {
  color: var(--color-muted);
  max-width: 540px;
  margin-inline: auto;
  margin-top: var(--space-3);
}

/* Utility */
.text-accent  { color: var(--color-accent); }
.text-muted   { color: var(--color-muted); }
.text-center  { text-align: center; }
.text-sm      { font-size: var(--fs-sm); }
.text-xs      { font-size: var(--fs-xs); }
.fw-medium    { font-weight: 500; }
.fw-bold      { font-weight: 700; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.gap-2        { gap: var(--space-2); }
.gap-4        { gap: var(--space-4); }
.mt-4         { margin-top: var(--space-4); }
.mt-8         { margin-top: var(--space-8); }
.mb-4         { margin-bottom: var(--space-4); }
.hidden       { display: none !important; }
.sr-only      { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Toast notifications */
#toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.toast {
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: #fff;
  min-width: 260px;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease, fadeOut 0.4s ease 2.8s forwards;
}
.toast--success { background: #2D6A4F; }
.toast--error   { background: #C0392B; }
.toast--info    { background: var(--color-primary); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(8px); }
}
