/* tools.css — the free-tools hub. Builds ON brand.css + guide.css, same "day"
   world as the guide, one page over: less reading, more doing. Reuses the
   guide's topbar, card, and tier chassis so it reads as the SAME site. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-display);
  overflow-x: hidden;
}

/* the topbar sits fixed here (no hero photo underneath it) instead of
   absolute-over-hero like the guide, so give the page room under it */
.topbar { position: relative; inset: auto; background: var(--bg); border-bottom: 1px solid var(--hair); }
.topbar .wordmark .label { color: var(--brass-lo); }
.topbar .wordmark .tag { color: var(--fg-muted); }
.topnav .label { color: var(--fg-muted); }
.topnav a:hover .label { color: var(--brass); }
.topnav a.on .label { color: var(--ox); border-bottom: 1px solid color-mix(in srgb, var(--ox) 55%, transparent); padding-bottom: 3px; }

/* ───────────────────────── hero ───────────────────────── */
.thero {
  padding: clamp(48px, 8vh, 88px) clamp(20px, 5vw, 72px) clamp(30px, 5vh, 54px);
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-3) 100%);
}
.thero-inner { max-width: 780px; margin: 0 auto; }
.thero .label { margin-bottom: 16px; display: inline-block; }
.thero h1 {
  margin: 0; font-family: var(--font-editorial); font-weight: 330;
  font-size: clamp(38px, 6.4vw, 76px); line-height: .98; letter-spacing: -0.01em;
  color: var(--fg); text-wrap: balance;
}
.thero h1 em { font-style: italic; color: var(--ox); }
.thero .sub {
  margin: 18px 0 0; max-width: 56ch;
  font-family: var(--font-editorial); font-size: clamp(15.5px, 1.6vw, 18px);
  line-height: 1.55; color: var(--fg-muted);
}
.thero .sub em { font-style: italic; color: var(--fg); }

/* ───────────────────────── the body column ───────────────────────── */
.page { position: relative; background: var(--bg); }
.col { max-width: 900px; margin: 0 auto; padding: 0 24px clamp(40px, 6vh, 64px); }

.sec-h {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .22em; text-transform: uppercase; color: var(--brass-lo);
  margin: clamp(40px, 6vh, 64px) 0 20px; padding-bottom: 12px;
  border-bottom: 1px solid var(--hair);
}
.sec-h:first-child { margin-top: 0; }

/* ───────────────────────── featured: invoice generator ───────────────── */
.feature {
  --accent: var(--brass);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 30px; align-items: center;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  border: 1px solid var(--hair); border-top: 3px solid var(--brass);
  border-radius: var(--r-card); padding: clamp(24px, 3.5vw, 40px);
  box-shadow: var(--shadow-card);
  position: relative; overflow: hidden;
}
@media (max-width: 780px) { .feature { grid-template-columns: 1fr; gap: 22px; } }
.feature .tk {
  font-family: var(--font-mono); font-size: 11px; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--brass-lo); margin-bottom: 14px;
}
.feature h2 {
  margin: 0 0 14px; font-family: var(--font-editorial); font-weight: 380;
  font-size: clamp(27px, 3.8vw, 42px); line-height: 1.04; letter-spacing: -.01em; color: var(--fg);
}
.feature h2 em { font-style: italic; color: var(--ox); }
.feature p {
  margin: 0 0 24px; max-width: 36em;
  font-family: var(--font-display); font-size: 16px; line-height: 1.62; color: #3d3222;
}
.feature p strong { font-weight: 700; color: var(--fg); }
.feature .shot { cursor: zoom-in; margin: 0; }
.feature .shot img {
  width: 100%; display: block; border-radius: 12px; border: 1px solid var(--hair);
  box-shadow: 0 20px 44px rgba(0, 0, 0, .28); transition: transform .2s ease;
}
.feature .shot:hover img { transform: translateY(-3px); }

.sub-dl { font-family: var(--font-mono); font-size: 12px; color: var(--fg-muted); margin-top: 14px; }
.sub-dl a { color: var(--brass-lo); border-bottom: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); text-decoration: none; }
.sub-dl a:hover { color: var(--brass); }

/* ───────────────────────── downloads grid ───────────────────────── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 880px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid { grid-template-columns: 1fr; } }

.tcard {
  display: flex; flex-direction: column;
  background: color-mix(in srgb, var(--bg-2) 92%, transparent);
  border: 1px solid var(--hair); border-top: 3px solid var(--brass);
  border-radius: var(--r-card); padding: 18px;
  box-shadow: var(--shadow-card);
}
.tcard .pv { cursor: zoom-in; margin: 0 0 16px; }
.tcard .pv img {
  width: 100%; display: block; border-radius: 10px; border: 1px solid var(--hair);
  box-shadow: 0 12px 26px rgba(0, 0, 0, .22); transition: transform .2s ease;
}
.tcard .pv:hover img { transform: translateY(-3px); }
.tcard h3 {
  margin: 0 0 8px; font-family: var(--font-editorial); font-weight: 480;
  font-size: 21px; letter-spacing: -.01em; color: var(--fg);
}
.tcard p { margin: 0 0 14px; font-family: var(--font-display); font-size: 14.5px; line-height: 1.55; color: var(--fg-muted); }
.tcard p.flex { flex: 1; }
.tcard .inside { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tcard .inside span {
  font-family: var(--font-mono); font-size: 9px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--brass-lo); border: 1px solid var(--hair);
  border-radius: 999px; padding: 4px 9px;
}
.tcard .btn { align-self: flex-start; font-size: 12.5px; padding: 11px 18px; }

/* the download / open buttons — thin wrapper around brand .btn so the arrow
   glyphs + sizing feel native to this page without new tokens */
.btn.sm { font-size: 13px; padding: 12px 22px; }

/* ───────────────────────── footer ───────────────────────── */
.foot {
  margin-top: 0;
  padding: 34px clamp(20px, 4.5vw, 64px) 44px;
  background: var(--bg-2); border-top: 1px solid var(--hair);
  font-family: var(--font-mono); font-size: 11.5px; color: var(--fg-muted);
  text-align: center; line-height: 1.9;
}
.foot a { color: var(--brass-lo); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--brass) 40%, transparent); }
.foot a:hover { color: var(--brass); }
.foot .dis { display: block; margin-top: 6px; color: var(--fg-muted); }

/* ───────────────────────── lightbox (restyled to the day surface) ─────── */
.lb {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 20, 12, .82); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 32px; cursor: zoom-out;
}
.lb.open { display: flex; }
.lb img {
  max-width: min(92vw, 860px); max-height: 92vh; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5);
}
.lb .x {
  position: fixed; top: 20px; right: 24px;
  font-family: var(--font-mono); font-size: 12px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--cream);
  background: rgba(26, 20, 12, .55); border-radius: 999px; padding: 8px 14px;
}

/* ───────────────────────── responsive ───────────────────────── */
@media (max-width: 700px) {
  .topbar { padding: 16px 18px; }
  .topbar .wordmark .tag { display: none; }
  .topnav { gap: 14px; }
  .topnav .label { font-size: 10px; }
  .thero { padding: 34px 18px 26px; }
  .col { padding: 0 18px clamp(30px, 5vh, 46px); }
  .feature { padding: 22px 18px; }
  .tcard .btn { align-self: stretch; text-align: center; }
}
