/*
Theme Name: EasyTools
Theme URI: https://easytools.fun
Author: EasyTools
Description: A pegboard-styled theme for a daily-use tools site — calculators, kids games, and photo tools hang like labeled tags on a workshop wall. Built for speed and simple content management.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: easytools
*/

/* ============================================
   DESIGN TOKENS
   Concept: a workshop pegboard. Tools hang as
   labeled tags on hooks, grouped by category.
   ============================================ */

:root {
  --paper: #EDEAE0;
  --paper-raised: #F6F4EC;
  --ink: #202A24;
  --ink-soft: #4B564F;
  --peg: #8A8368;
  --line: #D8D2C0;
  --yellow: #F0B41E;
  --yellow-ink: #55420A;
  --teal: #2F6F62;
  --teal-ink: #EAF3F0;
  --clay: #C1503B;
  --clay-ink: #FBEAE6;
  --radius-tag: 10px;
  --shadow-tag: 0 1px 0 rgba(32,42,36,0.06), 0 6px 14px rgba(32,42,36,0.07);
  --shadow-tag-hover: 0 2px 0 rgba(32,42,36,0.08), 0 16px 28px rgba(32,42,36,0.14);
  --font-display: 'Archivo Expanded', 'Archivo', Impact, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
  --max-width: 1120px;
}

/* ============================================
   RESET / BASE
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background-color: var(--paper);
  background-image: radial-gradient(var(--peg) 1px, transparent 1.6px);
  background-size: 26px 26px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  line-height: 1.08;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
}
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ============================================
   HEADER — tool-tray label strip
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper-raised);
  border-bottom: 2px solid var(--ink);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 20px;
}
.site-branding {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.site-branding .logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--yellow);
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 15px;
}
.site-title {
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 0;
}
.site-title a { display:flex; align-items:center; gap:10px; }

.primary-nav ul {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.primary-nav a {
  display: inline-block;
  padding: 8px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  transition: background 0.15s ease, transform 0.15s ease;
}
.primary-nav a:hover {
  background: var(--yellow);
  transform: translateY(-1px);
}
.menu-toggle { display: none; }

@media (max-width: 720px) {
  .primary-nav ul { display: none; }
  .primary-nav.is-open ul {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--paper-raised);
    border-bottom: 2px solid var(--ink);
    padding: 12px 28px 20px;
  }
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: none;
    border: 1px solid var(--ink);
    border-radius: 999px;
    padding: 8px 14px;
  }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  padding: 84px 0 64px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 76px);
  max-width: 900px;
  margin: 0 auto 20px;
}
.hero h1 .accent { color: var(--teal); }
.hero .subhead {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--ink-soft);
  font-size: 19px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-primary { background: var(--yellow); color: var(--yellow-ink); }
.btn-secondary { background: transparent; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 rgba(32,42,36,0.12); }

/* ============================================
   TOOL SECTIONS — pegboard rows of hanging tags
   ============================================ */

.tool-section {
  padding: 56px 0;
  border-top: 1px dashed var(--line);
}
.tool-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}
.tool-section-head h2 { font-size: 28px; margin: 0; }
.tool-section-head .count {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
}
.tool-section[data-cat="calculators"] .tag-hook { background: var(--teal); }
.tool-section[data-cat="kids-games"] .tag-hook { background: var(--clay); }
.tool-section[data-cat="photo-tools"] .tag-hook { background: var(--yellow); }

.tag-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 44px 28px;
}
.tool-tag {
  position: relative;
  padding-top: 26px;
}
.tool-tag:nth-child(odd) .tag-card { transform: rotate(-1.4deg); }
.tool-tag:nth-child(even) .tag-card { transform: rotate(1.1deg); }
.tag-hook {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  z-index: 2;
}
.tag-hook::after {
  content: "";
  position: absolute;
  top: 12px;
  left: 50%;
  width: 1px;
  height: 16px;
  background: var(--ink-soft);
  transform: translateX(-50%);
}
.tag-card {
  display: block;
  background: var(--paper-raised);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-tag);
  padding: 26px 20px 22px;
  text-align: center;
  box-shadow: var(--shadow-tag);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  height: 100%;
}
.tool-tag:hover .tag-card {
  transform: rotate(0deg) translateY(-5px);
  box-shadow: var(--shadow-tag-hover);
}
.tag-icon { font-size: 30px; margin-bottom: 10px; }
.tag-card h3 {
  font-family: var(--font-body);
  text-transform: none;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0;
  margin-bottom: 6px;
}
.tag-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}
.tag-card .go {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 28px;
  max-width: 920px;
  margin: 0 auto;
}
.category-card {
  display: block;
  text-align: center;
  background: var(--paper-raised);
  border: 2px solid var(--ink);
  border-radius: 16px;
  padding: 40px 24px 32px;
  box-shadow: var(--shadow-tag);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.category-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-tag-hover); }
.category-card[data-cat="calculators"] .category-icon { background: var(--teal-ink); }
.category-card[data-cat="kids-games"] .category-icon { background: var(--clay-ink); }
.category-card[data-cat="photo-tools"] .category-icon { background: #FBEFD2; }
.category-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  font-size: 28px;
  margin-bottom: 18px;
}
.category-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}
.category-card p {
  font-size: 14px;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.category-card .count {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
}

.empty-note {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius-tag);
  padding: 20px;
}

/* ============================================
   BLOG SECTION
   ============================================ */

.blog-section { padding: 56px 0 80px; border-top: 1px dashed var(--line); }
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}
.post-card {
  background: var(--paper-raised);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-tag);
  overflow: hidden;
  box-shadow: var(--shadow-tag);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-tag-hover); }
.post-card .thumb { aspect-ratio: 16/9; overflow: hidden; background: var(--line); }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 18px 20px 22px; }
.post-card .eyebrow { display: block; margin-bottom: 8px; }
.post-card h3 { font-family: var(--font-body); text-transform: none; font-size: 18px; letter-spacing: 0; margin-bottom: 8px; }
.post-card p { font-size: 14px; color: var(--ink-soft); }

/* ============================================
   GENERIC PAGE / SINGLE POST CONTENT
   ============================================ */

.content-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 64px 28px 96px;
}
.content-wrap .entry-header { margin-bottom: 32px; }
.content-wrap h1 { font-size: 38px; }
.entry-meta {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.entry-content h2 { font-size: 26px; text-transform: none; margin-top: 1.4em; }
.entry-content h3 { font-size: 20px; text-transform: none; margin-top: 1.2em; }
.entry-content p, .entry-content li { font-size: 17px; }
.entry-content ul, .entry-content ol { padding-left: 22px; list-style: revert; margin-bottom: 1em; }
.entry-content img { border-radius: var(--radius-tag); border: 1.5px solid var(--ink); margin: 12px 0; }
.entry-content a { color: var(--teal); text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote {
  border-left: 3px solid var(--yellow);
  margin: 24px 0;
  padding: 4px 0 4px 20px;
  color: var(--ink-soft);
  font-style: italic;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  border-top: 2px solid var(--ink);
  background: var(--paper-raised);
  padding: 48px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 36px;
}
.footer-col h4 {
  font-size: 13px;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}
.footer-col ul li { margin-bottom: 8px; font-size: 14px; }
.footer-col ul li a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px dashed var(--line);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 560px) {
  .hero { padding: 56px 0 44px; }
  .tool-section, .blog-section { padding: 40px 0; }
  .content-wrap { padding: 44px 20px 64px; }
}
