/* ============================================================
   HOME.CSS — Stilar specifika för startsidan (index)
   Grusarmering.se
   ============================================================ */

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  padding-top: 72px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
  transition: opacity 1.5s;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.7) 0%, rgba(5, 5, 5, 0.4) 40%, rgba(5, 5, 5, 0.85) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  padding: 0 48px;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 32px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.2s forwards;
}

.hero-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: linear-gradient(90deg, #4caf6e, transparent);
}

.hero h1 {
  font-size: clamp(52px, 7vw, 96px);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.35s forwards;
}

.hero h1 .accent {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-style: italic;
  background: linear-gradient(135deg, #4caf6e 0%, #8cb86e 50%, #c8a86e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: fadeUp 0.8s ease 0.35s forwards, gradientShift 8s ease-in-out infinite;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.45);
  font-weight: 300;
  max-width: 520px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.5s forwards;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s ease 0.65s forwards;
}

.hero-scroll {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-dot {
  width: 1px;
  height: 40px;
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.scroll-dot::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 40%;
  background: linear-gradient(180deg, transparent, #4caf6e);
  animation: scrollLine 2s ease-in-out infinite;
}

/* ===== FÖRE/EFTER-SLIDER ===== */
.ba {
  padding: 140px 0;
  position: relative;
  overflow: hidden;
}

.ba::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 110, 0.3), transparent);
}

.ba::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(76, 175, 110, 0.3), transparent);
}

.ba-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 48px;
}

.ba-header {
  text-align: center;
  margin-bottom: 64px;
}

.ba-container {
  position: relative;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  aspect-ratio: 16/9;
  border-radius: 20px;
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.5), 0 0 60px rgba(76, 175, 110, 0.08);
}

.ba-img {
  position: absolute;
  inset: 0;
}

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

.ba-img-before {
  clip-path: inset(0 50% 0 0);
  z-index: 2;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 2px;
  background: rgba(255, 255, 255, 0.8);
  transform: translateX(-50%);
  pointer-events: none;
}

.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  backdrop-filter: blur(4px);
}

.ba-handle svg {
  width: 20px;
  height: 20px;
}

.ba-tag {
  position: absolute;
  top: 24px;
  z-index: 5;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  padding: 7px 16px;
  border-radius: 100px;
  pointer-events: none;
}

.ba-tag-l { left: 24px; }
.ba-tag-r { right: 24px; }

.ba-hint {
  text-align: center;
  margin-top: 24px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.2);
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* ===== PROBLEM-SEKTION ===== */
.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.problem-card {
  background: rgba(255, 255, 255, 0.02);
  padding: 44px 36px;
  position: relative;
  overflow: hidden;
  transition: background 0.4s;
}

.problem-card:hover {
  background: rgba(76, 175, 110, 0.04);
}

.problem-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4caf6e, transparent);
  opacity: 0;
  transition: opacity 0.4s;
}

.problem-card:hover::after {
  opacity: 1;
}

.problem-num {
  font-family: 'Instrument Serif', serif;
  font-size: 48px;
  color: rgba(76, 175, 110, 0.12);
  line-height: 1;
  margin-bottom: 16px;
  font-weight: 400;
  font-style: italic;
}

.problem-card h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.problem-card p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.7;
  font-weight: 300;
}

/* ===== EXPLAINER ===== */
.explain-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.explain-text .subtitle {
  margin-top: 4px;
}

.explain-text p {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.8;
  font-weight: 300;
  margin-bottom: 16px;
}

.explain-text p strong {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.explain-img {
  aspect-ratio: 4/3;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
  position: relative;
}

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

.explain-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(76, 175, 110, 0.1), transparent 50%);
}

/* ===== FÖRDELAR ===== */
.benefits-wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ben {
  background: rgba(255, 255, 255, 0.02);
  padding: 40px 28px;
  transition: background 0.4s;
  position: relative;
  overflow: hidden;
}

.ben:hover {
  background: rgba(76, 175, 110, 0.04);
}

.ben-num {
  font-family: 'Instrument Serif', serif;
  font-size: 36px;
  color: rgba(76, 175, 110, 0.15);
  margin-bottom: 16px;
  font-style: italic;
}

.ben h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 8px;
}

.ben p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.65;
  font-weight: 300;
}

/* ===== PRODUKTER ===== */
.prod-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 56px;
}

.prod-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  max-width: 260px;
  text-align: right;
  line-height: 1.6;
}

.prod-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  border-radius: 20px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.prod {
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  transition: background 0.4s;
  position: relative;
  overflow: hidden;
}

.prod:hover {
  background: rgba(76, 175, 110, 0.03);
}

.prod.feat::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #2d5a3d, #4caf6e);
}

.prod-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.15);
  font-size: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.prod-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.85;
  transition: opacity 0.4s;
}

.prod:hover .prod-img img {
  opacity: 1;
}

.prod-body {
  padding: 32px 32px 36px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.prod-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 10px;
}

.prod.feat .prod-tag {
  color: #4caf6e;
}

.prod-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.prod-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.7;
  font-weight: 300;
  margin-bottom: 28px;
  flex-grow: 1;
}

.prod-specs {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.sp {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.sp:last-child {
  border-bottom: none;
}

.sp-k { color: rgba(255, 255, 255, 0.3); }
.sp-v { font-weight: 600; color: rgba(255, 255, 255, 0.7); }

.prod.feat .sp-v {
  color: #4caf6e;
}

.prod-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 16px;
  transition: color 0.2s;
}

.prod-link:hover,
.prod.feat .prod-link {
  color: #4caf6e;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-content {
    padding: 0 24px;
  }

  .ba-inner {
    padding: 0 24px;
  }

  .problem-grid {
    grid-template-columns: 1fr;
  }

  .explain-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .benefits-wrap {
    grid-template-columns: repeat(2, 1fr);
  }

  .prod-grid {
    grid-template-columns: 1fr;
  }

  .prod-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .prod-sub {
    text-align: left;
  }

}

@media (max-width: 640px) {
  .benefits-wrap {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions a {
    text-align: center;
    justify-content: center;
  }

  .inst-left {
    padding: 36px 28px;
  }

  .ba {
    padding: 100px 0;
  }

  .hero-scroll {
    display: none;
  }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50%       { background-position: 100% 50%; }
}
