/* Sotacandle homepage.
   Workshop / craft direction: warm paper, beeswax amber, ink brown,
   honeycomb as the one recurring motif, Manrope for display type.
   Loaded after the other visual*.css files, scoped to .shop-home.
*/

.shop-home {
  color: var(--ink);
  font-variant-numeric: lining-nums;
}

.index-content.shop-home {
  margin-top: 0;
  margin-bottom: 0;
}

/* ------------------------------------------------------------------
   Shared section heading: small comb cell, serif title, hairline.
------------------------------------------------------------------ */
.shop-home .home-section-head,
.shop-home .home-picks .sidebar-title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  padding: 0;
  border: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  line-height: 1.1;
  text-align: left;
}

.shop-home .home-section-head::before,
.shop-home .home-picks .sidebar-title::before {
  content: "";
  flex: 0 0 auto;
  width: 14px;
  height: 16px;
  background: var(--wax);
  clip-path: var(--hex);
}

.shop-home .home-section-head::after,
.shop-home .home-picks .sidebar-title::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
}

.shop-home .home-section-head__title {
  margin: 0;
  font: inherit;
  color: inherit;
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------ */
.shop-home .home-hero {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
  border-bottom: 1px solid var(--line);
}

.shop-home .home-hero::before {
  content: "";
  position: absolute;
  inset: 0 0 0 34%;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='100' viewBox='0 0 56 100'><path d='M28 66L0 50L0 16L28 0L56 16L56 50L28 66L28 100' fill='none' stroke='%23a85a00' stroke-width='1.2' stroke-opacity='.28'/><path d='M28 0L28 34L0 50L0 84L28 100L56 84L56 50L28 34' fill='none' stroke='%23a85a00' stroke-width='1.2' stroke-opacity='.28'/></svg>");
  -webkit-mask-image: linear-gradient(to right, transparent, #000 45%);
  mask-image: linear-gradient(to right, transparent, #000 45%);
  pointer-events: none;
}

.shop-home .home-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
  padding: 64px 0 72px;
}

.shop-home .home-hero__eyebrow {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 20px;
  color: var(--honey);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.shop-home .home-hero__eyebrow-mark {
  width: 12px;
  height: 14px;
  background: var(--wax);
  clip-path: var(--hex);
}

.shop-home .home-hero__eyebrow-est {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.shop-home .home-hero__eyebrow-est::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.shop-home .home-hero__title {
  max-width: 14em;
  margin: 0 0 32px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 800;
  letter-spacing: -0.012em;
  line-height: 1.04;
  text-wrap: balance;
}

.shop-home .home-hero__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid var(--ink);
  border-radius: 4px;
  background: var(--wax);
  box-shadow: 4px 4px 0 var(--ink);
  color: var(--ink);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.shop-home .home-hero__cta:hover,
.shop-home .home-hero__cta:focus-visible {
  color: var(--ink);
  transform: translate(3px, 3px);
  box-shadow: 1px 1px 0 var(--ink);
}

.shop-home .home-hero__cta-arrow {
  position: relative;
  width: 22px;
  height: 2px;
  background: currentColor;
  transition: width 0.2s var(--ease);
}

.shop-home .home-hero__cta-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  transform-origin: center;
}

.shop-home .home-hero__cta:hover .home-hero__cta-arrow {
  width: 30px;
}

/* Comb of five category photos. Hex width 31.5%, rows offset by half a cell. */
.shop-home .home-hero__comb {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  aspect-ratio: 100 / 64;
}

.shop-home .hex {
  position: absolute;
  width: 31.5%;
  aspect-ratio: 1 / 1.1547;
  display: grid;
  place-items: center;
  background: var(--cream);
  clip-path: var(--hex);
  transition: transform 0.35s var(--ease), background-color 0.2s;
  animation: hex-in 0.7s var(--ease) both;
}

.shop-home .hex img {
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  object-fit: cover;
  clip-path: var(--hex);
}

.shop-home .hex:hover {
  z-index: 2;
  background: var(--wax);
  transform: translateY(-5px) scale(1.04);
}

.shop-home .hex:nth-child(1) { left: 17.8%; top: 0; animation-delay: 0.1s; }
.shop-home .hex:nth-child(2) { left: 51%; top: 0; animation-delay: 0.18s; }
.shop-home .hex:nth-child(3) { left: 1.2%; top: 44.2%; animation-delay: 0.26s; }
.shop-home .hex:nth-child(4) { left: 34.4%; top: 44.2%; animation-delay: 0.34s; }
.shop-home .hex:nth-child(5) { left: 67.6%; top: 44.2%; animation-delay: 0.42s; }

.shop-home .home-hero__comb::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6%;
  width: 11%;
  aspect-ratio: 1 / 1.1547;
  background: var(--wax);
  clip-path: var(--hex);
  opacity: 0.9;
}

.shop-home .home-hero__comb::after {
  content: "";
  position: absolute;
  right: 1%;
  top: 4%;
  width: 7%;
  aspect-ratio: 1 / 1.1547;
  background: var(--ink);
  clip-path: var(--hex);
}

.shop-home .home-hero__eyebrow,
.shop-home .home-hero__title,
.shop-home .home-hero__cta {
  animation: rise 0.7s var(--ease) both;
}

.shop-home .home-hero__title { animation-delay: 0.08s; }
.shop-home .home-hero__cta { animation-delay: 0.16s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes hex-in {
  from { opacity: 0; transform: scale(0.82); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------------------------------------------
   Catalog: six-column grid so odd leftovers become wide tiles
------------------------------------------------------------------ */
.shop-home .home-catalog {
  padding-top: 64px;
}

.shop-home .home-catalog > .row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
  margin: 0;
  counter-reset: tile;
}

.shop-home .home-catalog > .row > [class*="col-"] {
  display: flex;
  flex: none;
  grid-column: span 2;
  width: auto;
  max-width: none;
  padding: 0;
  counter-increment: tile;
}

.shop-home .category-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--cream);
  box-shadow: none;
  color: var(--ink);
  text-decoration: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.2s;
}

.shop-home .category-tile:hover,
.shop-home .category-tile:focus {
  border-color: var(--wax);
  box-shadow: 0 18px 30px -18px rgba(120, 70, 10, 0.45);
  color: var(--ink);
  text-decoration: none;
  transform: translateY(-4px);
}

.shop-home .category-tile__photo {
  position: relative;
  inset: auto;
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  aspect-ratio: 5 / 4;
  background: var(--paper-deep);
}

/* White product shots melt into the tinted ground instead of boxing. */
.shop-home .category-tile__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  mix-blend-mode: multiply;
  transition: transform 0.7s var(--ease);
}

.shop-home .category-tile:hover .category-tile__photo img {
  transform: scale(1.05);
}

.shop-home .category-tile__photo::before {
  content: counter(tile, decimal-leading-zero);
  position: absolute;
  z-index: 2;
  left: 12px;
  top: 12px;
  padding: 2px 10px 3px;
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 15px;
  font-style: italic;
  font-weight: 700;
  line-height: 1.3;
}

.shop-home .category-tile__photo::after {
  content: "\2192";
  position: absolute;
  z-index: 2;
  right: 12px;
  bottom: 12px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wax);
  color: var(--ink);
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  transform: translateY(8px) scale(0.8);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}

.shop-home .category-tile:hover .category-tile__photo::after,
.shop-home .category-tile:focus-visible .category-tile__photo::after {
  opacity: 1;
  transform: none;
}

.shop-home .category-tile__title {
  position: static;
  display: -webkit-box;
  flex: 1 1 auto;
  margin: 0;
  padding: 16px 18px 20px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  background: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.2;
  transition: color 0.2s;
}

.shop-home .category-tile__title::before {
  content: none;
}

.shop-home .category-tile:hover .category-tile__title {
  color: var(--honey);
}

@media (min-width: 992px) {
  /* Leftover tiles in the last row fill it instead of leaving a hole. */
  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }

  .shop-home .home-catalog > .row > :nth-last-child(2):nth-child(3n + 1),
  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 2) {
    grid-column: span 3;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) .category-tile {
    flex-direction: row;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) .category-tile__photo {
    flex: 0 0 40%;
    aspect-ratio: 16 / 9;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) .category-tile__title {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px 40px;
    font-size: 32px;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) .category-tile__title::after {
    content: "\2192";
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-left: auto;
    border-radius: 50%;
    background: var(--wax);
    color: var(--ink);
    font-family: var(--font-body);
    font-size: 24px;
    line-height: 1;
    transition: transform 0.35s var(--ease);
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) .category-tile:hover .category-tile__title::after {
    transform: translateX(6px);
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 1) .category-tile__photo::after {
    content: none;
  }
}

/* ------------------------------------------------------------------
   Picks: video + best sellers (content comes from the sidebar chunk)
------------------------------------------------------------------ */
.shop-home .home-picks {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 24px 56px;
  align-items: start;
  margin-top: 80px;
}

.shop-home .home-picks > .sidebar {
  display: none;
}

.shop-home .home-picks .sidebar-rated {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

.shop-home .home-picks .video-block .img-block {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: var(--ink);
  box-shadow: 8px 8px 0 var(--paper-deep);
  line-height: 0;
}

.shop-home .home-picks .video-block .img-block > img:not(.img-play) {
  display: block;
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.3s;
}

.shop-home .home-picks .video-link:hover .img-block > img:not(.img-play) {
  transform: scale(1.04);
  opacity: 0.9;
}

.shop-home .home-picks .video-block .img-play {
  width: 68px;
  max-width: 68px;
  height: auto;
  transition: transform 0.25s var(--ease);
}

.shop-home .home-picks .video-link:hover .img-play {
  transform: translate(-50%, -50%) scale(1.1);
}

.shop-home .home-picks .sidebar-rated__item {
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 16px;
  margin: 0 0 12px;
  padding: 10px 16px 10px 10px;
}

.shop-home .home-picks .rated__img {
  width: 92px;
  height: 92px;
}

.shop-home .home-picks .rated__name a {
  font-size: 15px;
}

.shop-home .home-picks .prices-rated__new {
  font-size: 22px;
}

/* ------------------------------------------------------------------
   Article: the SEO text set as a two-column editorial piece
------------------------------------------------------------------ */
.shop-home .home-article {
  position: relative;
  margin: 88px 0 0;
  padding: 56px 0 88px;
  border-top: 1px solid var(--line);
}

.shop-home .home-article::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -9px;
  width: 18px;
  height: 20px;
  margin-left: -9px;
  background: var(--wax);
  clip-path: var(--hex);
}

.shop-home .home-article__title {
  max-width: 22em;
  margin: 0 0 32px;
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 800;
  line-height: 1.12;
}

.shop-home .seo__text {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  column-count: 2;
  column-gap: 64px;
  column-rule: 1px solid var(--line);
  text-wrap: pretty;
}

.shop-home .seo__text > p:first-child {
  margin-bottom: 1.2em;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.5;
}

.shop-home .seo__text h2,
.shop-home .seo__text h3 {
  break-after: avoid;
  break-inside: avoid;
  text-wrap: balance;
}

/* ------------------------------------------------------------------
   Tablet and phone
------------------------------------------------------------------ */
@media (max-width: 991px) {
  .shop-home .home-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    padding: 44px 0 52px;
  }

  .shop-home .home-hero::before {
    inset: 0;
    -webkit-mask-image: linear-gradient(to bottom, transparent 35%, #000);
    mask-image: linear-gradient(to bottom, transparent 35%, #000);
  }

  .shop-home .home-hero__comb {
    max-width: 440px;
    margin: 0 auto;
  }

  .shop-home .home-catalog {
    padding-top: 48px;
  }

  .shop-home .home-catalog > .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .shop-home .home-catalog > .row > [class*="col-"],
  .shop-home .home-catalog > .row > :nth-last-child(2):nth-child(3n + 1),
  .shop-home .home-catalog > .row > :last-child:nth-child(3n + 2) {
    grid-column: span 1;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) .category-tile {
    flex-direction: row;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) .category-tile__photo {
    flex: 0 0 44%;
    aspect-ratio: 4 / 3;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) .category-tile__title {
    display: flex;
    align-items: center;
    padding: 16px 22px;
    font-size: 24px;
  }

  .shop-home .home-picks {
    grid-template-columns: minmax(0, 1fr);
    margin-top: 56px;
  }

  .shop-home .home-article {
    margin-top: 56px;
    padding: 44px 0 56px;
  }

  .shop-home .seo__text {
    column-count: 1;
  }
}

@media (max-width: 575px) {
  .shop-home .home-hero__title {
    margin-bottom: 26px;
  }

  .shop-home .home-hero__cta {
    width: 100%;
    justify-content: center;
  }

  .shop-home .home-catalog > .row {
    gap: 10px;
  }

  .shop-home .category-tile__title {
    display: block;
    padding: 12px 12px 14px;
    font-size: 17px;
  }

  .shop-home .category-tile__photo::before {
    left: 8px;
    top: 8px;
    font-size: 13px;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) .category-tile {
    flex-direction: column;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) .category-tile__photo {
    flex: 0 0 auto;
    aspect-ratio: 16 / 9;
  }

  .shop-home .home-catalog > .row > :last-child:nth-child(odd) .category-tile__title {
    padding: 12px 14px 16px;
    font-size: 21px;
  }

  .shop-home .home-picks .video-block .img-block {
    box-shadow: 5px 5px 0 var(--paper-deep);
  }

  .shop-home .home-picks .sidebar-rated__item {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
  }

  .shop-home .home-picks .rated__img {
    width: 76px;
    height: 76px;
  }

  .shop-home .seo__text {
    font-size: 16px;
  }
}

/* No hover on touch screens: keep the tile arrow visible. */
@media (hover: none) {
  .shop-home .category-tile__photo::after {
    opacity: 1;
    transform: none;
  }
}
