/* BhorTools — ভোর টুলস | dawn theme: cream + deep orange + gold */
:root {
  --cream: #fdf6ec;
  --cream-2: #fbf1dd;
  --orange: #c2410c;
  --orange-deep: #9a3412;
  --red: #b91c1c;
  --gold: #c6a15b;
  --gold-soft: #e8d5ae;
  --ink: #2b2118;
  --muted: #7a6a58;
  --white: #fffdf8;
  --line: #eadfc8;
  --green: #166534;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(43, 33, 24, 0.07);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans Bengali", "Hind Siliguri", system-ui, -apple-system, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.65;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { line-height: 1.35; }
a { color: var(--orange); }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, var(--orange));
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}
.brand-text { font-size: 23px; font-weight: 700; }
.brand-text b { color: var(--orange); }
.nav { display: flex; gap: 16px; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
}
.nav a:hover { color: var(--orange); }
@media (max-width: 640px) {
  .nav a:nth-child(n+3) { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  text-align: center;
  padding: 52px 0 34px;
  background: linear-gradient(180deg, var(--cream-2), var(--cream));
}
.hero h1 { font-size: 42px; font-weight: 800; }
.hero h1 span { color: var(--orange); }
.hero .tagline { font-size: 19px; color: var(--muted); margin-top: 10px; }
.hero .sub { font-size: 15px; color: var(--muted); margin-top: 6px; }
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 10px;
  justify-content: center; margin-top: 22px;
}
.badge {
  background: var(--white);
  border: 1px solid var(--gold-soft);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--orange-deep);
}

/* ---------- Tool grid ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 26px 0 8px;
}
@media (max-width: 720px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .tool-grid { grid-template-columns: 1fr; } }
.tool-card {
  display: block;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: border-color 0.15s, transform 0.15s;
}
.tool-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.tool-card .icon { font-size: 28px; }
.tool-card h3 { font-size: 18px; margin: 8px 0 4px; }
.tool-card p { font-size: 14px; color: var(--muted); }

/* ---------- Tool sections ---------- */
.tool {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin: 22px 0;
  scroll-margin-top: 76px;
}
.tool-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tool-head .icon { font-size: 24px; }
.tool-head h2 { font-size: 22px; }
.tool-head p { color: var(--muted); font-size: 15px; width: 100%; margin-top: 2px; }
.tool-body { margin-top: 18px; }

label { display: block; font-weight: 600; font-size: 15px; margin: 14px 0 6px; }
label:first-child { margin-top: 0; }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; }

input[type="text"], input[type="number"], input[type="date"],
input[type="url"], textarea, select {
  width: 100%;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--orange);
}
textarea { min-height: 130px; resize: vertical; }
input[type="file"] { width: 100%; font-size: 15px; }
input[type="range"] { width: 100%; accent-color: var(--orange); }
input[type="color"] {
  width: 64px; height: 44px;
  padding: 2px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--orange); }
.check-row { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.check-row label { margin: 0; font-weight: 500; }

.btn {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 11px 26px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 16px;
}
.btn:hover { background: var(--orange-deep); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary {
  background: var(--white);
  color: var(--orange-deep);
  border: 1.5px solid var(--orange);
}
.btn-secondary:hover { background: var(--cream-2); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

.result {
  margin-top: 18px;
  background: var(--cream-2);
  border: 1px solid var(--gold-soft);
  border-radius: 10px;
  padding: 16px;
}
.result:empty { display: none; }
.result h3 { font-size: 17px; margin-bottom: 8px; }
.result p { font-size: 15px; }
.result .big { font-size: 26px; font-weight: 800; color: var(--orange-deep); }
.result .mono { font-family: ui-monospace, "Courier New", monospace; word-break: break-all; }
.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 6px;
}
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.stat .num { font-size: 24px; font-weight: 800; color: var(--orange-deep); }
.stat .lbl { font-size: 13px; color: var(--muted); }

.output-line {
  display: flex;
  gap: 8px;
  align-items: center;
}
.output-line input { flex: 1; }
.copy-btn {
  flex-shrink: 0;
  background: var(--white);
  color: var(--orange-deep);
  border: 1.5px solid var(--orange);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 15px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
}
.copy-btn:hover { background: var(--cream-2); }

.img-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}
@media (max-width: 560px) { .img-compare { grid-template-columns: 1fr; } }
.img-box {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  text-align: center;
}
.img-box img { max-width: 100%; max-height: 260px; border-radius: 6px; }
.img-box p { font-size: 13px; color: var(--muted); margin-top: 6px; }

.qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}
.qr-wrap #qr-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  line-height: 0;
}
.qr-wrap #qr-box img, .qr-wrap #qr-box canvas { max-width: 100%; height: auto; }

.color-row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.swatch {
  width: 64px; height: 44px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
}
.rgb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* ---------- Why free ---------- */
.why-free {
  background: var(--cream-2);
  border: 1px solid var(--gold-soft);
  border-radius: var(--radius);
  padding: 24px;
  margin: 26px 0;
}
.why-free h2 { font-size: 21px; margin-bottom: 8px; }
.why-free p { font-size: 15px; color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 3px solid var(--gold);
  background: var(--white);
  padding: 26px 0 34px;
  margin-top: 10px;
  text-align: center;
}
.site-footer p { font-size: 14px; color: var(--muted); margin-top: 6px; }
.site-footer .links { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
.site-footer .links a { font-weight: 700; text-decoration: none; }
.site-footer .links a:hover { text-decoration: underline; }
