/* Shared tokens, header, footer, and controls for the Swiss directory. */

@font-face {
  font-family: "Geist";
  src: url("../resources/libs/fonts/geist/Geist-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("../resources/libs/fonts/geist/Geist-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Geist";
  src: url("../resources/libs/fonts/geist/Geist-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f8f7f3;
  --cream-deep: #f3efe8;
  --paper: #ffffff;
  --ink: #111111;
  --ink-soft: #1a1a1a;
  --text: #111111;
  --text-muted: #6a6a6a;
  --text-dim: #8a8a8a;
  --line: #ecece8;
  --line-strong: #e4e4df;
  --star: #e8b423;
  --radius-pill: 999px;
  --header-h: 64px;
  --max: 1120px;
  --font: "Geist", "SF Pro Display", "SF Pro Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 80;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--paper);
}

.skip-link:focus {
  top: 16px;
}

.wrap {
  width: min(calc(100% - 48px), var(--max));
  margin: 0 auto;
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  pointer-events: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.28s ease, transform 0.28s ease, background 0.28s ease, border-color 0.28s ease;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.site-header.is-visible {
  pointer-events: auto;
  opacity: 1;
  transform: none;
  background: rgba(248, 247, 243, 0.92);
  border-bottom-color: var(--line);
  backdrop-filter: blur(16px);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  width: min(calc(100% - 40px), 1200px);
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  color: var(--ink);
}

.brand-mark svg {
  display: block;
}

.header-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.header-links a {
  font-size: 14px;
  color: var(--text-muted);
}

.header-links a:hover,
.brand:hover {
  color: var(--ink);
}

.header-links .btn-fill {
  color: var(--paper);
}

.header-links .btn-fill:hover {
  color: var(--paper);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: transparent;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

.btn-fill {
  background: var(--ink);
  color: var(--paper);
}

.btn-fill:hover {
  background: #000;
  color: var(--paper);
}

.btn-text {
  padding: 0;
  min-height: 0;
  color: var(--ink);
}

.btn-text:hover {
  opacity: 0.62;
}

.btn-arrow {
  font-size: 1.05em;
  line-height: 1;
}

.site-footer {
  background: var(--paper);
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  padding: 72px 0 48px;
}

.footer-brand {
  max-width: 280px;
}

.footer-brand .brand {
  margin-bottom: 14px;
}

.footer-brand p,
.footer-col p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}

.footer-col h2 {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li + li {
  margin-top: 10px;
}

.footer-col a {
  font-size: 14px;
}

.footer-col a:hover {
  color: var(--ink);
}

.footer-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.footer-base p {
  margin: 0;
}

.footer-base nav {
  display: flex;
  gap: 18px;
}

.footer-base a:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    padding: 56px 0 36px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(calc(100% - 32px), var(--max));
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-base {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-links a:not(.btn) {
    display: none;
  }
}
