/* Homepage art direction: editorial utility catalog with a poster-like brand edge. */

body:has(.home-hero) {
  background: var(--cream);
}

.home-hero {
  position: relative;
  padding: 0 3rem 3rem;
  overflow: hidden;
}

.home-hero::after {
  position: absolute;
  right: -4rem;
  bottom: -8rem;
  width: 18rem;
  height: 18rem;
  border: 3rem solid rgba(25, 82, 199, 0.07);
  border-radius: 999px;
  content: "";
  pointer-events: none;
}

.home-hero .hero-grid {
  grid-template-columns: minmax(24rem, 0.72fr) minmax(36rem, 1.28fr);
  min-height: 43rem;
}

.home-hero .hero-copy {
  position: relative;
  z-index: 3;
  min-height: 43rem;
  padding: 4.5rem 3rem 3rem 0;
}

.home-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.2rem;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.home-kicker::before {
  width: 2.4rem;
  height: 0.28rem;
  background: var(--yellow);
  content: "";
  transform-origin: left center;
  animation: home-rule-pulse 3.6s ease-in-out 1.4s infinite;
}

.home-hero .hero-title {
  max-width: 33rem;
  font-size: clamp(5.2rem, 7vw, 8rem);
  line-height: 0.82;
  letter-spacing: -0.025em;
}

.hero-title-line {
  display: block;
  width: max-content;
  transform-origin: left bottom;
  animation: home-title-arrive 850ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title-line:nth-child(2) {
  animation-delay: 90ms;
}

.hero-title-accent {
  display: inline-block;
  color: var(--blue);
  text-shadow: 0.035em 0.035em 0 var(--yellow);
  transform-origin: left center;
  animation: home-title-breathe 5.2s ease-in-out 1.2s infinite;
}

.home-hero .squiggle {
  width: min(25rem, 92%);
  margin: 1.35rem 0 1.5rem;
}

.hero-intro {
  max-width: 31rem;
  margin: 0 0 1.6rem;
  font-family: var(--serif);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0;
}

.home-proof {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  width: min(100%, 34rem);
  margin-top: 2rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.home-proof > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 0.9rem 0.9rem 0;
}

.home-proof > div + div {
  padding-left: 0.9rem;
  border-left: 1px solid var(--line);
}

.home-proof strong {
  color: var(--blue);
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.8rem;
  line-height: 0.9;
  letter-spacing: -0.02em;
}

.home-proof span {
  max-width: 8.5rem;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.home-hero .hero-art {
  min-height: 43rem;
  overflow: visible;
}

.home-hero .blue-poster {
  inset: 0 -3rem -1.8rem -5%;
  clip-path: polygon(14% 0, 100% 0, 100% 100%, 8% 100%, 0 87%, 5% 70%, 1% 52%, 8% 34%, 4% 15%);
}

.home-hero .hero-family-scene {
  top: 3rem;
  right: -1rem;
  width: 108%;
  height: calc(100% - 5rem);
  object-fit: contain;
  box-shadow: none;
}

.home-hero .hero-mascot {
  right: 26%;
  top: 2.4rem;
  width: 7.4rem;
  animation: home-float 4.2s ease-in-out infinite;
}

.home-hero .hero-badge {
  right: 2%;
  bottom: 2.5%;
  width: 8.8rem;
}

.hero-product-note {
  position: absolute;
  left: 2%;
  bottom: 5.5%;
  z-index: 4;
  display: grid;
  gap: 0.3rem;
  width: 10rem;
  padding: 0.9rem 1rem;
  border: 0.18rem solid var(--cream);
  color: var(--blue);
  background: var(--yellow);
  box-shadow: 0 0.8rem 0 rgba(14, 14, 14, 0.12);
  transform: rotate(-4deg);
}

.hero-product-note span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hero-product-note strong {
  font-family: var(--display);
  font-size: 1.45rem;
  line-height: 0.9;
  text-transform: uppercase;
}

.home-category-rail {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1rem;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
}

.home-category-rail a {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 0.8rem;
  min-height: 6.5rem;
  padding: 1rem 1.2rem;
  border-right: 1px solid var(--line);
  transition: color 180ms ease, background 180ms ease;
}

.home-category-rail a:last-child {
  border-right: 0;
}

.home-category-rail a:focus-visible {
  color: var(--white);
  background: var(--blue);
}

.home-category-rail span {
  grid-row: 1 / span 2;
  color: var(--blue);
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.25rem;
}

.home-category-rail a:focus-visible span {
  color: var(--yellow);
}

.home-category-rail a:active {
  color: var(--white);
  background: var(--blue);
}

.home-category-rail a:active span {
  color: var(--yellow);
}

@media (hover: hover) and (pointer: fine) {
  .home-category-rail a:hover {
    color: var(--white);
    background: var(--blue);
  }

  .home-category-rail a:hover span {
    color: var(--yellow);
  }
}

.home-category-rail strong {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.55rem;
  line-height: 0.88;
  letter-spacing: -0.015em;
  text-transform: uppercase;
}

.home-category-rail small {
  font-size: 0.75rem;
  line-height: 1.25;
}

.home-featured {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
  border-bottom: 1px solid var(--line);
}

.home-featured .collection-head {
  grid-template-columns: minmax(0, 1fr) minmax(20rem, 0.55fr);
  align-items: end;
  margin-bottom: 2.4rem;
}

.home-featured .section-title {
  display: block;
  max-width: 44rem;
  font-size: clamp(4rem, 6vw, 7rem);
}

.featured-heading-side {
  display: grid;
  justify-items: start;
  gap: 1.1rem;
  padding-left: 2rem;
  border-left: 1px solid var(--line);
}

.featured-heading-side p {
  max-width: 30rem;
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.08rem;
  line-height: 1.45;
  letter-spacing: 0;
}

.home-kicker,
.home-hero .squiggle,
.hero-intro,
.home-hero .hero-actions,
.home-proof {
  animation: home-copy-arrive 720ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-kicker { animation-delay: 20ms; }
.home-hero .squiggle { animation-delay: 180ms; }
.hero-intro { animation-delay: 250ms; }
.home-hero .hero-actions { animation-delay: 320ms; }
.home-proof { animation-delay: 390ms; }

.home-category-rail a {
  animation: home-category-arrive 620ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.home-category-rail a:nth-child(1) { animation-delay: 420ms; }
.home-category-rail a:nth-child(2) { animation-delay: 480ms; }
.home-category-rail a:nth-child(3) { animation-delay: 540ms; }
.home-category-rail a:nth-child(4) { animation-delay: 600ms; }

.home-featured .featured-product-rail {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
  gap: 1rem;
}

.home-featured .product-grid-featured {
  display: contents;
}

.home-featured .product-card {
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: var(--white);
}

.home-featured .product-card[data-product-card="air-hat"] {
  grid-column: span 7;
  grid-row: span 2;
  grid-template-rows: minmax(0, 1fr) auto;
}

.home-featured .product-card[data-product-card="mini-desk-fan"],
.home-featured .product-card[data-product-card="portable-light"] {
  grid-column: span 5;
}

.home-featured .product-card[data-product-card="clip-fan"] {
  grid-column: span 5;
}

.home-featured .product-card[data-product-card="cooling-pouch"] {
  grid-column: span 7;
}

.home-featured .product-media {
  aspect-ratio: 1.55 / 1;
}

.home-featured .product-card[data-product-card="air-hat"] .product-media {
  min-height: 28rem;
  height: 100%;
}

.home-featured .product-body {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.7rem 1.2rem;
  padding: 1rem 1.15rem 1.15rem;
  border-top: 1px solid var(--line);
}

.home-featured .swatches,
.home-featured .product-line {
  grid-column: 1;
}

.home-featured .product-actions {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  grid-template-columns: auto 2.8rem;
}

.home-featured .product-actions .button {
  min-height: 2.8rem;
}

#home-story-teaser {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

#home-story-teaser .story-grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(26rem, 0.92fr);
  gap: 0;
}

#home-story-teaser .lifestyle-photo {
  position: relative;
  min-height: 38rem;
  border-radius: 0;
}

.story-photo-label {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
  color: var(--cream);
  background: var(--blue);
}

.story-photo-label span {
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.story-photo-label strong {
  font-family: var(--display);
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 0.84;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

#home-story-teaser .about-panel {
  align-content: center;
  padding: 4rem;
  border: 1.5px solid var(--ink);
  border-left: 0;
  border-radius: 0;
  background: var(--blush);
}

#home-story-teaser .about-panel .section-title {
  max-width: 38rem;
  font-size: clamp(3.5rem, 5vw, 5.8rem);
}

.story-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story-points span {
  display: grid;
  align-content: center;
  min-height: 5rem;
  padding: 0.8rem;
  border-right: 1px solid var(--line);
  font-size: 0.75rem;
  font-weight: 900;
  line-height: 1.2;
  text-transform: uppercase;
}

.story-points span:last-child {
  border-right: 0;
}

@keyframes home-float {
  0%, 100% { transform: rotate(6deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(-0.45rem); }
}

@keyframes home-title-arrive {
  from { opacity: 0; transform: translate3d(-0.08em, 0.55em, 0) rotate(2deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) rotate(0); }
}

@keyframes home-title-breathe {
  0%, 100% { transform: rotate(-0.7deg) translate3d(0, 0, 0); }
  50% { transform: rotate(0.35deg) translate3d(0.025em, -0.025em, 0); }
}

@keyframes home-copy-arrive {
  from { opacity: 0; transform: translate3d(0, 1rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes home-category-arrive {
  from { opacity: 0; transform: translate3d(0, 1.25rem, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes home-rule-pulse {
  0%, 100% { transform: scaleX(1); }
  50% { transform: scaleX(0.72); }
}

@keyframes home-type-reveal {
  from { opacity: 0; transform: translate3d(0, 0.35em, 0) skewY(1deg); }
  to { opacity: 1; transform: translate3d(0, 0, 0) skewY(0); }
}

@supports (animation-timeline: view()) {
  .type-reveal {
    animation: home-type-reveal linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 28%;
  }
}

@media (max-width: 1100px) {
  .home-hero .hero-grid {
    grid-template-columns: minmax(21rem, 0.78fr) minmax(29rem, 1.22fr);
  }

  .home-featured .product-card[data-product-card="air-hat"] .product-media {
    min-height: 23rem;
  }

  .home-featured .product-body {
    grid-template-columns: 1fr;
  }

  .home-featured .product-actions {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 920px) {
  .home-hero {
    padding-right: 1rem;
    padding-left: 1rem;
  }

  .home-hero .hero-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .home-hero .hero-copy {
    min-height: 0;
    padding: 3rem 0;
  }

  .home-hero .hero-art {
    min-height: 36rem;
  }

  .home-category-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-category-rail a:nth-child(2) {
    border-right: 0;
  }

  .home-category-rail a:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .home-featured .collection-head {
    grid-template-columns: 1fr;
  }

  .featured-heading-side {
    padding: 0;
    border: 0;
  }

  .home-featured .product-card[data-product-card] {
    grid-column: span 6;
    grid-row: auto;
  }

  .home-featured .product-card[data-product-card="air-hat"] {
    grid-column: 1 / -1;
  }

  #home-story-teaser .story-grid {
    grid-template-columns: 1fr;
  }

  #home-story-teaser .about-panel {
    border-left: 1.5px solid var(--ink);
    border-top: 0;
  }
}

@media (max-width: 640px) {
  .home-hero .hero-copy {
    order: -1;
    padding: 2.8rem 0 2rem;
  }

  .home-hero .hero-title {
    font-size: clamp(4.1rem, 20vw, 5.25rem);
    line-height: 0.82;
  }

  .home-hero .hero-intro {
    font-size: 1.1rem;
  }

  .home-hero .hero-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
  }

  .home-hero .hero-actions .button {
    min-width: 0;
    padding-right: 0.7rem;
    padding-left: 0.7rem;
    font-size: 0.75rem;
  }

  .home-proof {
    margin-top: 1.5rem;
  }

  .home-proof span {
    font-size: 0.75rem;
    line-height: 1.25;
  }

  .home-hero .hero-art {
    order: 0;
    min-height: 21rem;
    margin: 0;
  }

  .home-hero .blue-poster {
    inset: 0 -1rem 0;
    clip-path: none;
  }

  .home-hero .hero-family-scene {
    top: 1rem;
    right: -0.5rem;
    width: calc(100% + 1rem);
    height: calc(100% - 1.5rem);
  }

  .home-hero .hero-mascot {
    top: 0.8rem;
    right: 24%;
    width: 5rem;
  }

  .home-hero .hero-badge {
    right: -0.2rem;
    bottom: -0.5rem;
    width: 6.2rem;
  }

  .hero-product-note {
    left: 0.6rem;
    bottom: 0.6rem;
    width: 8rem;
    padding: 0.65rem;
  }

  .hero-product-note strong {
    font-size: 1.1rem;
  }

  .home-category-rail {
    margin-top: 1.5rem;
  }

  .home-category-rail a {
    grid-template-columns: 1.6rem minmax(0, 1fr);
    gap: 0.15rem 0.55rem;
    min-height: 5.4rem;
    padding: 0.75rem;
  }

  .home-category-rail span {
    font-size: 1rem;
  }

  .home-category-rail strong {
    font-size: clamp(1.2rem, 6vw, 1.45rem);
    line-height: 0.94;
  }

  .home-category-rail small {
    display: block;
    font-size: 0.68rem;
    line-height: 1.2;
  }

  .home-featured {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  .home-featured .section-title {
    font-size: 4rem;
  }

  .home-featured .featured-product-rail {
    grid-template-columns: 1fr;
  }

  .home-featured .product-card[data-product-card] {
    grid-column: 1;
  }

  .home-featured .product-card[data-product-card="air-hat"] .product-media {
    min-height: 0;
  }

  #home-story-teaser {
    padding-top: 4rem;
    padding-bottom: 4rem;
  }

  #home-story-teaser .lifestyle-photo {
    min-height: 24rem;
  }

  #home-story-teaser .about-panel {
    padding: 2rem 1.25rem;
  }

  #home-story-teaser .about-panel .section-title {
    font-size: 3.4rem;
  }

  .story-points {
    grid-template-columns: 1fr;
  }

  .story-points span {
    min-height: 3rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .story-points span:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 340px) {
  .home-category-rail a {
    min-height: 4.8rem;
  }

  .home-category-rail small {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero .hero-mascot,
  .hero-title-line,
  .hero-title-accent,
  .home-kicker,
  .home-kicker::before,
  .home-hero .squiggle,
  .hero-intro,
  .home-hero .hero-actions,
  .home-proof,
  .home-category-rail a,
  .type-reveal {
    animation: none;
  }
}
