/* ============================================================
   BlowFix — Shared Stylesheet
   Loaded by every page with:
     <link rel="stylesheet" href="/css/style.css">
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  --accent: #003153;
  --accent-hover: #002740;
  --accent-soft: #e8eef4;

  --bg: #ffffff;
  --surface: #f7f8fa;
  --surface-2: #eef1f5;
  --border: #e3e6ea;

  --text: #12141a;
  --text-muted: #5b6470;
  --muted: #5b6470;

  --success: #1a7a4b;
  --danger: #c0392b;

  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 4px 16px rgba(16, 24, 40, .06);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5, h6 { margin: 0 0 0.5em; line-height: 1.25; }
p { margin: 0 0 1em; }

a { color: inherit; text-decoration: none; }

img, svg { display: block; max-width: 100%; height: auto; }

button { font-family: inherit; }

/* ---------- Container ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 66px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.01em;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  flex-shrink: 0;
}

.site-nav {
  display: flex;
  gap: 26px;
}

.site-nav a {
  color: var(--text-muted);
  font-size: .95rem;
  font-weight: 500;
  transition: color .15s;
}
.site-nav a:hover { color: var(--accent); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
  padding: 4px 8px;
}

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 28px 0;
  background: var(--surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-footer p {
  margin: 0;
  color: var(--text-muted);
  font-size: .875rem;
}

.footer-nav {
  display: flex;
  gap: 20px;
}

.footer-nav a {
  color: var(--text-muted);
  font-size: .875rem;
  transition: color .15s;
}
.footer-nav a:hover { color: var(--accent); }

/* ---------- Tool page headings (used by every tool page) ---------- */
.tool-head { margin: 8px 0 26px; }

.tool-head h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.2rem);
  margin: 0 0 8px;
  letter-spacing: -.02em;
  font-weight: 800;
  line-height: 1.15;
}

.tool-head h1 .grad {
  background: linear-gradient(90deg, #003153 0%, #2f6bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tool-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 720px;
}

.tool-wrap { max-width: 1000px; margin: 0 auto; }

/* ---------- Buttons ---------- */
.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 10px;
  font-family: inherit;
  font-size: .93rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  box-shadow: 0 6px 16px -6px rgba(0, 49, 83, .45);
}
.btn-main:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.btn-main:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 9px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .12s;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Tool cards ---------- */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.tool-card {
  display: block;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.tool-card .tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: 14px;
}

.tool-card h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  letter-spacing: -.005em;
}

.tool-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.55;
}

/* ---------- Helpers ---------- */
.muted { color: var(--text-muted); }
.text-center { text-align: center; }

/* ---------- Mobile ---------- */
@media (max-width: 760px) {
  .menu-toggle { display: block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 66px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    box-shadow: var(--shadow);
  }
  .site-nav.open { display: flex; }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}