/* ==========================================================================
   The shared page kit. Loaded on every page right after site.css
   (templates/shell.html), so any page can be built from the pieces the
   homepage proved: section bands and heads, striped cards, icon chips,
   arrow links, steps, the weekend schedule, photo cards, the red and green
   photo washes, donation amounts, rows on a wash, the totals scoreboard, a
   logo grid, and the closing band that ends a page with its next steps
   (tools/kit.py). Site tokens only (site.css :root). A page's own sheet
   (home.css, results.css) keeps only what is unique to that page.
   ========================================================================== */

/* ------------------------------------------------------------- bands */
.kit-band{padding-block:clamp(64px,7vw,104px)}
.kit-band.is-tint{background:var(--paper-2)}
.kit-head{display:flex; flex-direction:column; align-items:flex-start; gap:14px; max-width:760px;
  margin-bottom:clamp(30px,4vw,46px)}
.kit-head.is-center{align-items:center; text-align:center; margin-inline:auto}
.kit-head > p:not([class]){font-size:18px; line-height:1.6; text-wrap:pretty}
.kit-head h2{line-height:1.12}
.eyebrow.is-gold{background-image:none; background-color:var(--gold); color:var(--ink)}
.eyebrow.is-gold-grad{background-image:linear-gradient(-90deg, #BE9D3A 0%, #F2D06B 100%); color:var(--ink)}
.kit-kicker{font:700 .8rem/1.2 var(--font-body); letter-spacing:.09em; text-transform:uppercase; color:#B81C35}
.kit-script{font:400 clamp(40px,2.6vw + 24px,62px)/1.25 var(--font-script); color:#fff; text-shadow:0 2px 18px rgba(0,0,0,.25)}
.kit-rule{display:flex; align-items:center; gap:18px; margin:clamp(44px,5vw,64px) 0 24px; font-size:26px; white-space:nowrap}
.kit-rule::after{content:""; flex:1; height:1px; background:var(--line)}

/* ------------------------------------------------------ links and chips */
.kit-more{display:inline-flex; align-items:center; gap:7px; font-weight:600; color:var(--red-deep)}
.kit-more .ic{width:17px; height:17px; flex:none}
.kit-links{display:flex; flex-wrap:wrap; justify-content:center; gap:10px 28px; margin-top:28px}
.kit-chip{display:inline-grid; place-items:center; width:50px; height:50px; flex:none;
  border-radius:14px; background:#B81C35; color:#fff}
.kit-chip .ic{width:25px; height:25px}
.kit-chip.is-green{background:#1B6139}
.kit-chip.is-gold{background:#DAB641; color:var(--ink)}

/* -------------------------------------------------------------- cards */
/* A white card under a coloured stripe (--stripe). Three to a row in
   .kit-cards, which may be a div or a list. */
.kit-card{display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:28px 28px 26px;
  background:var(--paper); border-radius:15px; border-top:4px solid var(--stripe,#B81C35);
  box-shadow:var(--shadow-2)}
.kit-card h3{margin-top:4px}
.kit-card > p{font-size:16px; line-height:1.6}
.kit-card .kit-more{margin-top:auto; padding-top:4px}
.kit-cards{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px}
.kit-cards > li{display:flex}
.kit-cards > li > .kit-card{flex:1}
/* A card that is one link: the whole card is the target. */
a.kit-card{color:var(--body); transition:transform .15s ease, box-shadow .15s ease}
a.kit-card:hover{text-decoration:none; transform:translateY(-2px);
  box-shadow:0 2px 6px rgba(10,10,10,.06), 0 26px 50px -22px rgba(10,10,10,.42)}
a.kit-card:hover .kit-more > span{text-decoration:underline}

/* -------------------------------------------------------------- steps */
.kit-steps{list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:26px}
.kit-steps li{display:flex; align-items:flex-start; gap:14px}
.kit-step-ic{display:grid; place-items:center; width:48px; height:48px; flex:none; border-radius:14px;
  background:#FBF1D2; color:var(--red-deep)}
.kit-step-ic .ic{width:24px; height:24px}
.kit-step-text{display:flex; flex-direction:column; gap:4px; padding-top:2px}
.kit-step-text b{font:700 18px/1.25 var(--font-alt); color:var(--ink)}
.kit-step-text span{font-size:15.5px; line-height:1.5; color:var(--muted)}

/* ----------------------------------------------------------- schedule */
/* Two day cards and a photo (the third column). */
.kit-days{display:grid; grid-template-columns:1fr 1fr .9fr; gap:22px; align-items:stretch}
.kit-day{padding:24px 26px 14px; background:var(--paper); border-radius:15px;
  border-top:4px solid var(--stripe); box-shadow:var(--shadow-2)}
.kit-day h3{display:flex; align-items:baseline; justify-content:space-between; gap:10px; margin-bottom:10px; font-size:24px}
.kit-day-date{font:400 15px/1.2 "Roboto Slab",Georgia,serif; color:var(--muted)}
.kit-times{list-style:none; margin:0; padding:0}
.kit-times li{display:grid; grid-template-columns:6.7em 1fr; gap:12px; padding:12px 0;
  border-top:1px solid var(--line); font-size:16px; line-height:1.45}
.kit-time{font:600 14.5px/1.45 var(--font-body); color:var(--red-deep); font-variant-numeric:tabular-nums}

/* -------------------------------------------------------- photo cards */
/* A photo, a "when" line, a title, a price, a line and one button. A
   product shot sits on cream (.is-product) instead of filling the frame. */
.kit-extras{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px}
.kit-extra{display:flex; flex-direction:column; overflow:hidden; background:var(--paper); border-radius:15px;
  border-top:4px solid var(--stripe); box-shadow:var(--shadow-2)}
.kit-extra-photo{aspect-ratio:16/10; overflow:hidden; background:#2A2224}
.kit-extra-photo img{width:100%; height:100%; object-fit:cover}
.kit-extra-photo.is-product{display:grid; place-items:center; background:radial-gradient(circle at 50% 60%, #FFFFFF 0%, #FBF3DC 70%)}
.kit-extra-photo.is-product img{width:auto; height:86%; object-fit:contain; mix-blend-mode:multiply}
.kit-extra-body{flex:1; display:flex; flex-direction:column; align-items:flex-start; gap:10px; padding:20px 24px 24px}
.kit-extra-when{font:600 13px/1.2 var(--font-body); letter-spacing:.07em; text-transform:uppercase; color:var(--muted)}
.kit-extra h3{font-size:25px}
.kit-price{font:700 17px/1.3 var(--font-alt); color:var(--red-deep)}
.kit-extra-body > p:not([class]){font-size:16px; line-height:1.6}
.kit-extra-body .btn{margin-top:auto}
.kit-extra-body > p:not([class]) + .btn,.kit-extra-body > p:not([class]) + .kit-pending{margin-top:auto}
/* An action that is not open yet: a "soon" pill over a link. */
.kit-pending{display:flex; flex-direction:column; align-items:flex-start; gap:10px; margin-top:auto}
.kit-soon{display:inline-flex; align-items:center; gap:8px; min-height:46px; padding:0 18px; border-radius:var(--radius-pill);
  background:var(--paper-3); color:var(--body); font-weight:600; font-size:15.5px}
.kit-soon .ic{width:18px; height:18px; color:#1B6139}

/* ------------------------------------------------------- photo washes */
/* Race cars under the red wash, or the Christmas tile under the green. */
.kit-wash{position:relative; isolation:isolate; overflow:hidden; padding-block:clamp(64px,7vw,104px);
  color:rgba(255,255,255,.9); background-size:cover; background-position:center}
.kit-wash.is-red{background-color:#5A0000;
  background-image:linear-gradient(90deg, rgba(120,0,0,.93) 0%, rgba(176,0,0,.86) 100%),
    url('/wp-content/uploads/2025/10/race-car-background.webp');
  background-position:center 60%}
.kit-wash.is-green{background-color:#0F4A19;
  background-image:linear-gradient(180deg, rgba(20,102,31,.80) 0%, rgba(9,52,18,.92) 100%),
    url('/wp-content/uploads/2025/10/christmas-background.webp')}
.kit-wash .kit-head > p:not([class]){color:rgba(255,255,255,.9); font-size:19px}

/* ---------------------------------------------------- give and amounts */
.kit-give{display:flex; flex-direction:column; align-items:flex-start; gap:12px; padding:30px 32px 28px;
  background:var(--paper); color:var(--body); border-radius:18px; border-top:4px solid #DAB641;
  box-shadow:0 30px 60px -30px rgba(0,0,0,.6)}
.kit-give h3{margin-top:6px; font-size:28px}
.kit-give > p{font-size:17px}
.kit-amounts{list-style:none; margin:8px 0 6px; padding:0; width:100%; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px}
.kit-amounts a{display:flex; align-items:center; justify-content:center; min-height:58px; border-radius:12px;
  border:2px solid #E9C9CD; background:#fff; color:var(--red-deep); font:700 21px/1 var(--font-alt);
  transition:border-color .15s ease, background-color .15s ease, transform .15s ease}
.kit-amounts a:hover{border-color:var(--red-deep); background:#FDF3F4; text-decoration:none; transform:translateY(-1px)}
.kit-amounts a.is-other{font-size:17px}
.kit-give .kit-more{margin-top:auto; padding-top:6px}

/* ------------------------------------------------------- rows on a wash */
.kit-rows{list-style:none; margin:0; padding:0; display:grid; gap:14px; align-content:stretch}
.kit-row{display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:16px; height:100%;
  padding:18px 20px; border-radius:16px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.26);
  color:#fff; transition:background-color .15s ease}
a.kit-row:hover{background:rgba(255,255,255,.18); text-decoration:none}
.kit-row-ic{display:grid; place-items:center; width:46px; height:46px; border-radius:13px; background:var(--gold); color:var(--ink)}
.kit-row-ic .ic{width:23px; height:23px}
.kit-row-text{display:flex; flex-direction:column; gap:3px}
.kit-row-text b{font:700 19px/1.25 var(--font-alt); color:#fff}
.kit-row-text span{font-size:15.5px; line-height:1.5; color:rgba(255,255,255,.86)}
.kit-row-go{width:20px; height:20px; color:var(--gold)}
.kit-row-tag{padding:6px 11px; border-radius:var(--radius-pill); background:rgba(255,255,255,.16);
  color:#fff; font:600 13px/1.2 var(--font-body); white-space:nowrap}

/* ---------------------------------------------------------- scoreboard */
/* One bar per total, the number in a fixed column so the count-up never
   pushes the label around. */
.kit-totals{list-style:none; margin:8px 0 12px; padding:0; width:100%; display:grid; gap:10px}
.kit-totals li{display:flex; align-items:baseline; gap:16px;
  padding:14px 20px; border-radius:16px; background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.22)}
.kit-totals .stat-num{flex:none; min-width:5.2em; font:700 clamp(26px,1vw + 18px,34px)/1.1 var(--font-alt); color:var(--gold);
  font-variant-numeric:tabular-nums; white-space:nowrap}
.kit-totals .stat-label{font:400 17px/1.3 "Roboto Slab",Georgia,serif; color:rgba(255,255,255,.92)}

/* --------------------------------------------------------------- logos */
.kit-logos{list-style:none; margin:0 auto; padding:0; max-width:1100px;
  display:flex; flex-wrap:wrap; justify-content:center; gap:14px}
.kit-logos li{flex:0 0 calc((100% - 4 * 14px) / 5); display:grid; place-items:center; height:108px; padding:14px 18px;
  background:#fff; border:1px solid var(--line); border-radius:14px}
.kit-logos img{max-width:100%; max-height:72px; width:auto; height:auto; object-fit:contain}

/* --------------------------------------------------- the closing band */
/* What a page offers once its own job is done (tools/kit.py NEXT): three
   cards that are each one link, so no page ends in a dead end. Tinted, or
   white straight after a tinted band so it never runs into the band before
   it. Rows on a phone, so it stays short. */
.kit-next{background:var(--paper-2)}
.band--tint + .kit-next{background:var(--paper)}

/* ----------------------------------------------------------- responsive */
@media (max-width:1100px){
  .kit-days{grid-template-columns:1fr 1fr}
}
@media (max-width:900px){
  .kit-steps{grid-template-columns:1fr; gap:18px}
  .kit-days{grid-template-columns:1fr}
  .kit-extras{grid-template-columns:1fr; max-width:560px; margin-inline:auto}
  .kit-cards{grid-template-columns:1fr; max-width:560px; margin-inline:auto}
  .kit-logos li{flex-basis:calc((100% - 2 * 14px) / 3)}
}
@media (max-width:620px){
  .kit-head > p:not([class]){font-size:17px}
  .kit-amounts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .kit-give{padding:24px 20px 22px}
  .kit-row{grid-template-columns:auto 1fr; padding:16px; gap:8px 13px}
  .kit-row-go{display:none}
  .kit-row-tag{grid-column:2; justify-self:start}
  .kit-totals li{gap:12px; padding:12px 16px}
  .kit-totals .stat-label{font-size:16px}
  .kit-logos li{flex-basis:calc((100% - 14px) / 2); height:96px}
  .kit-times li{grid-template-columns:6.6em 1fr}
  .kit-rule{font-size:22px; white-space:normal}
  .kit-day h3{font-size:22px}
  /* The closing band as rows: chip, title and line, then an arrow. */
  .kit-next .kit-cards{gap:12px}
  .kit-next a.kit-card{display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:3px 14px;
    padding:16px 16px 16px 18px; border-top:0; border-left:4px solid var(--stripe,#B81C35)}
  .kit-next a.kit-card .kit-chip{grid-row:1 / span 2; width:44px; height:44px; border-radius:12px}
  .kit-next a.kit-card .kit-chip .ic{width:22px; height:22px}
  .kit-next a.kit-card h3{grid-column:2; margin:0; font-size:19px}
  .kit-next a.kit-card > p{grid-column:2; font-size:15px; line-height:1.45; text-wrap:pretty}
  .kit-next a.kit-card .kit-more{grid-column:3; grid-row:1 / span 2; margin:0; padding:0}
  .kit-next a.kit-card .kit-more > span{position:absolute; width:1px; height:1px; overflow:hidden;
    clip:rect(0 0 0 0); white-space:nowrap}
  .kit-next a.kit-card .kit-more .ic{width:20px; height:20px}
}
@media (prefers-reduced-motion:reduce){
  .kit-amounts a,a.kit-card{transition:none}
  a.kit-card:hover{transform:none}
}
