/* Homepage modules share the reference's content width and vertical rhythm. */
.home-page .section {
  --panel-border: #e3e6ea;
  --panel-shadow: 0 14px 32px rgb(15 23 42 / 6%);
  padding: 46px var(--gutter);
  background: #fff;
}
.home-page .section + .section { border-top: 0; }
.home-page .section > .container { width: 100%; max-width: 1160px; }
.home-page .section-heading { display: block; margin: 0 0 24px; text-align: center; }
.home-page .section h2 {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: 0;
}
.home-page .section h3 {
  font-size: 1.375rem;
  font-weight: 750;
  line-height: 1.28;
  letter-spacing: 0;
}
.home-page .section-heading .intro {
  max-width: 900px;
  margin: 14px auto 0;
  font-size: 1.0625rem;
  line-height: 1.7;
}
.home-page .section-end { justify-content: center; margin-top: 26px; }
.home-page .section-end .button, .home-page .form-submit .button {
  min-height: 50px;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 1.125rem;
}
.home-page .home-gallery, .home-page .section .grid { gap: 16px; }
.home-gallery { display: grid; }
.home-category-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.home-collection-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.home-tile, .home-page .stage-grid .stage, .home-page .case-card, .home-page .certificate,
.home-page .feedback-card, .home-page .split-panel, .home-page .inquiry-intro,
.home-form-card, .home-page .location-card {
  min-width: 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  box-shadow: var(--panel-shadow);
}
.home-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.home-tile:hover, .home-tile:focus-visible { border-color: var(--accent); }
.home-tile:hover h3, .home-tile:focus-visible h3 { color: var(--accent); }
.home-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: auto;
  object-fit: cover;
  border-radius: 7px;
  background: var(--surface);
}
.home-collection-gallery img { object-fit: contain; background: #f6f7f8; }
.home-category-gallery .home-tile:has(img) .tile-description { display: none; }
@media (min-width: 1025px) {
  .home-category-gallery .home-tile:last-child:nth-child(3n + 1):not(:first-child):has(img) {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(200px, 30%) 1fr;
    grid-template-areas: "image title" "image description";
    align-content: center;
    align-items: end;
    gap: 8px 28px;
  }
  .home-category-gallery .home-tile:last-child:nth-child(3n + 1):not(:first-child) img { grid-area: image; aspect-ratio: 2 / 1; }
  .home-category-gallery .home-tile:last-child:nth-child(3n + 1):not(:first-child) h3 { grid-area: title; }
  .home-category-gallery .home-tile:last-child:nth-child(3n + 1):not(:first-child):has(img) .tile-description {
    grid-area: description; display: block; align-self: start; max-width: 56ch; color: var(--muted);
  }
}
.home-tile-text {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 20px;
  padding: 18px 22px;
  box-shadow: none;
}
.home-tile-text h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
.home-tile-text p { color: var(--muted); }
.collection-nav, .home-page .filter-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 24px;
}
.collection-nav a, .home-page .filter-nav a {
  padding: 7px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 2em;
  text-decoration: none;
  font-weight: 650;
  font-size: .9375rem;
}
.collection-nav a:hover, .home-page .filter-nav a:hover { border-color: var(--accent); }
.home-page .trade-stage-grid, .home-page .case-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.home-page .stage-grid .stage { display: flex; flex-direction: column; gap: 12px; }
.home-page .stage-body { display: contents; }
.home-page .stage h3 { order: -1; }
.home-page .stage-body p, .home-page .stage-body .bullet-list { margin: 0; }
.home-page .stage .bullet-list { color: var(--muted); font-size: .9375rem; }
.home-page .stage .bullet-list li + li { margin-top: 4px; }
.home-page .stage-grid .stage img { aspect-ratio: 16 / 9; border-radius: 7px; }
.home-page .case-image { overflow: hidden; aspect-ratio: 4 / 3; border-radius: 7px; }
.home-page .case-copy { padding: 16px 0 0; }
.home-page .case-copy .eyebrow { margin-bottom: 6px; }
.case-notes { max-width: 980px; margin: 32px auto 0; }
.case-notes > h3 { text-align: center; margin-bottom: 16px; }
.case-notes details img { width: min(100%, 340px); border-radius: 6px; margin-bottom: 14px; }
.case-notes .bullet-list { margin-top: 8px; }
.home-page .split-panel {
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 42px);
  padding: clamp(16px, 2.5vw, 30px);
}
.home-page .split-media { aspect-ratio: 4 / 3; border-radius: 7px; }
.home-page .split-copy h3 { margin: 0; }
.home-page .split-copy .button, .home-page .location-actions .button { border-radius: 6px; }
.home-page .factory-preview { margin-top: 16px; }
.home-page .section-inquiry { background: var(--surface); }
.home-page .inquiry-panel {
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: start;
  gap: 20px;
}
.home-page .inquiry-intro, .home-form-card, .home-page .location-card { padding: clamp(18px, 2.6vw, 32px); }
.home-page .inquiry-intro h2, .home-form-card h3 { margin-bottom: 20px; text-align: center; }
.home-page .inquiry-intro > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; }
.home-form-card .inquiry-form { border: 0; padding: 0; }
.home-form-card :is(input, select, textarea) { border-radius: 5px; }
.home-page #faq > .container { max-width: 980px; }
.home-page .accordion { display: grid; gap: 12px; border-top: 0; }
.home-page .accordion details { border: 1px solid var(--panel-border); border-radius: 8px; background: #fff; box-shadow: var(--panel-shadow); }
.home-page .accordion summary { min-height: 72px; padding: 16px 20px; }
.home-page .accordion summary span::after { width: 30px; border-radius: 5px; color: white; line-height: 30px; background: var(--accent); }
.home-page .accordion details > div { max-width: none; padding: 0 20px 20px; }
.home-page .case-notes summary { min-height: 54px; }
.home-page .empty-state { border-radius: 8px; padding: 20px; text-align: center; }

@media (max-width: 1024px) {
  .home-category-gallery, .home-collection-gallery, .home-page .factory-preview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) and (max-width: 1024px) {
  .home-tile-text:nth-child(even) { grid-column: auto; flex-direction: column; justify-content: center; }
}
@media (max-width: 767px) {
  .home-page .section { padding: 32px var(--gutter); }
  .home-page .section h2 { font-size: 1.5rem; }
  .home-page .section h3 { font-size: 1.25rem; }
  .home-page .section-heading { margin-bottom: 18px; }
  .home-page .section-heading .intro { font-size: 1rem; margin-top: 10px; }
  .home-category-gallery, .home-collection-gallery, .home-page .trade-stage-grid, .home-page .case-grid,
  .home-page .factory-preview, .home-page .split-panel, .home-page .inquiry-panel,
  .home-page .certificate-grid { grid-template-columns: minmax(0, 1fr); }
  .home-page .home-gallery, .home-page .section .grid { gap: 14px; }
  .home-tile, .home-page .stage-grid .stage { padding: 14px; }
  .home-page .section-end .button { width: 100%; }
  .home-page .accordion summary { padding: 14px 16px; min-height: 60px; }
  .home-form-card .form-fields { grid-template-columns: 1fr; }
}
