/* Palette Girlies, home.css (V2 home, phase 2, nov 2026: src/pages/index.html, tools/home_parts.py).
   Built on the tokens and components of site.css (.wrap .sec .label .dark .btn .link .ln .rv). No hex here: every color is a token,
   and the season colors come in as --c from the data. Breakpoints: 480, 720, 900, 1100.
   Sections: hero (.hh), 01 what changes (.hc), 02 twelve seasons (.hs), 03 five colors (.tn, also on /palettes), 04 shop (.sh, dark band),
   05 journal (.hj), 06 newsletter (.hn). */

/* ---------- shared: section heads ---------- */
.h-head { display: grid; gap: var(--s3); align-content: start; margin-bottom: var(--s6); }
.h-head h2, .h-head h1 { font-size: var(--fs-6); max-width: 14ch; }
.h-lede { max-width: 42ch; font-size: var(--fs-3); line-height: 1.6; color: inherit; }
@media (min-width: 900px) {
  .h-head--split { grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 6vw, 96px); align-items: end; }
  .h-head--split .label, .h-head--split h2 { grid-column: 1; }
  .h-head--split .h-lede { grid-column: 2; grid-row: 2; justify-self: end; }
  .h-head--split h2 { font-size: var(--fs-6); max-width: 16ch; }
}

/* ---------- hero (phase 12, color first): the words left, the paint-chip wall right; on a phone the words, then the chips as a sideways row ---------- */
.home main { padding-top: 0; }
.hh { position: relative; min-height: 100svh; padding-top: var(--hdr-h); display: grid; }
.hh-grid { position: relative; z-index: 1; display: grid; gap: var(--s5); align-content: center; padding: var(--s5) 0 var(--s6); }
.hero-ink { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; pointer-events: none; }
.hh-text { display: grid; gap: var(--s4); align-content: center; padding: 0 var(--gut); min-width: 0; }
.hh h1 { font-size: clamp(60px, 18vw, 120px); line-height: .94; letter-spacing: -.02em; }
.hh-lead { max-width: 34ch; font-size: var(--fs-4); line-height: 1.45; color: var(--ink); }
.hh-act { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s4); margin-top: var(--s1); }
.hh-alt .link { min-height: 44px; }
.hh-trust { list-style: none; margin: var(--s2) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--s2) 0; font: 500 var(--fs-1)/1.35 var(--sans); color: var(--ink-2); }
.hh-trust li { margin-right: 14px; padding-right: 14px; border-right: 1px solid var(--line-2); }
.hh-trust li:last-child { margin-right: 0; padding-right: 0; border-right: 0; }
/* the saved card (site/js/saved-card.js puts it before the button): a quiet line, not a paper note */
.hh .card-note { flex-basis: 100%; transform: none; margin: 0; padding: 0 0 var(--s3); background: none; border: 0; border-bottom: 1px solid var(--line); box-shadow: none; width: 100%; max-width: 30em; }
.hh .card-note::before { content: none; }
.hh .card-note-chips i { width: 10px; height: 36px; }
.hh .card-note-name { font-size: var(--fs-2); }
.hh .card-note-name b { font-size: 20px; }
.hh .card-note .more { padding: 4px 0 0; font-size: var(--fs-2); }

/* the paint-chip wall: twelve cards by family, each five flat colors and the name on the spine; the card is the link */
.hh-wall { min-width: 0; }
.hw { list-style: none; margin: 0; padding: var(--s3) var(--gut) var(--s4); display: flex; gap: var(--s4); overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain; scrollbar-width: thin; }
.hw-row { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s2); }
.hw-row > li { scroll-snap-align: start; }
.hw-card {
  display: grid; grid-template-rows: minmax(0, 1fr) auto; width: 72px; height: 240px; overflow: hidden;
  border-radius: 10px; background: var(--card); box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.hw-cols { display: grid; grid-template-rows: repeat(5, minmax(0, 1fr)); }
.hw-cols i { display: block; background: var(--c); }
.hw-name { display: grid; place-items: center; height: 116px; padding: var(--s2) 0; font: 400 17px/1 var(--serif); letter-spacing: -.01em; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; }
.hw-card:hover, .hw-card:focus-visible { transform: translateY(-10px); box-shadow: var(--shadow-deep), 0 0 0 1px var(--line); color: var(--ink); }
.hw-card:focus-visible { outline: 2px solid var(--berry); outline-offset: 3px; }
@media (min-width: 900px) {
  .hh { padding-top: 0; }
  .hh-grid {
    grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 4vw, 64px); align-items: center;
    max-width: var(--max); width: 100%; margin: 0 auto; padding: calc(var(--hdr-h) + var(--s5)) var(--gut) var(--s6);
  }
  .hh-text { padding: 0; }
  .hh h1 { font-size: var(--fs-7); }
  .hw { padding: 14px 0 0; overflow: visible; gap: var(--s3); }
  .hw-fam { flex: 3 1 0; min-width: 0; }
  .hw-row > li { flex: 1 1 0; min-width: 0; }
  .hw-card { width: 100%; height: 300px; }
  .hw-name { height: 124px; }
}
@media (prefers-reduced-motion: reduce) { .hw-card { transition: none; } .hw-card:hover, .hw-card:focus-visible { transform: none; } }

/* ---------- 01, what changes: three rows, the picture on alternating sides, the text sticky beside it ---------- */
.hc-rows { display: grid; }
.hc-row { display: grid; gap: var(--s4); padding: var(--s5) 0 var(--s6); border-top: 1px solid var(--line); }
.hc-row:last-child { padding-bottom: 0; }
.hc-pic { overflow: hidden; background: var(--paper-2); }
.hc-pic img { width: 100%; height: 100%; object-fit: cover; }
.hc-pic--tall, .hc-pic--sq { aspect-ratio: 4 / 5; }
.hc-pic--wide { aspect-ratio: 3 / 2; }
.hc-text { display: grid; gap: var(--s3); align-content: start; }
.hc-k { font: 600 12.5px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--graphite); }
.hc-text h3 { font-size: clamp(32px, 4vw, 56px); line-height: 1.02; max-width: 12ch; }
.hc-line { max-width: 30ch; font-size: var(--fs-4); line-height: 1.5; color: var(--ink); }
.hc-go { margin-top: var(--s2); }
@media (min-width: 900px) {
  .hc-row { grid-template-columns: 7fr 5fr; column-gap: clamp(32px, 6vw, 96px); padding: var(--s6) 0; }
  .hc-row--r { grid-template-columns: 5fr 7fr; }
  .hc-row--r .hc-pic { order: 2; }
  .hc-text { position: sticky; top: calc(var(--hdr-h) + var(--s5)); align-self: start; padding-top: var(--s3); }
  .hc-pic--tall, .hc-pic--sq { aspect-ratio: 5 / 6; }
}

/* ---------- 02, the twelve seasons: a dark band with a horizontal track. site/js/home-track.js pins it at 901px and up (.is-pinned);
   otherwise the row scrolls sideways and snaps. Each card is a wall of 26 flat colors, 6 to a row, the HEX on hover ---------- */
.hs { overflow: hidden; }
.hs .h-head { margin-bottom: var(--s5); }
.ht-view { overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.ht-view:focus-visible { outline-offset: -2px; }
.ht-list { list-style: none; margin: 0; padding: 0 var(--gut) var(--s3); display: flex; gap: var(--s4); width: max-content; }
.ht-list > li { flex: none; width: min(78vw, 440px); scroll-snap-align: start; }
.ht-card { display: grid; gap: var(--s2); padding: var(--s3); border-radius: 22px; background: rgba(247, 241, 232, .06); box-shadow: inset 0 0 0 1px var(--line); color: var(--paper); text-decoration: none; transition: background-color .4s var(--ease); }
.ht-wall { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin-bottom: var(--s2); }
.ht-wall i { display: grid; place-items: end start; aspect-ratio: 1; border-radius: 6px; background: var(--c); }
.ht-wall i::after { content: attr(data-hex); padding: 0 0 5px 5px; font: 500 12.5px/1 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: -.03em; opacity: 0; transition: opacity .3s var(--ease); }
.ht-wall i.p::after { color: var(--paper); }
.ht-wall i.k::after { color: var(--ink); }
.ht-wall i.lo::after { margin: 0 0 4px 4px; padding: 1px 3px; background: var(--paper); color: var(--ink); }
.ht-card:hover .ht-wall i::after, .ht-card:focus-visible .ht-wall i::after { opacity: 1; }
.ht-name { font: 400 var(--fs-5)/1.05 var(--serif); letter-spacing: -.015em; }
.ht-line { font-size: var(--fs-2); line-height: 1.4; color: var(--ink-2); }
.dark .ht-card:hover, .dark .ht-card:focus-visible { color: var(--paper); background: rgba(247, 241, 232, .1); }
.ht-card:hover .ht-name, .ht-card:focus-visible .ht-name { color: var(--blush); }
@media (min-width: 720px) { .ht-card { padding: var(--s4); } }
@media (min-width: 901px) {
  .hs.is-pinned { display: flex; flex-direction: column; justify-content: center; min-height: 100vh; padding: calc(var(--hdr-h) + var(--s4)) 0 var(--s5); }
  .hs.is-pinned .h-head { margin-bottom: var(--s4); }
  .hs.is-pinned .h-head--split h2 { max-width: none; font-size: clamp(40px, 4.8vw, 72px); }
  .hs.is-pinned .ht-list > li { width: min(30vw, 400px); }
  .hs.is-pinned .ht-wall i { aspect-ratio: 1 / .8; }
  .hs.is-pinned .ht-view { overflow: visible; scroll-snap-type: none; }
  .hs.is-pinned .ht-list { padding-left: max(var(--gut), calc((100vw - var(--max)) / 2 + var(--gut))); padding-right: var(--gut); }
}
@media (prefers-reduced-motion: reduce) { .ht-wall i::after, .ht-card { transition: none; } }

/* ---------- 03, five colors for tonight (the home and the /palettes stub): five stripes across the wrap, 160px tall ---------- */
.tn-go { margin-top: var(--s2); }
.tn { margin: 0; }
.tn-strips { list-style: none; margin: 0; padding: 0; display: grid; border-radius: 22px; overflow: hidden; }
.tn-strips li { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "role hex" "name hex"; align-items: end; gap: 2px var(--s3); min-height: 84px; padding: var(--s3); background: var(--c); color: var(--t); }
.tn-role { grid-area: role; font: 600 12.5px/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.tn-name { grid-area: name; font: 400 24px/1.1 var(--serif); letter-spacing: -.015em; }
.tn-hex { grid-area: hex; font: 500 13px/1.2 ui-monospace, "SF Mono", Consolas, monospace; letter-spacing: .04em; }
.tn-strips li.lo .tn-role, .tn-strips li.lo .tn-hex { justify-self: start; padding: 2px 6px; background: var(--paper); color: var(--ink); }
.tn-cap { margin-top: var(--s3); font-size: var(--fs-2); color: var(--graphite); }
@media (min-width: 720px) {
  .tn-strips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tn-strips li { grid-template-columns: 1fr; grid-template-areas: "role" "." "name" "hex"; grid-template-rows: auto 1fr auto auto; align-items: start; min-height: 160px; padding: var(--s3); }
  .tn-name { font-size: clamp(22px, 1.9vw, 28px); }
}
.tn-grid { display: grid; }
.tn-grid .h-head { margin-bottom: var(--s5); }
@media (min-width: 900px) {
  .tn-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 6vw, 96px); align-items: start; }
  .tn-grid .h-head { margin-bottom: 0; }
  .tn-grid .h-head h2, .tn-grid .h-head h1 { font-size: clamp(40px, 5vw, 72px); }
}

/* ---------- 04, shop: the dark band, four products in a hairline grid ---------- */
.sh-h-link { color: inherit; text-decoration: none; }
.dark .sh-h-link:hover, .dark .sh-h-link:focus-visible { color: var(--blush); }
.sh-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sh-grid > li { background: var(--ink); }
.sh-card { display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s3); color: var(--paper); text-decoration: none; }
.dark .sh-card:hover { color: var(--paper); }
.sh-pic { position: relative; aspect-ratio: 4 / 5; margin-bottom: var(--s3); }
.sh-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 24px 30px rgba(0, 0, 0, .45)); transition: transform .6s var(--ease); }
.sh-card:hover .sh-pic img, .sh-card:focus-visible .sh-pic img { transform: translateY(-6px); }
.sh-top { display: grid; gap: 4px; }
.sh-name { font: 400 clamp(22px, 2.2vw, 30px)/1.1 var(--serif); letter-spacing: -.015em; }
.sh-price { font: 600 var(--fs-3)/1 var(--sans); }
.sh-line { font-size: var(--fs-2); line-height: 1.5; color: var(--ink-2); }
.sh-card:hover .sh-name, .sh-card:focus-visible .sh-name { color: var(--blush); }
@media (min-width: 720px) {
  .sh-card { padding: var(--s4); }
  .sh-top { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); }
}
@media (min-width: 1100px) { .sh-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .sh-pic img { transition: none; } }

/* ---------- 05, journal: three posts as hairline rows ---------- */
.hj-grid { display: grid; }
.hj-all { margin-top: var(--s2); }
.hj-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: hj; }
.hj-list > li { border-bottom: 1px solid var(--line); counter-increment: hj; }
.hj-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline; gap: var(--s2) var(--s3); min-height: 44px; padding: var(--s4) 0; color: var(--ink); text-decoration: none; }
.hj-list a::before { content: counter(hj, decimal-leading-zero); font: 600 13px/1 var(--sans); letter-spacing: .08em; color: var(--graphite); }
.hj-t { font: 400 clamp(26px, 3vw, 40px)/1.1 var(--serif); letter-spacing: -.015em; transition: color .3s var(--ease); }
.hj-d { max-width: 52ch; font-size: var(--fs-3); line-height: 1.5; color: var(--ink); }
.hj-list a:hover .hj-t, .hj-list a:focus-visible .hj-t { color: var(--berry); }
@media (min-width: 900px) {
  .hj-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 6vw, 96px); }
  .hj-grid .h-head { position: sticky; top: calc(var(--hdr-h) + var(--s5)); align-self: start; margin-bottom: 0; }
}

/* ---------- 06, the newsletter ---------- */
.hn-grid { display: grid; }
.hn-big { font: 400 clamp(34px, 4.4vw, 60px)/1.06 var(--serif); letter-spacing: -.02em; max-width: 14ch; }
.hn-big em { color: var(--berry); }
.hn .signup { max-width: 640px; margin: 0; }
@media (min-width: 900px) {
  .hn-grid { grid-template-columns: 5fr 7fr; column-gap: clamp(32px, 6vw, 96px); align-items: start; }
  .hn-grid .h-head { margin-bottom: 0; }
}
