/* Let's make (projects.html), variant B chosen 13.10.2026: short headline, newest project featured, filters, card grid.
   Builds on style.css, tutorial.css (pills, difficulty dots, hidden Mini) and home.css (section width, NEW badge). */

.catalog-page main>section h1{font-size:clamp(48px,5vw,72px);margin:0}
.cat-section{padding:56px 0 0}

/* ---------- Head ---------- */
.cat-head{display:flex;justify-content:space-between;align-items:end;gap:40px;margin-bottom:72px}
.cat-head .intro{font-size:18px;line-height:1.6;margin:0;max-width:400px}

/* ---------- Featured (newest) ---------- */
/* outer corner = picture corner + padding (110 + 18), so both curves run in parallel */
.cat-feat{display:grid;grid-template-columns:1.35fr 1fr;align-items:center;gap:clamp(32px,5vw,72px);background:#f0ede2;border-radius:128px 28px 28px 36px;padding:18px clamp(28px,4vw,60px) 18px 18px;margin-bottom:64px}
.cat-feat-pic{position:relative;aspect-ratio:16/10;border-radius:110px 18px 18px 18px;overflow:hidden}
.cat-feat-pic>img{width:100%;height:100%;object-fit:cover;transition:transform .45s ease}
.cat-feat:hover .cat-feat-pic>img{transform:scale(1.03)}
.cat-feat-pic .rail-pills{position:absolute;left:auto;right:16px;top:16px;display:flex;gap:6px}
.cat-feat-copy .h-new{position:static;display:inline-block;margin-bottom:18px}
.cat-feat-copy h2{font-size:clamp(32px,3vw,44px);margin:0 0 14px}
.cat-feat-copy p{font-size:17px;line-height:1.6;margin:0 0 26px;color:#45484b}
.cat-feat:hover .button{transform:scale(1.03)}

/* ---------- Toolbar ---------- */
.cat-tools{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 48px;scroll-margin-top:110px}
.cat-filters{display:flex;align-items:center;gap:8px;min-width:0}
.cat-filters button,.cat-kinds button{flex:none;display:inline-flex;align-items:center;gap:7px;background:transparent;border:1px solid #20242830;height:40px;padding:0 16px;border-radius:30px;font-size:14px;font-weight:500;line-height:1;transition:background-color .2s,border-color .2s,color .2s}
/* every pill is exactly 40px tall: on a Mac the emoji font has a taller line than the text and used to stretch the season pills */
.cat-season>span{display:inline-block;font-size:15px;line-height:1;height:1em}
.cat-filters button small,.cat-kinds button small{font-size:12px;color:#626466;font-weight:500}
.cat-filters button:hover,.cat-kinds button:hover{border-color:var(--ink)}
.cat-filters button.active,.cat-kinds button.active{background:var(--ink);border-color:var(--ink);color:#fff}
.cat-filters button.active small,.cat-kinds button.active small{color:#ffffffa6}
/* season pills (catalog.js, by the calendar): both outlined, the current season first; only a chosen pill is filled.
   Each season wears the colour of its emoji: --s outline and fill, --t text (darker, readable on cream), --f text on the fill. */
/* a full-strength coloured 1px line reads heavier than the soft grey ones (it seemed to sit outside the pill),
   so the resting outline is the season colour at half strength; hover and the chosen state use the full colour */
.cat-filters .cat-season{--s:#ff8a3d;--t:#b34a08;--f:var(--ink);border-color:color-mix(in srgb,var(--s) 50%,transparent);color:var(--t)}
.cat-filters .cat-season small{color:var(--t);opacity:.7}
.cat-filters .cat-season:hover{border-color:var(--s)}
.cat-filters .cat-season.active{background:var(--s);border-color:var(--s);color:var(--f)}
.cat-filters .cat-season.active small{color:var(--f)}
.cat-filters .season-christmas{--s:#2f9e55;--t:#1d7a3d;--f:#fff}
.cat-filters .season-winter{--s:#3fa9f5;--t:#1b6aa8;--f:var(--ink)}
.cat-filters .season-spring{--s:#ff85d5;--t:#b0287c;--f:var(--ink)}
.cat-filters .season-summer{--s:#f2c200;--t:#7d6300;--f:var(--ink)}
/* search sits above the pills, on their left edge (14.10.2026); the pills wrap if they are longer than the page */
.cat-tools{flex-direction:column-reverse;align-items:flex-start;gap:22px}
.cat-filters{flex-wrap:wrap;row-gap:8px}
.cat-tools .cat-search{width:min(380px,100%)}
/* search and the "under 30 min" switch share the top line: both are about how to look, the pills below are what to look for */
.cat-top{display:flex;align-items:center;gap:16px;width:100%}
/* Printables only: optional row of kinds (templates / colouring / puzzles), shown by build_printables.py once there are
   2+ kinds with 3+ printables each; sits between search and the tag pills */
.cat-kinds{display:flex;flex-wrap:wrap;gap:8px}
/* "+ More" opens a second row of tags right under the first (catalog.js). The wrapper animates its height
   (grid rows 0fr -> 1fr) and cancels the toolbar gap plus its own 6px padding while closed; the pills come in one by one (--i = position). */
.cat-filters .cat-more-btn{border-style:dashed;font-weight:600}
.cat-pm{position:relative;width:10px;height:10px;flex:none;transition:transform .35s cubic-bezier(.3,1.4,.5,1)}
.cat-pm:before,.cat-pm:after{content:'';position:absolute;background:currentColor;border-radius:2px}
.cat-pm:before{left:0;right:0;top:4px;height:2px}
.cat-pm:after{top:0;bottom:0;left:4px;width:2px;transition:transform .35s cubic-bezier(.3,1.4,.5,1)}
.cat-more-btn.is-open .cat-pm{transform:rotate(180deg)}
.cat-more-btn.is-open .cat-pm:after{transform:scaleY(0)}
.cat-more-wrap{display:grid;grid-template-rows:0fr;margin-top:-28px;transition:grid-template-rows .3s ease,margin-top .3s ease}
.cat-more-wrap.is-open{grid-template-rows:1fr;margin-top:-12px}
.cat-more-wrap>.cat-filters-more{min-height:0;overflow:hidden;padding:2px 0 4px}
.cat-filters-more button{opacity:0;transform:translateY(-8px);transition:opacity .15s,transform .15s,background-color .2s,border-color .2s,color .2s}
.cat-more-wrap.is-open .cat-filters-more button{opacity:1;transform:none;transition:opacity .3s calc(var(--i,0)*30ms + 60ms),transform .4s cubic-bezier(.3,1.4,.5,1) calc(var(--i,0)*30ms + 60ms),background-color .2s,border-color .2s,color .2s}
.cat-filters button:focus-visible{outline:2px solid var(--ink);outline-offset:2px}
@media(prefers-reduced-motion:reduce){.cat-more-wrap,.cat-pm,.cat-pm:after,.cat-filters-more button,.cat-more-wrap.is-open .cat-filters-more button{transition:none}}
.cat-sep{flex:none;width:1px;height:24px;background:#20242826;margin:0 6px}
.cat-search{flex:none;display:flex;align-items:center;gap:8px;width:230px;border-bottom:1px solid #20242840;padding:8px 2px;color:#626466}
.cat-search:focus-within{border-color:var(--ink);color:var(--ink)}
.cat-search svg{width:18px;height:18px;flex:none}
.cat-search input{border:0;background:none;font:inherit;font-size:15px;width:100%;outline:none;color:var(--ink)}

/* ---------- Grid (the card itself, .pc, lives in frame.css) ---------- */
.cat-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:44px 24px}
.pc-cell{position:relative;min-width:0}
.pc-cell[hidden]{display:none}

/* "More makes" card: fills the free cells of the last row (catalog.js sets the span); a full row turns it into a wide band */
.pc-more{background:#f0ede2;border-radius:22px;padding:28px;display:flex;flex-direction:column;justify-content:flex-end;gap:8px;align-self:stretch}
.pc-more[hidden]{display:none}
/* quiet tiles that fill the empty cells of the last row (catalog.js): plain beige, the second one fainter */
.pc-filler{align-self:start;aspect-ratio:1;border-radius:22px;background:#f0ede2;opacity:.8}
.pc-filler+.pc-filler{opacity:.4}
.pc-more>img{width:92px;margin-bottom:auto;transition:transform .35s cubic-bezier(.3,1.6,.5,1)}
.pc-more:hover>img{transform:rotate(-4deg) translateY(-4px)}
.pc-more h3{font-size:22px;letter-spacing:-.02em;line-height:1.2;margin:0 0 8px}
.pc-more .pc-copy{margin:0}
.pc-more .soft-link{align-self:flex-start;font-weight:600;font-size:15px;margin-top:12px}
.pc-more.is-double{padding:36px 40px}
.pc-more.is-double>img{width:128px}
.pc-more.is-double h3{font-size:28px}
.pc-more.is-double .pc-copy{max-width:380px}
.pc-more.is-wide{flex-direction:row;align-items:center;gap:32px;padding:26px 40px;margin-top:12px}
.pc-more.is-wide>img{margin:0}
.pc-more.is-wide .pc-more-copy{flex:1}
.pc-more.is-wide .soft-link{align-self:center;margin:0}

/* Hidden Mini: mini.css + mini.js */

.cat-empty{text-align:center;padding:40px 0 20px}
.cat-empty img{width:100px}
.cat-empty h3{font-size:24px;margin:10px 0}
.cat-empty p{margin:0}

@media(prefers-reduced-motion:reduce){.pc-img>img,.cat-feat-pic>img,a.pc h3{transition:none}}

@media(max-width:1100px){
  .cat-feat{grid-template-columns:1fr;padding:14px 14px 30px;border-radius:124px 28px 28px 28px}
  .cat-feat-copy{padding:0 14px}
}
@media(max-width:760px){
  .cat-section{padding-top:32px}
  .cat-head{flex-direction:column;align-items:flex-start;gap:16px;margin-bottom:44px}
  /* phones: keep the featured block short so the grid starts sooner */
  .cat-feat{border-radius:78px 22px 22px 22px;padding:12px 12px 22px;gap:18px;margin-bottom:44px}
  .cat-feat-pic{border-radius:66px 12px 12px 12px}
  .cat-feat-copy{padding:0 8px}
  .cat-feat-copy .h-new{margin-bottom:12px}
  .cat-feat-copy h2{font-size:28px;margin-bottom:8px}
  .cat-feat-copy p{font-size:15px;margin-bottom:18px}
  .cat-feat-copy .more{display:none}
  .cat-tools{flex-direction:column-reverse;align-items:stretch;gap:14px}
  .cat-search{width:auto}
  .cat-tools .cat-top .cat-search{flex:1;width:auto;min-width:0}
  .cat-more-wrap{margin-top:-20px}.cat-more-wrap.is-open{margin-top:-6px}
  /* the swipe row bleeds to the screen edges, so the clipping wrapper has to bleed too */
  .cat-more-wrap{margin-left:-5vw;margin-right:-5vw}.cat-more-wrap>.cat-filters-more{margin:0;padding:2px 5vw 4px;overflow-x:auto}
  /* one swipeable row of pills instead of wrapped rows */
  .cat-filters{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;margin:0 -5vw;padding:2px 5vw}
  .cat-filters::-webkit-scrollbar{display:none}
  .cat-grid{grid-template-columns:1fr 1fr;gap:30px 14px}
  .pc-more,.pc-more.is-double{padding:20px}.pc-more>img,.pc-more.is-double>img{width:64px}.pc-more h3,.pc-more.is-double h3{font-size:18px}
  .pc-more.is-wide{flex-direction:column;align-items:flex-start;gap:8px;padding:22px}.pc-more.is-wide .soft-link{align-self:flex-start;margin-top:8px}
}
