/*
 * Window and Door Rescue — Blog Stylesheet
 * Site-specific tokens + Webgun blog-base.css
 */

:root {
  --bg-primary: #1A1A1A;
  --bg-secondary: #2D2D2D;
  --bg-card: #2D2D2D;
  --border: #3D3D3D;
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #6B6B6B;
  --accent: #FFC10C;
  --accent-hover: #FFD54F;
  --accent-dim: rgba(255,193,12,0.08);
  --font-display: 'DM Sans', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-height: 60px;
}

/* ── RESET ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── ACCESSIBILITY ── */
.skip-link {
  position: absolute; top: -100%; left: 0; z-index: 200;
  padding: 8px 16px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
}
.skip-link:focus { top: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

/* ── NAV ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(11, 11, 11, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
.nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.4); }

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.nav-logo span { color: var(--accent); }

.nav-links {
  display: flex; align-items: center;
  list-style: none; gap: 32px;
}
.nav-links a {
  position: relative;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: ''; position: absolute; bottom: -4px; left: 0;
  width: 0; height: 1px; background: var(--accent);
  transition: width 0.3s;
}
.nav-links a:hover::after { width: 100%; }
.nav-links a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}

/* ── HAMBURGER ── */
.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; background: none; border: none; padding: 8px;
}
.nav-toggle span {
  display: block; width: 22px; height: 1.5px;
  background: var(--text-primary);
  transition: all 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(4.5px, 4.5px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(4.5px, -4.5px); }

/* ── MOBILE MENU ── */
.mobile-menu {
  position: fixed; top: 0; right: -100%; width: 100%; height: 100vh;
  background: rgba(11, 11, 11, 0.97);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  z-index: 1001;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; gap: 32px;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.mobile-menu.open { right: 0; }
.mobile-menu a {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s;
}
.mobile-menu a:hover { color: var(--accent); }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
}

/* ── BREADCRUMB ── */
.breadcrumb { display: flex; gap: 8px; font-size: 14px; color: var(--text-muted); margin-bottom: 24px; flex-wrap: wrap; }
.breadcrumb a { color: var(--accent); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ── ARTICLE HEADER ── */
.article-header {
  padding: 140px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.article-header h1 {
  font-size: clamp(28px, 4.5vw, 52px);
  color: var(--text-primary);
  margin-bottom: 16px;
  max-width: 800px;
  margin-left: auto; margin-right: auto;
}
.article-header-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.article-header-date {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
}

/* ── ARTICLE BODY ── */
.article-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px 80px;
}
.article-body p {
  color: var(--text-secondary);
  margin-bottom: 20px;
}
.article-body h2 {
  font-size: clamp(22px, 3vw, 32px);
  color: var(--text-primary);
  margin-top: 48px;
  margin-bottom: 20px;
}
.article-body h3 {
  font-size: clamp(18px, 2.5vw, 24px);
  color: var(--text-primary);
  margin-top: 36px;
  margin-bottom: 16px;
}
.article-body ul, .article-body ol {
  color: var(--text-secondary);
  margin-bottom: 20px;
  padding-left: 24px;
}
.article-body li { margin-bottom: 10px; }
.article-body strong { color: var(--text-primary); }
.article-body a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  transition: color 0.3s;
}
.article-body a:hover { color: var(--accent-hover); }

/* ── BLOCKQUOTE ── */
.article-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 20px 24px;
  margin: 32px 0;
  background: var(--accent-dim);
  color: var(--text-primary);
  font-style: italic;
  font-size: 19px;
  line-height: 1.6;
}
.article-body blockquote p {
  color: var(--text-primary);
  margin-bottom: 0;
}

/* ── BACK LINK ── */
.article-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 48px;
  text-decoration: none;
  transition: color 0.3s;
}
.article-back:hover { color: var(--accent-hover); }

/* ── BLOG CTA BANNER ── */
.blog-cta {
  padding: 80px 0;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.blog-cta h2 {
  font-size: clamp(28px, 4vw, 44px);
  margin-bottom: 16px;
}
.blog-cta p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 540px;
  margin: 0 auto 32px;
}
.blog-cta-btn {
  display: inline-block;
  padding: 14px 40px;
  background: var(--accent);
  color: var(--bg-primary);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.3s;
}
.blog-cta-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* ── BLOG INDEX: HEADER ── */
.blog-header {
  padding: 140px 0 60px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.blog-header h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin-bottom: 16px;
}
.blog-header p {
  color: var(--text-secondary);
  font-size: 18px;
  max-width: 540px;
  margin: 0 auto;
}

/* ── BLOG INDEX: GRID ── */
.blog-grid {
  padding: 72px 0 120px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 32px;
}

/* ── BLOG INDEX: CARDS ── */
.blog-card {
  background: var(--bg-card, var(--bg-secondary));
  border: 1px solid var(--border);
  border-top: 3px solid var(--card-border-accent, transparent);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex; flex-direction: column;
  position: relative;
  text-decoration: none;
}
.blog-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0; transition: opacity 0.4s;
}
.blog-card:hover {
  transform: var(--card-hover-transform, translateY(-6px));
  box-shadow: var(--card-hover-shadow, 0 16px 48px rgba(0,0,0,0.4));
  border-color: var(--accent-dim, rgba(255,255,255,0.1));
}
.blog-card:hover::before { opacity: 1; }

.blog-card-icon {
  padding: 32px 32px 0;
  color: var(--accent);
}
.blog-card-icon svg { width: 32px; height: 32px; }

.blog-card-body {
  padding: 20px 32px 32px;
  flex: 1; display: flex; flex-direction: column;
}
.blog-card-meta {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.blog-card-meta span { color: var(--accent); }

.blog-card h2 {
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 12px; line-height: 1.25;
}
.blog-card p {
  color: var(--text-secondary);
  font-size: 15px; line-height: 1.65;
  margin-bottom: 24px; flex: 1;
}
.blog-card-link {
  font-family: var(--font-body);
  font-weight: 600; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s;
}
.blog-card-link:hover { color: var(--accent-hover); }

/* ── FOOTER ── */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  background: var(--bg-primary);
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 24px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
}
.footer-logo span { color: var(--accent); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 0.8rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}
.footer-links a:hover { color: var(--accent); }
.footer-links a:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.footer-copy {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── ANIMATIONS ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
  .article-body { padding: 48px 20px 64px; }
  .blog-grid { grid-template-columns: 1fr; }
  .blog-card-body { padding: 16px 24px 24px; }
}
