/* learn.safelift.se — base stylesheet
   Brand register. Geist throughout. OKLCH tinted neutrals.
   Body measure 65–75ch. Modular scale 1.333. */

:root {
  /* tinted neutrals, slight warmth toward brand red */
  --ink:        oklch(18% 0.012 35);
  --ink-soft:   oklch(34% 0.010 35);
  --ink-muted:  oklch(52% 0.008 35);
  --paper:      oklch(98.5% 0.004 80);
  --paper-warm: oklch(96.5% 0.008 65);
  --rule:       oklch(88% 0.006 60);
  --accent:     oklch(58% 0.18 32);     /* Safelift red, restrained */
  --accent-ink: oklch(38% 0.14 32);
  --highlight:  oklch(94% 0.04 75);
  --shadow-1:   0 1px 2px oklch(20% 0.02 35 / 0.06), 0 4px 12px oklch(20% 0.02 35 / 0.04);

  --measure: 68ch;
  --max-page: 1280px;

  --t-fast: 120ms;
  --t-base: 220ms;
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("https://cdn.jsdelivr.net/fontsource/fonts/geist:vf@latest/latin-wght-normal.woff2") format("woff2-variations");
}

* { box-sizing: border-box; }

html {
  font-size: clamp(16px, 0.95rem + 0.15vw, 18px);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Geist", "Geist Variable", system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent-ink);
  text-decoration: none;
  border-bottom: 1px solid color-mix(in oklch, var(--accent-ink) 35%, transparent);
  transition: color var(--t-fast) var(--ease-out-quart),
              border-color var(--t-fast) var(--ease-out-quart);
}
a:hover  { color: var(--accent); border-bottom-color: var(--accent); }
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--highlight); color: var(--ink); }

/* layout */

.site {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100dvh;
}

.shell {
  width: 100%;
  max-width: var(--max-page);
  margin: 0 auto;
  padding-inline: clamp(20px, 4vw, 56px);
}

/* nav */

.nav {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in oklch, var(--paper) 92%, transparent);
  backdrop-filter: saturate(140%) blur(8px);
  position: sticky;
  top: 0;
  z-index: 200;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 18px;
  gap: 32px;
}
.brand {
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.05rem;
  color: var(--ink);
  border-bottom: none;
}
.brand .dot { color: var(--accent); }
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.nav-links a {
  color: inherit;
  border-bottom: none;
}
.nav-links a:hover { color: var(--accent); }

/* article */

.article {
  padding-block: clamp(48px, 6vw, 96px);
}
.article-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 64px;
}
@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: minmax(0, 1fr) 280px;
  }
}

.eyebrow {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--accent-ink);
  margin: 0 0 18px;
  text-transform: uppercase;
}

h1.title {
  font-size: clamp(2.1rem, 1.4rem + 2.2vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  font-weight: 600;
  text-wrap: balance;
  margin: 0 0 24px;
  max-width: 24ch;
}

.lede {
  font-size: clamp(1.1rem, 1rem + 0.4vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 56ch;
  line-height: 1.5;
  text-wrap: pretty;
  margin: 0 0 40px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  font-size: 0.88rem;
  color: var(--ink-muted);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding-block: 14px;
  margin-block: 32px;
}
.meta b { font-weight: 500; color: var(--ink-soft); }

.prose {
  max-width: var(--measure);
  font-size: 1.075rem;
}
.prose > * + * { margin-top: 1.25em; }
.prose h2 {
  margin-top: 2.4em;
  margin-bottom: 0.5em;
  font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
  font-weight: 600;
  text-wrap: balance;
}
.prose h3 {
  margin-top: 2em;
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.prose ul, .prose ol {
  padding-left: 1.4em;
}
.prose li + li { margin-top: 0.4em; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 24px;
  border-left: 2px solid var(--accent);
  color: var(--ink-soft);
  font-style: normal;
}
.prose code {
  font-family: ui-monospace, "SFMono-Regular", "JetBrains Mono", monospace;
  font-size: 0.92em;
  background: var(--paper-warm);
  padding: 2px 6px;
  border-radius: 4px;
}

table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.96rem;
  margin: 1.6em 0;
  font-variant-numeric: tabular-nums;
}
table.spec th,
table.spec td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
}
table.spec th {
  font-weight: 500;
  color: var(--ink-soft);
  background: var(--paper-warm);
}
table.spec tr:last-child td { border-bottom: none; }

.callout {
  margin: 2em 0;
  padding: 24px 28px;
  background: var(--paper-warm);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

aside.sidebar {
  position: sticky;
  top: 88px;
  align-self: start;
  font-size: 0.92rem;
  color: var(--ink-soft);
  border-top: 1px solid var(--rule);
  padding-top: 18px;
}
aside.sidebar h4 {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 0 0 12px;
  font-weight: 500;
}
aside.sidebar ul { list-style: none; padding: 0; margin: 0; }
aside.sidebar li + li { margin-top: 10px; }
aside.sidebar a { color: var(--ink-soft); border-bottom: none; }
aside.sidebar a:hover { color: var(--accent); }

/* CTA at end of article */

.cta {
  margin-top: 64px;
  padding: 36px 40px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 8px;
  display: grid;
  gap: 16px;
  max-width: var(--measure);
}
.cta h3 {
  font-size: 1.35rem;
  margin: 0;
  letter-spacing: -0.015em;
  font-weight: 600;
}
.cta p { margin: 0; color: oklch(82% 0.008 35); max-width: 52ch; }
.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 0.96rem;
  border: 1px solid transparent;
  border-bottom: 1px solid transparent;
  transition: transform var(--t-fast) var(--ease-out-quart),
              background var(--t-fast) var(--ease-out-quart);
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: var(--paper);
}
.btn-primary:hover { background: oklch(54% 0.20 32); color: var(--paper); }
.btn-ghost {
  background: transparent;
  border-color: oklch(45% 0.012 35);
  color: var(--paper);
}
.btn-ghost:hover { background: oklch(28% 0.014 35); color: var(--paper); }

/* index / landing */

.hero {
  padding-block: clamp(64px, 8vw, 128px);
}
.hero h1 {
  font-size: clamp(2.4rem, 1.4rem + 3.2vw, 4.4rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
  font-weight: 600;
  text-wrap: balance;
  max-width: 18ch;
  margin: 0 0 28px;
}
.hero p {
  font-size: clamp(1.1rem, 1rem + 0.5vw, 1.4rem);
  max-width: 62ch;
  color: var(--ink-soft);
  margin: 0 0 36px;
  line-height: 1.5;
  text-wrap: pretty;
}

.list {
  border-top: 1px solid var(--rule);
}
.list-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 32px;
  padding-block: 28px;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
  transition: background var(--t-fast) var(--ease-out-quart);
}
@media (max-width: 720px) {
  .list-item {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}
.list-item:hover { background: color-mix(in oklch, var(--paper-warm) 60%, transparent); }
.list-num {
  font-variant-numeric: tabular-nums;
  color: var(--ink-muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
}
.list-body h2 {
  font-size: clamp(1.25rem, 1.05rem + 0.6vw, 1.6rem);
  font-weight: 500;
  margin: 0 0 6px;
  letter-spacing: -0.018em;
  line-height: 1.25;
  text-wrap: balance;
}
.list-body h2 a {
  color: var(--ink);
  border-bottom: none;
}
.list-body h2 a:hover { color: var(--accent); }
.list-body p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1.02rem;
  max-width: 64ch;
  line-height: 1.5;
}

/* footer */

footer.foot {
  border-top: 1px solid var(--rule);
  padding-block: 48px;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 768px) {
  .foot-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.foot-col p { margin: 0 0 8px; }
.foot-col a { color: var(--ink-soft); border-bottom: none; }
.foot-col a:hover { color: var(--accent); }
.foot-meta {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

/* reduced motion */

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