/* ════════════════════════════════════════════════════════════════════════════
   JobbHajen — Brand System (Dark mode + orange glow)
   Premium dark surfaces, warm bite-orange accent, generous glows and depth.
   Inter för UI, Instrument Serif (italics) för display.
   ──────────────────────────────────────────────────────────────────────────── */

:root {
  /* Yta — mörka surfaces */
  --paper:        #07090C;  /* page bg, deep ink-black */
  --paper-deep:   #0B0F14;  /* alternate section bg */
  --surface:      #11161D;  /* cards */
  --surface-2:    #181E27;  /* hover / elevated */
  --surface-3:    #20272F;  /* tertiary */

  /* Text (vit på mörkt) */
  --ink:          #FFFFFF;
  --ink-2:        rgba(255, 255, 255, 0.78);
  --ink-3:        rgba(255, 255, 255, 0.56);
  --ink-4:        rgba(255, 255, 255, 0.38);
  --ink-5:        rgba(255, 255, 255, 0.22);

  /* Linjer */
  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.18);

  /* Brand — orange "shark bite" */
  --bite:         #FF5722;
  --bite-2:       #FF6B3A;  /* hover, lite ljusare i dark mode */
  --bite-3:       #E64A19;  /* deeper variant */
  --bite-soft:    rgba(255, 87, 34, 0.12);
  --bite-glow:    rgba(255, 87, 34, 0.30);

  /* Status */
  --ok:           #22C55E;
  --warn:         #F59E0B;
  --danger:       #EF4444;

  /* Skuggor & glow */
  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow:       0 4px 12px rgba(0, 0, 0, 0.32), 0 12px 32px rgba(0, 0, 0, 0.28);
  --shadow-lg:    0 8px 24px rgba(0, 0, 0, 0.4), 0 24px 64px rgba(0, 0, 0, 0.36);
  --glow-bite:    0 0 0 1px rgba(255, 87, 34, 0.5), 0 8px 32px rgba(255, 87, 34, 0.4);

  /* Radius */
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Font stacks */
  --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-mono:    ui-monospace, 'SF Mono', Monaco, Consolas, monospace;
}

/* ── Reset & base ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--paper);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  font-feature-settings: 'ss01', 'cv11';

  /* Subtila glödande gradients i bakgrunden — sätter tonen */
  background-image:
    radial-gradient(900px circle at 0% -10%, rgba(255, 87, 34, 0.10), transparent 40%),
    radial-gradient(700px circle at 100% 0%, rgba(255, 87, 34, 0.06), transparent 40%);
  background-attachment: fixed;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 99px; border: 2px solid var(--paper); }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.22); }

/* ── Typography ────────────────────────────────────────────────────────────── */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Container ─────────────────────────────────────────────────────────────── */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 880px; margin: 0 auto; padding: 0 24px; }

/* ── Topbar (glassmorph) ──────────────────────────────────────────────────── */
.topbar {
  background: rgba(7, 9, 12, 0.7);
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.015em;
}
.brand:hover { color: var(--ink); }
.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  flex-shrink: 0;
  position: relative;
  box-shadow: 0 0 18px rgba(255, 87, 34, 0.25);
}
.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  border-radius: var(--r);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
  white-space: nowrap;
}
.btn:focus-visible {
  outline: 2px solid var(--bite);
  outline-offset: 2px;
}

/* Primary — ljus knapp på mörk bg (fyll med vit/ink-text) */
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.12);
}

/* Bite — orange-glow CTA (huvudknappen för konvertering) */
.btn-bite {
  background: var(--bite);
  color: #FFFFFF;
  border-color: var(--bite);
  box-shadow: 0 6px 20px rgba(255, 87, 34, 0.4), 0 0 0 1px rgba(255, 87, 34, 0.4);
}
.btn-bite:hover {
  background: var(--bite-2);
  border-color: var(--bite-2);
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(255, 87, 34, 0.5), 0 0 0 1px rgba(255, 87, 34, 0.6);
}

/* Ghost — outline-knapp på mörk bg */
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.08);
}

.btn-text {
  background: transparent;
  color: var(--ink-2);
  padding: 8px 4px;
}
.btn-text:hover {
  color: var(--ink);
}
.btn-lg {
  padding: 14px 22px;
  font-size: 15px;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

/* ── Pills (toggle) ────────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 12.5px;
  font-weight: 500;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-2);
  cursor: pointer;
  transition: border-color 140ms, background 140ms, color 140ms;
  font-family: inherit;
}
.pill:hover {
  border-color: rgba(255, 255, 255, 0.32);
  color: var(--ink);
}
.pill.active {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.pill-bite.active {
  background: var(--bite);
  color: #fff;
  border-color: var(--bite);
  box-shadow: 0 0 18px rgba(255, 87, 34, 0.4);
}

/* ── Tag / badge ───────────────────────────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  font-size: 11.5px;
  font-weight: 500;
  border-radius: 99px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink-2);
  line-height: 1.4;
  white-space: nowrap;
}
.tag-bite { background: var(--bite-soft); border-color: rgba(255, 87, 34, 0.4); color: #FFBFA3; }
.tag-ok   { background: rgba(34, 197, 94, 0.12); border-color: rgba(34, 197, 94, 0.35); color: #86EFAC; }
.tag-warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.35); color: #FCD34D; }

/* Pulsande "live"-prick */
.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  position: relative;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}
.live-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--ok);
  opacity: 0.35;
  animation: livepulse 2s ease-out infinite;
}
@keyframes livepulse {
  0%   { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.8); opacity: 0; }
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}
.card-hover:hover {
  border-color: var(--line-strong);
  background: var(--surface-2);
  box-shadow: var(--shadow), 0 0 32px rgba(255, 87, 34, 0.08);
  transform: translateY(-2px);
}
.card-bite {
  border-left: 3px solid var(--bite);
}

/* ── Input ─────────────────────────────────────────────────────────────────── */
.input,
.select,
.textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  transition: border-color 140ms, box-shadow 140ms, background 140ms;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--bite);
  background: var(--surface-2);
  box-shadow: 0 0 0 3px rgba(255, 87, 34, 0.18);
}
.input::placeholder,
.textarea::placeholder { color: var(--ink-4); }

.select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.56)' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

/* ── Section helpers ───────────────────────────────────────────────────────── */
.section { padding: 80px 0; position: relative; }
.section-tight { padding: 48px 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line-strong);
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 12px;
}
.section-lead {
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 0 0 32px;
}

/* ── Bite-mark — underline med glow ────────────────────────────────────────── */
.bite-mark {
  position: relative;
  display: inline-block;
  color: inherit;
}
.bite-mark::after {
  content: '';
  position: absolute;
  left: -2px; right: -2px;
  bottom: 0.05em;
  height: 0.12em;
  background: var(--bite);
  border-radius: 2px;
  box-shadow: 0 0 16px rgba(255, 87, 34, 0.6);
}

/* ── Skeleton ──────────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--line-strong);
  border-top-color: var(--bite);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Fade in ───────────────────────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}
.fade-up { animation: fadeUp 360ms cubic-bezier(0.16, 1, 0.3, 1) both; }

/* ── Footer ────────────────────────────────────────────────────────────────── */
.app-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--line);
  margin-top: 64px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}
.app-footer a { color: var(--ink-2); text-decoration: none; }
.app-footer a:hover { color: var(--ink); }

/* ── Glow utility ──────────────────────────────────────────────────────────── */
.glow-bite { box-shadow: var(--glow-bite); }

/* Section med inbäddad orange-glow i bakgrunden — kan användas på CTA/hero etc. */
.glow-bg {
  position: relative;
  overflow: hidden;
}
.glow-bg::before {
  content: '';
  position: absolute;
  top: -150px; right: -150px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 87, 34, 0.25), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.glow-bg > * { position: relative; z-index: 1; }

/* ── Utility ───────────────────────────────────────────────────────────────── */
.clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tnum { font-variant-numeric: tabular-nums; }

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

/* ── Mobile defaults ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .container, .container-narrow { padding: 0 16px; }
  .section { padding: 56px 0; }
  .topbar-inner { padding: 0 16px; }
}
