/* ============================================================
   LAPLAND LOGIC — FRIENDLY SCANDINAVIAN LIGHT DESIGN SYSTEM
   Single merged site (ADR 0012). Modern, approachable, fast, non-dark UI.
   ============================================================ */

/* Self-hosted under SIL OFL 1.1; licenses: ../assets/fonts/LICENSE-*.txt */
@font-face {
  font-family: 'Inter';
  src: url('../assets/fonts/InterVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
}

@font-face { font-family: 'IBM Plex Mono'; src: url('../assets/fonts/IBMPlexMono-Light.woff2') format('woff2'); font-style: normal; font-weight: 300; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../assets/fonts/IBMPlexMono-Regular.woff2') format('woff2'); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../assets/fonts/IBMPlexMono-Medium.woff2') format('woff2'); font-style: normal; font-weight: 500; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../assets/fonts/IBMPlexMono-SemiBold.woff2') format('woff2'); font-style: normal; font-weight: 600; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('../assets/fonts/IBMPlexMono-Bold.woff2') format('woff2'); font-style: normal; font-weight: 700; font-display: swap; }

:root {
  /* --- Light Palette (from Design/colors_and_type.css, light-surface tokens) --- */
  --bg-main:          #F8FAFC;   /* Soft Ice White */
  --bg-surface:       #FFFFFF;   /* Pure White Cards */
  --bg-subtle:        #F1F5F9;   /* Subtle Grey Fill */
  --bg-accent-light:  #E0F2FE;   /* Soft Glacial Blue Tint */

  --text-main:        #0F172A;   /* Deep Slate Primary Text */
  --text-muted:       #475569;   /* Muted Body Text */
  --text-subtle:      #5D6B7F;   /* Subtext / Hints - 4.95:1 auf --bg-subtle (WCAG AA) */

  --accent-blue:      #0EA5E9;   /* Vivid Arctic Cyan/Blue */
  --accent-blue-hover:#0284C7;   /* Deep Blue Hover */
  --accent-navy:      #0F172A;   /* Dark Navy Accent */

  /* --accent-blue is a UI/icon accent, not text-safe on light surfaces (~2.5:1).
     --text-link is the same brand blue, darkened until it clears 4.5:1 on --bg-subtle
     and --bg-surface (measured 5.4:1 / 5.9:1) — use it wherever the accent colour
     carries text, not decoration. */
  --text-link:        #0369A1;   /* AA text-safe Arctic Blue */
  --text-success:     #15803D;   /* Form success message, 4.6:1 on --bg-subtle */
  --text-error:       #B91C1C;   /* Form error message, 5.9:1 on --bg-subtle */

  --border-light:     #E2E8F0;   /* Clean Divider Border */
  --border-focus:     #7DD3FC;   /* Focus Border */

  --font-sans:        'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:        'IBM Plex Mono', monospace;

  --radius-sm:        6px;
  --radius-md:        12px;
  --radius-lg:        16px;
  --radius-pill:      9999px;

  --shadow-sm:        0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-md:        0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg:        0 16px 36px rgba(14, 165, 233, 0.12);

  --transition:       all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Visible focus outline everywhere (accessibility requirement) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
}

/* --- NAVIGATION --- */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-main);
}

.nav-brand img {
  height: 40px;
  width: auto;
}

.nav-brand-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--accent-blue-hover);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 6px;
  margin-left: 16px;
  padding-left: 16px;
  border-left: 1px solid var(--border-light);
}

.lang-btn {
  background: transparent;
  border: 1px solid transparent;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.lang-btn:hover {
  color: var(--text-main);
  background: var(--bg-subtle);
}

.lang-btn.active {
  /* --text-link, not --accent-blue: white on #0EA5E9 is only 2.8:1, on #0369A1 5.9:1 */
  background: var(--text-link);
  color: #FFFFFF;
}

/* Mobile hamburger toggle (kept hidden above 768px) — CSS-only checkbox pattern,
   works with JavaScript disabled entirely. The checkbox is the real, focusable
   control; the label is only its visual skin. */
.nav-toggle-checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.nav-toggle-checkbox:focus-visible + .mobile-menu-btn {
  outline: 2px solid var(--accent-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--text-main);
  cursor: pointer;
  padding: 8px;
}

/* --- HERO SECTION --- */
.hero {
  padding: 140px 48px 80px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  background: var(--bg-accent-light);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius-pill);
  color: var(--accent-blue-hover);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}

.hero-title {
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 24px;
}

.hero-title span {
  color: var(--accent-blue);
  background: linear-gradient(135deg, #0EA5E9 0%, #0284C7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent-blue);
  color: #FFFFFF;
  border: none;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(14, 165, 233, 0.45);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  transform: translateY(-2px);
}

/* --- SECTION CONTAINER --- */
.section {
  padding: 96px 48px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 56px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-main);
  margin-bottom: 16px;
}

.section-desc {
  font-size: 17px;
  color: var(--text-muted);
}

/* --- PRICING CARDS --- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(310px, 100%), 1fr));
  gap: 32px;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.pricing-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-focus);
}

.pricing-card.popular {
  border: 2px solid var(--accent-blue);
}

.popular-badge {
  position: absolute;
  top: -14px;
  right: 28px;
  background: var(--accent-blue);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pricing-name {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.pricing-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  min-height: 42px;
}

.pricing-name {
  line-height: 1.25;
}

/* Two equal price rows (ADR 0017): start price and monthly price carry the same
   weight, so the running cost is never the small print. */
.pricing-prices {
  border-block: 1px solid var(--border-light);
  padding: 6px 0;
  margin-bottom: 10px;
}

.price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  column-gap: 12px;
  padding: 8px 0;
}

.price-row + .price-row {
  border-top: 1px dashed var(--border-light);
}

.price-label {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.price-amount {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--text-main);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.price-from {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
}

/* Bokning: no start figure, the row says so in words at label size. */
.price-row--note {
  min-height: 58px;
  align-items: center;
}

.price-row--note .price-label {
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-main);
}

.pricing-moms {
  font-size: 12px;
  color: var(--text-subtle);
  margin-bottom: 32px;
}

.pricing-timeline-note {
  font-size: 12px;
  color: var(--text-subtle);
  margin: -24px 0 24px;
  font-style: italic;
}

.pricing-list {
  list-style: none;
  margin-bottom: 36px;
  flex-grow: 1;
}

.pricing-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-main);
  margin-bottom: 14px;
}

.pricing-list li svg {
  color: var(--accent-blue);
  flex-shrink: 0;
  margin-top: 3px;
  width: 18px;
  height: 18px;
}

/* Open door if the price doesn't fit (ADR 0012 §4) — quiet, no CTA styling */
.price-flex-note {
  margin-top: 32px;
  text-align: center;
  font-size: 14px;
  color: var(--text-subtle);
}

/* Terms and e-mail notes under the cards: plain reading text, no card chrome. */
.price-notes {
  max-width: 760px;
  margin: 48px auto 0;
  display: grid;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Value-for-value draft (ADR 0017 §2): its own calm block, visually quieter
   than the paid packages — no shadow, no accent fill, one plain button. */
.value-block {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 28px 32px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--text-link);
  border-radius: var(--radius-md);
}

.value-block h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.value-block p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

/* --- 3 STEP PROCESS --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 24px;
}

.process-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.process-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.process-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-accent-light);
  color: var(--accent-blue-hover);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.process-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.process-card p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* --- DEMO SHOWCASE (NO REAL CUSTOMER NAMES!) --- */
.demo-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}

.demo-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 16px;
  flex-wrap: wrap;
}

.demo-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  color: var(--text-muted);
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.demo-btn:hover {
  background: var(--bg-accent-light);
  color: var(--accent-blue-hover);
}

.demo-btn.active {
  /* --text-link, not --accent-blue: white on #0EA5E9 is only 2.8:1, on #0369A1 5.9:1 */
  background: var(--text-link);
  color: #FFFFFF;
  border-color: var(--text-link);
}

.demo-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

/* Grid items default to min-width:auto, which for a replaced element like <img> equals
   its intrinsic pixel width — this forced desktop AND mobile horizontal scroll. */
.demo-preview > * {
  min-width: 0;
}

.demo-note {
  margin: 10px auto 0;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
}

/* Outer frame: light "browser window" chrome in the site's own token system
   (fixes the B16 dark island). What is inside the frame is a faithful miniature
   of the actually-linked demo page (fixes B16's second, heavier issue: the
   mockup must show what it links to, not an invented generic bakery scene). */
.demo-mockup {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.mockup-browserbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-light);
}

.mockup-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
}

.mockup-url {
  margin-left: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Colours and font-families inside .mockup-viewport intentionally come from the
   linked demo page's own palette (demos/bageri|hantverk|beauty.html), not from
   the Lapland Logic light system. This is a window onto someone else's page —
   the same way a screenshot inside a light portfolio card stays honest about
   what it depicts. Values are copy-checked 1:1 against the three demo files. */
.mockup-viewport {
  padding: 24px;
  transition: var(--transition);
}

.mockup-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.mockup-heading {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
}

.mockup-lead {
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.6;
}

/* Bageri theme — matches demos/bageri.html (:root ink/cream/paper/berry). */
.mockup-viewport[data-theme="bageri"] { background: #FFFAF1; color: #30261F; }
.mockup-viewport[data-theme="bageri"] .mockup-kicker { color: #9F3D32; }
.mockup-viewport[data-theme="bageri"] .mockup-heading { font-family: Georgia, serif; font-weight: 400; }
.mockup-viewport[data-theme="bageri"] .mockup-lead { color: #655344; }

/* Hantverk theme — matches demos/hantverk.html (:root black/panel/sand/lime/fog).
   This demo is genuinely dark by its own editorial choice; the frame around it
   (.demo-mockup, .mockup-browserbar) stays light regardless of which industry
   tab is active, so the page itself never mixes light and dark chrome. */
.mockup-viewport[data-theme="hantverk"] { background: #151817; color: #F4F3ED; }
.mockup-viewport[data-theme="hantverk"] .mockup-kicker { color: #C8E36B; }
.mockup-viewport[data-theme="hantverk"] .mockup-heading { font-family: Arial, sans-serif; font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; }
.mockup-viewport[data-theme="hantverk"] .mockup-lead { color: #B7BDB8; }

/* Beauty theme — matches demos/beauty.html (:root ink/chalk/blush/sage).
   Kicker uses a darkened sage (#4F5B52, not the demo's lighter #68766A) — the
   original shade measures 4.4:1 on this background, just under the 4.5:1 floor. */
.mockup-viewport[data-theme="beauty"] { background: #F7F5F1; color: #242321; }
.mockup-viewport[data-theme="beauty"] .mockup-kicker { color: #4F5B52; }
.mockup-viewport[data-theme="beauty"] .mockup-heading { font-family: Georgia, serif; font-weight: 400; }
.mockup-viewport[data-theme="beauty"] .mockup-lead { color: #706C66; }

.demo-mockup-hint {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-light);
}

/* The parallax image below is intentionally scaled beyond its box (transform: scale).
   Without a clipping container the scaled paint area was measured as page overflow and
   forced horizontal scrolling at every viewport width. */
.demo-photo-frame {
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 18px;
}

.demo-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.22);
  transform: translate3d(0, var(--image-shift, 0), 0) scale(1.06);
  clip-path: inset(0 round 10px);
  will-change: transform;
}

.scroll-progress {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 1200;
  width: 100%;
  height: 2px;
  pointer-events: none;
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
  background: linear-gradient(90deg, var(--accent-blue), var(--text-link));
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.35);
}

@media (prefers-reduced-motion: reduce) {
  .scroll-progress { display: none; }
  .demo-photo { transform: none; }
}

/* --- CONTACT ---
   No form (it only ever opened a mailto draft, ADR 0010). One calm card whose main
   element is the address itself. Stands out through --bg-subtle + border + shadow. */
.contact-card {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 64px 48px 56px;
  box-shadow: var(--shadow-md);
  text-align: center;
  container-type: inline-size;
}

.contact-card h2 {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.contact-card p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.contact-mail {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px 20px;
  margin-top: 40px;
}

/* The address sizes to the card (cqi), so it never breaks mid-word at 320 px.
   21 characters of Inter 700 ≈ 11.6em → 7.4cqi keeps it under the card width. */
.contact-email {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 0.4rem + 3.4vw, 2.625rem);
  font-size: clamp(1rem, 7.4cqi, 2.625rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-link);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  padding: 4px 6px 14px;
}

.contact-email-at {
  font-weight: 400; /* same --text-link colour: a lighter blue would drop below 4.5:1 at 17 px */
  padding: 0 0.04em;
}

.contact-email-text {
  position: relative;
  display: inline-block;
}

/* Ski track under the address: two grooves (same motif as the section tags).
   At rest a short faint pair; on hover/focus both lines are drawn to full width. */
.contact-email-text::before,
.contact-email-text::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 1px;
  background: #7DD3FC;
  transform: scaleX(0.14);
  transform-origin: left center;
}
.contact-email-text::before { bottom: -6px; }
.contact-email-text::after  { bottom: -11px; }

.contact-email:hover .contact-email-text::before,
.contact-email:hover .contact-email-text::after,
.contact-email:focus-visible .contact-email-text::before,
.contact-email:focus-visible .contact-email-text::after {
  transform: scaleX(1);
  background: var(--accent-blue);
}

@media (prefers-reduced-motion: no-preference) {
  .contact-email-text::before,
  .contact-email-text::after {
    transition: transform 700ms cubic-bezier(0.2, 0.7, 0.2, 1), background-color 300ms ease;
  }
  .contact-email:hover .contact-email-text::after,
  .contact-email:focus-visible .contact-email-text::after { transition-delay: 120ms; }
}

.contact-email:focus-visible {
  outline: 2px solid var(--text-link);
  outline-offset: 4px;
}

.contact-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  cursor: pointer;
  transition: color 200ms ease, border-color 200ms ease;
}
.contact-copy[hidden] { display: none; }

.contact-copy:hover {
  color: var(--text-link);
  border-color: var(--border-focus);
}

.contact-copy:focus-visible {
  outline: 2px solid var(--text-link);
  outline-offset: 3px;
}

.contact-copy-done { display: none; color: var(--text-success); }
.contact-copy.is-copied .contact-copy-icon { display: none; }
.contact-copy.is-copied .contact-copy-done { display: inline; }

.contact-card .contact-copy-status {
  min-height: 1.5em;
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
}

.contact-card .contact-reply {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-subtle);
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--border-light);
  padding: 40px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  background: var(--bg-surface);
  font-size: 14px;
  color: var(--text-muted);
}

/* Legally required provider name (e-handelslagen § 8): kept, but set quietly. */
.legal-notice {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-subtle); /* 5.4:1 on --bg-surface */
  max-width: 520px;
}

@media (max-width: 768px) {
  nav { padding: 0 24px; }
  .hero { padding: 110px 24px 60px; }
  .section { padding: 64px 24px; }
  .demo-preview { grid-template-columns: 1fr; }
  .contact-card { padding: 44px 20px 36px; }
  .contact-card h2 { font-size: 28px; }
  .contact-card p { font-size: 16px; }
  .contact-mail { margin-top: 28px; }
  footer { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .value-block { padding: 24px 20px; }

  .mobile-menu-btn { display: block; }

  .nav-links {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    padding: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
  }

  /* Pure CSS, no JavaScript required: the checkbox precedes .nav-links in the DOM,
     so :checked ~ .nav-links works with native browser behaviour alone. */
  .nav-toggle-checkbox:checked ~ .nav-links {
    display: flex;
  }

  .lang-switcher {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    margin-top: 4px;
  }
}


@media (max-width: 400px) {
  .pricing-card { padding: 36px 22px; }
  .price-amount { font-size: 24px; }
}


/* ============================================================
   MOTION — five deliberate movements, nothing else moves.
   1 Hero horizon (fjäll ridges draw once, aurora band drifts slowly)
   2 Section tags: a double ski track draws itself once
   3 Pricing: checkmarks are ticked off one by one; tactile tilt + light edge
   4 Process: a ski track fills as you scroll through the three steps
   5 Language switcher: the active marker glides between SV/EN/DE
   Rules: content is fully visible without JS. Hidden start states only exist
   under html.has-motion, which the script sets only when reduced motion is off.
   Only transform/opacity animate, except one-shot stroke-dashoffset on small
   SVG strokes (paint only, no layout).
   ============================================================ */

/* 1 — Hero horizon. Absolutely positioned inside the hero's bottom padding:
   takes no space, cannot shift layout. */
.hero {
  position: relative;
  isolation: isolate;
}

.hero-horizon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 150px;
  z-index: -1;
  overflow: hidden; /* the aurora drift must never widen the page */
  pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent);
}

.hero-horizon svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.horizon-aurora { opacity: 0.8; }

.ridge {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
}
.ridge--far  { stroke: #BAE6FD; }
.ridge--mid  { stroke: #7DD3FC; }
.ridge--near { stroke: #CBD5E1; }

@media (prefers-reduced-motion: no-preference) {
  .ridge {
    stroke-dasharray: 1;
    animation: ridge-draw 2.6s cubic-bezier(0.3, 0.6, 0.2, 1) both;
  }
  .ridge--far  { animation-delay: 0.2s; }
  .ridge--mid  { animation-delay: 0.45s; }
  .ridge--near { animation-delay: 0.7s; }

  .horizon-aurora {
    will-change: transform, opacity;
    transform-origin: 50% 100%;
    animation:
      aurora-in 2.2s ease-out 1.4s both,
      aurora-drift 17s ease-in-out 3.6s infinite alternate;
  }
  .hero-horizon.is-paused .horizon-aurora { animation-play-state: paused; }
}

@keyframes ridge-draw {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}
@keyframes aurora-in {
  from { opacity: 0; transform: translate3d(-12px, 6px, 0); }
  to   { opacity: 0.8; transform: none; }
}
@keyframes aurora-drift {
  from { opacity: 0.8; transform: none; }
  to   { opacity: 0.45; transform: translate3d(28px, -3px, 0) scaleY(1.12); }
}

/* 2 — Double ski track under each section tag. Absolutely positioned inside the
   tag's bottom margin, so it takes no space. Two grooves = two skis. */
.section-tag {
  position: relative;
}

.section-tag::before,
.section-tag::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 44px;
  height: 1.5px;
  border-radius: 1px;
  background: #7DD3FC;
  transform: translateX(-50%);
  transform-origin: left center;
}
.section-tag::before { bottom: -5px; }
.section-tag::after  { bottom: -9px; }

.has-motion .section-header .section-tag::before,
.has-motion .section-header .section-tag::after {
  transition: transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.has-motion .section-header .section-tag::after { transition-delay: 140ms; }
.has-motion .section-header:not(.is-seen) .section-tag::before,
.has-motion .section-header:not(.is-seen) .section-tag::after {
  transform: translateX(-50%) scaleX(0);
}

/* 3a — Checkmarks ticked off one by one when a card first comes into view. */
.has-motion .pricing-list svg path {
  stroke-dasharray: 24;
  transition: stroke-dashoffset 420ms cubic-bezier(0.3, 0.6, 0.2, 1);
}
.has-motion .pricing-card:not(.is-seen) .pricing-list svg path { stroke-dashoffset: 24; }
.has-motion .pricing-list li:nth-child(2) svg path { transition-delay: 90ms; }
.has-motion .pricing-list li:nth-child(3) svg path { transition-delay: 180ms; }
.has-motion .pricing-list li:nth-child(4) svg path { transition-delay: 270ms; }
.has-motion .pricing-list li:nth-child(5) svg path { transition-delay: 360ms; }
.has-motion .pricing-card:nth-child(2) .pricing-list svg path { transition-duration: 480ms; }

/* 3b — Tactile tilt with a light edge that follows the pointer (mouse only).
   Without JS the plain lift-on-hover above still applies. */
.pricing-card::after {
  content: '';
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(240px circle at var(--lx, 50%) var(--ly, 0%), rgba(56, 189, 248, 0.95), rgba(56, 189, 248, 0) 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 250ms ease-out;
}
.pricing-card.popular::after { inset: -2px; padding: 2px; }

.has-motion .pricing-card {
  transition: transform 220ms ease-out, box-shadow 200ms ease-out, border-color 200ms ease-out;
}
.has-motion .pricing-card.is-tilting {
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(-4px);
  transition: transform 120ms linear, box-shadow 200ms ease-out, border-color 200ms ease-out;
}
.has-motion .pricing-card.is-tilting::after { opacity: 1; }

/* 4 — Process ski track. Created by the script; horizontal when the three steps
   stand side by side (>= 1024px), vertical in the side gutter on phones, absent
   in the two-column in-between layout. */
.process-grid { position: relative; }

.process-track {
  display: none;
  position: absolute;
  z-index: 1;
  pointer-events: none;
}
.process-track__fill {
  position: absolute;
  inset: -1.5px;
  border: 0 solid var(--accent-blue);
}

.has-track .process-num {
  position: relative;
  z-index: 2;
  transition: background-color 300ms ease-out, color 300ms ease-out;
}
.has-track .process-num.is-reached {
  background: var(--text-link);
  color: #FFFFFF;
}
/* The cards stay put while the track runs across them. */
.has-track .process-card:hover { transform: none; }

@media (min-width: 1024px) {
  .process-track {
    display: block;
    /* from the centre of circle 1 to the centre of circle 3 (card padding 32 + radius 22) */
    top: 51px;
    left: 54px;
    width: calc((100% - 48px) * 2 / 3 + 48px);
    height: 6px;
    border-block: 1.5px solid #CBD5E1;
  }
  .process-track__fill {
    border-block-width: 1.5px;
    transform: scaleX(var(--track, 0));
    transform-origin: left center;
  }
}

@media (max-width: 768px) {
  .process-track {
    display: block;
    top: 54px;
    bottom: 40px;
    left: -15px;
    width: 6px;
    border-inline: 1.5px solid #CBD5E1;
  }
  .process-track__fill {
    border-inline-width: 1.5px;
    transform: scaleY(var(--track, 0));
    transform-origin: center top;
  }
}

/* 5 — Language switcher: one marker glides to the active language. */
.lang-switcher { position: relative; }

.lang-indicator {
  position: absolute;
  top: 0;
  left: 0;
  border-radius: var(--radius-sm);
  background: var(--text-link);
  pointer-events: none;
}
.lang-indicator.is-ready {
  transition: transform 380ms cubic-bezier(0.3, 0.7, 0.2, 1), width 380ms cubic-bezier(0.3, 0.7, 0.2, 1);
}
.has-indicator .lang-btn { position: relative; z-index: 1; }
.has-indicator .lang-btn.active { background: transparent; }

@media print {
  .hero-horizon, .process-track, .lang-indicator { display: none; }
  .has-motion .pricing-card .pricing-list svg path { stroke-dashoffset: 0; }
  .has-motion .section-header .section-tag::before,
  .has-motion .section-header .section-tag::after { transform: translateX(-50%); }
}
