:root {
  --orange: #e65300;
  --orange-bright: #ff6d1a;
  --orange-soft: rgba(230, 83, 0, 0.12);
  --ink: #141414;
  --ink-soft: #3a3a3a;
  --muted: #6b6b6b;
  --line: #d8d6cf;
  --sand: #e2e0d6;
  --paper: #f7f6f2;
  --white: #ffffff;
  --radius: 10px;
  --header-h: 72px;
  --font-display: "Outfit", sans-serif;
  --font-body: "Source Sans 3", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  height: var(--header-h);
  padding: 0 clamp(1.25rem, 4vw, 2.5rem);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent);
  transition: background 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(20, 20, 20, 0.92);
  backdrop-filter: blur(10px);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  animation: smile-in 0.9s var(--ease) both;
}

.logo-img {
  display: block;
  height: 34px;
  width: auto;
  max-width: min(220px, 58vw);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--header-h) + 2rem) clamp(1.25rem, 5vw, 4rem) 4.5rem;
  color: var(--white);
  overflow: hidden;
  text-align: center;
}

.hero-media {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10, 10, 10, 0.35) 0%, rgba(10, 10, 10, 0.55) 45%, rgba(10, 10, 10, 0.78) 100%),
    linear-gradient(120deg, rgba(230, 83, 0, 0.35), transparent 55%),
    url("https://images.unsplash.com/photo-1497366216548-37526070297c?auto=format&fit=crop&w=2000&q=80")
      center / cover no-repeat;
  transform: scale(1.06);
  animation: hero-zoom 8s var(--ease) both;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-lockup {
  display: block;
  margin: 0 auto 1.1rem;
  width: min(26rem, 88vw);
  height: auto;
  aspect-ratio: 1024 / 160;
  animation: rise 0.8s var(--ease) 0.1s both;
}

.hero h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.85rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  animation: rise 0.8s var(--ease) 0.22s both;
}

.hero-lead {
  margin: 0 auto 1.75rem;
  max-width: none;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.88);
  animation: rise 0.8s var(--ease) 0.34s both;
  white-space: nowrap;
}

.hero-lead-rest::before {
  content: " ";
}

@media (max-width: 640px) {
  .hero-lead {
    white-space: normal;
    max-width: 22rem;
  }

  .hero-lead-rest {
    display: block;
  }

  .hero-lead-rest::before {
    content: none;
  }
}

.hero .btn {
  animation: rise 0.8s var(--ease) 0.46s both;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.hero .btn-primary:hover {
  background: #fff;
  color: var(--orange);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.6rem;
  border: none;
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

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

.btn-primary {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}

.btn-primary:hover {
  background: #000;
  transform: translateY(-1px);
}

/* Survey */
.survey-section {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.25rem, 4vw, 2rem) 5rem;
}

.survey-intro {
  margin-bottom: 2.25rem;
}

.survey-intro h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.survey-intro p {
  margin: 0;
  color: var(--muted);
}

.survey-form {
  display: grid;
  gap: 1.75rem;
}

.question {
  margin: 0;
  padding: 1.5rem 1.35rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.question:focus-within {
  border-color: color-mix(in srgb, var(--orange) 55%, var(--line));
  box-shadow: 0 0 0 3px var(--orange-soft);
}

.question legend {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 0;
  float: left;
  width: 100%;
  margin-bottom: 1.15rem;
}

.question legend + * {
  clear: both;
}

.q-num {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
}

.q-text {
  padding-top: 0.2rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}

/* Scale 1–5 — koncept B: boll + siffra under */
.scale {
  display: flex;
  gap: 0.55rem;
  width: 100%;
}

.scale-option {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  cursor: pointer;
}

.scale-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.scale-face {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  padding: 0.55rem 0.25rem 0.5rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
}

.scale-face img {
  width: min(4.25rem, 100%);
  height: auto;
  display: block;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.1));
  pointer-events: none;
  transition: transform 0.2s var(--ease), filter 0.2s var(--ease);
}

.scale-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  color: var(--ink);
  transition: color 0.2s var(--ease);
}

/* När något är valt i gruppen: dämpa resten */
.scale:has(input:checked) .scale-option:not(:has(input:checked)) .scale-face {
  opacity: 0.42;
}

.scale:has(input:checked) .scale-option:not(:has(input:checked)):hover .scale-face {
  opacity: 0.72;
}

.scale-option:hover .scale-face {
  border-color: var(--orange);
  transform: translateY(-2px);
}

.scale-option input:checked + .scale-face {
  border-color: var(--orange);
  border-width: 2.5px;
  background: #fff7f2;
  box-shadow: 0 0 0 3px var(--orange-soft), 0 8px 20px rgba(230, 83, 0, 0.18);
  transform: translateY(-3px) scale(1.06);
  opacity: 1;
}

.scale-option input:checked + .scale-face img {
  transform: scale(1.04);
  filter: drop-shadow(0 5px 10px rgba(230, 83, 0, 0.28));
}

.scale-option input:checked + .scale-face .scale-num {
  color: var(--orange);
}

.scale-option input:focus-visible + .scale-face {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.scale-hints {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Yes / No */
.yesno {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.choice {
  position: relative;
  flex: 1;
  max-width: 10rem;
  cursor: pointer;
}

.choice input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.choice span {
  display: grid;
  place-items: center;
  min-height: 3rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.choice:hover span {
  border-color: var(--orange);
  color: var(--orange);
}

.choice input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Text fields */
.field-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.optional {
  font-weight: 400;
  color: var(--muted);
}

textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  resize: vertical;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

textarea::placeholder {
  color: #9a9a9a;
}

textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px var(--orange-soft);
  background: var(--white);
}

.form-error {
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 8px;
  background: #fde8e8;
  color: #9b1c1c;
  font-weight: 600;
}

.form-actions {
  padding-top: 0.25rem;
}

.form-actions .btn {
  width: 100%;
  max-width: 16rem;
}

/* Thanks */
.thanks {
  text-align: center;
  padding: 3.5rem 1rem;
  overflow: visible;
  animation: rise 0.7s var(--ease) both;
}

.thanks-mark {
  margin: 0 auto 1.15rem;
}

.thanks-mark img {
  display: block;
  width: 5.5rem;
  height: auto;
  margin: 0 auto;
}

.thanks h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.thanks p {
  margin: 0 auto;
  max-width: 26rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  padding: 1.5rem clamp(1.25rem, 4vw, 2rem) 2rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--orange);
}

/* Motion */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-zoom {
  from {
    transform: scale(1.12);
  }
  to {
    transform: scale(1.06);
  }
}

@keyframes smile-in {
  from {
    opacity: 0;
    transform: scale(0.7) rotate(-8deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .hero-media {
    transform: none;
  }
}

@media (max-width: 520px) {
  .scale {
    gap: 0.35rem;
  }

  .scale-face {
    padding: 0.4rem 0.15rem 0.4rem;
    gap: 0.25rem;
  }

  .scale-face img {
    width: min(3.4rem, 100%);
  }

  .scale-num {
    font-size: 0.9rem;
  }

  .yesno {
    flex-direction: column;
  }

  .choice {
    max-width: none;
  }

  .form-actions .btn {
    max-width: none;
  }
}
