/* Fire Words: the headline explainer and the gear rack of cubbies. */

/* ---------- the head: a big jump straight to the cubbies (they sit below the engine-or-truck stop) ---------- */
.cubjump { margin-top: 18px; min-height: 64px; padding-left: 0.5em; padding-right: 1.1em; gap: 0.4em; white-space: nowrap; }
.cubjump__pic { width: 52px; height: 52px; margin: -6px 0 -8px; flex: none; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.25)); transition: transform 0.3s var(--ease-out); }
.cubjump__arrow { display: inline-grid; transform: rotate(90deg); }
.cubjump:hover .cubjump__pic, .cubjump:focus-visible .cubjump__pic { transform: rotate(-8deg) translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .cubjump__pic { transition: none; } }
@media (max-width: 700px) { .cubjump { margin-top: 14px; } }
@media (max-width: 400px) { .cubjump { font-size: 1.08em; } .cubjump__pic { width: 46px; height: 46px; } }

/* ---------- Is that a fire truck? ---------- */
.vs { padding: clamp(44px, 5vw, 80px) 0 clamp(48px, 5vw, 80px); background: var(--cream); text-align: center; }
.vs h2 { margin-bottom: 0.25em; }
.vs h2 + .vs__lede { margin: 0 auto 1.6em; max-width: 52ch; font-size: 1.12em; color: var(--ink-soft); }
.vs__pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 0; max-width: 1100px; margin: 0 auto; }
.vs__side { position: relative; display: flex; flex-direction: column; align-items: center; padding: clamp(18px, 2.4vw, 32px) clamp(16px, 2.4vw, 32px) clamp(22px, 2.6vw, 34px); border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-2); }
/* the rig parks on a strip of apron concrete, wheels down, with a shadow under it */
/* one contact plane: --lift is where the image box ends; the wheels sit --pad above that (transparent rows in the art) */
.vs__stage { --lift: clamp(14px, 2.6vw, 24px); --pad: 3px; position: relative; width: 100%; max-width: 460px; aspect-ratio: 2 / 1; display: flex; align-items: flex-end; justify-content: center; padding: 0 4% var(--lift); isolation: isolate; }
.vs__stage::before { content: ""; position: absolute; left: -6%; right: -6%; bottom: 0; height: calc(var(--lift) + 20px); z-index: -2; border-radius: 10px;
  background: repeating-linear-gradient(90deg, transparent 0 118px, rgb(60 30 20 / 0.08) 118px 120px), linear-gradient(to bottom, #dccaa7, var(--apron) 10px, #f4ead7);
  box-shadow: inset 0 2px 0 rgb(60 30 20 / 0.14); }
.vs__stage::after { content: ""; position: absolute; left: 9%; right: 9%; bottom: calc(var(--lift) + var(--pad) - 7px); height: 14px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(40 20 10 / 0.42), rgb(40 20 10 / 0.18) 60%, transparent); }
.vs__stage img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; object-position: 50% 100%; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.25)); }
.vs__side h3 { font-size: clamp(1.8rem, 1.5vw + 1.2rem, 2.6rem); margin: 6px 0 0.2em; color: var(--red); }
.vs__side p { margin: 0 0 16px; max-width: 30ch; font-size: 1.05em; }
.vs__side .btn { margin-top: auto; }
.vs__side p b { color: var(--spot); }
.vs__or { align-self: center; z-index: 1; display: grid; place-items: center; width: 74px; height: 70px; margin: 0 -18px;
  background: url("/assets/img/spot-1.svg") center / contain no-repeat; color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; padding-bottom: 4px; }
.vs__foot { margin: 1.6em auto 1em; max-width: 46ch; font-weight: 700; font-size: 1.08em; }
@media (max-width: 760px) {
  .vs__side { padding: 14px 10px 16px; border-radius: 20px; }
  .vs__side h3 { font-size: 1.45rem; }
  .vs__side p { font-size: 0.92em; line-height: 1.4; margin-bottom: 12px; }
  .vs__side .btn { font-size: 0.9em; padding-inline: 0.8em; }
  .vs__or { width: 52px; height: 50px; margin: 0 -14px; font-size: 1.1rem; }
}

/* ---------- the gear room ---------- */
.gearroom { padding: clamp(36px, 4vw, 64px) 0 clamp(56px, 6vw, 96px); background: #e9e3d6; background-image: linear-gradient(rgb(255 255 255 / 0.35) 2px, transparent 2px); background-size: 100% 64px; }
.gearroom__top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); gap: 18px 32px; align-items: end; margin-bottom: clamp(24px, 3vw, 40px); }
.jump { display: flex; flex-wrap: wrap; gap: 8px; }
.jump a { display: inline-flex; align-items: center; min-height: 48px; padding: 6px 18px; border-radius: 999px; background: #fff; color: var(--spot); font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; text-decoration: none; box-shadow: var(--shadow-1); }
.jump a:hover { background: var(--yellow); color: var(--spot); }
.find label { display: block; font-weight: 800; font-size: 0.92em; margin-bottom: 6px; color: var(--ink-soft); }
.find input { width: 100%; min-height: 52px; padding: 10px 16px; border: 3px solid var(--spot); border-radius: 14px; background: #fff; font: inherit; color: var(--ink); }
.find input::placeholder { color: #6e625c; }
.find input:focus-visible { outline: 4px solid var(--sky-deep); outline-offset: 2px; }
.find__none { margin: 8px 0 0; min-height: 1.4em; font-weight: 700; color: var(--red-deep); }
@media (max-width: 860px) { .gearroom__top { grid-template-columns: 1fr; } }

.group + .group { margin-top: clamp(40px, 5vw, 72px); }
.group__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 18px; margin-bottom: 14px; }
.group__head h3 { display: inline-block; margin: 0; padding: 6px 18px 8px; background: #f4ead3; border: 3px solid var(--spot); border-radius: 12px; font-size: clamp(1.4rem, 1vw + 1.1rem, 1.9rem); }
.group__head p { margin: 0; color: var(--ink-soft); font-weight: 700; max-width: 60ch; }

/* the rack: red frame, dark wooden cubbies, red dividers drawn by each cubby */
.rack {
  --cols: 2; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 8px;
  max-width: calc(var(--cols) * 224px); grid-auto-flow: row dense;
  padding: 8px; border-radius: 20px;
  background: linear-gradient(#43321f, #3a2b1b);
  box-shadow: 0 0 0 8px var(--red), var(--shadow-2);
  margin: 8px;
}
/* each group gets a rack sized to its words, so every row is full: no big empty dark blocks.
   (dense flow lets the empty cubbies fill the last row even when an open drawer sits under it) */
@media (min-width: 521px) { .rack--6 { --cols: 3; } }
@media (min-width: 760px) { .rack--4, .rack--8, .rack--10 { --cols: 4; } }
@media (min-width: 1000px) { .rack--10 { --cols: 5; } }
@media (min-width: 1180px) { .rack--6 { --cols: 6; } }
/* the one leftover: Tools on a 4-wide rack shows two empty cubbies, each with a peg waiting for gear */
.rack__empty { --strip: 66px; display: none; position: relative; min-height: 268px; border-radius: 4px; overflow: hidden;
  background: /* a blank name strip (nothing hung here yet), then the dark cubby */
    linear-gradient(var(--trim-lime) 0 2px, var(--trim-silver) 2px 5px, var(--trim-lime) 5px) bottom / 100% 7px no-repeat,
    linear-gradient(#fffaf0, #f6efe0) bottom / 100% var(--strip) no-repeat,
    linear-gradient(#4d3a28, #3c2c1c); box-shadow: 0 0 0 4px var(--red), inset 0 10px 18px -8px rgb(0 0 0 / 0.5); }
.rack__empty::before { /* the brass hook on the back wall */
  content: ""; position: absolute; top: 30%; left: 50%; width: 30px; height: 36px; margin-left: -15px;
  border: 5px solid #c9a24a; border-top: 0; border-radius: 0 0 16px 16px; box-shadow: 0 3px 3px rgb(0 0 0 / 0.35);
  background: radial-gradient(circle at 50% 0, #f6dc8f 0 6px, transparent 7px) 0 -6px / 100% 14px no-repeat;
}
.rack__empty::after { /* the same cubby floor board the full cubbies have */
  content: ""; position: absolute; left: 0; right: 0; bottom: var(--strip); height: 26px;
  background: linear-gradient(#7a5b3d, #6a4e33 40%, #5e4530); box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.12);
}
@media (min-width: 760px) and (max-width: 999px) { .rack--10 .rack__empty { display: block; } }
.rack:has(.is-hidden) .rack__empty { display: none !important; } /* while the finder filters, no fake gaps */
.cub {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  min-height: 268px; padding: 52px 10px 0; margin: 0; border: 0; border-radius: 4px; cursor: pointer;
  font: inherit; color: var(--spot); text-align: center;
  background: linear-gradient(#5b4532, #43321f);
  box-shadow: 0 0 0 4px var(--red);
  overflow: hidden;
}
.cub__plate {
  position: absolute; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 16px);
  padding: 3px 12px; background: #f4ead3; border: 2px solid var(--spot); border-radius: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* each cubby has a floor board; the object stands on it with a contact shadow */
.cub__pic { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 150px; padding-bottom: 12px; isolation: isolate; }
.cub__pic::before { /* the cubby floor, seen a little from above */
  content: ""; position: absolute; left: -10px; right: -10px; bottom: 0; height: 26px; z-index: -1;
  background: linear-gradient(#7a5b3d, #6a4e33 40%, #5e4530);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.12), inset 0 -1px 0 rgb(0 0 0 / 0.2);
}
.cub__obj { position: relative; display: block; max-width: 88%; line-height: 0; isolation: isolate; transition: transform 0.4s var(--ease-out); }
.cub__obj::after { /* contact shadow on the floor */
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -6px; height: 12px; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0.25) 60%, transparent);
  transition: transform 0.4s var(--ease-out), opacity 0.4s var(--ease-out);
}
.cub__obj img { display: block; max-width: 100%; max-height: 116px; width: auto; height: auto; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.3)); transition: transform 0.4s var(--ease-out); }
.cub--frame .cub__obj { width: 84%; }
.cub__obj--lean::after { left: auto; right: -2%; width: 22%; } /* a leaning pole only touches the floor at its foot */
.cub--frame .cub__obj img { width: 100%; height: 108px; max-height: none; object-fit: cover; border: 6px solid #fffaf0; border-radius: 4px; box-shadow: 0 2px 4px rgb(0 0 0 / 0.4); filter: none; }
.cub:hover .cub__obj img, .cub:focus-visible .cub__obj img { transform: translateY(-8px) rotate(-3deg); }
.cub--frame:hover .cub__obj img, .cub--frame:focus-visible .cub__obj img { transform: translateY(-6px) rotate(1.5deg); }
.cub:hover .cub__obj::after, .cub:focus-visible .cub__obj::after { transform: scaleX(0.8); opacity: 0.6; }
.cub__line {
  display: block; width: calc(100% + 20px); margin-top: 0; padding: 9px 8px 17px; background: #fffaf0;
  font-weight: 700; font-size: 0.95rem; line-height: 1.25; position: relative; min-height: 4.1em; display: grid; place-items: center;
}
.cub__line::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 7px; background: linear-gradient(var(--trim-lime) 0 2px, var(--trim-silver) 2px 5px, var(--trim-lime) 5px); }
.cub:hover .cub__line::after, .cub:focus-visible .cub__line::after, .cub[aria-expanded="true"] .cub__line::after { background: linear-gradient(var(--trim-lime) 0 2px, #fff 2px 5px, var(--trim-lime) 5px); }
.cub:focus-visible { outline: 4px solid var(--yellow); outline-offset: -4px; border-radius: 4px; }
.cub[aria-expanded="true"] { background: linear-gradient(#6d533c, #4f3a26); }
.cub[aria-expanded="true"] .cub__plate { background: var(--yellow); }
.cub[aria-expanded="true"]::after { /* a little notch pointing at the open drawer */
  content: ""; position: absolute; left: 50%; bottom: -1px; width: 22px; height: 12px; margin-left: -11px; background: var(--paper); clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.cub.is-hidden, .drawer.is-hidden, .group.is-hidden { display: none; }

/* the open drawer: a paper sheet across the whole rack */
.drawer {
  grid-column: 1 / -1; display: grid; grid-template-columns: minmax(180px, 360px) minmax(0, 1fr); gap: clamp(16px, 3vw, 40px); align-items: center;
  padding: clamp(18px, 2.6vw, 34px); background: var(--paper); border-radius: 6px; box-shadow: 0 0 0 4px var(--red);
  animation: drawer-in 0.45s var(--ease-out);
}
.drawer[hidden] { display: none; }
@keyframes drawer-in { from { opacity: 0; transform: translateY(-10px); clip-path: inset(0 0 60% 0); } to { opacity: 1; transform: none; clip-path: inset(0); } }
.drawer__pic img { width: 100%; height: auto; max-height: 320px; object-fit: contain; }
/* the object stands on a shallow wooden tabletop: top face (seen from above) + front edge; its base sits in the top face */
.drawer__pic--cut { position: relative; display: flex; align-items: flex-end; justify-content: center; padding: 18px 14px 18px; isolation: isolate; }
.drawer__pic--cut::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 38px; z-index: -1; border-radius: 8px 8px 5px 5px;
  background: linear-gradient(#dcc095, #cfae7c 24px, #9c6b40 24px, #865a34);
  box-shadow: inset 0 2px 0 rgb(255 255 255 / 0.4), 0 8px 12px -6px rgb(60 30 20 / 0.45);
}
.drawer__obj { position: relative; display: block; line-height: 0; isolation: isolate; max-width: 100%; }
.drawer__obj::after { content: ""; position: absolute; left: 5%; right: 5%; bottom: -5px; height: 12px; z-index: -1; border-radius: 50%; background: radial-gradient(closest-side, rgb(60 30 20 / 0.5), rgb(60 30 20 / 0.2) 60%, transparent); }
.drawer__obj img { display: block; width: auto; max-width: 100%; max-height: 300px; min-width: min(220px, 100%); filter: drop-shadow(0 2px 3px rgb(60 30 20 / 0.25)); }
.drawer__pic--frame img { aspect-ratio: 3 / 2; object-fit: cover; object-position: 50% 50% !important; border: 8px solid #fff; border-radius: 6px; box-shadow: var(--shadow-1); filter: none; max-height: none; }
.drawer__text h4 { font-size: clamp(1.8rem, 1.4vw + 1.2rem, 2.5rem); margin: 0 0 0.3em; color: var(--red); }
.drawer__kid { font-size: 1.18em; font-weight: 700; line-height: 1.5; max-width: 52ch; }
.drawer__gu { color: var(--ink-soft); font-size: 0.95em; max-width: 64ch; margin-top: 1em; }
.drawer__gu p { margin: 0.3em 0 0; }
.drawer__gu summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 800; color: var(--spot); list-style: none; border-radius: 10px; }
.drawer__gu summary::-webkit-details-marker { display: none; }
.drawer__gu summary::before { content: ""; width: 9px; height: 9px; margin: 0 4px 0 2px; border: solid currentColor; border-width: 0 3px 3px 0; transform: rotate(-45deg); transition: transform 0.2s var(--ease-out); }
.drawer__gu[open] summary::before { transform: rotate(45deg) translate(-2px, -2px); }
.drawer__btns { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 14px; }
.drawer__text h4 + .drawer__btns { margin-top: -2px; }
.rigtag { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px; border-radius: 14px; background: var(--cream); border: 2px dashed #d8c497; font-weight: 700; max-width: 60ch; }
.rigtag__q { font-family: var(--font-display); font-weight: 600; color: var(--ink-soft); width: 100%; font-size: 0.95em; }
.rigtag b { font-family: var(--font-display); font-size: 1.15em; padding: 2px 14px 4px; border-radius: 999px; background: var(--spot); color: #fff; }
.rigtag--engine b { background: var(--red); }
.rigtag--truck b { background: var(--yellow); color: var(--spot); }
@media (max-width: 700px) {
  .drawer { grid-template-columns: 1fr; gap: 12px; }
  .drawer__text h4 { margin-bottom: 0.2em; }
  .drawer__pic img, .drawer__obj img { max-height: 200px; }
}
@media (max-width: 520px) {
  .rack { margin: 6px 4px; }
  .cub { min-height: 232px; padding-top: 48px; }
  .cub__pic { height: 116px; padding-bottom: 10px; }
  .cub__pic::before { height: 22px; }
  .cub__obj img { max-height: 86px; }
  .cub--frame .cub__obj img { height: 82px; border-width: 4px; }
  /* long names wrap to two lines instead of losing letters */
  .cub { padding-top: 60px; min-height: 244px; }
  .cub__plate { left: 8px; right: 8px; width: fit-content; max-width: none; margin-inline: auto; transform: none;
    font-size: 0.95rem; padding: 2px 9px; line-height: 1.1; white-space: normal; overflow: visible; text-overflow: clip; text-align: center; }
  .cub__line { font-size: 0.86rem; }
}

/* ---------- the book ---------- */
.fw-book { padding: clamp(48px, 6vw, 96px) 0; background: var(--cream); }
.fw-book__in { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: clamp(20px, 4vw, 52px); align-items: center; max-width: 900px; }
/* the book stands on a little wall shelf: cover bottom on the board, a short contact shadow where they meet */
.fw-book__shelf { position: relative; padding: 0 14px 17px; isolation: isolate; }
.fw-book__shelf::after { /* the board, with two brackets under it holding it to the wall */
  /* top face 0-10px (the cover stands 5px back on it, with its contact shadow), a lit lip, then the front edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 22px; z-index: 1; border-radius: 3px;
  background: radial-gradient(44% 6px at 50% 5px, rgb(30 10 0 / 0.55), rgb(30 10 0 / 0.2) 60%, transparent) no-repeat, linear-gradient(#b87a46, #cf9560 10px, #e2ad78 10px, #a86b3c 12px, #7a4523);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.25), 0 6px 10px rgb(60 30 10 / 0.3);
}
.fw-book__shelf::before { /* brackets */
  content: ""; position: absolute; left: 14%; right: 14%; bottom: -16px; height: 18px; z-index: 0;
  background: linear-gradient(135deg, #6a3d1f 50%, transparent 50%) left / 16px 100% no-repeat, linear-gradient(225deg, #6a3d1f 50%, transparent 50%) right / 16px 100% no-repeat;
}
.fw-book__shelf img { position: relative; z-index: 2; display: block; width: 100%; border-radius: 3px 9px 9px 3px;
  box-shadow: inset 6px 0 0 rgb(0 0 0 / 0.18), -3px 0 0 rgb(0 0 0 / 0.2), 0 2px 3px rgb(30 10 0 / 0.45), 8px 0 18px -6px rgb(0 0 0 / 0.35); }

.fw-book h2 { font-size: clamp(1.9rem, 1.6vw + 1.2rem, 2.7rem); }
@media (max-width: 600px) { .fw-book__in { grid-template-columns: 1fr; } .fw-book__shelf { width: 198px; margin-bottom: 18px; } }
