/* /tools: the AI tools page. Builds on desk.css (tokens, header, footer, lights off).
   Each tool is a paper card on the desk, tilted a little and straightened on hover. */

.tools-page { max-width: 1080px; margin: 0 auto; padding-bottom: 24px; }

.tools-hero { padding: 36px 0 12px; text-align: center; }
.tools-kicker { font-size: 26px; color: var(--ink-2); }
.tools-hero h1 {
  margin-top: 2px;
  font-size: clamp(42px, 7vw, 68px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.04em;
}
.tools-lede {
  max-width: 560px;
  margin: 16px auto 0;
  font-size: 18px;
  color: var(--ink-2);
  text-wrap: balance;
}
.tools-disclosure {
  max-width: 600px;
  margin: 14px auto 0;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: balance;
}

/* ---------- Groups ---------- */

.tool-group { margin-top: 40px; }
.tool-group h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.tool-group h2::after { content: ""; flex: 1; border-top: 1px dashed rgba(21, 21, 21, 0.25); }

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

/* ---------- Tool card ---------- */

.tool {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  border-radius: 14px;
  background: var(--paper);
  box-shadow: var(--shadow);
  transform: rotate(var(--r, 0deg));
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tool:hover,
.tool:focus-visible {
  transform: rotate(0deg) translateY(-4px);
  box-shadow: var(--shadow-lift);
}
.tool-head { display: flex; align-items: center; gap: 12px; }
.tool-head img {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.12);
}
.tool-name { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.tool-what { flex: 1; font-size: 15px; line-height: 1.45; color: var(--ink-2); }

.tool-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(21, 21, 21, 0.18);
}
/* the deal sits under a highlighter, like the receipt total on the desk */
.tool-deal {
  position: relative;
  z-index: 0;
  padding: 2px 4px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
}
.tool-deal::before {
  content: "";
  position: absolute;
  inset: 0 -3px;
  z-index: -1;
  background: var(--accent);
  border-radius: 3px 8px 4px 9px;
  transform: rotate(-1.5deg);
}
.tool-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.tool-cta::after {
  content: "";
  width: 11px;
  height: 11px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M7 7h10v10'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17L17 7M7 7h10v10'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform 0.2s ease;
}
.tool:hover .tool-cta::after { transform: translate(2px, -2px); }

/* ---------- Next steps ---------- */

.tools-next {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 56px;
}
.next-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 22px 24px;
  border-radius: 16px;
  background: var(--accent);
  color: #151515;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.next-card:hover,
.next-card:focus-visible { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.next-dark { background: #151515; color: #FFFFFF; }
.next-kicker { font-family: var(--hand); font-size: 22px; font-weight: 700; }
.next-title { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.next-sub { font-size: 15px; opacity: 0.8; }

/* ---------- Lights off ---------- */

html.night .tools-hero { color: #F6F1E8; }
html.night .tools-kicker,
html.night .tools-lede,
html.night .tool-group h2 { color: #D3CDC2; }
html.night .tools-disclosure { color: #A9A397; }
html.night .tool-group h2::after { border-top-color: rgba(255, 255, 255, 0.2); }
html.night .tool { box-shadow: 0 1px 2px rgba(0, 0, 0, 0.45), 0 18px 40px rgba(0, 0, 0, 0.55); filter: brightness(0.92) sepia(0.1); }
html.night .next-dark { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14), 0 18px 40px rgba(0, 0, 0, 0.55); }

/* ---------- Smaller screens ---------- */

/* desk.css narrows .wrap to 600px below 1100px for the stacked desk; this page keeps its grid */
@media (max-width: 1099px) {
  .wrap { max-width: 1080px; }
}
@media (max-width: 900px) {
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .tools-hero { padding-top: 20px; }
  .tools-lede { font-size: 16px; }
  .tool-grid, .tools-next { grid-template-columns: 1fr; }
  .tool { transform: rotate(calc(var(--r, 0deg) * 0.4)); }
}
@media (prefers-reduced-motion: reduce) {
  .tool, .next-card { transition: none; }
}
