/*
 * style.css — design system for the developer-tools site.
 * Direction: classy / premium. Deep navy + charcoal base, one disciplined
 * gold accent, warm light body, dark editor panels, system font stack only
 * (fully self-contained, no external downloads).
 */

:root {
  --navy-900: #0a1322;
  --navy-800: #0e1a2e;
  --navy-700: #16263f;
  --navy-600: #1f3a5f;
  --ink: #1c2430;
  --ink-soft: #4a5568;
  --gold: #c19a3d;
  --gold-bright: #d9b45c;
  --gold-soft: #f3e9d2;
  --paper: #faf8f4;
  --card: #ffffff;
  --line: #e6e0d2;
  --editor-bg: #0d1626;
  --editor-line: #22334f;
  --editor-text: #e9e7de;
  --ok: #1e7d46;
  --err: #b3261e;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.05), 0 1px 3px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 10px 25px -12px rgba(10, 19, 34, 0.25), 0 4px 10px -6px rgba(10, 19, 34, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy-800); text-decoration-color: var(--gold); text-underline-offset: 3px; }
a:hover { color: var(--gold); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  box-shadow: 0 6px 24px -10px rgba(10, 19, 34, 0.55);
  border-bottom: 2px solid var(--gold);
}
.header-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.22rem;
  letter-spacing: -0.01em;
}
.brand:hover { color: var(--gold-bright); }
.brand .mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border: 1.5px solid var(--gold);
  border-radius: 9px;
  color: var(--gold-bright);
  font-family: var(--mono);
  font-size: 0.95rem;
  background: rgba(193, 154, 61, 0.08);
}
.brand small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  line-height: 1;
  margin-top: 2px;
}
.main-nav { margin-left: auto; }
.main-nav ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}
.main-nav a {
  color: #d7dce4;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
}
.main-nav a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- layout ---------- */

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 1.25rem 3rem; }

.hero {
  margin: 2rem 0 2.5rem;
  background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-900) 70%);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  color: #eef1f5;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -70px; top: -70px;
  width: 260px; height: 260px;
  border-radius: 50%;
  border: 46px solid rgba(193, 154, 61, 0.14);
}
.kicker {
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 0.8rem;
}
.hero h1 {
  margin: 0 0 0.9rem;
  font-size: 2.35rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 750;
  max-width: 22ch;
}
.hero p { margin: 0; max-width: 58ch; color: #c6cdd8; font-size: 1.05rem; }
.hero .assurances {
  margin-top: 1.4rem;
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: var(--gold-soft);
  font-weight: 600;
}

.section-head { margin: 2.6rem 0 1.1rem; }
.section-head h2 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.25rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.section-head h2::before {
  content: "";
  width: 22px; height: 3px;
  background: var(--gold);
  border-radius: 2px;
  flex: none;
}
.section-head p { margin: 0; color: var(--ink-soft); max-width: 70ch; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.tool-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.2rem 1.05rem;
  text-decoration: none;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  display: block;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--gold);
  color: var(--ink);
}
.tool-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #8a6d1f;
  margin-bottom: 0.7rem;
}
.tool-card h3 { margin: 0 0 0.3rem; font-size: 1.02rem; letter-spacing: -0.01em; }
.tool-card p { margin: 0; font-size: 0.88rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- reserved ad slots (placeholders only) ---------- */

.ad-slot {
  margin: 2rem auto;
  max-width: 728px;
  height: 90px;
  border: 1px dashed #cfc7b4;
  border-radius: 10px;
  background: #f3f0e8;
  color: #9a917c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}
.ad-slot.tall { max-width: 336px; height: 280px; }

/* ---------- tool pages ---------- */

.crumb { font-size: 0.85rem; color: var(--ink-soft); margin: 1.6rem 0 0.4rem; }
.crumb a { color: var(--ink-soft); }
.tool-head h1 { font-size: 2rem; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.tool-head .lede { color: var(--ink-soft); max-width: 72ch; margin: 0 0 1.4rem; font-size: 1.02rem; }

.tool-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.panel-bar {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #fff;
  padding: 0.65rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.panel-bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); flex: none; }
.panel-body { padding: 1.1rem; }

.field-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
}
.editor {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  background: var(--editor-bg);
  color: var(--editor-text);
  border: 1px solid var(--editor-line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  line-height: 1.55;
  tab-size: 2;
}
.editor:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.editor::placeholder { color: #5d6f8c; }
input[type="text"].text-input {
  width: 100%;
  background: var(--editor-bg);
  color: var(--editor-text);
  border: 1px solid var(--editor-line);
  border-radius: 10px;
  padding: 0.6rem 0.9rem;
  font-family: var(--mono);
  font-size: 0.9rem;
}
input[type="text"].text-input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }

.options-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
  margin: 0.9rem 0;
}
.opt { display: flex; flex-direction: column; gap: 0.3rem; }
.opt label { font-size: 0.78rem; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.04em; }
.opt select {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.opt.check { flex-direction: row; align-items: center; gap: 0.45rem; padding-bottom: 0.5rem; }
.opt.check label { font-size: 0.88rem; }

.actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.btn {
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 10px;
  padding: 0.6rem 1.15rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  border-color: #a5832f;
  color: #241a02;
}
.btn-primary:hover { background: linear-gradient(180deg, #e5c268, var(--gold-bright)); }
.btn-dark { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.btn-dark:hover { background: var(--navy-700); }

.status {
  font-size: 0.9rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  margin: 0.4rem 0 0.8rem;
  display: none;
}
.status.show { display: block; }
.status.ok { background: #e6f4ec; color: var(--ok); border: 1px solid #bfe3cf; }
.status.err { background: #fbeae9; color: var(--err); border: 1px solid #f2c6c3; }

.highlight-box {
  background: var(--editor-bg);
  color: var(--editor-text);
  border: 1px solid var(--editor-line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-family: var(--mono);
  font-size: 0.88rem;
  white-space: pre-wrap;
  word-break: break-word;
  min-height: 60px;
}
.highlight-box mark { background: var(--gold); color: #241a02; border-radius: 3px; padding: 0 1px; }

.qr-stage { text-align: center; padding: 1rem 0 0.4rem; }
.qr-stage canvas {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

/* ---------- prose sections ---------- */

.prose { max-width: 78ch; }
.prose h2 { font-size: 1.35rem; letter-spacing: -0.015em; margin: 2.2rem 0 0.6rem; }
.prose p { color: #2c3644; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0.8rem 0; max-width: 78ch; }
.steps li {
  position: relative;
  padding: 0.35rem 0 0.35rem 2.6rem;
  margin-bottom: 0.4rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0; top: 0.3rem;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy-800);
  color: var(--gold-bright);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
code.inline {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--gold-soft);
  padding: 0.08em 0.35em;
  border-radius: 5px;
}

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

.site-footer {
  background: linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: #c6cdd8;
  margin-top: 3rem;
  border-top: 2px solid var(--gold);
}
.footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  padding: 2.4rem 1.25rem 1.6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.6rem;
}
.site-footer h4 {
  color: #fff;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.7rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.35rem; }
.site-footer a { color: #c6cdd8; text-decoration: none; font-size: 0.9rem; }
.site-footer a:hover { color: var(--gold-bright); }
.footer-note {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem 1.8rem;
  font-size: 0.84rem;
  color: #8e99ab;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.1rem;
}

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .hero { padding: 2rem 1.3rem; }
  .hero h1 { font-size: 1.7rem; }
  .tool-head h1 { font-size: 1.55rem; }
  .header-inner { gap: 0.7rem; }
  .main-nav { margin-left: 0; }
  .main-nav a { padding: 0.35rem 0.5rem; font-size: 0.84rem; }
  .panel-body { padding: 0.85rem; }
  .editor { min-height: 140px; }
}
