/*
Theme Name: Gizmo 421
Description: Dark neon-green theme for gizmo421.info — free browser tools + blog.
Author: Juan
Version: 1.1
License: GNU General Public License v2 or later
*/

:root {
  --bg: #070b10;
  --panel: #0d131b;
  --panel-2: #101823;
  --border: #1d2a39;
  --accent: #39ff14;
  --accent-dim: #2bd910;
  --accent-soft: rgba(57, 255, 20, 0.12);
  --text: #e8eef4;
  --muted: #8ba0b5;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px 300px at 85% -5%, rgba(57, 255, 20, 0.07), transparent 70%),
    radial-gradient(500px 260px at 10% 0%, rgba(57, 255, 20, 0.04), transparent 70%),
    var(--bg);
}

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

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 22px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #000; padding: 8px 14px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 16, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px; gap: 18px;
}

.brand {
  font-family: var(--mono);
  font-size: 22px; font-weight: 700; letter-spacing: 0.5px;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); text-shadow: 0 0 14px rgba(57, 255, 20, 0.55); }
.brand:hover span { text-decoration: underline; }

.nav-list {
  display: flex; align-items: center; gap: 6px;
  list-style: none; margin: 0; padding: 0;
}
.nav-list li { margin: 0; }
.nav-list a {
  display: block;
  padding: 9px 14px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px; font-weight: 500;
}
.nav-list a:hover, .nav-list .current_page_item a, .nav-list .current-menu-item a {
  color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

/* ---------- nav dropdowns ---------- */
.nav-list li { position: relative; }
.nav-list .sub-menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 215px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  list-style: none; margin: 6px 0 0;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55);
  z-index: 60;
}
.nav-list li:hover > .sub-menu,
.nav-list li:focus-within > .sub-menu { display: block; }
.nav-list .sub-menu::before {
  content: "";
  position: absolute; top: -7px; left: 0; right: 0;
  height: 7px;
  background: transparent;
}
.nav-list .sub-menu li a { padding: 8px 12px; font-size: 14px; border-radius: 7px; }
.nav-list .sub-menu li a:hover { background: var(--accent-soft); }
.nav-list .menu-item-has-children > a::after {
  content: " \25BE";
  font-size: 10.5px;
  vertical-align: 1px;
}

/* mobile nav: hamburger + collapsible drawer (see assets/nav.js) */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; width: 100%;
  background: var(--accent); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .header-inner { min-height: 56px; }
  .nav-toggle { display: inline-flex; }
  .main-nav { display: none; }
  .main-nav.nav-open {
    display: block;
    position: fixed; top: 57px; left: 0; right: 0;
    max-height: calc(100vh - 57px); overflow-y: auto;
    background: rgba(7, 11, 16, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px 24px;
    z-index: 60;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 2px; flex-wrap: nowrap; }
  .nav-list a { padding: 11px 10px; font-size: 16px; }
  .nav-list .sub-menu {
    display: none;
    position: static; min-width: 0;
    background: transparent; border: none; box-shadow: none;
    padding: 0 0 0 14px; margin: 0;
  }
  .nav-list li.menu-open > .sub-menu { display: block; }
  .nav-list .sub-menu li a { display: block; padding: 7px 10px; font-size: 14px; }
  .nav-list .menu-item-has-children > a::after { float: right; transition: transform 0.2s; }
  .nav-list li.menu-open > a::after { transform: rotate(180deg); }
}

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

.hero { padding: 84px 0 64px; text-align: center; }

.hero-badge {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(57, 255, 20, 0.35);
  border-radius: 999px;
  padding: 6px 16px;
  margin: 0 0 26px;
}

.hero h1 {
  font-size: clamp(34px, 6vw, 58px);
  font-weight: 800;
  line-height: 1.12;
  margin: 0 0 20px;
  letter-spacing: -1px;
}

.hero h1 .accent {
  color: var(--accent);
  text-shadow: 0 0 24px rgba(57, 255, 20, 0.45);
}

.hero-sub {
  max-width: 640px; margin: 0 auto 32px;
  color: var(--muted); font-size: 19px;
}

.hero-actions { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #04140a;
  font-weight: 700; font-size: 16px;
  padding: 12px 26px;
  border-radius: 10px;
  box-shadow: 0 0 22px rgba(57, 255, 20, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 0 30px rgba(57, 255, 20, 0.5); text-decoration: none; }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); }

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

.section-title {
  font-family: var(--mono);
  font-size: 15px; font-weight: 600;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin: 0 0 22px;
}

.tools-section { padding: 30px 0 40px; }
.blog-section { padding: 30px 0 70px; }

/* ---------- tool cards ---------- */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.tool-card {
  display: block;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  color: var(--text);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}
.tool-card:hover {
  text-decoration: none;
  transform: translateY(-3px);
  border-color: rgba(57, 255, 20, 0.5);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 18px rgba(57, 255, 20, 0.12);
}

.tool-icon {
  font-family: var(--mono);
  font-size: 15px; font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(57, 255, 20, 0.3);
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  margin-bottom: 16px;
}

.tool-card h3 { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: var(--text); }
.tool-card p { margin: 0 0 16px; color: var(--muted); font-size: 15.5px; }

.tool-cta {
  font-family: var(--mono);
  font-size: 13.5px; font-weight: 600;
  color: var(--accent);
}
.post-card .tool-cta { display: inline-block; margin-top: 4px; }

/* ---------- blog ---------- */

.page-title { margin: 44px 0 28px; }

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.post-card:hover { border-color: rgba(57, 255, 20, 0.35); }

.post-card h2, .post-card h3 { margin: 0 0 10px; font-size: 20px; line-height: 1.3; }
.post-card h2 a, .post-card h3 a { color: var(--text); }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--accent); text-decoration: none; }

.post-meta {
  font-family: var(--mono);
  font-size: 12.5px; letter-spacing: 0.8px;
  color: var(--muted);
  margin: 0 0 12px;
}

.pagination { margin: 26px 0 60px; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
  font-family: var(--mono);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 13px;
  color: var(--muted);
  font-size: 14px;
}
.pagination .current { color: var(--accent); border-color: rgba(57, 255, 20, 0.4); background: var(--accent-soft); }
.pagination a:hover { color: var(--accent); text-decoration: none; border-color: rgba(57, 255, 20, 0.4); }

/* ---------- single post ---------- */

.single-post-wrap { max-width: 760px; margin: 0 auto; padding: 54px 22px 80px; }

.single-post-wrap h1 {
  font-size: clamp(28px, 4.5vw, 40px);
  line-height: 1.2;
  margin: 0 0 14px;
  letter-spacing: -0.5px;
}

.entry-content { font-size: 17.5px; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.2em 0; padding: 4px 0 4px 20px;
  color: var(--muted);
  background: var(--accent-soft);
  border-radius: 0 10px 10px 0;
}
.entry-content code {
  font-family: var(--mono);
  background: var(--panel-2);
  border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 6px;
  font-size: 0.9em;
}
.entry-content pre {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 18px;
  overflow-x: auto;
}
.entry-content pre code { background: none; border: none; padding: 0; }
.entry-content img { max-width: 100%; border-radius: 10px; }

.post-nav {
  display: flex; justify-content: space-between; gap: 14px;
  border-top: 1px solid var(--border);
  margin-top: 50px; padding-top: 20px;
  font-size: 15px;
}

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

.page-shell { padding: 44px 0 70px; }

.page-shell > .wrap > h1.page-heading {
  font-family: var(--mono);
  font-size: 30px; font-weight: 700;
  margin: 0 0 22px;
  letter-spacing: 0.5px;
}

.tool-shell {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  overflow-x: auto;
}

.tool-shell .gizmo-body {
  border-radius: 10px;
  overflow: hidden;
}

/* plain text pages (privacy policy etc.) */

.plain-content { max-width: 760px; }
.plain-content h2 { font-size: 24px; margin-top: 1.6em; }
.plain-content p, .plain-content li { color: #c6d3de; font-size: 16.5px; }
.plain-content a { word-break: break-word; }

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

.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(13, 19, 27, 0.6);
  margin-top: 40px;
  padding: 44px 0 34px;
}

.footer-inner { text-align: center; }

.footer-brand {
  font-family: var(--mono);
  font-size: 20px; font-weight: 700;
  margin-bottom: 10px;
}
.footer-brand span { color: var(--accent); }

.footer-tag { color: var(--muted); font-size: 15px; max-width: 520px; margin: 0 auto 20px; }

.footer-nav { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; margin-bottom: 22px; }
.footer-nav a { color: var(--muted); font-size: 15px; }
.footer-nav a:hover { color: var(--accent); }

.copyright { font-family: var(--mono); color: #8b9db3; font-size: 13px; margin: 0; }

/* ---------- wp core bits ---------- */

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px);
}

/* ---------- homepage collapsible sections ---------- */
button.section-toggle {
	display: flex; width: 100%;
	justify-content: space-between; align-items: center;
	background: none; border: none; padding: 0; margin: 0 0 22px;
	cursor: pointer; text-align: left;
}
button.section-toggle:hover .tog-chev, button.section-toggle:focus-visible .tog-chev { border-top-color: var(--accent-dim); }
button.section-toggle .section-title { margin: 0; }
.tog-meta { display: flex; align-items: center; gap: 10px; }
.tog-count { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 1px; }
.tog-chev { width: 0; height: 0; border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 6px solid var(--accent); transition: transform .3s ease; }
.tool-grid-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; }
.tool-grid-clip { overflow: hidden; }
/* state rules as #id.class (house convention) */
#fp-calculators-grid.open, #fp-tools-grid.open, #fp-network-tools-grid.open { grid-template-rows: 1fr; }
#fp-calculators-toggle.open .tog-chev, #fp-tools-toggle.open .tog-chev, #fp-network-tools-toggle.open .tog-chev { transform: rotate(180deg); }

/* homepage section heading reset (a11y heading order) */
.fp-section-h { margin: 0; font-size: inherit; font-weight: inherit; }
