/*
Theme Name:   HousePermits
Theme URI:    https://housepermits.com
Description:  Custom standalone theme for HousePermits.com — AI-native permit knowledge base
Author:       HousePermits.com
Author URI:   https://housepermits.com
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  housepermits
Tags:         custom, full-width
*/

/* ============================================
   HOUSEPERMITS.COM — BRAND DESIGN SYSTEM
   ============================================ */

:root {
  --hp-green-darkest:  #04342C;
  --hp-green-dark:     #085041;
  --hp-green-mid:      #0F6E56;
  --hp-green-base:     #1D9E75;
  --hp-green-light:    #5DCAA5;
  --hp-green-lighter:  #9FE1CB;
  --hp-green-lightest: #E1F5EE;

  --hp-text-primary:   #1a1a1a;
  --hp-text-secondary: #5c5c5c;
  --hp-text-muted:     #888;

  --hp-border:         rgba(0,0,0,0.10);
  --hp-border-strong:  rgba(0,0,0,0.18);

  --hp-radius-sm:  6px;
  --hp-radius-md:  10px;
  --hp-radius-lg:  14px;
  --hp-radius-xl:  20px;

  --hp-shadow-sm:  0 1px 3px rgba(0,0,0,0.07);
  --hp-shadow-md:  0 2px 8px rgba(0,0,0,0.09);
}

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

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--hp-text-primary);
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--hp-green-mid); text-decoration: none; }
a:hover { color: var(--hp-green-dark); }

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  line-height: 1.25;
  color: var(--hp-text-primary);
  margin: 0 0 1rem;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.875rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--hp-text-secondary);
  margin: 0 0 1rem;
}

ul, ol { padding-left: 1.5rem; color: var(--hp-text-secondary); line-height: 1.7; }

/* ============================================
   SITE WRAPPER
   ============================================ */

#hp-site { display: flex; flex-direction: column; min-height: 100vh; }
#hp-content { flex: 1; }

/* ============================================
   HEADER & NAV
   ============================================ */

#hp-header {
  background: #ffffff;
  border-bottom: 0.5px solid var(--hp-border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.hp-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 32px;
}

/* Logo */
.hp-logo {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--hp-green-mid);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.hp-logo em { font-style: normal; color: var(--hp-green-dark); }
.hp-logo span { font-weight: 400; color: var(--hp-green-base); font-size: 0.9em; }

/* Nav links */
.hp-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hp-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--hp-text-secondary);
  padding: 6px 12px;
  border-radius: var(--hp-radius-sm);
  transition: all 0.14s ease;
  white-space: nowrap;
}

.hp-nav a:hover,
.hp-nav .current-menu-item > a {
  color: var(--hp-green-dark);
  background: var(--hp-green-lightest);
}

/* Nav CTA */
.hp-nav .hp-nav-cta > a {
  background: var(--hp-green-mid);
  color: var(--hp-green-lightest) !important;
  border-radius: var(--hp-radius-md);
  padding: 7px 16px;
}

.hp-nav .hp-nav-cta > a:hover {
  background: var(--hp-green-dark);
}

/* Mobile hamburger */
.hp-hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}

.hp-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--hp-text-primary);
  border-radius: 2px;
  transition: all 0.2s;
}

/* Mobile nav */
.hp-mobile-nav {
  display: none;
  background: #fff;
  border-top: 0.5px solid var(--hp-border);
  padding: 12px 24px 20px;
}

.hp-mobile-nav.open { display: block; }

.hp-mobile-nav a {
  display: block;
  padding: 10px 0;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--hp-text-secondary);
  border-bottom: 0.5px solid var(--hp-border);
}

.hp-mobile-nav a:last-child { border-bottom: none; }

/* ============================================
   PAGE LAYOUTS
   ============================================ */

/* Full-width — used for homepage, state guides, custom pages */
.hp-layout-full { width: 100%; }

/* Contained — used for blog posts, standard pages */
.hp-layout-contained {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

/* Content + sidebar */
.hp-layout-sidebar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 32px 64px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}

/* ============================================
   BUTTONS
   ============================================ */

.hp-btn {
  display: inline-block;
  background: var(--hp-green-mid);
  color: var(--hp-green-lightest);
  border: none;
  border-radius: var(--hp-radius-md);
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.14s ease, transform 0.1s ease;
  text-decoration: none;
  font-family: inherit;
}

.hp-btn:hover {
  background: var(--hp-green-dark);
  color: var(--hp-green-lightest);
  transform: translateY(-1px);
}

.hp-btn-outline {
  background: transparent;
  color: var(--hp-green-mid);
  border: 1px solid var(--hp-green-base);
}

.hp-btn-outline:hover {
  background: var(--hp-green-lightest);
  color: var(--hp-green-dark);
  transform: translateY(-1px);
}

/* ============================================
   CARDS
   ============================================ */

.hp-card {
  background: #fff;
  border: 0.5px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  padding: 1.25rem;
  transition: border-color 0.14s, box-shadow 0.14s;
}

.hp-card:hover {
  border-color: var(--hp-green-base);
  box-shadow: var(--hp-shadow-sm);
}

/* ============================================
   PERMIT TABLES
   ============================================ */

.hp-permit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.hp-permit-table th {
  text-align: left;
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--hp-text-muted);
  border-bottom: 0.5px solid var(--hp-border-strong);
  padding: 0.6rem 0.75rem;
}

.hp-permit-table td {
  padding: 0.75rem;
  border-bottom: 0.5px solid var(--hp-border);
  color: var(--hp-text-secondary);
  vertical-align: top;
}

.hp-permit-table td:first-child { font-weight: 500; color: var(--hp-text-primary); }
.hp-permit-table tr:last-child td { border-bottom: none; }
.hp-permit-table tr:hover td { background: var(--hp-green-lightest); }

/* ============================================
   HOW-TO STEPS
   ============================================ */

.hp-steps { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.75rem; }

.hp-step { display: flex; gap: 1rem; align-items: flex-start; }

.hp-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--hp-green-lightest);
  border: 1.5px solid var(--hp-green-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--hp-green-dark);
  flex-shrink: 0;
  margin-top: 2px;
}

.hp-step-body h4 { font-size: 0.95rem; font-weight: 500; margin-bottom: 0.25rem; }
.hp-step-body p  { font-size: 0.85rem; margin: 0; }

/* ============================================
   FAQ ACCORDION
   ============================================ */

.hp-faq {
  border: 0.5px solid var(--hp-border);
  border-radius: var(--hp-radius-lg);
  overflow: hidden;
  margin-bottom: 1.75rem;
}

.hp-faq-item { border-bottom: 0.5px solid var(--hp-border); }
.hp-faq-item:last-child { border-bottom: none; }

.hp-faq-q {
  padding: 1rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  transition: background 0.14s;
}

.hp-faq-q:hover { background: var(--hp-green-lightest); }
.hp-faq-a { padding: 0 1.1rem 1rem; font-size: 0.875rem; color: var(--hp-text-secondary); line-height: 1.65; }

/* ============================================
   AI CITATION BANNER
   ============================================ */

.hp-ai-cite {
  background: var(--hp-green-lightest);
  border-left: 3px solid var(--hp-green-base);
  border-radius: 0 var(--hp-radius-md) var(--hp-radius-md) 0;
  padding: 0.75rem 1.1rem;
  margin-bottom: 1.75rem;
  font-size: 0.8rem;
  color: var(--hp-green-dark);
  line-height: 1.55;
}

/* ============================================
   STAT CHIPS
   ============================================ */

.hp-stat {
  background: #f6f5f1;
  border-radius: var(--hp-radius-md);
  padding: 1rem 1.1rem;
}

.hp-stat-label { font-size: 0.72rem; color: var(--hp-text-muted); margin-bottom: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }
.hp-stat-val   { font-size: 1.5rem; font-weight: 500; color: var(--hp-text-primary); margin-bottom: 0.2rem; }
.hp-stat-sub   { font-size: 0.75rem; color: var(--hp-text-muted); }

/* ============================================
   SIDEBAR CARDS
   ============================================ */

.hp-sidebar-card {
  background: #f6f5f1;
  border-radius: var(--hp-radius-lg);
  padding: 1.1rem;
  margin-bottom: 1rem;
}

.hp-sidebar-card h4 { font-size: 0.875rem; font-weight: 500; margin-bottom: 0.5rem; }
.hp-sidebar-card p  { font-size: 0.8rem; margin-bottom: 0.75rem; }

.hp-sidebar-card.accent {
  background: var(--hp-green-lightest);
  border: 0.5px solid var(--hp-green-lighter);
}

.hp-sidebar-card.accent h4 { color: var(--hp-green-dark); }
.hp-sidebar-card.accent p  { color: var(--hp-green-mid); }

/* ============================================
   BREADCRUMBS
   ============================================ */

.hp-breadcrumb {
  font-size: 0.78rem;
  color: var(--hp-text-muted);
  padding: 0.75rem 0;
  margin-bottom: 1rem;
}

.hp-breadcrumb a { color: var(--hp-text-secondary); }
.hp-breadcrumb a:hover { color: var(--hp-green-mid); }
.hp-breadcrumb .sep { margin: 0 0.35rem; color: var(--hp-border-strong); }

/* ============================================
   UTILITY
   ============================================ */

.hp-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hp-green-mid);
  margin-bottom: 0.5rem;
  display: block;
}

.hp-meta-chip {
  font-size: 0.75rem;
  color: var(--hp-text-secondary);
  background: #f6f5f1;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  border: 0.5px solid var(--hp-border);
  display: inline-block;
}

/* WordPress core alignment */
.alignleft  { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin: 0 auto 1rem; }
.wp-caption { max-width: 100%; }

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

#hp-footer {
  background: #f6f5f1;
  border-top: 0.5px solid var(--hp-border);
  padding: 40px 32px 28px;
}

.hp-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}

.hp-footer-logo {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--hp-green-mid);
  display: block;
  margin-bottom: 10px;
}

.hp-footer-logo em { font-style: normal; color: var(--hp-green-dark); }
.hp-footer-logo span { font-weight: 400; color: var(--hp-green-base); font-size: 0.9em; }

.hp-footer-tagline {
  font-size: 12px;
  color: var(--hp-text-muted);
  line-height: 1.6;
  margin: 0 0 14px;
}

.hp-footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--hp-text-muted);
  margin: 0 0 12px;
}

.hp-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.hp-footer-col ul li { margin-bottom: 7px; }

.hp-footer-col ul a {
  font-size: 13px;
  color: var(--hp-text-secondary);
  transition: color 0.14s;
}

.hp-footer-col ul a:hover { color: var(--hp-green-mid); }

.hp-footer-bottom {
  max-width: 1200px;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 0.5px solid var(--hp-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.hp-footer-copy { font-size: 12px; color: var(--hp-text-muted); }

.hp-footer-ai-note {
  font-size: 11px;
  color: var(--hp-text-muted);
  font-family: 'DM Mono', monospace;
}

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

@media (max-width: 1024px) {
  .hp-footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hp-layout-sidebar { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hp-header-inner { padding: 0 20px; }
  .hp-nav { display: none; }
  .hp-hamburger { display: flex; }
  #hp-footer { padding: 32px 20px 24px; }
  .hp-footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .hp-layout-contained { padding: 32px 20px 48px; }
}

@media (max-width: 480px) {
  .hp-footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .hp-footer-bottom { flex-direction: column; align-items: flex-start; }
}
