/* Klarar — shared base styles */

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

:root {
  --ink: #0f0f0f;
  --paper: #f5f2ed;
  --paper-soft: #ede9e2;
  --muted: #6b655d;
  --accent: #1a3a2a;
  --accent-payloop: #2e5a6e;
  --accent-dot: #4a9e6e;
  --line: rgba(15, 15, 15, 0.12);
  --line-strong: rgba(15, 15, 15, 0.22);
  --serif: 'Iowan Old Style', 'Palatino Linotype', Palatino, Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

html, body { height: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 1.0625rem;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1rem;
  text-decoration: none;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent-payloop);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Header */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}
.site-header .brand {
  font-family: var(--serif);
  font-size: 1.25rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-header .brand .dot-sm {
  display: inline-block;
  width: 0.28em;
  height: 0.28em;
  background: var(--accent-dot);
  border-radius: 50%;
  vertical-align: super;
  margin-left: 0.04em;
}
.site-header .product-crumb {
  margin-left: 0.75rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  font-family: var(--serif);
}
.lang-toggle {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.lang-toggle a {
  color: var(--muted);
  text-decoration: none;
  padding: 0 0.3rem;
}
.lang-toggle a:hover { color: var(--ink); }
.lang-toggle a[aria-current="true"] {
  color: var(--ink);
  font-weight: 500;
}
.lang-toggle span.sep { color: var(--line-strong); }

/* Headings */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--ink);
}
h1 { font-size: clamp(2.25rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }
p { max-width: 640px; }

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.85rem 1.5rem;
  border-radius: 3rem;
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.2;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: #000; }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  padding: 0.85rem 0.75rem;
}
.btn-secondary:hover { color: var(--accent-payloop); }

/* Footer */
footer {
  margin-top: auto;
  padding: 3rem 2rem 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}
.footer-inner h4 {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.footer-inner ul { list-style: none; }
.footer-inner li { margin-bottom: 0.4rem; }
.footer-inner a {
  color: var(--muted);
  text-decoration: none;
}
.footer-inner a:hover { color: var(--ink); }
.footer-legal {
  max-width: 1120px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

@media (max-width: 720px) {
  .site-header { padding: 1.25rem 1.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-legal { text-align: left; }
}
@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

/* Legal / policy stub pages (villkor, integritet, pba, + EN equivalents) */
.stub-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 4rem 2rem;
}
.stub {
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  animation: fadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.stub .divider {
  width: 48px;
  height: 1px;
  background: var(--line);
  margin: 0 auto 2rem;
}
.stub h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
  color: var(--accent);
  font-weight: 400;
}
.stub p {
  color: var(--muted);
  margin: 0 auto 1.25rem;
  max-width: 420px;
  line-height: 1.6;
}
.stub p:last-of-type { margin-bottom: 2.5rem; }
.stub p a { color: var(--ink); }
.stub a.btn-back {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  border-radius: 3rem;
  font-size: 0.95rem;
  min-height: 44px;
  line-height: 1.6;
  transition: background 0.15s ease;
}
.stub a.btn-back:hover { background: #000; }

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
