/*
 * Shared stylesheet for the static Berglabs pages (kontakt, företaget,
 * integritetspolicy, användarvillkor). Mirrors the design tokens and visual
 * language of the React-built homepage (src/styles.css + shadcn/ui) so the
 * whole site feels like one product, without depending on the Tailwind
 * build pipeline (Tailwind only scans src/, not public/).
 *
 * Direction: spacious, quiet, confident — generous whitespace, big Manrope
 * headlines, no boxed/bordered cards, navy (#102866) reserved for one clear
 * accent per page rather than spread across every element.
 */

:root {
  --brand: #102866;
  --brand-hover: #0c1f52;
  --foreground: #111318;
  --muted-foreground: #6b7280;
  --background: #fbfbfc;
  --secondary: #f3f5f9;
  --border: #e8e9ec;
  --radius: 0.75rem;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.font-display {
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  letter-spacing: -0.02em;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.container {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.container--narrow {
  max-width: 44rem;
}

@media (min-width: 640px) {
  .container {
    padding-inline: 2.5rem;
  }
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 251, 252, 0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 5rem;
}

.site-logo img {
  height: 1.75rem;
  width: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.site-nav__links {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.site-nav__links a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-nav__links a:hover {
  color: var(--foreground);
}

@media (min-width: 640px) {
  .site-nav__links {
    display: flex;
  }
}

/* Mobile nav toggle */

.site-nav__toggle {
  display: none;
  position: relative;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

@media (max-width: 639px) {
  .site-nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav__cta {
    display: none;
  }
}

.site-nav__toggle-icon,
.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after {
  content: "";
  display: block;
  position: absolute;
  width: 1.25rem;
  height: 2px;
  background: var(--foreground);
  border-radius: 1px;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease,
    top 0.2s ease;
}

.site-nav__toggle-icon {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.site-nav__toggle-icon::before {
  top: -6px;
  left: 0;
}

.site-nav__toggle-icon::after {
  top: 6px;
  left: 0;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon {
  background: transparent;
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-nav__toggle[aria-expanded="true"] .site-nav__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-mobile-nav {
  border-top: 1px solid var(--border);
  background: var(--background);
  padding: 1rem 1.5rem 1.25rem;
}

.site-mobile-nav[hidden] {
  display: none;
}

@media (min-width: 640px) {
  .site-mobile-nav {
    display: none !important;
  }
}

.site-mobile-nav__links {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.site-mobile-nav__links a {
  display: block;
  padding: 0.75rem 0.5rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.site-mobile-nav__links a:hover {
  background: var(--secondary);
}

.site-mobile-nav__cta {
  display: flex;
  width: 100%;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.5rem 1.375rem;
  height: 2.375rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.btn-sm {
  height: 2.125rem;
  padding: 0.4rem 1.125rem;
  font-size: 0.875rem;
}

.btn-lg {
  height: 2.875rem;
  padding: 0.625rem 2.25rem;
  font-size: 1rem;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-hover);
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--foreground);
}

.btn-outline:hover {
  background: var(--secondary);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
}

.site-footer__row {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-block: 4rem;
}

@media (min-width: 640px) {
  .site-footer__row {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__brand img {
  height: 1.5rem;
  width: auto;
}

.site-footer__copyright {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  margin: 0;
}

.site-footer__columns {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
}

.site-footer__columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.site-footer__columns a {
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer__columns a:hover {
  color: var(--foreground);
}

/* Page header (used by legal + kontakt pages) */

.page-hero {
  padding-block: 5.5rem 3.5rem;
  text-align: center;
}

.page-hero__eyebrow {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted-foreground);
  margin: 0 0 1rem;
}

.page-hero h1 {
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  font-weight: 800;
  margin: 0 0 1.125rem;
}

.page-hero p {
  font-size: 1.1875rem;
  color: var(--muted-foreground);
  max-width: 42rem;
  margin-inline: auto;
}

/* Prose (legal content) */

.prose {
  padding-block: 1rem 6rem;
}

.prose h2 {
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  letter-spacing: -0.015em;
  font-size: 1.4375rem;
  font-weight: 800;
  margin: 3rem 0 0.875rem;
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p {
  color: var(--foreground);
  margin: 0 0 1.125rem;
}

.prose ul {
  margin: 0 0 1.125rem;
  padding-left: 1.25rem;
  color: var(--foreground);
}

.prose li {
  margin-bottom: 0.5rem;
}

.prose strong {
  font-weight: 600;
}

.prose a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose .updated {
  color: var(--muted-foreground);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* Reveal-on-scroll */

.reveal {
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.7s ease-out,
    transform 0.7s ease-out;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  html {
    scroll-behavior: auto;
  }
}
