/*
 * EmRuth 2026 home.css (Package H, contract 7.2). Loads after base.css on the front page only.
 * Phones and tablets (< 1024px) follow Home-phone; desktop (>= 1024px) follows Home-desktop.
 * Only em2-home-* classes, plus page-scoped spacing of F's components inside Home sections.
 */

/* ---------- Shared section bits ---------- */
.em2-home-head { display:flex; flex-wrap:wrap; align-items:flex-end; justify-content:space-between; gap:12px 24px; margin-bottom:16px; }
.em2-home-head > .em2-lead { max-width:560px; }
.em2-home-picks-sect .em2-home-head { flex-wrap:nowrap; }
.em2-home-picks-sect .em2-home-head > h2 { min-width:0; }
.em2-home-shopall { flex:none; white-space:nowrap; text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:4px; display:inline-flex; align-items:center; min-height:44px; }

/* ---------- 7.2.1 Hero ---------- */
.em2-home-hero { scroll-margin-top:var(--hdr-h); }
.em2-home-hero-grid {
  display:grid; grid-template-columns:minmax(0, 1fr); gap:12px; padding-top:16px; padding-bottom:32px;
  grid-template-areas:"lbl" "h1" "field" "stage" "offer" "go" "date" "upload";
}
.em2-home-lbl { grid-area:lbl; }
.em2-home-h1 { grid-area:h1; }
.em2-home-field { grid-area:field; display:flex; flex-direction:column; gap:6px; }
.em2-home-field .em2-input-hero { height:56px; font-size:20px; }
.em2-home-ideas { grid-area:ideas; display:none; }
.em2-home-stage { grid-area:stage; padding:12px 64px 64px; }
.em2-home-offer { grid-area:offer; }
.em2-home-offer .em2-h3 { white-space:nowrap; }
.em2-home-acts { display:contents; }
#em2-hero-go { grid-area:go; width:100%; }
#em2-hero-upload { grid-area:upload; width:100%; }
.em2-home-date { grid-area:date; }

/* The overlay bar: phones put the chips and swatches straight on the tile (Home-phone:45-48). */
.em2-home-bar { position:absolute; left:12px; right:12px; bottom:12px; display:flex; align-items:center; justify-content:space-between; gap:4px; }
.em2-home-garments, .em2-home-colors { display:flex; align-items:center; gap:4px; }
.em2-home-garments .em2-chip { padding:0 10px; }
/* Under 1024 the bar sits straight on the light photo tile in both modes, so it keeps light-mode colors in Dark and Auto. */
@media (max-width:1023px) {
  .em2-home-bar { --paper:#ffffff; --ink:#111428; --ink-2:#2b2f4a; --muted:#4d5168; --line:#d6d9e3; --hover-fill:#f3f4f7; --focus:#2467d6; }
}
/* Narrow phones: tighter chips and touching 44px swatches keep one row from 360px; under 360 the colors wrap to a second row. */
@media (max-width:389px) {
  .em2-home-garments .em2-chip { padding:0 6px; min-width:44px; }
  .em2-home-colors { gap:0; }
}
@media (max-width:359px) {
  .em2-home-bar { flex-wrap:wrap; row-gap:4px; }
}

/* Phones: the offer is one 20px line without the check mark (Home-phone:50); 18px under 380px and 16px under 340px so it still fits. */
@media (max-width:599px) {
  .em2-home-offer .em2-check-row > svg { display:none; }
}
@media (max-width:379px) {
  .em2-home-stage { padding-left:48px; padding-right:48px; }
  .em2-home-offer .em2-h3 { font-size:18px; }
}
/* Under 360 a slightly smaller shirt pays for the second bar row, so the main button stays on an 812px screen. */
@media (max-width:359px) {
  .em2-home-stage { padding:12px 64px 112px; }
}
@media (max-width:339px) {
  .em2-home-offer .em2-h3 { font-size:16px; }
}
/* Tablets: the phone layout with the stage capped so the main button stays on the first screen. */
@media (min-width:600px) and (max-width:1023px) {
  .em2-home-stage { width:100%; max-width:480px; justify-self:center; }
}

@media (min-width:1024px) {
  .em2-home-hero-grid {
    grid-template-columns:minmax(0, 1fr) minmax(0, 1fr); column-gap:48px; row-gap:24px; padding-top:56px; padding-bottom:64px;
    grid-template-rows:repeat(7, auto) 1fr;
    grid-template-areas:"lbl stage" "h1 stage" "field stage" "ideas stage" "acts stage" "offer stage" "date stage" ". stage";
  }
  .em2-home-field .em2-input-hero { height:64px; font-size:26px; }
  .em2-home-ideas { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
  .em2-home-stage { padding:40px 56px 112px; align-self:start; }
  .em2-home-acts { grid-area:acts; display:flex; flex-wrap:wrap; gap:12px; }
  #em2-hero-go, #em2-hero-upload { width:auto; }
  .em2-home-offer { margin-top:0; }
  .em2-home-bar { left:24px; right:24px; bottom:24px; padding:12px; background:var(--paper); border:2px solid var(--ink); flex-wrap:wrap; row-gap:8px; }
  .em2-home-colors { gap:0; }
  .em2-home-garments .em2-chip { padding:0 8px; }
}
/* Below 1280 the desktop bar may need two rows; the tile keeps room for them under the shirt. */
@media (min-width:1024px) and (max-width:1279px) {
  .em2-home-stage { padding-bottom:164px; }
}

/* ---------- 7.2.2 Shop by category ---------- */
.em2-home-cats { padding-bottom:32px; }
.em2-home-cats .em2-home-head { margin-bottom:12px; }
@media (min-width:1024px) {
  .em2-home-cats { padding-bottom:72px; }
  .em2-home-cats .em2-home-head { margin-bottom:16px; }
}

/* ---------- 7.2.3 Two ways to order ---------- */
.em2-home-ways { padding-top:32px; padding-bottom:32px; }
.em2-home-ways .em2-home-head { margin-bottom:12px; }
.em2-home-ways-phone { display:flex; flex-direction:column; gap:12px; }
.em2-home-way { display:flex; align-items:flex-start; gap:14px; padding:16px; border:2px solid var(--ink); background:var(--paper); color:var(--ink); text-decoration:none; transition:background-color var(--t-fast) var(--ease); }
.em2-home-way:hover { background:var(--hover-fill); }
.em2-home-way > svg { flex:none; width:28px; height:28px; }
.em2-home-way-text { display:flex; flex-direction:column; gap:4px; }
.em2-home-ways-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:24px; }
.em2-home-way-card { display:flex; flex-direction:column; gap:16px; padding:32px; }
.em2-home-way-card > svg { width:32px; height:32px; }
.em2-home-way-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:8px; color:var(--ink-2); }
.em2-home-way-list li::before { content:"· "; }
.em2-home-way-card > .em2-btn { margin-top:auto; }
@media (min-width:1024px) {
  .em2-home-ways { padding-top:80px; padding-bottom:80px; }
  .em2-home-ways .em2-home-head { margin-bottom:32px; }
}

/* ---------- 7.2.4 Start with these ---------- */
.em2-home-picks-sect { padding-top:32px; padding-bottom:32px; }
/* Cards in both lists carry no mark and always show; only the one-width extras are hidden at the other width. */
@media (max-width:1023px) {
  .em2-home-picks > li.em2-pick-desk-only { display:none; }
}
@media (min-width:600px) and (max-width:767px) {
  .em2-home-picks { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (min-width:768px) and (max-width:1023px) {
  .em2-home-picks { grid-template-columns:repeat(4, minmax(0, 1fr)); }
}
@media (min-width:1024px) {
  .em2-home-picks-sect { padding-top:80px; padding-bottom:80px; }
  .em2-home-picks-sect .em2-home-head { margin-bottom:32px; }
  .em2-home-picks > li.em2-pick-phone-only { display:none; }
}

/* ---------- 7.2.5 Who we print for ---------- */
.em2-home-who-sect { padding-bottom:32px; }
.em2-home-who-grid { list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:16px 12px; }
.em2-home-who-grid > li { min-width:0; }
.em2-home-who-grid > li:first-child { grid-column:1 / -1; }
.em2-home-who { display:flex; flex-direction:column; gap:8px; color:var(--ink); text-decoration:none; }
.em2-home-who:hover .em2-h4 { text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:3px; }
.em2-home-who-tile { padding:12px; }
.em2-home-who-grid > li:first-child .em2-home-who-tile { padding:12px 22%; }
.em2-home-who-grid > li:not(:first-child) .em2-h4 { font-size:16px; }
.em2-home-who-grid > li:not(:first-child) .em2-home-who-line { display:none; }
@media (min-width:1024px) {
  .em2-home-who-sect { padding-bottom:80px; }
  .em2-home-who-sect .em2-home-head { margin-bottom:32px; }
  .em2-home-who-grid { grid-template-columns:repeat(5, minmax(0, 1fr)); gap:24px; }
  .em2-home-who-grid > li:first-child { grid-column:auto; }
  .em2-home-who { gap:12px; }
  .em2-home-who-tile, .em2-home-who-grid > li:first-child .em2-home-who-tile { padding:16px; }
  .em2-home-who-grid > li:not(:first-child) .em2-h4 { font-size:17px; }
  .em2-home-who-grid > li:not(:first-child) .em2-home-who-line { display:block; }
}

/* ---------- 7.2.6 How it works ---------- */
.em2-home-how { padding-top:32px; padding-bottom:32px; }
.em2-home-how-grid { display:grid; grid-template-columns:minmax(0, 1fr); gap:16px; }
.em2-home-how-steps { display:flex; flex-direction:column; gap:16px; }
.em2-home-steps { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:16px; }
.em2-home-steps > li { display:flex; align-items:flex-start; gap:12px; }
.em2-home-step-n { flex:none; width:28px; font-size:24px; line-height:1.1; }
.em2-home-step-text { display:flex; flex-direction:column; gap:4px; }
.em2-home-step-text .em2-h3 { font-size:17px; line-height:1.3; }
.em2-home-step-text p { font:500 14px/1.45 var(--body); color:var(--muted); }
.em2-home-speeds { display:flex; flex-direction:column; gap:12px; }
.em2-home-speeds > .em2-lbl { margin-top:4px; }
.em2-home-opt { display:grid; grid-template-columns:minmax(0, 1fr) auto; grid-template-areas:"date fee" "line fee"; column-gap:12px; cursor:default; }
.em2-home-opt:hover { border-color:var(--line); }
.em2-home-opt-title, .em2-home-opt-est { display:none; }
.em2-home-opt-date { grid-area:date; }
.em2-home-opt-line { grid-area:line; }
.em2-home-opt-fee { grid-area:fee; align-self:center; justify-self:end; }
@media (min-width:1024px) {
  .em2-home-how { padding-top:80px; padding-bottom:80px; }
  .em2-home-how-grid { grid-template-columns:repeat(12, minmax(0, 1fr)); gap:48px; }
  .em2-home-how-steps { grid-column:1 / span 5; gap:24px; }
  .em2-home-steps { gap:24px; }
  .em2-home-steps > li { gap:16px; }
  .em2-home-step-n { width:48px; font-size:32px; line-height:1.05; }
  .em2-home-step-text .em2-h3 { font-size:20px; line-height:1.25; }
  .em2-home-step-text p { font:400 16px/1.5 var(--body); color:var(--ink); }
  .em2-home-speeds { grid-column:7 / span 6; align-self:center; gap:16px; }
  .em2-home-speeds > .em2-lbl { margin-top:0; }
  .em2-home-opt { grid-template-areas:"title date" "est fee"; }
  .em2-home-opt-title, .em2-home-opt-est { display:block; }
  .em2-home-opt-title { grid-area:title; }
  .em2-home-opt-est { grid-area:est; }
  .em2-home-opt-line { display:none; }
  .em2-home-opt-date { justify-self:end; text-align:right; }
  .em2-home-opt-fee { align-self:start; }
}

/* ---------- 7.2.7 Order more, pay less per shirt ---------- */
.em2-home-ladder-sect { padding-top:32px; padding-bottom:32px; }
.em2-home-ladder-box { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); background:var(--paper); color:var(--ink); border-top:2px solid var(--ink); border-left:2px solid var(--ink); }
.em2-home-ladder, .em2-home-ladder thead, .em2-home-ladder tbody, .em2-home-ladder tr { display:contents; }
.em2-home-ladder th, .em2-home-ladder td { min-width:0; border-right:2px solid var(--ink); text-align:left; font-weight:700; }
.em2-home-ladder th { padding:12px 8px 4px; }
.em2-home-ladder td { padding:0 8px 12px; border-bottom:2px solid var(--ink); font-size:16px; line-height:1.2; letter-spacing:0; }
.em2-home-ladder th:nth-child(1), .em2-home-ladder td:nth-child(1) { grid-column:1; }
.em2-home-ladder th:nth-child(2), .em2-home-ladder td:nth-child(2) { grid-column:2; }
.em2-home-ladder th:nth-child(3), .em2-home-ladder td:nth-child(3) { grid-column:3; }
.em2-home-ladder th:nth-child(4), .em2-home-ladder td:nth-child(4) { grid-column:4; }
.em2-home-ladder th:nth-child(5), .em2-home-ladder td:nth-child(5) { grid-column:1; }
.em2-home-ladder th:nth-child(6), .em2-home-ladder td:nth-child(6) { grid-column:2; }
.em2-home-ladder th:nth-child(7), .em2-home-ladder td:nth-child(7) { grid-column:3; }
.em2-home-ladder th:nth-child(-n+4) { grid-row:1; }
.em2-home-ladder td:nth-child(-n+4) { grid-row:2; }
.em2-home-ladder th:nth-child(n+5) { grid-row:3; }
.em2-home-ladder td:nth-child(n+5) { grid-row:4; }
.em2-home-ladder-go { grid-column:4; grid-row:3 / span 2; display:flex; align-items:center; padding:12px 8px; background:var(--ink); color:var(--paper); border-right:2px solid var(--ink); border-bottom:2px solid var(--ink); font:800 15px/1.2 var(--body); text-decoration:none; }
.em2-home-ladder-go:hover { text-decoration:underline; text-decoration-thickness:2px; text-underline-offset:3px; }
.em2-home-ladder-cap { margin-top:16px; font-weight:700; }
@media (min-width:1024px) {
  .em2-home-ladder-sect { padding-top:72px; padding-bottom:72px; }
  .em2-home-ladder-sect .em2-home-head { margin-bottom:24px; }
  .em2-home-ladder-box { grid-template-columns:repeat(7, minmax(0, 1fr)); border:2px solid var(--ink); }
  .em2-home-ladder th:nth-child(n), .em2-home-ladder td:nth-child(n) { grid-column:auto; }
  .em2-home-ladder th:nth-child(n) { grid-row:1; padding:20px 20px 4px; }
  .em2-home-ladder td:nth-child(n) { grid-row:2; padding:0 20px 20px; border-bottom:0; font-size:22px; line-height:1; letter-spacing:-0.01em; }
  .em2-home-ladder th:last-child, .em2-home-ladder td:last-child { border-right:0; }
  .em2-home-ladder-cap { margin-top:24px; }
}

/* ---------- 7.2.8 Trust band ---------- */
.em2-home-trust { padding-top:40px; padding-bottom:40px; }
.em2-home-trust-grid { display:grid; grid-template-columns:minmax(0, 1fr); gap:24px; grid-template-areas:"copy" "promise" "acts"; }
.em2-home-trust-copy { grid-area:copy; display:flex; flex-direction:column; gap:16px; }
.em2-home-trust .em2-lead, .em2-home-trust .em2-lbl, .em2-home-trust .em2-small { color:var(--on-band-ink-2); }
.em2-home-trust-acts { grid-area:acts; display:flex; flex-direction:column; gap:12px; }
.em2-home-trust-acts .em2-btn { width:100%; height:56px; padding:0 24px; font-size:18px; }
.em2-home-promise { grid-area:promise; display:flex; flex-direction:column; gap:12px; }
.em2-home-promise-list { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.em2-home-promise-list > li { display:flex; align-items:flex-start; gap:12px; padding-top:12px; border-top:2px solid var(--on-band-ink); }
.em2-home-promise-n { flex:none; width:32px; }
.em2-home-promise-text { display:flex; flex-direction:column; }
@media (min-width:1024px) {
  .em2-home-trust { padding-top:80px; padding-bottom:80px; }
  .em2-home-trust-grid { grid-template-columns:repeat(12, minmax(0, 1fr)); column-gap:48px; row-gap:16px; align-items:center; grid-template-areas:none; }
  .em2-home-trust-copy { grid-column:1 / span 6; grid-row:1; }
  .em2-home-trust-acts { grid-column:1 / span 6; grid-row:2; flex-direction:row; flex-wrap:wrap; align-self:start; }
  .em2-home-trust-acts .em2-btn { width:auto; height:48px; padding:0 20px; font-size:16px; }
  .em2-home-promise { grid-column:8 / span 5; grid-row:1 / span 2; gap:16px; }
  .em2-home-promise-list { gap:16px; }
  .em2-home-promise-list > li { gap:16px; padding-top:16px; }
  .em2-home-promise-n { width:40px; }
}

/* ---------- 7.2.9 Questions ---------- */
.em2-home-faq { padding-top:32px; padding-bottom:32px; }
.em2-home-faq-grid { display:grid; grid-template-columns:minmax(0, 1fr); gap:8px; }
.em2-home-faq-list { display:flex; flex-direction:column; align-items:flex-start; gap:12px; }
.em2-home-faq-list > .em2-acc-list { align-self:stretch; }
@media (min-width:1024px) {
  .em2-home-faq { padding-top:80px; padding-bottom:80px; }
  .em2-home-faq-grid { grid-template-columns:repeat(12, minmax(0, 1fr)); gap:48px; }
  .em2-home-faq-grid > h2 { grid-column:1 / span 4; }
  .em2-home-faq-list { grid-column:6 / span 7; gap:16px; }
}

/* ---------- Phone vs desktop pieces (last, so they win over the display rules above) ---------- */
@media (max-width:1023px) {
  .em2-home-h2 { font-size:32px; line-height:1.05; }
  .em2-ctx-home .em2-home-desk { display:none; }
}
@media (min-width:1024px) {
  .em2-ctx-home .em2-home-phone { display:none; }
}
