/* Home (DESIGN.md §7–§8 "Home", first-screen numbers). First ported from the reference
   build's home CSS (5 Oct); since 7-8 Oct this file is the site's design (DESIGN.md §17). Owned by the home page
   (step 6, batch 1). In batch 1 the gift counter, gift finder, search and the letter are
   left out (their pages don't exist); the price diary and the kit are teasers that link to
   the product and guide pages (the diary drawing and the receipt live in their CSS). No
   inline styles: every variant is a class. */

/* hero */
.hero .sw{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:40px;align-items:end;padding-block:30px 26px}
.hero h1{font-size:clamp(40px,5vw,66px)}
.hero h1 span{display:block;color:var(--ink2)}
.hero .lede{margin:0}
.hero .hn{font-size:23px;margin-top:14px}

/* the spread: the featured postcard (and, once its page exists, the gift counter) */
.spread .sw{display:grid;grid-template-columns:minmax(0,1.7fr) minmax(0,1fr);gap:34px;align-items:end;padding-block:12px 46px;position:relative}
.spread.solo .sw{grid-template-columns:minmax(0,1fr)}
.spread.solo .find{max-width:820px}

/* featured postcard */
/* The tabs tilt with the stamp and sit on its dashed line's inset (owner, 17 Oct: the green
   tab's left edge on the dashed line, the filed tab's right edge never past it) */
.find{position:relative;transform:rotate(-.5deg)}
.find .ftabs{padding-inline:10px}
.find .card{filter:drop-shadow(0 8px 18px var(--shadow))}
.find .face{position:relative;background:var(--paper);padding:26px 30px;overflow:hidden}
.find .face::after{content:"";position:absolute;inset:10px;border:1.4px dashed color-mix(in srgb,var(--ink) 22%,transparent);pointer-events:none}
.find .head{display:flex;gap:14px;align-items:baseline;padding-bottom:12px;margin-bottom:18px;border-bottom:1px solid var(--rule);position:relative;z-index:1;padding-right:78px}
.find .grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:28px;align-items:center;position:relative;z-index:1}
.find .grid.bare{grid-template-columns:minmax(0,1fr)}
.find .mount{min-height:320px}
.find h2{font-size:clamp(28px,2.8vw,36px);padding-right:78px;overflow-wrap:break-word}
.find .pm{position:absolute;right:20px;top:12px;width:84px;height:84px;z-index:2}
/* the postmark as the link to the price diary (owner, 7 Oct): it looks as before and, with
   the card's hover (the same moment as the sweep) or its own focus, dips and turns a little;
   down, not up, so it never runs into the stamp's edge */
.find .pmlink{position:absolute;right:20px;top:12px;width:84px;height:84px;z-index:2;display:block;color:var(--ink2);
  transition:transform .28s cubic-bezier(.16,1,.3,1),filter .28s}
.find .pmlink .pm{position:static;width:100%;height:100%}
.find .pmlink:focus-visible{outline:2px solid var(--ink2);outline-offset:4px;border-radius:50%}
.find.lights:hover .pmlink,.find .pmlink:focus-visible{transform:translateY(5px) rotate(6deg);filter:drop-shadow(0 6px 6px var(--shadow))}
.find .washi{left:40%;top:-12px;width:118px;height:28px;transform:rotate(-4deg)}
/* its pearl lines as the round-up's finds (owner, 18 Oct), always bottom right: the card's
   top holds its label row */
.find .pml{right:0;bottom:0;width:max(33%,160px);height:96px}
.find .pml path:last-child{display:none}
.find .face > .grid .txt{padding-bottom:76px}  /* the words end above them (review, 22 Oct) */

/* Real price drops this week (the cards are shared: desk.css) */
.drops{padding-top:40px}
.drops .alldrops{margin:34px 0 0;text-align:right}

/* Every price has a past (a link to a price diary; the drawing is the product page's) */
.diaryfeat{background:var(--s-diary);position:relative;overflow:hidden}
.diaryfeat .sw{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.4fr);gap:44px;align-items:center;position:relative}
/* the pearl lines run the band's whole width at every width (owner, 17-18 Oct: iPad
   portrait and landscape, desktop): drawn 2,600 units wide at their own scale, the band
   shows their middle, never stretched (marks.pml fit "xMidYMax slice") */
.diaryfeat > .pml{left:0;right:0;bottom:10px;width:100%;height:150px}
.diaryfeat .dn{font-size:26px;margin-top:18px;transform:rotate(-2deg)}
.dcard{background:var(--paper);padding:22px 24px 24px;box-shadow:0 10px 24px var(--shadow);position:relative;max-width:520px}
.dcard .dname{font-size:24px;margin-top:6px}
.dcard .when{margin-top:8px}
.dcard .diarynote{margin-top:16px}

/* a costed kit's teaser (the receipt is the guide page's) */
.kitt .sw{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr);gap:44px;align-items:start}
.kitt .btn{margin-top:22px}
.kitt .stops{gap:14px}  /* the list and its circles: desk.css */
.kitt .stops > li{display:grid;grid-template-columns:46px minmax(0,1fr);gap:14px;align-items:center}
.kitt .stops > li > b{font-weight:600}


/* ---- the intelligent site (22 Oct 2026; the mock-ups' round 4 "Home") ---- */
/* under the search box: what people search, or "On our Pins this week" */
.hero .looking{margin:12px 0 0;font-size:15px;line-height:1.6;color:var(--ink2)}
.hero .looking .lbl{display:inline;margin-right:6px}
.hero .looking a{color:var(--ink);text-decoration:underline;text-decoration-color:var(--yarn);text-underline-offset:3px}
/* the find and the gift counter side by side */
/* the gift counter beside the find (owner, 22 Oct): its top level with the tabs' top, its
   own height (its form right under its words), never stretched to the find's foot */
.spread.duo .sw{grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);align-items:start}
/* ... its top at the stamp card's (below the filing tabs), the near corners level after both
   tilts (owner, 22 Oct): the tabs' height and the two tilts' rise over the cards' widths */
@media (min-width:901px){.spread.duo .cwrap{margin-top:49px}}
/* the find beside the gift counter: a narrower card, so its name a size smaller (never a
   word broken at the card's edge) */
.spread.duo .find h2{font-size:clamp(24px,2.3vw,31px)}
/* ... and its photo above its words, so a long name has the card's whole width (review,
   22 Oct: "Chocolonely" broke mid-word beside the counter) */
.spread.duo .find .grid{grid-template-columns:minmax(0,1fr);gap:18px}
.spread.duo .find .mount{min-height:0}
.cwrap{position:relative}
.cwrap .cholly{position:absolute;left:-18px;top:-36px;width:92px;height:60px;transform:rotate(-14deg);z-index:4;pointer-events:none}
.counter{position:relative;background:var(--s-giftc);padding:30px 30px 44px;transform:rotate(.6deg);box-shadow:0 10px 24px var(--shadow)}
.counter h2{font-size:clamp(28px,2.8vw,38px);line-height:1.05;margin:18px 96px 10px 0}
.counter .t{margin:0 0 16px;font-size:16px}
/* the budget band on a white tag, or in the Christmas season the gold seal: one band, its
   first line ("Under") set small (a band only as a label: data-band) */
.counter .tag,.counter .seal{position:absolute;right:24px;top:18px;width:76px;text-align:center;font:400 26px/22px var(--display);color:var(--ink);
  white-space:pre-line;text-transform:uppercase}
/* "Under" and the amount on their own lines, the same in every browser (owner, 23 Oct: the
   seal's words "off centre" on iPad and phone): the break is in the words, the case is set on
   the whole band (Safari ignores a case change on a first line), and both lines have one fixed
   height (Safari sizes a first line by the big type, Chrome by the small) */
.counter .tag{background:var(--white);padding:14px 10px 10px;transform:rotate(8deg);box-shadow:0 4px 10px var(--shadow)}
.counter .seal{box-sizing:border-box;height:76px;border-radius:50%;padding:17px 4px 0;transform:rotate(-8deg);  /* its two lines (44px) in the middle of the gold */
  background:conic-gradient(from 20deg,var(--xmas-gold-light),var(--xmas-gold),var(--xmas-gold-note),var(--xmas-gold),var(--xmas-gold-light));
  box-shadow:0 3px 8px rgba(0,0,0,.25),inset 0 0 0 4px rgba(255,255,255,.35)}
.counter .tag::first-line,.counter .seal::first-line{font:400 10.5px/22px var(--label);letter-spacing:.14em}
.counter .mini{display:grid;gap:8px}
.counter .mini .frow{display:grid;grid-template-columns:76px minmax(0,1fr);align-items:center;gap:10px}
.counter .mini label{font:400 11px/1.3 var(--label);letter-spacing:.14em;text-transform:uppercase}
.counter .mini select{font:400 17px/1.3 var(--display);background-color:transparent;border:0;border-bottom:1px solid color-mix(in srgb,var(--ink) 30%,transparent);padding:6px 22px 6px 0;color:var(--ink);min-width:0}
.counter .mini .btn{margin-top:10px;justify-self:start}
/* the holly (Christmas only), coloured from the tokens */
.holly{display:block;width:100%;height:100%}
.holly .hl{fill:var(--xmas-holly)}.holly .hr{fill:none;stroke:var(--xmas-holly-rib);stroke-width:1.6}
.holly .hb{fill:var(--xmas-berry)}.holly .hs{fill:var(--white);opacity:.55}
/* the seasonal band */
.band{position:relative;padding-block:58px 64px}
.band .sw{position:relative}
.band .bn{font-size:27px;margin:6px 0 0;display:inline-block;transform:rotate(-2deg)}
.bdwrap{margin-top:34px}
.band .washi{position:absolute;left:50%;top:-30px;width:118px;height:28px;transform:translateX(-50%) rotate(-3deg)}
.bdoors{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:26px;align-items:end}  /* doors with and without photos: their names on one line */
.bd{position:relative}
.bdoor{display:block;background:var(--paper);color:var(--ink);padding:18px 18px 32px;box-shadow:0 10px 24px var(--shadow);text-decoration:none;border-top:6px solid var(--tint)}
.bd:nth-child(1) .bdoor{transform:rotate(-1deg)}.bd:nth-child(2) .bdoor{transform:rotate(.8deg)}.bd:nth-child(3) .bdoor{transform:rotate(-.6deg)}
.bdoor .fan{position:relative;display:block;height:150px;margin-bottom:14px}
/* each shop photo whole and unchanged (DESIGN.md §11): contained in its white mount */
.bdoor .fan img{position:absolute;top:8px;width:min(46%,132px);height:auto;aspect-ratio:1;object-fit:contain;background:var(--white);border:5px solid var(--white);box-shadow:0 4px 10px var(--shadow)}
.bdoor .fan img:nth-child(1){left:2%;transform:rotate(-7deg)}
.bdoor .fan img:nth-child(2){left:27%;top:0;z-index:2;transform:rotate(2deg)}
.bdoor .fan img:nth-child(3){left:52%;transform:rotate(8deg)}
.bdoor .lbl{display:block;color:var(--ink2)}
.bdoor .dn{display:block;font:var(--dw) 24px/1.15 var(--display);margin:4px 0}
.bdoor .dc{display:block;font-size:14px;color:var(--ink2)}
.bdoor .go{position:absolute;right:16px;bottom:24px;font-size:20px;color:var(--accent-ink)}
.bdoor:hover .dn{text-decoration:underline;text-decoration-color:var(--accent);text-underline-offset:4px}
/* Christmas: the Christmas Pins' field, gold lines behind the doors (never under the words),
   the twine across the band's top edge, holly above the first door, the gold postmark */
.band.xmas{background:var(--xmas-pine);color:var(--xmas-words)}
.band.xmas .lbl{color:color-mix(in srgb,var(--xmas-words) 82%,transparent)}
.band.xmas h2{color:var(--xmas-words)}
.band.xmas .bn{color:var(--xmas-gold-note)}
.band.xmas .bdoor{border-top:0;box-shadow:0 10px 24px rgba(0,0,0,.25)}
.band.xmas .bdoor .lbl{color:var(--ink2)}
/* the gold lines run the band's whole width behind the doors' middle, whatever their height */
.band{overflow-x:clip}
.bdwrap{position:relative}
.band .gold{position:absolute;left:calc(50% - 50vw);width:100vw;top:calc(50% - 55px);height:110px;pointer-events:none}
.bdoors{position:relative}
.band .gold path{fill:none;stroke:url(#xgold);stroke-width:1.5;opacity:.85}
.band .gold path:nth-child(even){stroke:url(#xgold2)}
.band .gold .g1{stop-color:var(--xmas-gold)}.band .gold .g2{stop-color:var(--xmas-gold-note)}.band .gold .g3{stop-color:var(--xmas-gold-light)}
.band .twine{position:absolute;left:50%;top:-70px;width:150px;height:30px;transform:translateX(-50%) rotate(-2deg);
  background:repeating-linear-gradient(135deg,var(--xmas-berry) 0 9px,var(--xmas-words) 9px 18px);opacity:.95}
.band .xpost{position:absolute;right:0;top:-20px;width:104px;height:104px;color:var(--xmas-gold-light)}
@media (max-width:1100px){.band .xpost{right:12px;width:88px;height:88px}}  /* inside the screen's edge on an iPad or phone */
.bd .hollyc{position:absolute;left:-30px;top:-40px;width:80px;height:52px;z-index:3;transform:rotate(-14deg);pointer-events:none}
@media (max-width:900px){
  .spread.duo .sw{grid-template-columns:minmax(0,1fr)}
  .bdoors{grid-template-columns:minmax(0,1fr)}
  .bdoor .fan{height:130px}
  .bd .hollyc{left:-12px}  /* on a phone, inside the screen's edge */
  .cwrap .cholly{left:-6px}
  /* one door across: the fan as wide as its photos (one, two or three, one per maker) and
     in the door's middle (owner, 23 Oct: on iPad "not working or centred", on phone
     "messy"): each photo --ph wide, the next --st along */
  .bdoor .fan{--ph:112px;--st:75px;--n:3;width:min(100%,calc(var(--ph) + (var(--n) - 1) * var(--st)));margin-inline:auto}
  .bdoor .fan:has(img:only-child){--n:1}
  .bdoor .fan:has(img:nth-child(2):last-child){--n:2}
  .bdoor .fan img{width:var(--ph)}  /* the fan's height, never over its label */
  .bdoor .fan img:nth-child(1){left:0}.bdoor .fan img:nth-child(2){left:var(--st)}.bdoor .fan img:nth-child(3){left:calc(2 * var(--st))}
  .band .xpost{width:78px;height:78px;top:-34px}
  .counter h2{margin-right:84px}
}
@media (min-width:621px) and (max-width:900px){.bdoor .fan{--ph:146px;--st:97px;height:168px}}  /* an iPad's wide door: bigger photos */

/* phone */
@media (max-width:900px){
  .hero .sw,.spread .sw,.diaryfeat .sw,.kitt .sw{grid-template-columns:minmax(0,1fr)}
  .find .grid{grid-template-columns:minmax(0,1fr)}
  .find .ftabs span{padding:8px 11px calc(9px + var(--ftuck))}
  .find .ftabs span b{font-size:15px}
  /* one column on a tablet or phone: the diary card takes the column (owner, 17 Oct: on
     iPad "the white box ... is bunched on the left"); the pearl lines: the rule above */
  .dcard{max-width:none}
}
@media (prefers-reduced-motion:no-preference){
  .find .card{transition:transform .5s cubic-bezier(.16,1,.3,1)}
}
@media (prefers-reduced-motion:reduce){
  .find .pmlink{transform:none!important;filter:none!important}  /* the postmark stays still */
}
