/* =========================
   1. RESET / GRUNNINNSTILLINGER
========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================
   2. VARIABLER
========================= */

:root {
  --bg: #efe4d2;
  --bg-soft: #f6f1e8;
  --card: #fbf8f2;
  --ink: #18283b;
  --muted: #5b6a79;
  --line: rgba(24, 40, 59, 0.1);
  --green: #4e8b6f;
  --green-dark: #3d735a;
  --shadow: 0 20px 45px rgba(24, 40, 59, 0.09);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --max: 1180px;
}

/* =========================
   3. LAYOUT / HJELPEKLASSER
========================= */

.container {
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 96px 0;
}

.section-title {
  margin: 0;
  letter-spacing: -0.05em;
  line-height: 0.95;
  font-size: clamp(2.2rem, 4.6vw, 3.8rem);
}

.section-intro {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.section-head {
  max-width: 760px;
  margin-bottom: 34px;
}

.eyebrow {
  margin-bottom: 14px;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green);
}

/* =========================
   4. NAVIGASJON
========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: rgba(239, 228, 210, 0.82);
  border-bottom: 1px solid rgba(24, 40, 59, 0.06);
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 84px;
  gap: 24px;
}

.logo {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}

.menu {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.menu a {
  color: var(--muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

.menu a:hover {
  color: var(--ink);
}

/* =========================
   5. HERO
========================= */

.hero {
  padding: 44px 0 56px;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 470px);
  align-items: center;
  gap: 60px;
  min-height: calc(100vh - 128px);
}

.hero-copy h1 {
  margin: 0;
  letter-spacing: -0.06em;
  line-height: 0.92;
  font-size: clamp(3.8rem, 8vw, 6.7rem);
  max-width: 9ch;
}

.hero-role {
  margin-top: 24px;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  color: var(--muted);
}

.hero-intro {
  margin-top: 22px;
  font-size: clamp(1.08rem, 1.8vw, 1.4rem);
  max-width: 34ch;
  color: #23354a;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.hero-card {
  position: relative;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: calc(var(--radius-xl) + 8px);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  border-radius: var(--radius-xl);
  animation: floatMaskot 4s ease-in-out infinite;
}

.speech {
  position: absolute;
  top: -20px;
  right: -10px;
  background: white;
  border-radius: 14px;
  padding: 12px 16px;
  font-size: 0.9rem;
  line-height: 1.4;
  max-width: 220px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 3;
  animation: bubbleIn 1.2s ease;
}

.speech::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 20px;
  width: 16px;
  height: 16px;
  background: white;
  transform: rotate(45deg);
}

/* =========================
   6. KNAPPER
========================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: white;
  box-shadow: var(--shadow);
}

.btn-secondary {
  background: var(--green);
  color: white;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
  background: var(--green-dark);
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-icon svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* =========================
   7. SEKSJONSBAKGRUNNER
========================= */

.section-story {
  background: linear-gradient(
    to bottom,
    transparent 0%,
    transparent 52%,
    rgba(255, 255, 255, 0.18) 52%,
    rgba(255, 255, 255, 0.18) 100%
  );
}

.section-results {
  background: rgba(255, 255, 255, 0.25);
}

.section-faq {
  background: rgba(255, 255, 255, 0.1);
}

.chatbot-section {
  background: rgba(255, 255, 255, 0.18);
}

/* =========================
   8. MIN REISE
========================= */

.journey-list {
  display: grid;
  gap: 36px;
  margin-top: 28px;
}

.journey-item {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 26px;
  align-items: center;
  background: rgba(255, 255, 255, 0.28);
  border: 1px solid rgba(24, 40, 59, 0.08);
  border-radius: 24px;
  padding: 22px;
}

.journey-item.reverse {
  grid-template-columns: 0.95fr 1.05fr;
}

.journey-item.reverse .journey-image {
  order: 2;
}

.journey-item.reverse .journey-copy {
  order: 1;
}

.journey-image img {
  width: 100%;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(24, 40, 59, 0.08);
}

.journey-kicker {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
}

.journey-copy h3 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem);
  letter-spacing: -0.03em;
}

.journey-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.75;
  font-size: 1.05rem;
}

/* =========================
   9. KORT / FELLESKOMPONENTER
========================= */

.results-grid,
.insight-list {
  display: grid;
  gap: 18px;
}

.quote-card,
.result-card,
.insight-item,
.faq-list details,
.contact-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 30px rgba(24, 40, 59, 0.05);
}

.quote-card,
.result-card,
.insight-item {
  padding: 22px;
}

.quote-card {
  background: var(--ink);
  color: white;
}

.quote-card p {
  margin: 0;
  color: white;
  font-weight: 700;
  font-size: 1.12rem;
}

/* =========================
   10. RESULTATER / INSIGHTS
========================= */

.results-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.result-card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.result-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

.result-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 0.9rem;
  background: #e9e4db;
}

.result-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.result-card:hover .result-card-image img {
  transform: scale(1.04);
}

.result-number {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--green);
}

.result-card h3 {
  margin: 0 0 0.65rem;
  font-size: 1.05rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.result-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 1rem;
}

.insight-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.insight-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
}

.insight-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(63, 127, 105, 0.1);
  color: var(--green);
  font-weight: 800;
  font-size: 1.1rem;
}

.insight-item p {
  margin: 0;
  padding-top: 8px;
  font-weight: 600;
}

/* =========================
   11. FAQ
========================= */

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-list details {
  padding: 0;
  overflow: hidden;
}

.faq-list summary {
  list-style: none;
  cursor: pointer;
  padding: 20px 24px;
  font-weight: 700;
  position: relative;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 18px;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--green);
}

.faq-list details[open] summary::after {
  content: "–";
}

.faq-list details p {
  margin: 0;
  padding: 0 24px 22px;
  color: var(--muted);
}

/* =========================
   12. CHATBOT
========================= */

.chatbot-section .container {
  max-width: 920px;
}

#jj-chat {
  max-width: 760px;
  margin: 0 auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(24, 40, 59, 0.08);
}

#jj-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.58);
}

.jj-chat-header-avatar {
  flex: 0 0 44px;
}

.jj-chat-header-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

#jj-header .htext,
.jj-chat-header-text {
  line-height: 1.3;
}

#jj-header .htext strong,
.jj-chat-header-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

#jj-header .htext span,
.jj-chat-header-text span {
  display: block;
  margin-top: 3px;
  font-size: 0.84rem;
  color: var(--muted);
}

.jj-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}

#jj-messages {
  background: var(--bg-soft);
  padding: 18px;
  min-height: 320px;
  max-height: 440px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scroll-behavior: smooth;
}

.jj-msg {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.jj-msg.user {
  justify-content: flex-end;
}

.jj-av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: 0 0 36px;
  object-fit: cover;
}

.jj-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jj-bubble {
  max-width: 560px;
  background: #f7f7f8;
  border: 1px solid rgba(24, 40, 59, 0.08);
  border-radius: 18px;
  padding: 1rem 1.25rem;
  line-height: 1.7;
  color: var(--ink);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  text-align: left;
  white-space: normal;
  word-break: keep-all;
  overflow-wrap: normal;
}
.jj-msg.bot .jj-bubble {
  width: auto;
}
.jj-msg.bot .jj-bubble {
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  border: 1px solid rgba(24, 40, 59, 0.08);
  border-top-left-radius: 8px;
}

.jj-msg.user .jj-bubble {
  background: var(--ink);
  color: white;
  border-top-right-radius: 8px;
}

#jj-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 10px;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.jj-chip {
  appearance: none;
  border: 1px solid var(--line);
  background: white;
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 13px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.jj-chip:hover {
  background: var(--bg-soft);
  border-color: rgba(78, 139, 111, 0.28);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(24, 40, 59, 0.06);
}

#jj-inputrow {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 14px 18px 16px;
  background: var(--card);
  border-top: 1px solid var(--line);
}

#jj-input {
  flex: 1;
  min-width: 0;
  min-height: 50px;
  max-height: 96px;
  resize: none;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.5;
  outline: none;
  background: white;
  color: var(--ink);
  overflow-y: auto;
}

#jj-input:focus {
  border-color: rgba(78, 139, 111, 0.55);
  box-shadow: 0 0 0 3px rgba(78, 139, 111, 0.12);
}

#jj-send {
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border: none;
  border-radius: 16px;
  background: var(--ink);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    box-shadow 0.18s ease;
}

#jj-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(24, 40, 59, 0.16);
}

#jj-send:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

#jj-footer {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 0 18px 16px;
  background: var(--card);
}

.jj-cv-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

.jj-cv-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 700;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    border-color 0.18s ease;
}

.jj-cv-link:hover {
  transform: translateY(-1px);
  background: white;
  border-color: rgba(24, 40, 59, 0.16);
}

.jj-typing {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  min-height: 18px;
}

.jj-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(24, 40, 59, 0.35);
  animation: jjTypingBounce 1.2s infinite ease-in-out;
}

.jj-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.jj-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

/* =========================
   13. KONTAKT
========================= */

.section-contact {
  padding-bottom: 110px;
}

.contact-box {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 24px;
  padding: 30px;
}

.contact-box p {
  margin: 10px 0 0;
  color: var(--muted);
  max-width: 50ch;
}

.contact-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

/* =========================
   14. STICKY GUIDE
========================= */

.sticky-guide {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  z-index: 50;
}

.sticky-guide-img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: white;
}

.sticky-guide-bubble {
  position: relative;
  background: white;
  color: var(--ink);
  border-radius: 16px;
  padding: 12px 14px;
  max-width: 220px;
  font-size: 0.92rem;
  line-height: 1.4;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.sticky-guide-bubble::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 18px;
  border-width: 8px;
  border-style: solid;
  border-color: transparent white transparent transparent;
}

.guide-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #1f2e3d;
  color: white;
  font-size: 16px;
  cursor: pointer;
  line-height: 24px;
  padding: 0;
}

.guide-close:hover {
  background: #000;
}

.guide-open {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 16px;
  border-radius: 999px;
  border: none;
  background: #1f2e3d;
  color: white;
  font-weight: 600;
  cursor: pointer;
  display: none;
  z-index: 50;
}

.sticky-guide.is-closed {
  display: none;
}

.sticky-guide.is-closed + .guide-open {
  display: block;
}

/* =========================
   15. SCROLL REVEAL
========================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   16. ANIMASJONER
========================= */

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

@keyframes bubbleIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes jjTypingBounce {
  0%,
  80%,
  100% {
    transform: scale(0.7);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================
   17. RESPONSIVE
========================= */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    min-height: auto;
    gap: 28px;
  }

  .hero-copy {
    order: 1;
  }

  .hero-card {
    order: 2;
    max-width: 560px;
  }

  .results-grid,
  .insight-list,
  .journey-item,
  .journey-item.reverse,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .journey-item.reverse .journey-image,
  .journey-item.reverse .journey-copy {
    order: initial;
  }

  .sticky-guide {
    right: 14px;
    bottom: 14px;
    left: 14px;
    gap: 10px;
  }

  .sticky-guide-img {
    width: 72px;
    height: 72px;
  }

  .sticky-guide-bubble {
    max-width: none;
    font-size: 0.88rem;
  }
}

@media (max-width: 900px) {
  .results-grid {
    grid-template-columns: 1fr;
  }

  .insight-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .site-header-inner {
    min-height: 72px;
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 10px 0;
  }

  .logo {
    font-size: 1.18rem;
  }

  .menu {
    gap: 14px;
    font-size: 0.95rem;
  }

  .section {
    padding: 70px 0;
  }

  .hero {
    padding: 28px 0 48px;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .contact-actions {
    width: 100%;
  }

  .speech {
    top: 10px;
    right: 10px;
    max-width: 180px;
    font-size: 0.82rem;
  }

  #jj-inputrow {
    flex-direction: column;
  }

  #jj-send {
    width: 100%;
    min-height: 50px;
    flex: none;
  }

  .jj-bubble {
    max-width: 92%;
  }
}

#jj-messages img {
  max-height: 260px;
  width: 100%;
  object-fit: cover;
  border-radius: 12px;
}
.jj-bubble p {
  margin: 0;
}

.jj-bubble p + p {
  margin-top: 0.75rem;
}
.jj-bubble,
.jj-bubble p,
.jj-bubble span {
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  text-align: left;
  line-height: 1.7;
}
#jj-messages {
  position: relative;
  z-index: 1;
}

#jj-chips,
#jj-inputrow,
#jj-footer,
.jj-cv-links {
  position: relative;
  z-index: 2;
}
