/* ==========================================================
   BASE STYLES — Reset, Typography, Utilities
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800;900&family=DM+Sans:wght@300;400;500;600&display=swap');

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg);
  min-height: 100vh;
  overflow-x: hidden;
}

/* --- Headings --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-tight);
  color: var(--taupe);
  font-weight: var(--fw-bold);
}

h1 { font-size: var(--fs-4xl); font-weight: var(--fw-xbold); }
h2 { font-size: var(--fs-3xl); font-weight: var(--fw-xbold); }
h3 { font-size: var(--fs-2xl); }
h4 { font-size: var(--fs-xl); }
h5 { font-size: var(--fs-lg); }
h6 { font-size: var(--fs-md); }

p { line-height: var(--lh-relaxed); }

/* --- Links --- */
a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--accent-hover); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

/* --- Lists --- */
ul, ol { list-style: none; }

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

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

/* --- Section Spacing --- */
.section {
  padding-block: var(--space-24);
}

.section-sm {
  padding-block: var(--space-16);
}

.section-title {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-xbold);
  color: var(--taupe);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--fs-md);
  color: var(--text-secondary);
  line-height: var(--lh-relaxed);
  max-width: 600px;
}

.section-header {
  margin-bottom: var(--space-16);
}

.section-header.centered {
  text-align: center;
}

.section-header.centered .section-subtitle {
  margin-inline: auto;
}

/* --- Utility: 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: Visually hide but keep focus --- */
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* --- Skip to content --- */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: 1000;
  background: var(--taupe);
  color: var(--cream);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-sm);
  font-weight: var(--fw-semi);
  transition: top var(--t-fast);
}
.skip-link:focus { top: var(--space-4); }

/* --- Divider --- */
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--apricot), var(--blush));
  border-radius: var(--radius-full);
  margin-block: var(--space-4);
}

.divider.centered { margin-inline: auto; }

/* --- Tag / Badge --- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semi);
  font-family: var(--font-heading);
  background: var(--peach-light);
  color: var(--taupe-light);
  border: 1px solid var(--peach);
}

/* --- Language pills --- */
.lang-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
}

.lang-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semi);
  font-family: var(--font-heading);
  background: var(--white);
  color: var(--taupe);
  border: 2px solid var(--peach);
  box-shadow: var(--shadow-sm);
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb {
  background: var(--peach-deep);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover { background: var(--apricot); }

/* --- Selection --- */
::selection {
  background: var(--blush);
  color: var(--taupe);
}
