/* Landing page. Colours, fonts and radii come from MakerLens Assets'
   design tokens (/assets/css/tokens.css), so the family stays in sync. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-image: radial-gradient(circle, var(--dot) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--t);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--a); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--a); outline-offset: 3px; border-radius: 4px; }
code { font-family: var(--mono); font-size: .85em; background: var(--s2); border: 1px solid var(--bd); border-radius: 4px; padding: 0 4px; color: var(--t); }

/* header */
.top { display: flex; align-items: center; height: var(--hh); padding: 0 16px; border-bottom: 1px solid var(--bd); background: var(--header-bg); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--t); text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand .mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: var(--r); background: var(--a10); border: 1px solid var(--a20); color: var(--a); }
.word span, h2 span { color: var(--a); }

/* content */
main { flex: 1; width: 100%; max-width: 960px; margin: 0 auto; padding: 56px 16px 48px; }
.hero { text-align: center; max-width: 640px; margin: 0 auto 40px; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); line-height: 1.15; letter-spacing: -.025em; margin: 0 0 14px; }
.lead { color: var(--t2); font-size: 1.1rem; margin: 0; }
.lead strong { color: var(--t); }

.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
/* Each card is an <article> whose heading link is stretched over the whole card
   (::after), so the link's accessible name is just the tool name, not the card text. */
.tool {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 24px; border-radius: var(--r-lg);
  background: var(--s1); border: 1px solid var(--bd); box-shadow: var(--shadow-sm);
  color: var(--t); text-decoration: none;
  transition: border-color .15s, box-shadow .15s, transform .15s var(--ease);
}
.tool:hover, .tool:focus-within { border-color: var(--a40); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.tool h2 a { color: inherit; text-decoration: none; }
.tool h2 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; } /* above .go, whose hover filter makes a stacking context */
.tool h2 a:focus-visible { outline: none; }
.tool:has(h2 a:focus-visible) { outline: 2px solid var(--a); outline-offset: 3px; }
.tool-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r); background: var(--a10); color: var(--a); }
.tool h2 { margin: 6px 0 0; font-size: 1.3rem; letter-spacing: -.015em; }
.tool h2 em { font-style: normal; color: var(--t2); font-weight: 600; }
.tool p { margin: 0; color: var(--t2); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 4px 0 0; padding: 0; }
.chips li { font-size: 12px; font-weight: 500; padding: 2px 10px; border-radius: 999px; background: var(--s2); border: 1px solid var(--bd); color: var(--t2); }
.go {
  align-self: flex-start; margin-top: auto;
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 18px;
  border-radius: var(--r); background: var(--a-bg); color: var(--a-on); font-weight: 600;
}
.tool:hover .go, .tool:focus-within .go { filter: brightness(1.08); }

.promise { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px 24px; margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--bd); }
.promise h3 { margin: 0 0 4px; font-size: 1rem; }
.promise p { margin: 0; color: var(--t2); font-size: .95rem; }

.foot { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 24px; padding: 20px 16px 28px; border-top: 1px solid var(--bd); font-size: 14px; }
.foot a { color: var(--t2); }
.foot a:hover { color: var(--a); }

/* 404 */
.notfound { text-align: center; max-width: 520px; margin: 0 auto; }
.notfound .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.notfound .links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border-radius: var(--r); border: 1px solid var(--bd2); background: var(--s1); color: var(--t); text-decoration: none; font-weight: 500; }
.notfound .links a:hover { border-color: var(--a40); background: var(--a10); }

@media (prefers-reduced-motion: reduce) { .tool { transition: none; } .tool:hover, .tool:focus-within { transform: none; } }
