/* ---------------------------------------------------------------------------
   Outsource China — home (marketplace layout)

   Category rail · banner · RFQ card on top, then vertical tiles, curated rows,
   new listings, project lines, how an order runs. Builds on tokens.css,
   app.css (.pcard, .prail) and intel.css. Paper surfaces; dark plates only for
   the banner, the project band and the closing band.
--------------------------------------------------------------------------- */

.home { padding-bottom: 0; }
.home .kicker { margin: 0 0 6px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--warning); }
.home .kicker--on-dark { color: var(--brand-on-dark); }
.home h2 { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.home .btn--glass { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.home .btn--glass:hover { background: rgba(255, 255, 255, .16); color: #fff; }
body:has(.home) .foot { margin-top: 0; }

/* --- Top row ------------------------------------------------------------------ */

.hm-top { display: grid; grid-template-columns: 240px minmax(0, 1fr) 300px; gap: var(--s-4); padding-top: var(--s-4); padding-bottom: var(--s-4); align-items: stretch; }

/* Category rail */
.hm-cats { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.hm-cats__head { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 12px 14px 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }
.hm-cats__head small { color: var(--text-subtle); font-weight: 600; }
.hm-cats__list { flex: 1; margin: 0; padding: 0 0 4px; list-style: none; }
.hm-cats__item { position: relative; }
.hm-cats__item > a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 14px; color: var(--text); font-size: 13.5px; }
.hm-cats__item > a:hover, .hm-cats__item:hover > a { background: var(--surface-hover); color: var(--accent); text-decoration: none; }
.hm-cats__item > a small { color: var(--text-subtle); font-size: 11px; }
.hm-cats__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-cats__fly {
  position: absolute; left: 100%; top: -8px; z-index: 5; width: 520px; padding: 14px 18px 12px;
  background: var(--surface-raised); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  display: none;
}
.hm-cats__item:hover .hm-cats__fly, .hm-cats__item:focus-within .hm-cats__fly { display: block; }
.hm-cats__fly ul { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; margin: 8px 0 0; padding: 0; list-style: none; }
.hm-cats__fly li a { display: block; padding: 5px 0; font-size: 13px; color: var(--text); }
.hm-cats__fly li a:hover { color: var(--accent); }
.hm-cats__all { display: inline-block; margin-top: 10px; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.hm-cats__foot { display: block; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 12.5px; font-weight: 700; color: var(--accent); }

/* Banner */
/* Slides share one grid cell, so the banner is as tall as its tallest slide (or the row) and every slide fills it. */
.hm-banner { position: relative; display: grid; container-type: inline-size; min-height: 420px; border-radius: var(--radius-lg); overflow: hidden; background: var(--plate-1); color: var(--plate-text); box-shadow: var(--shadow); }
.hm-slide { grid-area: 1 / 1; display: grid; grid-template-rows: auto minmax(220px, 1fr); gap: 28px; padding: 36px 40px 48px; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.hm-slide.is-on { opacity: 1; pointer-events: auto; }
.hm-slide--navy { background: radial-gradient(700px 360px at 85% 10%, rgba(90, 215, 239, .22), transparent 60%), linear-gradient(135deg, #070d16, #122033 70%, #16283a); }
.hm-slide--amber { background: radial-gradient(700px 360px at 85% 0%, rgba(242, 160, 50, .32), transparent 60%), linear-gradient(135deg, #1a1204, #2a2113 60%, #0b131e); }
.hm-slide--teal { background: radial-gradient(700px 360px at 90% 100%, rgba(26, 143, 163, .36), transparent 60%), linear-gradient(135deg, #061419, #0f2a31 60%, #0b131e); }
.hm-slide__kicker { margin: 0 0 10px; color: var(--signal-on-plate); }
.hm-slide--amber .hm-slide__kicker { color: var(--brand-on-dark); }
.hm-slide__title { margin: 0; font-size: clamp(26px, 3vw, 40px); font-weight: 800; line-height: 1.05; letter-spacing: -.035em; color: var(--plate-text); }
/* Copy on top. Buttons sit under the text, or beside it once the banner itself is wide enough
   (a container query, so zoomed or narrow windows never squeeze the title into one word per line). */
.hm-slide__copy { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: var(--s-5); align-items: end; }
.hm-slide__text { max-width: 52ch; margin: 14px 0 0; font-size: 15px; line-height: 1.55; color: var(--plate-text-muted); }
.hm-slide__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
@container (min-width: 760px) {
  .hm-slide__copy { grid-template-columns: minmax(0, 1fr) auto; }
  .hm-slide__copy > * { grid-column: 1; }
  .hm-slide__actions { grid-column: 2; grid-row: 1 / span 3; align-self: end; justify-content: flex-end; margin-top: 0; }
}
/* Photos below as a strip that fills the rest of the banner; the first one leads, the others step down. */
.hm-slide__art { position: relative; display: flex; gap: 14px; min-height: 0; }
.hm-slide__grid { position: absolute; inset: 0; opacity: .35; background-image: linear-gradient(var(--plate-line) 1px, transparent 1px), linear-gradient(90deg, var(--plate-line) 1px, transparent 1px); background-size: 32px 32px; -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent); mask-image: radial-gradient(60% 60% at 50% 50%, #000, transparent); }
.hm-slide__shot { position: relative; z-index: 1; flex: 1 1 0; min-width: 0; display: block; border-radius: 14px; overflow: hidden; background: var(--photo-plate); box-shadow: 0 24px 50px rgba(0, 0, 0, .45); border: 1px solid rgba(255, 255, 255, .12); transition: transform .25s; }
.hm-slide__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-slide__shot:hover { transform: translateY(-4px); }
.hm-slide__shot--0 { flex-grow: 1.6; }
.hm-slide__shot--1 { margin-top: 18px; }
.hm-slide__shot--2 { margin-top: 36px; }
.hm-banner__dots { position: absolute; left: 40px; bottom: 18px; display: flex; gap: 6px; z-index: 4; }
.hm-banner__dots button { width: 22px; height: 6px; padding: 0; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .28); cursor: pointer; }
.hm-banner__dots button[aria-selected="true"] { background: var(--brand-on-dark); width: 34px; }
.hm-banner__arrow { position: absolute; top: 50%; z-index: 4; width: 34px; height: 34px; margin-top: -17px; border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%; background: rgba(6, 11, 18, .55); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .15s; }
.hm-banner:hover .hm-banner__arrow, .hm-banner__arrow:focus-visible { opacity: 1; }
.hm-banner__arrow--prev { left: 10px; }
.hm-banner__arrow--next { right: 10px; }

/* RFQ card + account */
.hm-side { display: flex; flex-direction: column; gap: var(--s-3); }
.hm-rfq { padding: 16px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.hm-rfq__kicker { margin: 0 0 4px; color: var(--signal); }
.hm-rfq h2 { font-size: 17px; margin-bottom: 10px; }
.hm-rfq textarea { min-height: 76px; font-size: 13.5px; margin-bottom: 8px; }
.hm-rfq__row { display: grid; grid-template-columns: 1fr 96px; gap: 8px; margin-bottom: 10px; }
.hm-rfq__fine { margin: 10px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--text-subtle); }
.hm-user { flex: 1; padding: 14px 16px; background: var(--surface-sunken); border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 13px; }
.hm-user__hi { margin: 0 0 8px; font-weight: 800; }
.hm-user > a { display: block; padding: 4px 0; color: var(--text); }
.hm-user > a:hover { color: var(--accent); }
.hm-user ul { margin: 0 0 10px; padding-left: 16px; color: var(--text-muted); }
.hm-user ul li { margin-bottom: 3px; }
.hm-user__actions { display: flex; gap: 6px; }

/* --- Trust strip ---------------------------------------------------------------- */

.hm-trust { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); padding-bottom: var(--s-5); }
.hm-trust__item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hm-trust__glyph { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--plate-1); color: var(--signal-on-plate); font-weight: 800; }
.hm-trust__item strong { display: block; font-size: 13.5px; }
.hm-trust__item small { display: block; font-size: 12px; color: var(--text-muted); }

/* --- Sections ------------------------------------------------------------------- */

.hm-sec { padding-top: var(--s-5); padding-bottom: var(--s-5); }
.hm-sec__head { display: flex; align-items: end; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-4); }
.hm-sec__more { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.hm-tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--s-3); }
.hm-tile { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; color: var(--text); transition: transform .15s, box-shadow .15s, border-color .15s; }
.hm-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--border-strong); text-decoration: none; color: var(--text); }
.hm-tile__shot { display: block; aspect-ratio: 4 / 3; background: var(--photo-plate); }
.hm-tile__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-tile__body { display: block; padding: 10px 12px; }
.hm-tile__body strong { display: block; font-size: 13.5px; line-height: 1.25; }
.hm-tile__body small { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-subtle); }

.hm-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s-3); }

/* --- Why choose us ------------------------------------------------------------- */

.hm-why { padding-top: var(--s-5); padding-bottom: var(--s-5); }
.hm-why h2 { margin: 0 0 var(--s-4); }
.hm-why__cols { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.hm-why__cols > div { padding: var(--s-5); }
.hm-why__cols > div + div { border-left: 1px solid var(--border); }
.hm-why h3 { margin: 0 0 12px; font-size: 18px; }
.hm-why p { margin: 0 0 12px; max-width: 62ch; font-size: 15px; line-height: 1.65; color: var(--text-muted); }
.hm-why p:last-child { margin-bottom: 0; }

/* Project band */
.hm-projects { margin: var(--s-4) 0; padding: var(--s-6) 0; background: var(--plate-1); color: var(--plate-text); }
.hm-projects__inner { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); gap: var(--s-6); align-items: start; }
.hm-projects h2 { color: var(--plate-text); margin-bottom: 10px; }
.hm-projects header p:not(.kicker) { max-width: 40ch; margin: 0 0 16px; color: var(--plate-text-muted); font-size: 14.5px; }
.hm-projects__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.hm-projects__list a { display: block; padding: 10px; background: rgba(255, 255, 255, .04); border: 1px solid var(--plate-line-strong); border-radius: var(--radius-lg); color: var(--plate-text); }
.hm-projects__list a:hover { border-color: var(--signal-on-plate); text-decoration: none; }
.hm-projects__shot { display: block; aspect-ratio: 16 / 9; margin-bottom: 8px; border-radius: var(--radius); overflow: hidden; background: var(--photo-plate); }
.hm-projects__shot img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-projects__list strong { display: block; font-size: 14px; }
.hm-projects__list small { display: block; font-size: 11.5px; color: var(--plate-text-muted); }

/* Steps + compliance */
.hm-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.hm-steps li { display: grid; gap: 6px; padding: var(--s-4); }
.hm-steps li + li { border-left: 1px solid var(--grid-line-strong); }
.hm-steps .num { font-size: 12px; font-weight: 700; color: var(--signal); }
.hm-steps strong { font-size: 15px; }
.hm-steps small { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; }
.hm-compliance { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: var(--s-3); }
.hm-compliance ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.hm-compliance li a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 12px; color: var(--text); background: var(--surface); }
.hm-compliance li a b { font-family: var(--mono); font-size: 11.5px; }
.hm-compliance li a span { color: var(--text-subtle); font-size: 11px; }
.hm-compliance li a:hover { border-color: var(--signal); text-decoration: none; }

/* Close band */
.hm-close { margin-top: var(--s-5); padding: var(--s-7) 0; color: var(--plate-text); background: radial-gradient(800px 400px at 10% 0%, rgba(242, 160, 50, .22), transparent 60%), linear-gradient(180deg, #122033, #070d16); }
.hm-close__inner { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: var(--s-6); align-items: center; }
.hm-close h2 { color: var(--plate-text); font-size: clamp(24px, 2.6vw, 34px); }
.hm-close p:not(.kicker) { margin: 12px 0 0; color: var(--plate-text-muted); }
.hm-close__form { display: flex; gap: 8px; }
.hm-close__form input { flex: 1; min-width: 0; height: 46px; background: var(--plate-0); color: var(--plate-text); border-color: var(--plate-line-strong); }
.hm-close__form input::placeholder { color: #6f8095; }

/* --- Responsive ----------------------------------------------------------------- */

@media (max-width: 1180px) {
  .hm-top { grid-template-columns: 220px minmax(0, 1fr); }
  .hm-side { grid-column: 1 / -1; flex-direction: row; }
  .hm-side > * { flex: 1; }
  .hm-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .hm-top { grid-template-columns: 1fr; }
  .hm-cats { display: none; }
  .hm-side { flex-direction: column; }
  .hm-trust, .hm-steps { grid-template-columns: 1fr 1fr; }
  .hm-steps li:nth-child(3) { border-left: 0; }
  .hm-steps li:nth-child(n + 3) { border-top: 1px solid var(--grid-line-strong); }
  .hm-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hm-projects__inner, .hm-close__inner { grid-template-columns: 1fr; }
  .hm-slide { grid-template-rows: auto 220px; padding: 28px 24px 48px; }
  .hm-banner__dots { left: 24px; }
}
@media (max-width: 600px) {
  .hm-trust, .hm-steps, .hm-tiles, .hm-projects__list { grid-template-columns: 1fr 1fr; }
  .hm-grid { grid-template-columns: 1fr 1fr; }
  .hm-steps li + li { border-left: 0; }
  .hm-steps li:nth-child(even) { border-left: 1px solid var(--grid-line-strong); }
  .hm-slide__title { font-size: 24px; }
  .hm-slide { grid-template-rows: auto; }
  .hm-slide__art { display: none; }
  .hm-banner { min-height: 0; }
  .hm-close__form { flex-direction: column; }
  .hm-why__cols { grid-template-columns: 1fr; }
  .hm-why__cols > div + div { border-left: 0; border-top: 1px solid var(--border); }
}
