/*
Theme Name: DSCR House Hacking
Theme URI: https://dscrhousehacking.com
Author: Greg Lee
Description: A lightweight, editable WordPress theme for DSCR House Hacking.
Version: 1.0.0
Text Domain: dscr-house-hacking
*/

:root {
  --forest: #1a3a2a;
  --forest-deep: #10281d;
  --forest-muted: #2b5541;
  --parchment: #f5f0e8;
  --paper: #fffdfa;
  --ink: #1d2b24;
  --muted: #64736a;
  --gold: #c9a84c;
  --gold-light: #e6d49a;
  --line: #d9d3c7;
  --shadow: 0 20px 50px rgba(18, 40, 29, 0.12);
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--parchment); font-family: Lato, Arial, sans-serif; font-size: 17px; line-height: 1.65; }
a { color: var(--forest); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--gold); }
img { max-width: 100%; height: auto; display: block; }
button, input { font: inherit; }

.container { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(780px, calc(100% - 40px)); margin: 0 auto; }
.site-header { background: rgba(16, 40, 29, 0.97); border-bottom: 1px solid rgba(230, 212, 154, 0.18); position: sticky; top: 0; z-index: 50; backdrop-filter: blur(16px); }
.nav-shell { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { color: var(--parchment); font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--gold); }
.primary-nav ul { list-style: none; display: flex; gap: 25px; margin: 0; padding: 0; align-items: center; }
.primary-nav a { color: rgba(245, 240, 232, 0.82); font-size: 0.78rem; font-weight: 700; letter-spacing: 0.09em; text-decoration: none; text-transform: uppercase; }
.primary-nav a:hover, .primary-nav .current-menu-item a { color: var(--gold-light); }
.nav-toggle { display: none; border: 1px solid rgba(230, 212, 154, 0.38); color: var(--parchment); background: transparent; padding: 7px 11px; border-radius: 8px; }

.site-hero { color: var(--parchment); background: radial-gradient(circle at 88% 14%, rgba(201,168,76,.25), transparent 25%), linear-gradient(135deg, #0e281d 0%, #1a3a2a 52%, #123123 100%); padding: clamp(72px, 11vw, 150px) 0 clamp(64px, 9vw, 110px); overflow: hidden; position: relative; }
.site-hero::after { content: ""; position: absolute; width: 580px; height: 580px; border: 1px solid rgba(230,212,154,.14); border-radius: 50%; right: -230px; bottom: -320px; }
.hero-copy { max-width: 790px; position: relative; z-index: 1; }
.eyebrow { display: inline-flex; gap: 9px; align-items: center; color: var(--gold-light); font-size: .75rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }
h1, h2, h3, h4 { color: var(--forest); font-family: "Cormorant Garamond", Georgia, serif; line-height: 1.1; margin: 0 0 .7em; }
h1 { font-size: clamp(2.85rem, 6vw, 5.25rem); font-weight: 700; letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 4vw, 3.1rem); font-weight: 700; letter-spacing: -.035em; }
h3 { font-size: 1.55rem; font-weight: 700; }
.site-hero h1 { color: var(--parchment); max-width: 13ch; margin-top: 18px; }
.hero-summary { max-width: 58ch; color: rgba(245,240,232,.83); font-size: 1.18rem; line-height: 1.65; margin: 0 0 30px; }
.button, .wp-block-button__link { display: inline-block; padding: 13px 19px; background: var(--gold); border: 1px solid var(--gold); border-radius: 3px; color: var(--forest-deep) !important; font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-decoration: none; text-transform: uppercase; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover, .wp-block-button__link:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--forest-deep) !important; transform: translateY(-2px); }
.button-outline { background: transparent; border-color: rgba(245,240,232,.48); color: var(--parchment) !important; margin-left: 10px; }
.button-outline:hover { background: rgba(245,240,232,.1); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.feature-strip { background: var(--gold); color: var(--forest-deep); }
.feature-strip .container { display: grid; grid-template-columns: repeat(3, 1fr); }
.feature-strip p { margin: 0; padding: 18px 22px; border-left: 1px solid rgba(16,40,29,.16); font-size: .78rem; font-weight: 800; letter-spacing: .075em; text-align: center; text-transform: uppercase; }
.feature-strip p:first-child { border-left: 0; }

.section { padding: clamp(60px, 8vw, 110px) 0; }
.section-paper { background: var(--paper); }
.section-forest { color: var(--parchment); background: var(--forest); }
.section-forest h2, .section-forest h3 { color: var(--parchment); }
.section-intro { max-width: 660px; margin-bottom: 40px; }
.section-intro p { color: var(--muted); margin: 0; }
.section-forest .section-intro p { color: rgba(245,240,232,.72); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.post-card { display: flex; flex-direction: column; min-height: 100%; overflow: hidden; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 9px 25px rgba(18,40,29,.06); transition: transform .18s ease, box-shadow .18s ease; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-5px); }
.post-card-image { aspect-ratio: 16 / 9; background: var(--forest-muted); overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.post-card:hover .post-card-image img { transform: scale(1.04); }
.post-card-body { padding: 22px; display: flex; flex: 1; flex-direction: column; }
.post-card .category, .article-meta { color: var(--gold); font-size: .73rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.post-card h3 { font-size: 1.55rem; margin: 9px 0 10px; }
.post-card h3 a { color: var(--forest); text-decoration: none; }
.post-card p { color: var(--muted); font-size: .92rem; line-height: 1.58; margin: 0 0 18px; }
.post-card .read-link { color: var(--forest); font-size: .76rem; font-weight: 800; letter-spacing: .1em; margin-top: auto; text-decoration: none; text-transform: uppercase; }

.page-header, .article-hero { color: var(--parchment); background: linear-gradient(135deg, var(--forest-deep), var(--forest)); padding: clamp(58px, 8vw, 105px) 0 48px; }
.page-header h1, .article-hero h1 { color: var(--parchment); max-width: 19ch; font-size: clamp(2.6rem, 5vw, 4.6rem); }
.article-hero .article-meta { color: var(--gold-light); margin: 0 0 18px; }
.article-hero .back-link { color: rgba(245,240,232,.7); display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .1em; margin-bottom: 22px; text-decoration: none; text-transform: uppercase; }
.featured-image-wrap { width: min(1040px, calc(100% - 40px)); margin: -1px auto 0; }
.featured-image { width: 100%; max-height: 540px; object-fit: cover; }
.article-content, .page-content { padding: clamp(50px, 7vw, 90px) 0; }
.article-content p, .page-content p { margin: 0 0 1.3em; }
.article-content h2, .page-content h2 { margin-top: 1.65em; }
.article-content h3, .page-content h3 { margin-top: 1.6em; }
.article-content ul, .article-content ol, .page-content ul, .page-content ol { margin: 0 0 1.4em; padding-left: 1.35em; }
.article-content li, .page-content li { margin-bottom: .45em; }
.article-content blockquote, .page-content blockquote { border-left: 3px solid var(--gold); color: var(--forest-muted); font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.45rem; font-style: italic; line-height: 1.35; margin: 1.75em 0; padding: .15em 0 .15em 1.1em; }
.article-content table, .page-content table { border-collapse: collapse; display: block; font-size: .92rem; margin: 1.6em 0; overflow-x: auto; width: 100%; }
.article-content th, .article-content td, .page-content th, .page-content td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.article-content th, .page-content th { background: #eee7d9; color: var(--forest); }
.article-content hr, .page-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.2em 0; }
.article-content a, .page-content a { color: var(--forest-muted); font-weight: 700; }

.kit-box { background: var(--forest); border-radius: var(--radius); box-shadow: var(--shadow); color: var(--parchment); margin: 44px 0 0; padding: clamp(28px, 5vw, 50px); text-align: center; }
.kit-box h2 { color: var(--parchment); font-size: clamp(1.8rem, 3vw, 2.7rem); }
.kit-box p { color: rgba(245,240,232,.76); margin: 0 auto 20px; max-width: 58ch; }
.kit-box form { text-align: left; }
.kit-box .formkit-submit { background: var(--gold) !important; color: var(--forest-deep) !important; font-weight: 800 !important; }

.related-posts { background: var(--forest-deep); padding: clamp(54px, 7vw, 90px) 0; }
.related-posts h2 { color: var(--parchment); }
.related-posts .post-card { box-shadow: none; }
.archive-toolbar { align-items: end; display: flex; gap: 20px; justify-content: space-between; margin-bottom: 36px; }
.archive-toolbar p { color: var(--muted); margin: 0; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 48px; }
.pagination .page-numbers { background: var(--paper); border: 1px solid var(--line); color: var(--forest); font-weight: 700; min-width: 40px; padding: 7px 12px; text-align: center; text-decoration: none; }
.pagination .current { background: var(--forest); color: var(--parchment); }

.deal-analyzer { background: #ebe5d8; border: 1px solid var(--line); border-radius: var(--radius); margin: 30px 0; overflow: hidden; }
.calculator-head { background: var(--forest); color: var(--parchment); padding: 26px; }
.calculator-head h2 { color: var(--parchment); font-size: 2rem; margin: 0 0 5px; }
.calculator-head p { color: rgba(245,240,232,.75); font-size: .9rem; margin: 0; }
.calculator-grid { display: grid; gap: 24px; grid-template-columns: 1.1fr .9fr; padding: 26px; }
.calculator-inputs { display: grid; gap: 13px; grid-template-columns: repeat(2, 1fr); }
.calculator-inputs label { color: var(--forest); display: grid; font-size: .78rem; font-weight: 800; gap: 5px; letter-spacing: .05em; text-transform: uppercase; }
.calculator-inputs input { background: var(--paper); border: 1px solid #c8c0b1; border-radius: 4px; color: var(--ink); min-height: 43px; padding: 9px 11px; width: 100%; }
.calculator-results { background: var(--paper); border-radius: 10px; padding: 20px; }
.calculator-results h3 { font-size: 1.55rem; }
.metric { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 15px; padding: 11px 0; }
.metric span { color: var(--muted); font-size: .86rem; }
.metric strong { color: var(--forest); font-family: "Cormorant Garamond", Georgia, serif; font-size: 1.25rem; }
.metric.highlight strong { color: #237047; }
.metric.negative strong { color: #a33e32; }
.calculator-note { color: var(--muted); font-size: .75rem; margin: 16px 0 0; }

.site-footer { background: #0b2017; color: rgba(245,240,232,.68); padding: 58px 0 25px; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1.6fr 1fr 1fr; }
.site-footer .brand { display: inline-block; margin-bottom: 12px; }
.site-footer h3 { color: var(--parchment); font-size: 1.3rem; }
.site-footer p { font-size: .9rem; margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; }
.footer-links li { margin: 7px 0; }
.footer-links a { color: rgba(245,240,232,.72); font-size: .86rem; text-decoration: none; }
.footer-links a:hover { color: var(--gold-light); }
.footer-bottom { border-top: 1px solid rgba(245,240,232,.14); color: rgba(245,240,232,.45); font-size: .76rem; margin-top: 38px; padding-top: 20px; }
.not-found { min-height: 55vh; padding: 110px 0; text-align: center; }

@media (max-width: 850px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; left: 0; padding: 0 20px 20px; position: absolute; right: 0; top: 75px; background: var(--forest-deep); }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { align-items: stretch; flex-direction: column; gap: 0; }
  .primary-nav a { border-top: 1px solid rgba(245,240,232,.09); display: block; padding: 13px 0; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .calculator-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .container, .narrow, .featured-image-wrap { width: min(100% - 30px, 1180px); }
  .feature-strip .container { grid-template-columns: 1fr; }
  .feature-strip p { border-left: 0; border-top: 1px solid rgba(16,40,29,.16); padding: 12px; }
  .feature-strip p:first-child { border-top: 0; }
  .post-grid, .footer-grid, .calculator-inputs { grid-template-columns: 1fr; }
  .footer-grid > :first-child { grid-column: auto; }
  .button-outline { margin-left: 0; }
  .archive-toolbar { align-items: start; flex-direction: column; }
}
