/* Livsteknik – minimalistisk landningssida */

:root {
  --color-bg: #fafaf8;
  --color-text: #1a1a18;
  --color-text-muted: #3c3c37;
  --color-accent: #2d6a4f;
  --color-accent-hover: #1b4332;
  --color-focus-ring: #1b4332;
  --font-sans: "DM Sans", system-ui, -apple-system, sans-serif;
  --measure: 65ch;
  --space-section: clamp(3.5rem, 8vw, 6rem);
  --space-block: clamp(1rem, 3vw, 1.35rem);
  --radius-cta: 6px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 100;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-bg);
  background: var(--color-accent-hover);
  text-decoration: none;
  border-radius: 0 0 var(--radius-cta) 0;
  transform: translateY(-120%);
  transition: transform 0.15s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.skip-link:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 2px;
}

.site-header {
  padding: clamp(1.25rem, 4vw, 2rem) clamp(1.25rem, 5vw, 2.5rem);
  border-bottom: 1px solid rgba(26, 26, 24, 0.08);
}

.logo {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--color-text-muted);
}

main {
  padding: 0 clamp(1.25rem, 5vw, 2.5rem) var(--space-section);
}

.hero {
  text-align: center;
  padding: clamp(2.5rem, 10vw, 5rem) 0 var(--space-section);
  max-width: 36rem;
  margin-inline: auto;
}

.hero h1 {
  margin: 0 0 var(--space-block);
  font-size: clamp(2.25rem, 6vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--color-text);
}

.hero-lead {
  margin: 0;
  font-size: clamp(1.0625rem, 2.2vw, 1.1875rem);
  line-height: 1.6;
  color: var(--color-text-muted);
}

.hero-lead strong {
  color: var(--color-text);
  font-weight: 600;
}

.section {
  max-width: var(--measure);
  margin-inline: auto;
  padding-bottom: var(--space-section);
}

.section h2 {
  margin: 0 0 var(--space-block);
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--color-text);
}

.section p {
  margin: 0 0 1em;
  color: var(--color-text-muted);
}

.section p:last-child {
  margin-bottom: 0;
}

.section strong {
  color: var(--color-text);
  font-weight: 600;
}

/* Flödeskedja: vertikal på små skärmar, rad med pilar på större */
.flow-chain {
  list-style: none;
  margin: clamp(1.75rem, 4vw, 2.25rem) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.5rem;
}

.flow-step {
  padding: 0.85rem 1rem;
  border: 1px solid rgba(26, 26, 24, 0.12);
  border-radius: var(--radius-cta);
  background: #fff;
  text-align: center;
}

.flow-step__label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
}

.flow-step--arrow {
  border: none;
  background: transparent;
  padding: 0.15rem 0;
  color: var(--color-accent);
  font-size: 1.25rem;
  line-height: 1;
}

.flow-arrow {
  display: block;
}

.flow-arrow::before {
  content: "↓";
}

.flow-step--arrow span {
  display: block;
}

@media (min-width: 640px) {
  .flow-chain {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.5rem;
  }

  .flow-step:not(.flow-step--arrow) {
    flex: 0 1 auto;
    min-width: min(100%, 9.5rem);
  }

  .flow-arrow::before {
    content: "→";
  }

  .flow-step--arrow span {
    display: inline-block;
    transform: none;
  }
}

.cta-section {
  text-align: center;
  padding-top: clamp(1rem, 3vw, 2rem);
  border-top: 1px solid rgba(26, 26, 24, 0.08);
  max-width: 28rem;
}

.cta-text {
  margin-bottom: 1.25rem !important;
  color: var(--color-text);
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  padding: 0.85rem 1.75rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: #fff;
  background-color: var(--color-accent);
  border-radius: var(--radius-cta);
  border: 2px solid transparent;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.cta-button:hover {
  background-color: var(--color-accent-hover);
  color: #fff;
}

.site-footer {
  padding: clamp(1.5rem, 4vw, 2rem) clamp(1.25rem, 5vw, 2.5rem);
  border-top: 1px solid rgba(26, 26, 24, 0.08);
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

/* Tillgänglighet: fokus, skärmläsare */
:focus-visible {
  outline: 2px solid var(--color-focus-ring);
  outline-offset: 3px;
}

.cta-button:focus-visible {
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cta-button,
  .skip-link {
    transition: none;
  }
}
