/*
Theme Name: DwellDecoded
Theme URI: https://dwelldecoded.com/
Author: DwellDecoded
Description: A fast, editorial WordPress theme for practical home guidance.
Version: 2.0.0
Requires at least: 6.7
Requires PHP: 8.1
Text Domain: dwelldecoded
*/

:root {
  --ink: #17202a;
  --muted: #667085;
  --paper: #fffdf8;
  --panel: #f4efe6;
  --line: #e5ded3;
  --brand: #b64f32;
  --brand-dark: #7d2e1c;
  --navy: #17324d;
  --white: #ffffff;
  --radius: 18px;
  --shadow: 0 18px 50px rgba(23, 50, 77, .10);
  --content: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
a { color: var(--brand-dark); text-decoration-thickness: .08em; text-underline-offset: .16em; }
a:hover { color: var(--brand); }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; z-index: 9999; top: 10px; left: 10px; width: auto; height: auto; padding: 10px 14px; margin: 0; clip: auto; background: var(--white); }
.wrap { width: min(calc(100% - 36px), var(--content)); margin-inline: auto; }

.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(229,222,211,.85); background: rgba(255,253,248,.95); backdrop-filter: blur(14px); }
.header-inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--navy); text-decoration: none; font-weight: 850; letter-spacing: -.035em; font-size: clamp(1.2rem, 2vw, 1.55rem); }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--white); background: var(--brand); box-shadow: 0 7px 20px rgba(182,79,50,.25); }
.brand-mark svg { width: 23px; height: 23px; }
.site-nav ul { display: flex; align-items: center; gap: 24px; margin: 0; padding: 0; list-style: none; }
.site-nav a { color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 700; }
.site-nav a:hover { color: var(--brand); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); color: var(--ink); }

.hero { overflow: hidden; padding: clamp(62px, 8vw, 110px) 0 72px; color: var(--white); background: var(--navy); }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: clamp(40px, 7vw, 90px); }
.eyebrow { margin: 0 0 14px; color: #f6b7a4; font-size: .78rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { max-width: 800px; margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: 1.02; letter-spacing: -.055em; }
.hero-copy { max-width: 680px; margin: 24px 0 32px; color: #d7e1e9; font-size: clamp(1.04rem, 2vw, 1.22rem); }
.hero-search { display: flex; max-width: 650px; padding: 7px; border-radius: 16px; background: var(--white); box-shadow: var(--shadow); }
.hero-search input { min-width: 0; flex: 1; padding: 13px 15px; border: 0; outline: 0; color: var(--ink); background: transparent; }
.hero-search button { padding: 12px 18px; border: 0; border-radius: 11px; color: var(--white); background: var(--brand); font-weight: 800; cursor: pointer; }
.home-diagram { position: relative; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: radial-gradient(circle at 45% 45%, rgba(246,183,164,.2), transparent 55%); }
.home-diagram::before { content: ""; position: absolute; inset: 18%; transform: rotate(45deg); border: 4px solid #f6b7a4; border-radius: 12px; }
.home-diagram::after { content: ""; position: absolute; inset: 38% 27% 18%; border: 4px solid var(--white); border-top: 0; border-radius: 0 0 10px 10px; }

.section { padding: clamp(64px, 8vw, 100px) 0; }
.section-soft { background: var(--panel); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section-head h2, .archive-title { margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--navy); font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.1; letter-spacing: -.04em; }
.section-head p { max-width: 560px; margin: 0; color: var(--muted); }
.category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.category-tile { position: relative; min-height: 190px; display: flex; flex-direction: column; justify-content: space-between; padding: 24px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); color: var(--ink); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.category-tile::after { content: ""; position: absolute; inset: 0; opacity: .26; background-image: url('assets/images/dwell-category-sprite.webp'); background-size: 400% 200%; background-position: 0 0; background-repeat: no-repeat; }
.category-tile-appliances::after, .visual-appliances { background-position: 33.333% 0 !important; }
.category-tile-cleaning::after, .visual-cleaning { background-position: 66.666% 0 !important; }
.category-tile-troubleshooting::after, .visual-troubleshooting { background-position: 100% 0 !important; }
.category-tile-home-systems::after, .visual-home-systems { background-position: 0 100% !important; }
.category-tile-tools::after, .visual-tools { background-position: 33.333% 100% !important; }
.category-tile-rooms::after, .visual-rooms { background-position: 66.666% 100% !important; }
.category-tile-smart-home::after, .visual-smart-home { background-position: 100% 100% !important; }
.category-tile h3, .category-tile > span { position: relative; z-index: 1; }
.category-tile:hover { transform: translateY(-4px); border-color: #d7b5a9; box-shadow: var(--shadow); color: var(--ink); }
.category-tile:hover::after { opacity:.62; filter:saturate(1.08) contrast(1.04); transform:scale(1.04); transition:opacity .25s ease,transform .25s ease,filter .25s ease; }
.category-tile span { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 13px; color: var(--brand-dark); background: #fae8e2; font-weight: 900; }
.category-tile h3 { margin: 24px 0 0; font-size: 1.1rem; line-height: 1.25; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.post-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: transform .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-media { display: block; aspect-ratio: 16/10; overflow: hidden; background: #dce3e8; }
.post-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover img { transform: scale(1.035); }
.post-card-placeholder { position: relative; height: 100%; display: grid; place-items: center; overflow: hidden; color: var(--navy); background: linear-gradient(135deg,#dbe4ec,#f7e2da); font-size: 2rem; font-weight: 900; }
.post-card-placeholder::before, .entry-visual::before { content: ""; position: absolute; width: 44%; aspect-ratio: 1; border: 3px solid rgba(23,50,77,.25); border-radius: 38% 62% 55% 45%; transform: rotate(-18deg); }
.post-card-placeholder::after, .entry-visual::after { content: ""; position: absolute; width: 30%; aspect-ratio: 1; border-radius: 50%; background: rgba(182,79,50,.76); transform: translate(42%,24%); }
.visual-home-maintenance, .visual-appliances, .visual-cleaning, .visual-troubleshooting, .visual-home-systems, .visual-tools, .visual-rooms, .visual-smart-home { background-image: url('assets/images/dwell-category-sprite.webp'); background-size: 400% 200%; background-repeat: no-repeat; }
.visual-glyph { position: relative; z-index: 1; width: 22%; aspect-ratio: 1; border: 3px solid rgba(23,50,77,.6); border-radius: 8px; transform: rotate(45deg); }
.entry-visual { position: relative; display: grid; place-items: center; min-height: 260px; margin: 0 0 40px; overflow: hidden; border-radius: 24px; background: linear-gradient(135deg,#dbe4ec,#f7e2da); box-shadow: var(--shadow); }
.post-card-body { padding: 22px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 9px; color: var(--muted); font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .06em; }
.post-card h2, .post-card h3 { margin: 0 0 10px; font-family: Georgia, "Times New Roman", serif; color: var(--navy); font-size: 1.35rem; line-height: 1.25; letter-spacing: -.025em; }
.post-card h2 a, .post-card h3 a { color: inherit; text-decoration: none; }
.post-card p { margin: 0; color: var(--muted); font-size: .94rem; }

.content-shell { width: min(calc(100% - 36px), 820px); margin-inline: auto; padding: 64px 0 100px; }
.entry-header { margin-bottom: 34px; }
.entry-header h1 { margin: 0 0 18px; font-family: Georgia, "Times New Roman", serif; color: var(--navy); font-size: clamp(2.35rem, 6vw, 4.6rem); line-height: 1.05; letter-spacing: -.05em; }
.entry-featured { overflow: hidden; margin: 0 0 40px; border-radius: 24px; box-shadow: var(--shadow); }
.entry-content { font-size: 1.08rem; }
.entry-content h2, .entry-content h3 { margin: 2em 0 .6em; color: var(--navy); line-height: 1.2; letter-spacing: -.025em; }
.entry-content h2 { font-family: Georgia, "Times New Roman", serif; font-size: 2rem; }
.entry-content blockquote { margin: 2em 0; padding: 22px 26px; border-left: 5px solid var(--brand); border-radius: 0 14px 14px 0; background: var(--panel); }
.entry-content img { border-radius: 16px; }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 12px; border: 1px solid var(--line); text-align: left; }
.archive-head { padding: 64px 0 32px; }
.archive-description { max-width: 720px; color: var(--muted); }
.pagination { margin-top: 42px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 9px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); text-decoration: none; }
.page-numbers.current { color: var(--white); background: var(--navy); border-color: var(--navy); }
.empty-state { padding: 60px 0 100px; text-align: center; }

.site-footer { padding: 58px 0 28px; color: #cbd6df; background: #10263a; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr .7fr; gap: 50px; }
.site-footer .brand { color: var(--white); }
.site-footer p { max-width: 480px; }
.footer-title { margin: 0 0 14px; color: var(--white); font-size: .86rem; text-transform: uppercase; letter-spacing: .1em; }
.footer-menu { margin: 0; padding: 0; list-style: none; }
.footer-menu li { margin: 7px 0; }
.footer-menu a { color: #cbd6df; text-decoration: none; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); color: #92a5b5; font-size: .86rem; }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .home-diagram { display: none; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .nav-toggle { display: grid; place-items: center; }
  .site-nav { display: none; position: absolute; top: 78px; left: 0; right: 0; padding: 18px; border-bottom: 1px solid var(--line); background: var(--paper); }
  .site-nav.is-open { display: block; }
  .site-nav ul { align-items: flex-start; flex-direction: column; gap: 12px; width: min(calc(100% - 36px), var(--content)); margin-inline: auto; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .header-inner { min-height: 68px; }
  .site-nav { top: 68px; }
  .hero { padding: 54px 0; }
  .hero-search { align-items: stretch; flex-direction: column; }
  .category-grid, .post-grid, .footer-grid { grid-template-columns: 1fr; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .category-tile { min-height: 150px; }
}

/* Strong category focus treatment */
.category-tile::after { pointer-events:none; transition:opacity .25s ease,transform .25s ease,filter .25s ease; }
.category-tile:hover::after, .category-tile:focus-visible::after { opacity:.95 !important; filter:saturate(1.2) contrast(1.1); transform:scale(1.04); }
.category-tile::after { background-size:cover !important; background-position:center !important; }
.category-tile-home-maintenance::after { background-image:url('assets/images/category/home-maintenance.jpg') !important; }
.category-tile-appliances::after { background-image:url('assets/images/category/appliances.jpg') !important; }
.category-tile-cleaning::after { background-image:url('assets/images/category/cleaning.jpg') !important; }
.category-tile-troubleshooting::after { background-image:url('assets/images/category/troubleshooting.jpg') !important; }
.category-tile-home-systems::after { background-image:url('assets/images/category/home-systems.jpg') !important; }
.category-tile-tools::after { background-image:url('assets/images/category/tools.jpg') !important; }
.category-tile-rooms::after { background-image:url('assets/images/category/rooms.jpg') !important; }
.category-tile-smart-home::after { background-image:url('assets/images/category/smart-home.jpg') !important; }
.category-tile:hover h3,.category-tile:focus-visible h3,.category-tile:hover > span,.category-tile:focus-visible > span { color:#fff !important; text-shadow:0 2px 8px rgba(0,0,0,.45); }

/* v2 editorial refresh: quieter chrome, stronger reading rhythm, photo-led cards */
:root { --paper:#fbfaf7; --panel:#f1eee8; --line:#ddd7ce; --brand:#b64f32; --navy:#18324b; --radius:14px; --shadow:0 16px 40px rgba(24,50,75,.09); }
.site-header { background:rgba(251,250,247,.9); }
.brand { font-family:Georgia,"Times New Roman",serif; font-size:clamp(1.25rem,2vw,1.65rem); letter-spacing:-.045em; }
.brand-mark { width:42px; height:42px; border-radius:50%; box-shadow:none; }
.hero { background:linear-gradient(120deg,#16314a 0%,#234b63 58%,#b64f32 180%); }
.hero h1,.section-head h2,.archive-title,.entry-header h1,.post-card h2,.post-card h3 { font-weight:700; }
.hero-search { border:1px solid rgba(255,255,255,.35); }
.home-diagram { border-radius:24px; aspect-ratio:4/3; background:linear-gradient(135deg,rgba(246,183,164,.3),rgba(255,255,255,.08)); }
.home-diagram::before { inset:12%; border-radius:20px; border-width:2px; }
.home-diagram::after { inset:24% 32% 18%; border-width:2px; }
.category-tile { min-height:170px; background:#fff; }
.category-tile::after { opacity:.10; filter:saturate(.75); }
.post-card { border-radius:12px; }
.post-card-media { aspect-ratio:3/2; }
.post-card-body { padding:24px; }
.entry-featured,.entry-visual { border-radius:16px; }
.entry-content { font-family:Georgia,"Times New Roman",serif; font-size:1.16rem; }
.entry-content p,.entry-content ul,.entry-content ol { max-width:700px; }
.entry-content h2,.entry-content h3 { font-family:Inter,ui-sans-serif,system-ui,sans-serif; font-weight:800; }
/* crop contact-sheet edge seams */\n.entry-featured img,.post-card-media img{transform:scale(1.08);transform-origin:center;}\n