/* ============================================================
   Toolnest — shared design system
   Rename the brand by find/replacing "Toolnest" across the repo.
   ============================================================ */

:root {
  --bg: #0f1220;
  --bg-soft: #161a2e;
  --card: #1b2138;
  --card-hover: #222a47;
  --border: #2b3357;
  --text: #e7e9f3;
  --muted: #9aa3c7;
  --brand: #6d8bff;
  --brand-2: #9b7bff;
  --accent: #43e0a5;
  --danger: #ff6b6b;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: radial-gradient(1200px 600px at 50% -10%, #1d2542 0%, var(--bg) 55%);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(15, 18, 32, 0.72);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; font-size: 18px;
}
.nav a { color: var(--muted); margin-left: 22px; font-weight: 600; font-size: 0.95rem; }
.nav a:hover { color: var(--text); text-decoration: none; }

/* ---------- Hero ---------- */
.hero { text-align: center; padding: 70px 0 40px; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  background: linear-gradient(120deg, #fff 30%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 620px; margin: 0 auto; }
.hero .pill {
  display: inline-block; margin-bottom: 18px; padding: 6px 14px;
  border: 1px solid var(--border); border-radius: 999px;
  font-size: 0.85rem; color: var(--muted); background: var(--bg-soft);
}

/* ---------- Tool grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  padding: 20px 0 60px;
}
.tool-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  background: var(--card-hover);
  border-color: var(--brand);
}
.tool-card .ico {
  width: 44px; height: 44px; border-radius: 11px; margin-bottom: 14px;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, rgba(109,139,255,0.22), rgba(155,123,255,0.22));
  border: 1px solid var(--border);
}
.tool-card h3 { margin: 0 0 6px; font-size: 1.12rem; color: var(--text); }
.tool-card p { margin: 0; color: var(--muted); font-size: 0.95rem; }
.tool-card .soon { color: var(--accent); font-size: 0.8rem; font-weight: 700; }

/* ---------- Tool page layout ---------- */
.tool-main { padding: 36px 0 70px; }
.crumbs { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.tool-head { margin-bottom: 26px; }
.tool-head h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin: 0 0 10px; letter-spacing: -0.02em; }
.tool-head p { color: var(--muted); font-size: 1.05rem; margin: 0; max-width: 680px; }

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.panel + .panel { margin-top: 20px; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; } }

/* ---------- Form controls ---------- */
label { display: block; font-size: 0.85rem; color: var(--muted); margin: 0 0 6px; font-weight: 600; }
.field { margin-bottom: 16px; }
input, textarea, select {
  width: 100%;
  padding: 11px 13px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.98rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); }
textarea { resize: vertical; min-height: 70px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700; font-size: 0.98rem; cursor: pointer;
  transition: filter 0.15s ease, transform 0.05s ease;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.secondary { background: var(--bg-soft); border: 1px solid var(--border); color: var(--text); }
.btn.full { width: 100%; justify-content: center; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- Result / output ---------- */
.result {
  margin-top: 18px; padding: 20px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(67,224,165,0.12), rgba(109,139,255,0.1));
  border: 1px solid var(--border); text-align: center;
}
.result .big { font-size: 2.4rem; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }
.result .label { color: var(--muted); font-size: 0.9rem; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.mt { margin-top: 18px; }
.hidden { display: none !important; }

/* SEO content block under tools */
.seo-content { margin-top: 50px; color: var(--muted); }
.seo-content h2 { color: var(--text); font-size: 1.4rem; margin-top: 32px; }
.seo-content h3 { color: var(--text); font-size: 1.1rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 30px 0;
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.site-footer a { color: var(--muted); }
