/*
 * HOME HERO AUDIT — index heroes across Projects
 * Used elsewhere: 12-col dew bento tiles (A120 prior) · full-bleed split L/R · glass float panel ·
 *   propagation tray wells (Tidepool) · field ledger cutouts · courtyard door split · packet fan ·
 *   carousel orbit · mesh blob grid · riso misregister stack · z-path mat · bench collage.
 * CHOSEN — DRYING_RACK_FAN (hm-loft): copy column + diagonal rack spine · three overlapping macro cards — not bento grid · not single split photo.
 */

/* —— Hero: drying rack —— */
.hm-home {
  overflow-x: clip;
}

.hm-loft {
  position: relative;
  padding-block: var(--at-space-6);
  overflow: hidden;
  overflow-x: clip;
}

@media (min-width: 768px) {
  .hm-loft {
    padding-block: var(--at-space-8);
  }
}

.hm-loft__wash {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 20%, color-mix(in srgb, var(--at-dew) 70%, transparent), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, color-mix(in srgb, var(--at-moss-light) 35%, transparent), transparent 50%),
    linear-gradient(165deg, var(--at-canvas) 0%, var(--at-canvas-deep) 100%);
  pointer-events: none;
}

.hm-loft__grain {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    115deg,
    transparent,
    transparent 3px,
    color-mix(in srgb, var(--at-ink) 4%, transparent) 3px,
    color-mix(in srgb, var(--at-ink) 4%, transparent) 4px
  );
  pointer-events: none;
}

.hm-loft__frame {
  position: relative;
  display: grid;
  gap: var(--at-space-6);
  align-items: center;
  min-width: 0;
}

@media (min-width: 1024px) {
  .hm-loft__frame {
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 1.05fr);
    gap: var(--at-space-7);
  }
}

.hm-loft__copy {
  min-width: 0;
  animation: hm-loft-rise 0.7s var(--at-ease) both;
}

.hm-loft__copy .ds-kicker {
  color: var(--at-moss);
}

@keyframes hm-loft-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-loft__copy {
    animation: none;
  }
}

.hm-loft__title {
  font-family: var(--at-font-display);
  font-size: var(--at-text-display);
  font-weight: 400;
  line-height: 1.06;
  margin: 0 0 var(--at-space-3);
  max-width: 18ch;
}

.hm-loft__title em {
  font-style: italic;
  color: var(--at-moss);
}

.hm-loft__lede {
  max-width: 42ch;
  margin-bottom: var(--at-space-4);
}

.hm-loft__actions {
  display: flex;
  flex-direction: column;
  gap: var(--at-space-2);
  margin-bottom: var(--at-space-4);
}

@media (min-width: 480px) {
  .hm-loft__actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--at-space-3);
  }
}

.hm-loft__actions .ds-btn {
  min-height: 2.75rem;
  justify-content: center;
}

@media (max-width: 479px) {
  .hm-loft__actions .ds-btn {
    width: 100%;
  }
}

.hm-loft__proof {
  display: flex;
  flex-wrap: wrap;
  gap: var(--at-space-2);
  list-style: none;
  margin: 0 0 var(--at-space-4);
  padding: 0;
}

.hm-loft__proof li {
  flex: 1 1 5.5rem;
  padding: var(--at-space-3);
  border-radius: var(--at-radius-md);
  background: color-mix(in srgb, var(--at-surface) 92%, transparent);
  border: 1px solid var(--at-line);
}

.hm-loft__proof-val {
  display: block;
  font-family: var(--at-font-display);
  font-size: var(--at-text-lg);
  color: var(--at-moss);
}

.hm-loft__proof-label {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  color: var(--at-ink-soft);
}

.hm-loft__search {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--at-space-2);
  max-width: 28rem;
  width: 100%;
}

.hm-loft__search .ds-input,
.hm-loft__search .ds-btn {
  min-height: 2.75rem;
}

/* Rack + cards */
.hm-loft__rack {
  position: relative;
  min-height: 21rem;
  min-width: 0;
  margin-inline: auto;
  width: min(100%, 22rem);
  padding-inline: var(--at-space-2);
  isolation: isolate;
}

@media (min-width: 768px) {
  .hm-loft__rack {
    min-height: 22rem;
  }
}

@media (min-width: 1024px) {
  .hm-loft__rack {
    width: 100%;
    min-height: 24rem;
    max-width: 28rem;
    justify-self: end;
    padding-inline: var(--at-space-3);
  }
}

.hm-loft__spine {
  position: absolute;
  left: 50%;
  top: 8%;
  bottom: 6%;
  width: 4px;
  transform: translateX(-50%) rotate(-8deg);
  border-radius: var(--at-radius-pill);
  background: linear-gradient(180deg, var(--at-terra-soft), var(--at-moss));
  box-shadow: var(--at-shadow-sm);
}

.hm-loft__card {
  position: absolute;
  display: block;
  text-decoration: none;
  color: var(--at-ink);
  border-radius: var(--at-radius-lg);
  overflow: hidden;
  border: 1px solid var(--at-line);
  background: var(--at-surface);
  box-shadow: var(--at-shadow-md);
  opacity: 1;
  transform: translateY(0) rotate(var(--hm-loft-rot, 0deg));
  transition: box-shadow var(--at-dur);
  min-width: 0;
}

.hm-loft--motion .hm-loft__card {
  opacity: 0;
  transform: translateY(14px) rotate(var(--hm-loft-rot, 0deg));
  transition:
    opacity 0.5s ease var(--hm-delay, 0ms),
    transform 0.5s ease var(--hm-delay, 0ms),
    box-shadow var(--at-dur);
}

.hm-loft--motion .hm-loft__card.is-visible {
  opacity: 1;
  transform: translateY(0) rotate(var(--hm-loft-rot, 0deg));
}

.hm-loft__card:hover {
  box-shadow: var(--at-shadow-lg);
  z-index: 4;
}

.hm-loft__card:focus-visible {
  outline: 2px solid var(--at-focus);
  outline-offset: 3px;
  z-index: 5;
}

.hm-loft__card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.hm-loft__card-cap {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--at-space-2);
  padding: var(--at-space-2) var(--at-space-3);
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  line-height: 1.35;
  background: color-mix(in srgb, var(--at-surface) 94%, transparent);
  border-top: 1px solid var(--at-line);
}

.hm-loft__card-cap strong {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 600;
}

.hm-loft__card--fan .hm-loft__card-cap {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hm-loft__card-cap em {
  font-style: normal;
  font-weight: 700;
  color: var(--at-terra);
}

.hm-loft__card--lead {
  --hm-loft-rot: -4deg;
  left: 18%;
  right: 10%;
  top: 12%;
  z-index: 2;
}

.hm-loft__card--fan-0 {
  --hm-loft-rot: -12deg;
  width: 44%;
  left: 0;
  bottom: 2%;
  z-index: 3;
}

.hm-loft__card--fan-1 {
  --hm-loft-rot: 10deg;
  width: 42%;
  right: 0;
  bottom: 6%;
  z-index: 3;
}

@media (max-width: 1023px) {
  .hm-loft__rack {
    min-height: 18rem;
    width: min(100%, 20rem);
  }

  .hm-loft__card--lead {
    left: 10%;
    right: 10%;
    top: 0;
  }

  .hm-loft__card--fan-0 {
    left: 0;
    bottom: 0;
  }

  .hm-loft__card--fan-1 {
    right: 0;
    bottom: 2%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hm-loft--motion .hm-loft__card,
  .hm-loft--motion .hm-loft__card.is-visible {
    opacity: 1;
    transform: rotate(var(--hm-loft-rot, 0deg));
    transition: box-shadow var(--at-dur);
  }
}

/* —— Below-fold sections —— */

.hm-pills__track {
  display: flex;
  gap: var(--at-space-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--at-space-2);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--at-moss-light) transparent;
}

.hm-pills__item {
  flex: 0 0 auto;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 8.5rem;
  padding: var(--at-space-4);
  border-radius: var(--at-radius-lg);
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  text-decoration: none;
  color: var(--at-ink);
  font-family: var(--at-font-ui);
  font-weight: 600;
  font-size: var(--at-text-sm);
  transition: box-shadow var(--at-dur), transform var(--at-dur);
}

.hm-pills__item:hover {
  box-shadow: var(--at-shadow-md);
  transform: translateY(-3px);
}

.hm-pills__count {
  font-family: var(--at-font-display);
  font-size: var(--at-text-lg);
  color: var(--at-terra);
}

.hm-feature__stagger {
  display: grid;
  gap: var(--at-space-3);
}

@media (min-width: 768px) {
  .hm-feature__stagger {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .hm-feature__stagger {
    grid-template-columns: repeat(4, 1fr);
  }
  .hm-feature__card {
    transform: translateY(calc((var(--hm-row) % 2) * 12px));
  }
}

.hm-feature__card {
  display: flex;
  flex-wrap: wrap;
  gap: var(--at-space-3);
  align-items: center;
  padding: var(--at-space-3);
  border-radius: var(--at-radius-lg);
  background: var(--at-surface);
  border: 1px solid var(--at-line);
  text-decoration: none;
  color: var(--at-ink);
  transition: box-shadow var(--at-dur);
}

.hm-feature__card:hover {
  box-shadow: var(--at-shadow-md);
}

.hm-feature__idx {
  font-family: var(--at-font-ui);
  font-size: var(--at-text-xs);
  color: var(--at-moss-light);
  width: 100%;
}

.hm-feature__card img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  border-radius: var(--at-radius-md);
}

.hm-feature__meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
}

.hm-feature__meta em {
  font-style: normal;
  font-weight: 600;
  color: var(--at-terra);
}

.hm-dual__grid {
  display: grid;
  gap: var(--at-space-5);
}

@media (min-width: 1024px) {
  .hm-dual__grid {
    grid-template-columns: 0.9fr 1.1fr;
    align-items: start;
  }
}

.hm-dual__list {
  margin: 0;
  padding-left: 1.1rem;
  font-family: var(--at-font-ui);
  color: var(--at-ink-soft);
}

.hm-dual__timeline {
  list-style: none;
  margin: var(--at-space-4) 0 0;
  padding: 0;
  border-left: 2px solid var(--at-dew-deep);
}

.hm-dual__timeline li {
  padding-left: var(--at-space-4);
  margin-bottom: var(--at-space-4);
  position: relative;
}

.hm-dual__timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--at-moss-light);
}

.hm-dual__timeline a {
  display: flex;
  gap: var(--at-space-3);
  align-items: center;
  text-decoration: none;
  color: var(--at-ink);
  font-family: var(--at-font-ui);
  font-size: var(--at-text-sm);
}

.hm-dual__timeline img {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: var(--at-radius-md);
  flex-shrink: 0;
}

.hm-dual__timeline em {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: var(--at-terra);
}

.hm-cta {
  padding-block: var(--at-space-7);
  background: linear-gradient(135deg, var(--at-moss) 0%, #2d4a38 100%);
  color: var(--at-surface);
  overflow-x: clip;
}

.hm-cta .ds-title {
  color: inherit;
  margin-bottom: var(--at-space-2);
}

.hm-cta .ds-lede {
  color: rgba(255, 252, 247, 0.88);
  max-width: 38ch;
  line-height: 1.55;
}

.hm-cta__inner {
  display: grid;
  gap: var(--at-space-5);
  align-items: center;
}

@media (min-width: 768px) {
  .hm-cta__inner {
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 15rem);
    gap: var(--at-space-6) var(--at-space-7);
  }
}

.hm-cta__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--at-space-3);
  max-width: 34rem;
}

.hm-cta__btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--at-space-3);
  width: 100%;
  margin-top: var(--at-space-1);
}

.hm-cta__btns .ds-btn {
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding-inline: 1.35rem;
  white-space: nowrap;
  border-radius: var(--at-radius-pill);
  justify-content: center;
}

@media (max-width: 539px) {
  .hm-cta__btns {
    flex-direction: column;
    align-items: stretch;
  }

  .hm-cta__btns .ds-btn {
    width: 100%;
  }
}

.hm-cta .ds-btn--ghost {
  background: transparent;
  border: 1px solid rgba(255, 252, 247, 0.5);
  color: var(--at-surface);
  box-shadow: none;
}

.hm-cta .ds-btn--ghost:hover {
  background: rgba(255, 252, 247, 0.14);
  color: var(--at-surface);
  border-color: rgba(255, 252, 247, 0.65);
}

.hm-cta__visual {
  display: flex;
  justify-content: center;
  width: 100%;
}

@media (min-width: 768px) {
  .hm-cta__visual {
    justify-content: flex-end;
  }
}

.hm-cta__visual img {
  width: min(100%, 11rem);
  max-height: 11rem;
  object-fit: cover;
  aspect-ratio: 1;
  border-radius: var(--at-radius-xl);
  border: 3px solid rgba(255, 252, 247, 0.35);
}

@media (min-width: 768px) {
  .hm-cta__visual img {
    width: min(100%, 14rem);
    max-height: 14rem;
  }
}
