/* =====================================================================
   /selge-bil — all-cars landing page. Loaded after styles.css + regnr.css.
   ===================================================================== */

/* ----- Hero: fuel-type chips ----- */
.fuel-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
}
.fuel-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem 0.35rem 0.65rem; /* icon side slightly tighter for optical balance */
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.85rem;
  font-weight: 600;
}
.fuel-chips svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: var(--orange-light);
}

/* ----- Plate form (hero + CTA band) ----- */
.regnr-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 560px;
  min-width: 0;
}
.regnr-form > * { min-width: 0; }
@media (min-width: 640px) {
  .regnr-form { grid-template-columns: 1fr auto; }
  .regnr-form .regnr-error { grid-column: 1 / -1; }
}
.regnr-form--center { margin-left: auto; margin-right: auto; text-align: left; }

.regnr-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.1rem;
  padding: 1rem 1.75rem;
  white-space: nowrap;
}
.regnr-submit svg { width: 18px; height: 18px; transition: transform 0.2s ease; }
.regnr-submit:hover svg { transform: translateX(3px); }

.regnr-error { margin: 0; font-size: 0.9rem; font-weight: 500; color: #fca5a5; }

.regnr-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 1.1rem 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
}
.regnr-trust li { display: inline-flex; align-items: center; gap: 0.4rem; }
.regnr-trust svg { width: 1rem; height: 1rem; color: var(--orange); flex-shrink: 0; }
.regnr-trust--center { justify-content: center; }

/* Hero scene + offer bubble placement */
.hero-photo { position: relative; width: 100%; max-width: 600px; }
.hero-photo .offer-bubble { position: absolute; left: -1rem; bottom: -2.75rem; }
@media (max-width: 640px) {
  /* Small screens: the card sits under the scene so it never hides the car */
  .hero-photo .offer-bubble { position: relative; left: auto; bottom: auto; width: fit-content; margin: -0.75rem 0 0 auto; }
  .hero-scene .car-scene .callout-pill text { font-size: 28px; }
}
.offer-tag {
  margin-left: 0.25rem;
  padding: 0.1rem 0.45rem;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
}

/* ----- Hero: animated scene of the cars we buy (illustration, js/selge-bil.js drives it) ----- */
.car-scene { display: block; width: 100%; height: auto; overflow: hidden; }
.car-scene .car { transform-box: view-box; }
/* Without JS (or before it runs) only the first car shows, parked */
.car-scene .car:not(:first-of-type) { display: none; }
.car-scene.is-live .car { display: inline; transform: translateX(-760px); }
.car-scene.is-live .car.is-here { transform: translateX(0); transition: transform 1.25s cubic-bezier(0.2, 0.75, 0.25, 1); }
.car-scene.is-live .car.is-gone { transform: translateX(760px); transition: transform 1s cubic-bezier(0.6, 0, 0.85, 0.4); }
.car-scene .rim, .car-scene .smoke circle, .car-scene .callout-ring { transform-box: fill-box; transform-origin: center; }
.car-scene .car.is-moving .rim { animation: csSpin 0.45s linear infinite; }
.car-scene .car.is-moving .car-body { animation: csBob 0.32s ease-in-out infinite; }
@keyframes csSpin { to { transform: rotate(360deg); } }
@keyframes csBob { 50% { transform: translateY(-1.5px); } }

.car-scene .road-line { transition: opacity 0.4s; }
.car-scene.is-driving .road-line { animation: csRoad 0.6s linear infinite; }
@keyframes csRoad { to { stroke-dashoffset: -48; } }

.car-scene .smoke circle { opacity: 0; animation: csSmoke 2.4s ease-out infinite; }
.car-scene .smoke circle:nth-child(2) { animation-delay: 0.8s; }
.car-scene .smoke circle:nth-child(3) { animation-delay: 1.6s; }
@keyframes csSmoke {
  0% { opacity: 0; transform: translate(0, 0) scale(0.5); }
  20% { opacity: 0.75; }
  100% { opacity: 0; transform: translate(-26px, -70px) scale(2); }
}
.car-scene .fault-glow { animation: csGlow 1.4s ease-in-out infinite; }
.car-scene .port-glow { animation: csGlow 1.8s ease-in-out infinite; }
.car-scene .soot circle { transform-box: fill-box; transform-origin: center; opacity: 0; animation: csSoot 1.6s ease-out infinite; }
.car-scene .soot circle:nth-child(2) { animation-delay: 0.55s; }
.car-scene .soot circle:nth-child(3) { animation-delay: 1.1s; }
@keyframes csSoot {
  0% { opacity: 0; transform: translate(0, 0) scale(0.6); }
  20% { opacity: 0.7; }
  100% { opacity: 0; transform: translate(-34px, -16px) scale(2.2); }
}
@keyframes csGlow { 50% { stroke-opacity: 0.25; } }

/* Damage callout: pill + dotted leader + pulsing dot */
.car-scene .callout { opacity: 0; transition: opacity 0.35s ease; }
.car-scene .callout.is-on { opacity: 1; }
.car-scene .callout-pill { transform-box: fill-box; transform-origin: center bottom; transform: translateY(8px) scale(0.92); transition: transform 0.45s cubic-bezier(0.3, 1.4, 0.5, 1); }
.car-scene .callout.is-on .callout-pill { transform: none; }
.car-scene .callout-pill text { font-family: Inter, system-ui, sans-serif; font-size: 19px; font-weight: 700; fill: #0c0c2d; }
.car-scene .callout-pill text.chip-t { fill: #fff; letter-spacing: 0.01em; }
.car-scene .callout-ring { animation: csPing 1.6s ease-out infinite; }
@keyframes csPing { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(2.6); opacity: 0; } }

/* Active fuel chip follows the car on screen */
.fuel-chips li { transition: background-color 0.3s, border-color 0.3s, color 0.3s; }
.fuel-chips li.is-active { background: rgba(249, 115, 22, 0.16); border-color: rgba(251, 146, 60, 0.7); color: #fff; }

.car-scene.is-paused *, .car-scene.is-paused { animation-play-state: paused !important; }

/* ----- "Vi kjøper alle typer biler" ----- */
.fuel-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .fuel-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .fuel-grid { grid-template-columns: repeat(4, 1fr); } }

.fuel-card {
  background: #fff;
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  border: 1px solid #eef0f4;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.fuel-card:hover { transform: translateY(-4px); box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1); }
.fuel-card-icon {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 0.9rem;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-dark) 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.3);
}
.fuel-card-icon svg { width: 1.75rem; height: 1.75rem; }
.fuel-card h3 { font-size: 1.15rem; font-weight: 700; color: var(--navy); margin: 0 0 0.4rem; }
.fuel-card p { color: #4b5563; font-size: 0.95rem; line-height: 1.6; margin: 0; }

/* ----- Fault grid: 3 columns on desktop, orphan-free ----- */
.fault-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)); /* columns may shrink below their longest word */
  gap: 1rem;
}
.fault-grid .defect-card { min-width: 0; }
.fault-grid h3 { hyphens: manual; -webkit-hyphens: manual; overflow-wrap: anywhere; } /* break compounds at &shy; (Motor-problemer), not mid-syllable */
@media (max-width: 360px) { .fault-grid { gap: 0.6rem; } .fault-grid .defect-card { padding: 0.85rem 0.6rem; } }
@media (min-width: 768px) { .fault-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }
@media (max-width: 767px) {
  .fault-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; max-width: calc(50% - 0.5rem); margin: 0 auto; width: 100%; }
}

/* ----- About (light variant, so it does not stack against the dark CTA band) ----- */
.about-light { background: #fff; }

/* ----- Closing CTA band ----- */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0c0c2d 0%, #1a1055 55%, #0c0c2d 100%);
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: -40% -10% auto auto;
  width: 70%;
  height: 180%;
  background: radial-gradient(ellipse, rgba(249, 115, 22, 0.1) 0%, transparent 65%);
  pointer-events: none;
}
.cta-band > * { position: relative; }

/* ----- Hero: keep the plate form above the fold on small phones ----- */
@media (max-width: 1023px) {
  .hero-allcars { min-height: 0 !important; align-items: flex-start !important; padding-top: 6.25rem !important; }
}
.hero-allcars h1 { margin-bottom: 1rem; }
.hero-lead { margin: 0 0 1.5rem; max-width: 34rem; color: rgba(255, 255, 255, 0.8); font-size: 1.125rem; line-height: 1.6; }

/* ----- Accessible orange for white button text on this page.
   #ea580c→#c2410c with large bold text passes WCAG AA; the live site's #f97316 buttons do not. ----- */
.btn-primary { background: linear-gradient(135deg, #ea580c 0%, #c2410c 100%); box-shadow: 0 4px 15px rgba(194, 65, 12, 0.3); font-weight: 700; }
section .btn-primary { font-size: 1.2rem; }
.btn-primary.btn-nav { background: #c2410c; }

/* ----- Phones: sticky plate bar (shown by js/selge-bil.js between the hero form and the CTA band/footer) ----- */
.sticky-plate { display: none; }
@media (max-width: 767px) {
  .sticky-plate {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(17, 14, 52, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(110%);
    visibility: hidden;
    transition: transform 0.25s ease, visibility 0s 0.25s;
  }
  .sticky-plate.is-shown { transform: none; visibility: visible; transition: transform 0.25s ease; }
  .sticky-plate-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; max-width: 560px; margin: 0 auto; }
  .sticky-plate .plate-field { box-shadow: none; }
  .sticky-plate .plate-field:focus-within { box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.55); }
  .sticky-plate .plate-badge { width: 2.25rem; }
  .sticky-plate .plate-input { padding: 0.7rem 0.75rem; font-size: 1.1rem; }
  .sticky-plate .regnr-submit { padding: 0.7rem 1.1rem; font-size: 1rem; }
  .sticky-plate .regnr-error { grid-column: 1 / -1; font-size: 0.85rem; }
  /* One action at a time: the navbar button steps aside while the bar is up */
  .navbar .btn-nav { transition: opacity 0.2s ease, visibility 0s; }
  body.sticky-plate-on .navbar .btn-nav { opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0s 0.2s; }
}
@media (prefers-reduced-motion: reduce) { .sticky-plate, .sticky-plate.is-shown { transition: none; } }
.step-eyebrow { color: #c2410c; font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ----- Components shared with the main site, made accessible here ----- */
.faq-item:not(.active) .faq-answer { visibility: hidden; }
.testimonial-scroll:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 0.5rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float-gentle, .btn-pulse, .offer-bubble { animation: none !important; }
  .car-scene *, .car-scene { animation: none !important; transition: none !important; }
  .fade-up, .stagger-in > * { transition: none !important; opacity: 1 !important; transform: none !important; }
}

/* Phones: all four fuel chips on one line (no orphan "Hybrid" on a second row) */
@media (max-width: 480px) {
  .fuel-chips { gap: 0.35rem; flex-wrap: nowrap; }
  .fuel-chips li { gap: 0.3rem; padding: 0.3rem 0.6rem 0.3rem 0.5rem; font-size: 0.78rem; white-space: nowrap; }
  .fuel-chips svg { width: 0.9rem; height: 0.9rem; }
  /* Keep the three trust checks on one line on phones */
  .regnr-trust { gap: 0.4rem 0.5rem; font-size: 0.75rem; }
  .regnr-trust--center { column-gap: 0.4rem; }   /* the CTA band is a few px narrower than the hero */
  .regnr-trust li { gap: 0.25rem; white-space: nowrap; }
  .regnr-trust svg { width: 0.875rem; height: 0.875rem; }
}
@media (max-width: 350px) { .fuel-chips { flex-wrap: wrap; } }
/* Trust checks: as large as each phone width allows while staying on one line (13px from 390px) */
@media (min-width: 375px) and (max-width: 480px) { .regnr-trust { font-size: 0.78rem; } }
@media (min-width: 390px) and (max-width: 480px) { .regnr-trust { font-size: 0.8125rem; } }

/* ----- "Biler vi har hentet": real pickups + what we handle ----- */
.section-eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c2410c; /* AA on white */
}
.pickup-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (min-width: 768px) { .pickup-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; } }
.pickup-photo {
  position: relative;
  aspect-ratio: 793 / 468;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #eef1f6;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 10px 24px -12px rgba(15, 23, 42, 0.25);
}
@media (min-width: 768px) { .pickup-photo { border-radius: 0.85rem; } }
.pickup-photo img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.pickup-photo:hover img { transform: scale(1.04); }
/* Missing photo (placeholders are never deployed): a calm panel instead of a broken-image icon */
.pickup-photo.is-missing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 600;
}
.pickup-photo.is-missing::before {
  content: '';
  width: 2.25rem;
  height: 2.25rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6.5h11.5v9.5H2zM13.5 10H18l3 3.2V16h-7.5'/%3E%3Ccircle cx='6' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 6.5h11.5v9.5H2zM13.5 10H18l3 3.2V16h-7.5'/%3E%3Ccircle cx='6' cy='17.5' r='1.8'/%3E%3Ccircle cx='17' cy='17.5' r='1.8'/%3E%3C/svg%3E") center / contain no-repeat;
}
.pickup-photo.is-missing::after { content: 'Bilde kommer'; }

.pickup-steps {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 640px) { .pickup-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .pickup-steps { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.5rem; } }
.pickup-steps li { display: flex; align-items: flex-start; gap: 0.85rem; }
.pickup-ic {
  width: 2.75rem;
  height: 2.75rem;
  flex-shrink: 0;
  border-radius: 0.8rem;
  background: #fff4ea;
  color: #c2410c;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pickup-ic svg { width: 1.4rem; height: 1.4rem; }
.pickup-steps h3 { margin: 0.1rem 0 0.2rem; font-size: 1rem; font-weight: 700; color: var(--navy); }
.pickup-steps p { margin: 0; font-size: 0.92rem; line-height: 1.5; color: #4b5563; }
@media (prefers-reduced-motion: reduce) { .pickup-photo img { transition: none; } .pickup-photo:hover img { transform: none; } }
