/* Telmes julkalender 2026: stor hero överst på svenska startsidan.
   Laddas bara när julkalendern är aktiv (src/_data/julkalender.js). */
:root {
  --jul-red: #b20713;
  --jul-red-dark: #7a050d;
  --jul-green: #257134;
  --jul-gold: #ead084;
  --jul-cream: #f7f5ef;
}

/* Knapp i hero-videon (ovanför rubriken) */
.hero__julpill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.45rem 0.95rem 0.45rem 0.8rem;
  border-radius: 999px;
  background: var(--jul-red);
  border: 2px solid var(--jul-gold);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 24px rgb(0 0 0 / 28%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero__julpill:hover,
.hero__julpill:focus-visible {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgb(0 0 0 / 36%);
}
.hero__julpill .fa-gift { color: var(--jul-gold); }
.hero__julpill-dates {
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  background: var(--jul-gold);
  color: var(--jul-red-dark);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 34rem) {
  .hero__julpill { font-size: 0.85rem; gap: 0.4rem; padding: 0.4rem 0.75rem; }
  .hero__julpill .fa-arrow-right { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__julpill { transition: none; }
  .hero__julpill:hover { transform: none; }
}

.julhero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: var(--visual-vh, 100svh);
  padding: calc(var(--header-height) + clamp(1.5rem, 5vh, 3rem)) 0 clamp(3rem, 8vh, 5rem);
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(50rem 30rem at 0% 100%, rgb(37 113 52 / 55%), transparent 65%),
    linear-gradient(135deg, var(--jul-red) 0%, var(--jul-red-dark) 100%);
}

/* Bilderna fyller hela ytan och växlar mellan Julverkstaden och Julexpressen */
.julhero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.julhero__slide {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  transition: opacity 1.4s ease;
}
.julhero__slide.is-active { opacity: 1; }
.julhero__slide picture,
.julhero__slide img {
  display: block;
  width: 100%;
  height: 100%;
}
.julhero__slide img {
  object-fit: cover;
  object-position: 70% 50%;
  transform: scale(1.04);
  transition: transform 9s ease-out;
}
.julhero__slide.is-active img { transform: scale(1.1); }

/* Röd toning från vänster så att texten alltid är läsbar */
.julhero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgb(60 2 6 / 55%) 0%, transparent 22%),
    linear-gradient(90deg, rgb(122 5 13 / 95%) 0%, rgb(150 6 16 / 85%) 28%, rgb(178 7 19 / 35%) 50%, rgb(178 7 19 / 0%) 66%),
    linear-gradient(0deg, rgb(60 2 6 / 45%) 0%, transparent 30%);
}

.julhero__content {
  position: relative;
  z-index: 2;
  width: min(100% - 2 * var(--page-gutter), var(--container-max, 80rem));
  margin-inline: auto;
}
.julhero__content > * { max-width: 44rem; }

.julhero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: var(--jul-green);
  border: 2px solid var(--jul-gold);
  font-weight: 700;
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  letter-spacing: 0.02em;
  box-shadow: 0 6px 18px rgb(0 0 0 / 25%);
}
.julhero__eyebrow i { color: var(--jul-gold); }

.julhero__title {
  margin: 0 0 1rem;
  color: #fff;
  font-size: clamp(3.4rem, 7.4vw, 7.75rem);
  line-height: 0.88;
  text-transform: uppercase;
  text-shadow: 0 4px 0 rgb(0 0 0 / 22%), 0 10px 40px rgb(0 0 0 / 35%);
}
.julhero__title span {
  display: block;
  color: var(--jul-gold);
}

.julhero__lead {
  margin: 0 0 1.5rem;
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  line-height: 1.4;
  font-weight: 500;
  text-shadow: 0 2px 10px rgb(0 0 0 / 35%);
}

/* 24 luckor, dagens lucka markeras i december (julkalender.js) */
.julhero__doors {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 0.4rem;
  max-width: 32rem;
}
.julhero__doors li {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 0.4rem;
  background: rgb(122 5 13 / 55%);
  border: 1px solid rgb(234 208 132 / 65%);
  font-family: var(--font-display);
  font-size: clamp(0.85rem, 1.3vw, 1.1rem);
  color: var(--jul-gold);
  backdrop-filter: blur(2px);
}
.julhero__doors li.is-open { background: rgb(37 113 52 / 85%); color: #fff; }
.julhero__doors li.is-today {
  background: var(--jul-gold);
  border-color: #fff;
  color: var(--jul-red-dark);
  box-shadow: 0 0 0 4px rgb(234 208 132 / 35%);
}

.julhero__actions { margin: 0 0 1.5rem; }
.julhero__cta {
  padding: 1rem 2.2rem;
  font-size: clamp(1.15rem, 1.8vw, 1.45rem);
  font-weight: 700;
  border-radius: 999px;
  background: var(--jul-gold);
  border-color: var(--jul-gold);
  color: var(--jul-red-dark);
  box-shadow: 0 12px 30px rgb(0 0 0 / 35%);
}
.julhero__cta:hover,
.julhero__cta:focus-visible {
  background: #fff;
  border-color: #fff;
  color: var(--jul-red-dark);
  box-shadow: 0 14px 36px rgb(0 0 0 / 42%);
}

/* Etiketter som visar och växlar bildvärld */
.julhero__worlds { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.julhero__world {
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1.5px solid rgb(234 208 132 / 70%);
  background: rgb(0 0 0 / 25%);
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}
.julhero__world[aria-pressed="true"] { background: var(--jul-gold); color: var(--jul-red-dark); border-color: var(--jul-gold); }
.julhero__world--expressen[aria-pressed="true"] { background: var(--jul-green); color: #fff; }

/* Guldband i nederkanten, som ett paketsnöre */
.julhero__ribbon {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.6rem;
  z-index: 2;
  background: linear-gradient(180deg, #f6e7b8, var(--jul-gold) 45%, #c9a94f);
}

/* Mobil och smal skärm: bilden överst, texten på rött under */
@media (max-width: 56rem) {
  .julhero {
    display: block;
    min-height: 0;
    padding: 0 0 2.5rem;
  }
  .julhero__media {
    position: relative;
    inset: auto;
    aspect-ratio: 4 / 3.2;
    max-height: 58svh;
    width: 100%;
  }
  .julhero__slide img { object-position: 50% 50%; }
  .julhero__scrim { display: none; }
  .julhero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
      linear-gradient(180deg, rgb(60 2 6 / 60%) 0%, transparent 28%);
  }
  /* Bilden tonar ut mot den röda bakgrunden utan synlig kant */
  .julhero__media {
    -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 62%, transparent 100%);
  }
  .julhero__content { margin-top: -2.5rem; }
  .julhero__title { font-size: clamp(3rem, 15vw, 5.5rem); }
}

@media (max-width: 34rem) {
  .julhero__doors { grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 0.3rem; }
  .julhero__cta { width: 100%; padding: 0.95rem 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
  .julhero__slide,
  .julhero__slide img,
  .julhero__cta { transition: none; }
  .julhero__slide img,
  .julhero__slide.is-active img { transform: none; }
}
