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

:root {
  --primary: #c47868;
  --bg: #f6f2eb;
  --text: #1a1814;
  --text-secondary: #736c64;
  --text-tertiary: rgba(26, 24, 20, 0.42);
  --border: rgba(26, 24, 20, 0.10);
  --border-glass: rgba(255, 255, 255, 0.62);
  --card-bg: rgba(255, 255, 255, 0.58);
  --glass-blur: 36px;
  --shadow-card:
    0 1px 0 rgba(255, 255, 255, 0.75) inset,
    0 10px 30px -18px rgba(40, 30, 12, 0.28),
    0 0 0 0.5px rgba(26, 24, 20, 0.06);
  --radius-card: 22px;
  --brand-space: 56px;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, "Noto Sans SC", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  --font-display: "New York", "Iowan Old Style", "Apple Garamond", "Source Serif 4", "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
  background: var(--bg);
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  position: relative;
  isolation: isolate;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background-image:
    url('images/paper-fibres.svg'),
    radial-gradient(ellipse 90% 55% at 50% -8%, rgba(255, 255, 255, 0.62), transparent 58%),
    linear-gradient(165deg, #fbf8f2 0%, #f5efe6 45%, #efe7dc 100%);
  background-size: 400px 400px, auto, auto;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g' x='0' y='0' width='100%25' height='100%25'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='1' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncA type='linear' slope='0' intercept='1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
  opacity: 0.18;
}

.site-brand {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: clamp(22px, 3.2vw, 32px) 0 0 clamp(20px, 4vw, 40px);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  transition: opacity .2s ease;
}

.site-brand:hover {
  opacity: 0.72;
  color: var(--text);
  text-decoration: none;
}

.site-brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: 0 1px 5px rgba(40, 28, 18, 0.14);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
}

.lang-toggle button {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.04em;
  padding: 5px 9px;
  min-width: 34px;
  border: 1px solid transparent;
  border-radius: 5px;
  cursor: pointer;
  background: transparent;
  color: var(--text-tertiary);
  transition: color .2s ease, border-color .2s ease, background .2s ease;
  font-family: inherit;
  line-height: 1;
}

.lang-toggle button:hover { color: var(--text-secondary); }

.lang-toggle button.active {
  border-color: rgba(26, 23, 20, 0.22);
  background: rgba(255, 255, 255, 0.35);
}

footer {
  border-top: 0.5px solid var(--border);
  padding: 22px 0 28px;
  background: transparent;
}

.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.footer-copy {
  font-size: 12.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  justify-self: start;
}

footer .lang-toggle { justify-self: center; }

.footer-links {
  display: flex;
  gap: 18px;
  justify-self: end;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 12.5px;
  color: var(--text-tertiary);
  font-weight: 500;
  text-decoration: none;
  transition: color .2s ease;
}

.footer-links a:hover {
  color: #3c3732;
  text-decoration: none;
}

@media (max-width: 599px) {
  .footer-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 14px;
  }

  .footer-copy,
  footer .lang-toggle,
  .footer-links {
    justify-self: center;
  }
}
