/* =========================================================
   Litow – stilmall
   Samma visuella identitet som appen (Schema).
   Ändra färger, typsnitt och avstånd i :root nedan.
   ========================================================= */

/* Självhostade typsnitt (licenser i assets/fonts/*-OFL.txt) */
@font-face {
  font-family: "DM Sans";
  src: url("fonts/dm-sans-latin-wght.woff2") format("woff2");
  font-weight: 100 1000;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-digits.woff2") format("woff2"); /* bara siffrorna 0–9 */
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ---- Designtokens från appen (Schema) – bara de som sajten använder ---- */

  /* Base */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-border: #e0e0e0;

  /* Text */
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;

  /* Primary accent: light digital blue */
  --color-primary: #8bd0ff;
  --color-primary-hover: #6fa6cc;
  --color-primary-muted: rgba(139, 208, 255, 0.3);
  --color-on-primary: #1a1a1a;     /* text på primärfärg är MÖRK, aldrig vit */

  /* Shape and depth */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-full: 9999px;
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-primary: 0 2px 8px rgba(139, 208, 255, 0.3);

  /* ---- Sajtens egna tokens ---- */

  /* Typsnitt: DM Sans för text, JetBrains Mono bara för siffror/kod */
  --font-sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Textstorlekar (skalar mellan mobil och desktop) */
  --text-sm: 0.875rem;
  --text-base: 1.0625rem;
  --text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.3125rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.875rem, 1.4rem + 2vw, 2.75rem);
  --text-wordmark: clamp(3.5rem, 1.25rem + 11vw, 8.5rem);
  --line-height: 1.6;

  /* Avstånd */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;

  /* Layout */
  --container-width: 68rem;
  --gutter: var(--space-4);        /* sidmarginal */
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (min-width: 48em) {
  :root {
    --gutter: var(--space-6);
  }
}

/* ---------- Grund ---------- */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

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

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
  text-wrap: balance;
}

p {
  margin: 0;
}

a {
  color: var(--color-text);
  text-decoration-color: var(--color-primary);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.25em;
}

a:hover {
  text-decoration-color: var(--color-primary-hover);
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: calc(var(--container-width) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  z-index: 10;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  font-weight: 600;
}

.skip-link:focus {
  top: var(--space-4);
}

/* ---------- Hero: logga + slogan ---------- */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--space-8) var(--gutter) var(--space-9);
  background: var(--color-bg);
  text-align: center;
}

.wordmark {
  padding-right: 0.045em; /* kompenserar för tät bokstavsavstånd så ordet hamnar mitt i */
  font-size: var(--text-wordmark);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1;
}

.slogan {
  margin-top: var(--space-5);
  color: var(--color-text-secondary);
  font-size: var(--text-xl);
}

/* Studsande pil längst ner – visar att man kan scrolla. Inte klickbar. */
.scroll-cue {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  color: var(--color-text-secondary);
  pointer-events: none;
  transform: translateX(-50%);
}

.scroll-cue svg {
  display: block;
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------- Andra sidan: Så arbetar vi + sidfot ---------- */

/* Minst en hel skärm hög, så att heron inte syns när man scrollat längst ner */
.page-two {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.page-two main {
  display: grid;
  flex: 1 0 auto;
  align-content: center; /* centrerar innehållet lodrätt */
}

.process {
  padding-block: clamp(5rem, 3rem + 8vw, 9rem);
}

.process-inner {
  display: grid;
  gap: var(--space-7);
}

.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  background: var(--color-primary-muted);
  color: var(--color-on-primary);
  font-size: 0.8125rem;
  font-weight: 600;
}

.process h2 {
  margin-bottom: var(--space-4);
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.intro {
  max-width: 28em;
  color: var(--color-text-secondary);
  font-size: var(--text-lg);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  column-gap: var(--space-5);
  padding-bottom: var(--space-7);
}

.step:last-child {
  padding-bottom: 0;
}

/* Tunn linje mellan stegen */
.step:not(:last-child)::before {
  content: "";
  position: absolute;
  top: 3.25rem;
  bottom: var(--space-3);
  left: calc(1.25rem - 0.5px);
  width: 1px;
  background: var(--color-border);
}

.step-number {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  box-shadow: var(--shadow-primary);
  color: var(--color-on-primary);
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  font-weight: 600;
}

.step h3 {
  margin: 0.3rem 0 var(--space-2);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
}

.step p {
  max-width: 32em;
  color: var(--color-text-secondary);
}

@media (min-width: 60em) {
  .process-inner {
    grid-template-columns: 1fr 1.2fr;
    align-items: start;
    gap: var(--space-9);
  }

  .process-heading {
    position: sticky;
    top: var(--space-8);
  }
}

/* ---------- Sidfot ---------- */

.site-footer {
  padding-block: var(--space-6);
  border-top: 1px solid var(--color-border);
  color: var(--color-text-secondary);
  font-size: var(--text-sm);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2) var(--space-5);
}

/* ---------- 404 ---------- */

.not-found h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  letter-spacing: -0.025em;
}

.not-found p {
  margin-top: var(--space-4);
  color: var(--color-text-secondary);
}

.not-found .home-link {
  display: inline-block;
  margin-top: var(--space-6);
  font-weight: 600;
}

/* ---------- Rörelse (stängs av om användaren valt "minska rörelse") ---------- */

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes nudge {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content {
    animation: fade-up 1.2s var(--ease-out) both;
  }

  .scroll-cue {
    animation: fade-in 1s var(--ease-out) 0.8s both;
  }

  .scroll-cue svg {
    animation: nudge 1.2s ease-in-out infinite;
  }

  /* Stegen glider in när man scrollar (i webbläsare som stöder det) */
  @supports (animation-timeline: view()) {
    .step {
      animation: fade-up linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 100%; /* helt synligt så fort steget är inne i bild */
    }
  }
}
