/* trackingbot.in — landing page */

:root {
  --bg: #faf9f6;
  --fg: #17171a;
  --muted: #6d6d68;
  --line: #e3e1db;
  --card: #ffffff;
  --card-hover: #ffffff;
  --accent: #1d1d1b;
  --badge-bg: #eeefe9;
  --badge-fg: #4a4a44;
  --shadow: 0 1px 2px rgba(23, 23, 26, .04), 0 12px 28px -18px rgba(23, 23, 26, .35);
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12120f;
    --fg: #f2f1ec;
    --muted: #96968e;
    --line: #2a2a26;
    --card: #191916;
    --card-hover: #1e1e1a;
    --accent: #f2f1ec;
    --badge-bg: #26261f;
    --badge-fg: #b9b9ad;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 36px -22px rgba(0, 0, 0, .9);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

/* the homepage header reads as a bar, like the one above each tool */
.home-header {
  padding: 14px 0 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--fg);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.0625rem;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent);
  position: relative;
  flex: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  border-bottom-color: transparent;
  border-right-color: transparent;
  transform: rotate(45deg);
}

.brand-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
  line-height: 1.2;
  transition: color .18s ease, background-color .18s ease, border-color .18s ease;
}

.nav-icon {
  width: 15px;
  height: 15px;
  flex: none;
  stroke-width: 1.7;
}

.site-nav a:hover { color: var(--fg); background: var(--badge-bg); }
.site-nav a:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }

/* the page you are on reads as the selected tab of the two */
.site-nav a[aria-current="page"] {
  color: var(--fg);
  background: var(--card);
  border-color: var(--line);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(23, 23, 26, .05);
}

.site-nav a[aria-current="page"]:hover { background: var(--card); color: var(--fg); }

/* ---------- hero ---------- */

.hero { padding: 8px 0 56px; }

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.035em;
  font-weight: 650;
}

.hero p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.0625rem;
}

/* ---------- tools ---------- */

.section-title {
  margin: 0 0 16px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.tools-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.tools-head .section-title { margin: 0; }

.tool-search {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.tool-search .search-icon {
  position: absolute;
  left: 11px;
  width: 14px;
  height: 14px;
  color: var(--muted);
  pointer-events: none;
}

.tool-search-input {
  width: 220px;
  height: 34px;
  padding: 0 12px 0 32px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  font-size: 0.8125rem;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.tool-search-input::-webkit-search-cancel-button { display: none; }
.tool-search-input::placeholder { color: var(--muted); }

.tool-search-input:focus {
  border-color: color-mix(in srgb, var(--fg) 30%, var(--line));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 8%, transparent);
}

/* ---------- recently used ---------- */

.recent { margin-bottom: 22px; }

.recent-title {
  margin: 0 0 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.recent-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.recent-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 13px 5px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  color: var(--fg);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(23, 23, 26, .04);
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.recent-link:hover {
  transform: translateY(-1px);
  background: var(--badge-bg);
  border-color: color-mix(in srgb, var(--fg) 22%, var(--line));
}

.recent-link:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }

.recent-icon {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--badge-bg);
  color: var(--fg);
}

.recent-icon svg { width: 13px; height: 13px; }

.tools-empty {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.tools-empty a { color: var(--fg); text-underline-offset: 3px; }

[hidden] { display: none !important; }

.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(248px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease;
}

a.card:hover,
a.card:focus-visible {
  transform: translateY(-2px);
  background: var(--card-hover);
  border-color: color-mix(in srgb, var(--fg) 22%, var(--line));
  box-shadow: 0 2px 3px rgba(23, 23, 26, .05), 0 22px 40px -24px rgba(23, 23, 26, .45);
}

a.card:focus-visible {
  outline: 2px solid var(--fg);
  outline-offset: 2px;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  color: var(--fg);
}

.card-icon svg { width: 19px; height: 19px; }

.badge {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--badge-fg);
  background: var(--badge-bg);
  border-radius: 999px;
  padding: 3px 8px;
}

.card-title {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card-desc {
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.card-link {
  margin-top: auto;
  padding-top: 16px;
  font-size: 0.875rem;
  font-weight: 550;
  color: var(--fg);
}

a.card:hover .card-link span { transform: translateX(2px); }
.card-link span { display: inline-block; transition: transform .18s ease; }

.card-ghost {
  background: transparent;
  border-style: dashed;
  box-shadow: none;
  color: var(--muted);
}

.card-ghost .card-icon { color: var(--muted); }
.card-ghost .card-title { color: var(--muted); }

.forum-note {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

.forum-note a { color: var(--fg); text-underline-offset: 3px; }
.forum-note a:hover { text-decoration-thickness: 2px; }

/* ---------- footer ---------- */

.site-footer {
  margin-top: auto;
  padding-top: 56px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  color: var(--muted);
  font-size: 0.8125rem;
}

.dot { opacity: .6; }

.site-footer a { color: inherit; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--fg); }

@media (max-width: 560px) {
  .page { padding: 20px 18px 40px; }
  .hero { padding-bottom: 40px; }
  .brand-note { display: none; }
  .header-right { gap: 8px; }
  .site-nav a { padding: 6px 10px; gap: 5px; }
  .tools-head { gap: 10px; }
  .tool-search { flex: 1 1 100%; }
  .tool-search-input { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
