/* ═══════════════════════════════════════════════
   base.css — shared styles across all pages
   ═══════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --ink:             #1a1a1a;
  --ink-mid:         #484848;
  --ink-light:       #6b6b6b;
  --ink-faint:       #999999;
  --accent:          #b5451b;
  --accent-hover:    #923812;
  --accent-subtle:   rgba(181, 69, 27, 0.08);
  --olive:           #5d6b30;
  --olive-hover:     #4a5526;
  --olive-subtle:    rgba(93, 107, 48, 0.09);
  --rule:            #e2ddd6;
  --rule-light:      #ebe7e0;
  --bg:              #f6f4ef;
  --white:           #fffef9;
  --link-blue:       #3a7abf;
  --link-blue-hover: #2a5d96;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --radius:    10px;
  --radius-sm: 6px;
}

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

/* ── Base ── */
body {
  background: var(--bg);
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ══════════════════════════
   Nav
   ══════════════════════════ */
.site-nav-wrapper {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-nav {
  max-width: 920px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-nav-links { display: flex; gap: 0; align-items: center; }
.site-nav-links a { position: relative; }

.site-nav-links a:not(:last-child)::after {
  content: '|';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rule);
  font-size: 11px;
  pointer-events: none;
}

.site-nav-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  padding: 6px 18px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
  letter-spacing: 0.01em;
}

.site-nav-links a:hover  { color: var(--ink); background: var(--rule-light); }
.site-nav-links a.active { color: var(--accent); background: var(--accent-subtle); font-weight: 600; }

.lang-toggle {
  position: relative;
  display: inline-flex;
  gap: 0;
  background: var(--rule-light);
  border-radius: 22px;
  padding: 3px;
}

.lang-toggle::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: calc(100% - 6px);
  background: var(--white);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.24s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 0;
}

.lang-toggle[data-active="en"]::before { transform: translateX(100%); }

.btn-lang {
  position: relative;
  z-index: 1;
  font-size: 18px;
  background: transparent;
  border: none;
  padding: 5px 13px;
  border-radius: 18px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.4;
  transition: opacity 0.18s, transform 0.1s;
  min-width: 44px;
  text-align: center;
}

.btn-lang:hover  { opacity: 0.7; }
.btn-lang:active { transform: scale(0.92); }
.btn-lang.active { opacity: 1; }

/* ══════════════════════════
   Layout
   ══════════════════════════ */
.container {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 96px;
}

/* ══════════════════════════
   Site footer
   ══════════════════════════ */
.site-footer {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-icon-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-light);
  text-decoration: none;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  transition: color 0.15s, background 0.15s;
}

.footer-icon-link:hover { color: var(--ink); background: var(--rule-light); }

.footer-icon-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.footer-icon-link:hover svg { opacity: 1; }

/* ══════════════════════════
   Mobile
   ══════════════════════════ */
@media (max-width: 640px) {
  .site-nav { flex-direction: row; align-items: center; padding: 12px 16px; }
  .container { padding: 28px 16px 72px; }
}

/* ══════════════════════════
   Print
   ══════════════════════════ */
@media print {
  .site-nav  { display: none !important; }
  .back-link { display: none !important; }
}
