/*
Theme Name: Dads Home Tech
Theme URI: https://dadshometech.com
Author: Dads Home Tech
Description: Custom theme for Dads Home Tech — smart home energy tech reviews. Practical workshop/nameplate feel, warm concrete/paper background, copper + teal accents.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: dadshometech
*/

:root {
  --bg: #EDEAE3;
  --surface: #F7F5F0;
  --surface-alt: #FFFFFF;
  --ink: #1E2530;
  --ink-deep: #12161C;
  --ink-soft: #5C5A54;
  --copper: #B5651D;
  --copper-deep: #8F4F16;
  --teal: #3E6B63;
  --border: #D8D3C8;
  --paper: #F3EFE6;
  --paper-soft: #B8AFA0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-rest: 0 1px 2px rgba(30,37,48,0.04);
  --shadow-hover: 0 16px 32px -12px rgba(30,37,48,0.18);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Work Sans', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .wordmark {
  font-family: 'Bitter', Georgia, serif;
  color: var(--ink);
  margin: 0;
  line-height: 1.12;
}
a { color: inherit; }
img, svg { max-width: 100%; display: block; }
.wrap {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 28px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ---------- SCROLL-DRIVEN REVEAL ---------- */
@supports (animation-timeline: view()) {
  .reveal {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 25%;
  }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- NAV ---------- */
header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 30;
}
nav.wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.wordmark {
  font-size: 1.28rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  text-decoration: none;
}
.wordmark span { color: var(--copper); }
.nav-links {
  display: flex;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  transition: border-color .2s ease, color .2s ease;
}
.nav-links a:hover, .nav-links a.current-item { color: var(--ink); border-color: var(--copper); }
.nav-toggle { display: none; background: none; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; }
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ''; display: block; width: 20px; height: 2px; background: var(--ink); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; width: 20px; height: 2px; background: var(--ink); }
.nav-toggle span::after { position: absolute; top: 6px; width: 20px; height: 2px; background: var(--ink); }

@media (max-width: 720px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; gap: 0; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 28px; border-bottom: 1px solid var(--border); }
  .nav-toggle { display: block; }
}

/* ---------- DARK BAND ---------- */
.band-dark {
  background: var(--ink-deep);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.band-dark::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  opacity: 0.045;
  mix-blend-mode: overlay;
  pointer-events: none;
}
.band-dark .wrap { position: relative; z-index: 1; }
.band-dark h1, .band-dark h2, .band-dark h3 { color: var(--paper); }
.band-dark p, .band-dark .lede { color: var(--paper-soft); }
.band-dark .section-tag { background: rgba(213,138,74,0.16); border-color: rgba(213,138,74,0.35); color: var(--copper); }
.band-dark .link-quiet { color: var(--paper-soft); text-decoration-color: rgba(184,175,160,0.4); }

/* ---------- HERO ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero { padding: 84px 0 100px; }
.hero .wrap { display: flex; align-items: center; gap: 64px; }
.hero-copy { flex: 1.1; min-width: 0; animation: rise .75s cubic-bezier(.2,.7,.3,1) both; }
.hero-copy h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 15ch;
  margin-top: 18px;
}
.hero-copy p.lede {
  margin-top: 24px;
  font-size: 1.12rem;
  max-width: 46ch;
}
.hero-actions { margin-top: 34px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.btn {
  display: inline-block;
  background: var(--copper);
  color: #201205;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: 1px solid var(--copper-deep);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { background: var(--copper-deep); transform: translateY(-2px); box-shadow: 0 12px 24px -8px rgba(181,101,29,0.45); }
.link-quiet { font-size: 0.95rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.hero-visual { flex: 1; min-width: 0; position: relative; animation: rise .85s cubic-bezier(.2,.7,.3,1) .12s both; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -50px;
  background:
    radial-gradient(circle at 35% 40%, rgba(213,138,74,0.30), transparent 55%),
    radial-gradient(circle at 65% 65%, rgba(95,167,154,0.22), transparent 55%);
  filter: blur(38px);
  z-index: 0;
}
.panel-frame { position: relative; z-index: 1; }
.toggle-label { font-family: 'Work Sans', sans-serif; font-size: 12px; fill: var(--paper-soft); }

@media (max-width: 800px) {
  .hero .wrap { flex-direction: column-reverse; }
  .hero { padding: 48px 0 60px; }
}

/* ---------- SECTION LABEL ---------- */
.section-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--copper-deep);
  background: rgba(181,101,29,0.10);
  border: 1px solid rgba(181,101,29,0.28);
  padding: 6px 15px;
  border-radius: 999px;
  margin-bottom: 20px;
}

section { padding: 76px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }

h2 { font-size: 1.85rem; font-weight: 700; max-width: 24ch; letter-spacing: -0.01em; }
h2.center { max-width: none; }

/* ---------- BENTO GRID ---------- */
.picks-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(150px, auto);
  gap: 20px;
  margin-top: 40px;
}
.pick-card {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-rest);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
  text-decoration: none;
  display: block;
  color: inherit;
}
.pick-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); border-color: transparent; }
.pick-card.featured {
  grid-column: span 2;
  grid-row: span 2;
  display: flex; flex-direction: column; justify-content: space-between;
  border-top: 4px solid var(--copper);
}
.pick-card.wide { grid-column: span 2; grid-row: span 1; }

@media (max-width: 800px) {
  .picks-grid { grid-template-columns: 1fr; }
  .pick-card.featured, .pick-card.wide { grid-column: span 1; grid-row: span 1; }
}
.pick-kicker {
  display: inline-block;
  font-size: 0.76rem;
  color: var(--teal);
  font-weight: 700;
  background: rgba(62,107,99,0.12);
  padding: 4px 11px;
  border-radius: 999px;
}
.pick-card h3 { font-size: 1.38rem; margin-top: 14px; }
.pick-card p { color: var(--ink-soft); margin-top: 12px; font-size: 0.98rem; }
.pick-card.wide h3 { font-size: 1.1rem; margin-top: 12px; }
.read-link { margin-top: 20px; display: inline-block; font-size: 0.9rem; font-weight: 700; color: var(--copper-deep); text-decoration: none; }
.read-link::after { content: ''; display: block; width: 0; height: 2px; background: var(--copper-deep); transition: width .2s ease; }
.pick-card:hover .read-link::after { width: 100%; }
.empty-state { color: var(--ink-soft); font-size: 0.98rem; margin-top: 24px; }

/* ---------- CATEGORY STRIP ---------- */
.cat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 40px; }
.cat-item {
  padding: 30px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-alt);
  box-shadow: var(--shadow-rest);
  transition: transform .22s ease, box-shadow .22s ease;
  text-decoration: none;
  display: block;
  color: inherit;
}
.cat-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.cat-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(181,101,29,0.12);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.cat-icon svg { width: 22px; height: 22px; stroke: var(--copper-deep); }
.cat-item h3 { font-size: 1rem; font-weight: 600; font-family: 'Work Sans', sans-serif; }
.cat-item p { font-size: 0.88rem; color: var(--ink-soft); margin-top: 7px; }

@media (max-width: 800px) {
  .cat-strip { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 500px) {
  .cat-strip { grid-template-columns: 1fr; }
}

/* ---------- TRUST ---------- */
.trust-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; margin-top: 40px; align-items: start; }
.trust-wrap p { font-size: 1.04rem; }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.checklist li { display: flex; gap: 15px; align-items: flex-start; font-size: 0.98rem; color: var(--paper); }
.checklist .mark {
  flex-shrink: 0;
  width: 16px; height: 16px;
  border-radius: 4px;
  background: var(--teal);
  margin-top: 3px;
}
@media (max-width: 800px) {
  .trust-wrap { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- FOOTER ---------- */
footer.site-footer { padding: 52px 0 40px; border-top: 1px solid var(--border); }
footer .foot-top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 20px; }
footer .nav-links { position: static; display: flex; background: none; border: none; }
footer .nav-links a { padding: 0; border: none; font-size: 0.9rem; }
.disclosure { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--ink-soft); max-width: 62ch; }
.copyright { margin-top: 14px; font-size: 0.8rem; color: var(--ink-soft); }

/* ---------- GENERIC PAGE / ARCHIVE / SINGLE CONTENT ---------- */
.page-header { padding: 56px 0 40px; }
.page-header h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); }
.page-header p.lede { margin-top: 16px; color: var(--ink-soft); font-size: 1.05rem; max-width: 60ch; }

.content-wrap { padding: 20px 0 76px; }
.content-wrap .wrap { max-width: 780px; }
.entry-content { font-size: 1.05rem; }
.entry-content h2 { margin-top: 2em; margin-bottom: 0.6em; font-size: 1.5rem; }
.entry-content h3 { margin-top: 1.6em; margin-bottom: 0.5em; font-size: 1.2rem; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.2em; padding-left: 1.4em; }
.entry-content img { border-radius: var(--radius); margin: 1.5em 0; }
.entry-content a { color: var(--copper-deep); text-decoration: underline; text-underline-offset: 3px; }

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 20px;
}
@media (max-width: 900px) { .archive-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .archive-grid { grid-template-columns: 1fr; } }
.archive-card {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-rest);
  transition: transform .22s ease, box-shadow .22s ease;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}
.archive-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.archive-card .pick-kicker { align-self: flex-start; }
.archive-card h3 { font-size: 1.15rem; margin-top: 12px; }
.archive-card p { color: var(--ink-soft); font-size: 0.95rem; margin-top: 10px; }

/* ---------- REVIEW BOX ---------- */
.review-meta {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 28px;
  margin: 30px 0;
  box-shadow: var(--shadow-rest);
}
.review-meta .stars { color: var(--copper); font-size: 1.2rem; letter-spacing: 2px; }
.review-meta dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 18px; margin: 16px 0 0; font-size: 0.95rem; }
.review-meta dt { color: var(--ink-soft); font-weight: 600; }
.review-meta dd { margin: 0; }
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 30px 0; }
@media (max-width: 700px) { .pros-cons { grid-template-columns: 1fr; } }
.pros-cons > div { border-radius: var(--radius); padding: 22px; }
.pros-cons .pros { background: rgba(62,107,99,0.08); border: 1px solid rgba(62,107,99,0.25); }
.pros-cons .cons { background: rgba(181,101,29,0.06); border: 1px solid rgba(181,101,29,0.2); }
.pros-cons h3 { font-size: 1rem; margin-bottom: 10px; }
.pros-cons ul { margin: 0; padding-left: 1.2em; }
.spec-table { width: 100%; border-collapse: collapse; margin: 30px 0; font-size: 0.95rem; }
.spec-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
.spec-table td:first-child { color: var(--ink-soft); font-weight: 600; width: 40%; }
