.home-page {
  overflow: clip;
}

.home-page .section {
  padding-block: clamp(3rem, 7vw, 6rem);
}

.home-hero {
  padding: var(--space-6) 0 clamp(3rem, 7vw, 6rem);
}

.home-hero__shell {
  width: min(100% - (var(--container-padding) * 2), var(--container-max));
}

.home-hero__scene {
  position: relative;
  min-height: 42.5rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-mineral);
}

.home-hero__image,
.home-choice__media img,
.home-rhythm__media img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-hero__image {
  position: absolute;
  inset: 0;
  object-position: center;
}

.home-hero__copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: min(41.666%, 48ch);
  min-width: 0;
  margin-left: 8.333%;
  padding: clamp(2rem, 5vw, 4rem);
  gap: var(--space-5);
  background: rgba(246, 247, 242, 0.93);
}

.home-hero__copy h1,
.home-hero__copy p {
  margin: 0;
}

.home-hero__copy h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.08;
}

.home-hero__lead {
  max-width: 48ch;
  font-size: var(--text-lg);
  line-height: 1.45;
}

.home-hero__actions,
.home-closing__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  min-width: 0;
}

.home-hero__actions > *,
.home-closing__actions > * {
  min-width: 0;
}

.home-hero__measure {
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
}

.home-hero__measure::before {
  position: absolute;
  top: -14rem;
  right: -9rem;
  width: 28rem;
  height: 28rem;
  border: 1px solid rgba(118, 166, 106, 0.68);
  border-radius: 50%;
  content: "";
}

.home-hero__measure span {
  position: absolute;
  display: block;
  height: 1px;
  background: rgba(32, 40, 36, 0.3);
  transform-origin: left center;
  animation: home-line-in 220ms ease-out both;
}

.home-hero__measure span:nth-child(1) { right: 9%; bottom: 19%; width: 20%; transform: rotate(-18deg); }
.home-hero__measure span:nth-child(2) { right: 17%; bottom: 25%; width: 10%; transform: rotate(72deg); animation-delay: 50ms; }
.home-hero__measure span:nth-child(3) { left: 4%; bottom: 11%; width: 14%; transform: rotate(8deg); animation-delay: 90ms; }

@keyframes home-line-in {
  from { opacity: 0; transform: scaleX(0); }
  to { opacity: 1; }
}

.home-directions {
  border-top: var(--border-divider);
}

.home-directions__grid,
.home-choice__grid,
.home-closing__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-6);
}

.home-directions__intro {
  grid-column: span 4;
  min-width: 0;
}

.home-directions__intro > :last-child,
.home-catalog__intro > :last-child,
.home-choice__content > :last-child,
.home-rhythm__intro > :last-child,
.home-materials__content > :last-child,
.home-closing__content > :last-child {
  margin-bottom: 0;
}

.home-section-number {
  margin: 0 0 var(--space-2);
  color: var(--color-clay);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-label);
}

.home-directions__links {
  display: flex;
  grid-column: span 8;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: var(--space-3);
  min-width: 0;
}

.home-directions__links a {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-height: 2.75rem;
  min-width: 0;
  padding: var(--space-3) var(--space-4);
  border: var(--border-default);
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: none;
}

.home-directions__links a:hover {
  background: var(--color-pale-lime);
  color: var(--color-graphite);
}

.home-catalog__intro {
  width: 41.666%;
  min-width: 0;
  margin-bottom: var(--space-8);
}

.home-catalog__intro p:last-child {
  max-width: 48ch;
}

.home-choice__media {
  grid-column: span 5;
  min-width: 0;
  margin: 0;
}

.home-choice__media img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-lg);
  object-position: center;
}

.home-choice__content {
  grid-column: span 7;
  min-width: 0;
}

.home-choice__lead {
  max-width: 52ch;
}

.home-choice__steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 var(--space-6);
  min-width: 0;
  margin-top: var(--space-8);
}

.home-choice__step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-3);
  min-width: 0;
  padding: var(--space-5) 0;
  border-top: var(--border-divider);
}

.home-choice__step > span,
.home-rhythm__steps > article > span {
  color: var(--color-clay);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
}

.home-choice__step h3,
.home-choice__step p {
  margin: 0;
}

.home-choice__step > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: var(--space-2);
}

.home-choice__step h3 {
  font-size: var(--text-lg);
}

.home-choice__step p {
  max-width: 32ch;
  font-size: var(--text-sm);
}

.home-choice__step a {
  align-self: flex-start;
  margin-top: var(--space-1);
  font-size: var(--text-sm);
}

.home-rhythm__media {
  margin: 0 0 var(--space-10);
}

.home-rhythm__media img {
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg);
  object-position: center;
}

.home-rhythm__intro {
  width: 50%;
  min-width: 0;
  margin-bottom: var(--space-8);
}

.home-rhythm__intro p:last-child {
  max-width: 54ch;
}

.home-rhythm__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  min-width: 0;
}

.home-rhythm__steps > article {
  min-width: 0;
  padding-top: var(--space-5);
  border-top: var(--border-divider);
}

.home-rhythm__steps h3 {
  margin-top: var(--space-2);
  font-size: var(--text-xl);
}

.home-rhythm__steps p {
  max-width: 28ch;
}

.home-rhythm__steps a {
  display: inline-block;
  max-width: 29ch;
  font-size: var(--text-sm);
}

.home-materials__panel {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem);
  overflow: hidden;
  background: var(--color-pale-lime);
  border-radius: var(--radius-lg);
}

.home-materials__panel::before {
  position: absolute;
  top: var(--space-6);
  bottom: var(--space-6);
  left: var(--space-6);
  width: 3px;
  background: var(--color-clay);
  content: "";
}

.home-materials__content {
  width: 58.333%;
  min-width: 0;
  margin-left: 16.666%;
}

.home-materials__content p:not(.eyebrow) {
  max-width: 56ch;
}

.home-materials__content a {
  display: inline-block;
  margin-top: var(--space-2);
  font-family: var(--font-heading);
  font-weight: var(--weight-semibold);
}

.home-materials__content a span {
  padding-left: var(--space-1);
}

.home-closing {
  border-top: var(--border-divider);
}

.home-closing__content {
  grid-column: span 7;
  min-width: 0;
}

.home-closing__content > p:not(.eyebrow) {
  max-width: 44ch;
}

.home-closing__arc {
  position: relative;
  grid-column: span 5;
  min-width: 0;
}

.home-closing__arc::after {
  position: absolute;
  right: 10%;
  bottom: 0;
  width: 11rem;
  height: 11rem;
  border: 1px solid var(--color-leaf);
  border-radius: 50% 50% 0 0;
  content: "";
}

.home-storefront {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: var(--space-6);
  min-width: 0;
  padding: var(--space-6);
  border: var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--color-white);
}

.home-storefront__filters {
  display: flex;
  flex-direction: column;
  grid-column: 1;
  min-width: 0;
  gap: var(--space-4);
  padding-right: var(--space-6);
  border-right: var(--border-divider);
}

.home-storefront__filter-field,
.home-storefront__price-fields > div,
.home-storefront__sort {
  min-width: 0;
}

.home-storefront__filter-field label,
.home-storefront__price-fields label,
.home-storefront__sort label {
  display: block;
}

.home-storefront__price-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  min-width: 0;
}

.home-storefront__check {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  gap: var(--space-2);
  margin: 0;
}

.home-storefront__main {
  grid-column: 2;
  min-width: 0;
}

.home-storefront__toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-4);
  min-width: 0;
  margin-bottom: var(--space-6);
}

.home-storefront__toolbar > * {
  min-width: 0;
}

.home-storefront__toolbar > p {
  margin: 0;
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.home-storefront__sort {
  width: min(100%, 14rem);
}

.home-storefront__grid,
.home-featured-layout__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-5);
  min-width: 0;
}

.home-featured-layout {
  width: 100%;
  min-width: 0;
}

.home-storefront__empty {
  margin: var(--space-6) 0 0;
  padding: var(--space-5);
  border: var(--border-default);
  background: var(--color-warm-white);
}

.home-product-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  border: var(--border-default);
  border-radius: var(--radius-md);
  background: var(--color-white);
}

.home-product-card__media {
  width: 100%;
  min-width: 0;
  aspect-ratio: 4 / 5;
  background: var(--color-mineral);
}

.home-product-card__media img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  object-fit: contain;
}

.home-product-card__content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: var(--space-4);
  gap: var(--space-2);
}

.home-product-card__content > * {
  margin: 0;
}

.home-product-card__category,
.home-product-card__availability {
  color: var(--color-muted);
  font-size: var(--text-xs);
}

.home-product-card h3 {
  font-size: var(--text-lg);
}

.home-product-card .price {
  margin-top: auto;
}

.home-product-card__actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-2);
  min-width: 0;
  margin-top: var(--space-2);
}

.home-product-card__actions .button {
  min-width: 0;
  padding-inline: var(--space-2);
  font-size: var(--text-xs);
}

.home-product-dialog {
  width: min(calc(100% - 2rem), 57.5rem);
  max-height: calc(100vh - 2rem);
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-raised);
  background: var(--color-white);
}

.home-product-dialog::backdrop {
  background: rgba(32, 40, 36, 0.45);
}

.home-product-dialog__layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.home-product-dialog__media,
.home-product-dialog__content {
  min-width: 0;
}

.home-product-dialog__media {
  background: var(--color-mineral);
}

.home-product-dialog__media img {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 30rem;
  object-fit: contain;
}

.home-product-dialog__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-6);
}

.home-product-dialog__content > * {
  margin: 0;
}

.home-product-dialog__close {
  align-self: flex-end;
  padding: var(--space-2);
  border: 0;
  background: transparent;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  text-decoration: underline;
}

.home-product-dialog__availability {
  color: var(--color-muted);
  font-size: var(--text-sm);
}

.home-product-dialog__attributes {
  margin: 0;
}

.home-product-attribute {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-top: var(--border-divider);
}

.home-product-attribute dd {
  margin: 0;
  text-align: right;
}

.home-product-dialog__fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.55fr);
  gap: var(--space-3);
  min-width: 0;
}

.home-product-dialog__fields > div {
  min-width: 0;
}

.home-product-dialog__status {
  min-height: 1.5rem;
  font-size: var(--text-sm);
}

@media (max-width: 1040px) {
  .home-hero__copy { width: 52%; margin-left: 5%; }
  .home-storefront { grid-template-columns: minmax(0, 1fr); }
  .home-storefront__filters { display: grid; grid-column: 1; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 0 var(--space-6); border-right: 0; border-bottom: var(--border-divider); }
  .home-storefront__filter-field--wide { grid-column: span 2; }
  .home-storefront__filters > .button { justify-self: start; }
  .home-storefront__main { grid-column: 1; }
}

@media (max-width: 960px) {
  .home-choice__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .home-choice__media { grid-column: 1 / -1; }
  .home-choice__content { grid-column: 1 / -1; }
  .home-choice__media img { max-height: 32rem; }
}

@media (max-width: 820px) {
  .home-directions__grid,
  .home-closing__grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .home-directions__intro { grid-column: span 3; }
  .home-directions__links { grid-column: span 5; }
  .home-rhythm__steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .home-rhythm__steps > article { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--space-3); }
  .home-rhythm__steps > article > span { grid-column: 1; grid-row: 1 / span 3; }
  .home-rhythm__steps h3, .home-rhythm__steps p, .home-rhythm__steps a { grid-column: 2; }
  .home-rhythm__steps h3 { margin-top: 0; }
  .home-closing__content { grid-column: span 6; }
  .home-closing__arc { grid-column: span 2; }
}

@media (max-width: 760px) {
  .home-hero { padding-top: var(--space-4); }
  .home-hero__scene { display: flex; flex-direction: column; min-height: 0; overflow: visible; background: transparent; }
  .home-hero__copy { order: 1; width: 100%; margin: 0; padding: var(--space-6) 0; background: transparent; }
  .home-hero__image { position: relative; order: 2; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); object-position: center bottom; }
  .home-hero__measure { inset: auto 0 0; height: 52%; overflow: hidden; border-radius: var(--radius-lg); }
  .home-hero__measure::before { top: -11rem; right: -11rem; width: 22rem; height: 22rem; }
  .home-hero__measure span:nth-child(1) { right: 8%; bottom: 25%; width: 22%; }
  .home-hero__measure span:nth-child(2) { display: none; }
  .home-hero__measure span:nth-child(3) { left: 6%; bottom: 14%; width: 18%; }
  .home-catalog__intro, .home-rhythm__intro, .home-materials__content { width: 100%; margin-left: 0; }
  .home-product-dialog__layout { grid-template-columns: minmax(0, 1fr); }
  .home-product-dialog__media img { min-height: 18rem; max-height: 24rem; }
}

@media (max-width: 600px) {
  .home-page .section { padding-block: clamp(2.5rem, 12vw, 3rem); }
  .home-directions__grid, .home-choice__grid, .home-closing__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-5); }
  .home-directions__intro, .home-directions__links, .home-choice__media, .home-choice__content, .home-closing__content { grid-column: 1 / -1; }
  .home-directions__links { flex-direction: column; flex-wrap: nowrap; }
  .home-directions__links a { width: 100%; }
  .home-choice__steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .home-rhythm__media { margin-bottom: var(--space-6); }
  .home-rhythm__media img { aspect-ratio: 4 / 3; }
  .home-materials__panel { padding: var(--space-5); }
  .home-materials__panel::before { top: var(--space-5); bottom: var(--space-5); left: var(--space-3); }
  .home-closing__arc { display: none; }
  .home-storefront { padding: var(--space-4); }
  .home-storefront__filters { grid-template-columns: minmax(0, 1fr); }
  .home-storefront__filter-field--wide { grid-column: auto; }
  .home-storefront__toolbar { flex-direction: column; align-items: stretch; }
  .home-storefront__sort { width: 100%; }
  .home-storefront__grid, .home-featured-layout__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
  .home-product-card__content { padding: var(--space-3); }
  .home-product-card h3 { font-size: var(--text-base); }
  .home-product-card__actions { grid-template-columns: minmax(0, 1fr); }
  .home-product-card__actions .button { width: 100%; }
  .home-product-dialog__content { padding: var(--space-5); }
}

@media (max-width: 479px) {
  .home-hero__copy h1 { font-size: 2.375rem; }
  .home-hero__actions, .home-closing__actions { flex-direction: column; width: 100%; }
  .home-hero__actions .button, .home-closing__actions .button { width: 100%; }
  .home-hero__measure span:nth-child(3) { display: none; }
  .home-choice__media img { aspect-ratio: 4 / 3; }
  .home-choice__step { padding-block: var(--space-4); }
  .home-product-dialog { width: calc(100% - 1rem); }
  .home-product-dialog__fields { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__measure span { animation: none; }
}
