/* /tools/: the tools as cards (two wide across the top, three below on a wide screen), each with its icon
   (src/assets/img/icons, made November 24, 2026), and "More from Iconic Relics". tools.js moves the light and the icon. */
.tgrid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); margin: clamp(10px, 2vw, 24px) 0 0; }
.tool { display: flex; grid-column: span 2; min-width: 0; }
.tool:nth-child(-n+2) { grid-column: span 3; }
.tgrid:not(:has(> .tool:nth-child(5))) > .tool:nth-child(n+3) { grid-column: span 3; }   /* four tools: two and two */
.tgrid:not(:has(> .tool:nth-child(4))) > .tool:nth-child(3) { grid-column: span 6; }     /* three tools: two, then one wide */
.tool:nth-child(2) { animation-delay: .08s; }
.tool:nth-child(3) { animation-delay: .12s; }
.tool:nth-child(4) { animation-delay: .18s; }
.tool:nth-child(5) { animation-delay: .24s; }

.tool__in { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-rows: auto 1fr; gap: 22px; width: 100%; padding: clamp(22px, 2.4vw, 32px); border: 1.5px solid var(--line); border-radius: 24px; background: linear-gradient(160deg, var(--stock-3), var(--stock-2) 58%); color: var(--ink); text-decoration: none; transition: border-color .25s, transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.tool:nth-child(-n+2) .tool__in, .tgrid:not(:has(> .tool:nth-child(4))) > .tool:nth-child(3) .tool__in { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: clamp(20px, 2.6vw, 36px); }
.tool__in:hover, .tool__in:focus-visible { border-color: var(--line-2); transform: translateY(-4px); box-shadow: 0 26px 52px rgba(0, 0, 0, .35); }
.tool__glow { position: absolute; z-index: -1; inset: 0; background: radial-gradient(440px circle at var(--mx, 30%) var(--my, 0%), rgba(22, 167, 184, .2), rgba(22, 167, 184, 0) 62%); opacity: 0; transition: opacity .35s; pointer-events: none; }
.tool__in:hover .tool__glow, .tool__in:focus-visible .tool__glow { opacity: 1; }
.tool__art { display: block; perspective: 800px; }
.tool__ic { display: block; width: clamp(112px, 10.5vw, 146px); height: auto; aspect-ratio: 1; border-radius: 22%; box-shadow: 0 22px 44px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .05); transform: rotateX(var(--ry, 0deg)) rotateY(var(--rx, 0deg)); transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out); }
.tool:nth-child(-n+2) .tool__ic { width: clamp(132px, 13vw, 176px); }
.tool__in:hover .tool__ic, .tool__in:focus-visible .tool__ic { box-shadow: 0 28px 56px rgba(0, 0, 0, .55), 0 0 0 1px rgba(22, 167, 184, .4), 0 0 38px rgba(22, 167, 184, .22); }
.tool__tx { display: grid; gap: 10px; align-content: start; min-width: 0; }
.tool__for { font: 800 .62rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--teal); }
.tool__name { margin: 0; font: 700 clamp(1.5rem, 2.2vw, 2.1rem)/1.05 var(--display); }
.tool__ds { max-width: 34em; font-size: .95rem; line-height: 1.5; color: var(--ink-2); }
.tool__go { justify-self: start; display: inline-flex; align-items: center; gap: .5em; margin-top: 6px; padding: .9em 0; border-bottom: 2px solid var(--teal); font: 800 .7rem/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; }
.tool__go .arrow, .mcard .arrow { transition: transform .3s var(--ease-out); }
.tool__in:hover .tool__go .arrow, .mcard:hover .arrow { transform: translateX(4px); }

.more { margin: clamp(48px, 7vw, 88px) 0 clamp(20px, 3vw, 40px); }
.more__h { margin: 0 0 18px; font: 700 clamp(1.4rem, 2.4vw, 2rem)/1.1 var(--display); }
.more__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.4vw, 18px); }
.more__row > li { display: flex; min-width: 0; }
.mcard { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; padding: 16px 18px; border: 1.5px solid var(--line); border-radius: 20px; background: var(--stock-2); color: var(--ink); text-decoration: none; transition: border-color .25s, background-color .25s, transform .35s var(--ease-out); }
.mcard:hover, .mcard:focus-visible { border-color: var(--line-2); background: var(--stock-3); transform: translateY(-3px); }
.mcard__ic { width: 72px; height: 72px; border-radius: 16px; box-shadow: 0 12px 26px rgba(0, 0, 0, .45); transition: transform .4s var(--ease-out); }
.mcard:hover .mcard__ic, .mcard:focus-visible .mcard__ic { transform: rotate(-5deg) scale(1.06); }
.mcard__tx { display: grid; gap: 4px; min-width: 0; }
.mcard__name { font: 700 1.2rem/1.1 var(--display); }
.mcard__ds { font-size: .85rem; line-height: 1.4; color: var(--ink-2); }
.mcard .arrow { font-size: 1.1rem; }

@media (max-width: 979px) {
  .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool, .tool:nth-child(-n+2), .tgrid > .tool:nth-child(n+3) { grid-column: span 1; }
  .tool:nth-child(-n+2) .tool__in { grid-template-columns: none; grid-template-rows: auto 1fr; align-items: stretch; }
  .tgrid > .tool:last-child:nth-child(odd) { grid-column: span 2; }
  .tgrid > .tool:last-child:nth-child(odd) .tool__in { grid-template-columns: auto minmax(0, 1fr); grid-template-rows: none; align-items: center; }
  .more__row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tgrid { grid-template-columns: minmax(0, 1fr); }
  .tool, .tgrid > .tool:last-child:nth-child(odd) { grid-column: auto; }
  .tool__in, .tool:nth-child(-n+2) .tool__in, .tgrid > .tool:last-child:nth-child(odd) .tool__in { grid-template-columns: 92px minmax(0, 1fr); grid-template-rows: none; align-items: start; gap: 18px; padding: 20px; border-radius: 20px; }
  .tool__ic, .tool:nth-child(-n+2) .tool__ic { width: 92px; }
  .tool__name { font-size: 1.4rem; }
  .tool__ds { font-size: .9rem; }
  .mcard { grid-template-columns: 56px minmax(0, 1fr) auto; gap: 14px; padding: 14px; }
  .mcard__ic { width: 56px; height: 56px; border-radius: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool__in, .tool__ic, .mcard, .mcard__ic, .tool__go .arrow, .mcard .arrow { transition: none; transform: none !important; }
}
/* on the light page the small teal labels need a deeper teal to stay readable (5.3:1 on the card) */
:root[data-theme="light"] .tool__for { color: #0B6B77; }
