/* article.css — Altitude Roofing */

/* ── Cursor Orb ───────────────────────────────── */
.cursor-orb {
  width: 560px;
  height: 560px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34,168,85,.11) 0%, transparent 70%);
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* ── Article Hero ─────────────────────────────── */
.article-hero {
  background: linear-gradient(145deg, #07101C 0%, #0e1e34 60%, #07101C 100%);
  padding: calc(var(--nav-h) + 3rem) 24px 4.5rem;
  position: relative;
  overflow: hidden;
}
.article-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 60%, rgba(34,168,85,.1) 0%, transparent 55%),
              radial-gradient(ellipse at 80% 20%, rgba(34,168,85,.05) 0%, transparent 50%);
  pointer-events: none;
}
.article-hero .container { position: relative; max-width: 860px; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  font-size: .85rem;
  color: rgba(255,255,255,.5);
}
.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
  transition: opacity .2s;
}
.breadcrumb a:hover { opacity: .8; }
.breadcrumb span { color: rgba(255,255,255,.35); }
.category-badge {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.article-hero h1 {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin: 0 0 20px;
  max-width: 780px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,.5);
  font-size: .9rem;
}
.article-meta span:nth-child(2) { opacity: .35; }

/* ── Trust bar ────────────────────────────────── */
.article-trust-bar {
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
  z-index: 1;
}
.article-trust-bar .container { max-width: 860px; }
.atb-list {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.atb-list li {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 14px 28px 14px 0;
  font-size: .78rem;
  font-weight: 600;
  color: rgba(255,255,255,.5);
  letter-spacing: .02em;
  white-space: nowrap;
}
.atb-list li + li {
  border-left: 1px solid rgba(255,255,255,.08);
  padding-left: 28px;
}
.atb-list li svg {
  flex-shrink: 0;
  stroke: var(--accent);
  opacity: .85;
}

/* ── Fade-scroll for h2 headings ──────────────── */
.fade-scroll {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-scroll.fade-scroll-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Two-column layout ────────────────────────── */
.article-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 56px;
  max-width: 1140px;
  margin: 0 auto;
  padding: 64px 24px 80px;
  align-items: start;
}
.article-content { min-width: 0; }

/* ── TLDR box ─────────────────────────────────── */
.tldr-box {
  border-left: 4px solid var(--accent);
  background: rgba(34,168,85,.07);
  border-radius: 0 10px 10px 0;
  padding: 20px 24px;
  margin-bottom: 40px;
}
.tldr-label {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.tldr-box p {
  margin: 0;
  color: #374151;
  font-size: .95rem;
  line-height: 1.7;
}

/* ── Article typography ───────────────────────── */
.article-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  margin: 44px 0 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(34,168,85,.25);
  scroll-margin-top: 120px;
}
.article-content h2:first-child { margin-top: 0; }
.article-content h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--dark);
  margin: 28px 0 10px;
}
.article-content p {
  color: #374151;
  font-size: 1rem;
  line-height: 1.85;
  margin: 0 0 20px;
}
.article-content ul,
.article-content ol {
  color: #374151;
  line-height: 1.8;
  padding-left: 1.6rem;
  margin: 0 0 20px;
  list-style: disc;
}
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 8px; }
.article-content ul li::marker { color: var(--accent); font-size: 1.1em; }

/* ── Bottom CTA ───────────────────────────────── */
.article-cta {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: url('../images/Roof-2880w.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  padding: 36px 40px;
  margin-top: 52px;
  text-align: center;
}
.article-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(5,12,22,.88) 0%, rgba(7,16,28,.78) 100%);
  pointer-events: none;
}
.article-cta > * { position: relative; z-index: 1; }
.article-cta h3 {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  margin: 0 0 10px;
}
.article-cta p {
  color: rgba(255,255,255,.55);
  margin: 0 0 24px;
  font-size: 1rem;
}
.article-cta .btn {
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  border-radius: 50px;
  padding: 12px 28px;
  text-decoration: none;
  display: inline-block;
  transition: transform .2s, box-shadow .2s;
}
.article-cta .btn:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* ── Sidebar ──────────────────────────────────── */
.article-sidebar {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ── TOC card ─────────────────────────────────── */
.toc-card {
  background: var(--dark);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  padding: 28px;
  overflow: hidden;
}
.toc-card h4 {
  color: rgba(255,255,255,.5);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin: 0 0 18px;
}
.toc-links { display: flex; flex-direction: column; gap: 4px; }
.toc-links a {
  display: block;
  color: rgba(255,255,255,.65);
  text-decoration: none;
  font-size: .88rem;
  line-height: 1.45;
  padding: 7px 12px;
  border-radius: 7px;
  border-left: 2px solid transparent;
  transition: color .2s, background .2s, border-color .2s;
}
.toc-links a:hover {
  color: #fff;
  background: rgba(255,255,255,.06);
}
.toc-links a.toc-active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: rgba(34,168,85,.1);
  font-weight: 600;
}

/* ── Sidebar CTA (shingles background) ────────── */
.sidebar-cta {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: url('../images/Roof-2880w.jpg') center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
}
.sidebar-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(5,12,22,.88) 0%, rgba(7,16,28,.78) 100%);
  pointer-events: none;
}
.sidebar-cta-inner {
  position: relative;
  z-index: 1;
  padding: 32px 24px 28px;
  text-align: center;
}
.sidebar-cta-label {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.sidebar-cta-label::before,
.sidebar-cta-label::after {
  content: '';
  display: block;
  width: 20px;
  height: 1px;
  background: var(--accent);
  opacity: .6;
}
.sidebar-cta-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -.02em;
}
.sidebar-cta-sub {
  color: rgba(255,255,255,.5);
  font-size: .82rem;
  margin: 0 0 22px;
  line-height: 1.6;
}
.sign-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: .92rem;
  padding: 13px 26px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s;
  letter-spacing: .01em;
}
.sign-btn svg { flex-shrink: 0; }
.sign-btn:hover {
  background: #1d964a;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(34,168,85,.4);
}

/* ── FAQ Accordion ────────────────────────────── */
.faq-list { border: 1px solid rgba(14,27,40,.1); border-radius: 14px; overflow: hidden; }
.faq-item {
  border-bottom: 1px solid rgba(14,27,40,.08);
}
.faq-item:last-child { border-bottom: none; }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  font-size: .97rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.4;
  transition: background .2s;
}
.faq-q:hover { background: rgba(34,168,85,.04); }
.faq-q .faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(14,27,40,.06);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .25s, transform .35s cubic-bezier(.22,.68,0,1.2);
}
.faq-q .faq-chevron svg {
  width: 12px;
  height: 12px;
  stroke: var(--dark);
  stroke-width: 2.2;
  transition: stroke .2s;
}
.faq-item.open .faq-q { color: var(--accent); }
.faq-item.open .faq-q .faq-chevron {
  background: rgba(34,168,85,.12);
  transform: rotate(180deg);
}
.faq-item.open .faq-q .faq-chevron svg { stroke: var(--accent); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .38s cubic-bezier(.4,0,.2,1);
}
.faq-item.open .faq-a { max-height: 600px; }
.faq-a-inner {
  padding: 0 22px 20px;
}
.faq-a-inner p {
  font-size: .93rem;
  color: #4B5563;
  line-height: 1.75;
  margin: 0;
}

/* ── Resources hero ───────────────────────────── */
.resources-hero {
  background: linear-gradient(135deg, #07101C 0%, #0d1f35 100%);
  padding: 160px 24px 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.resources-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(34,168,85,.1) 0%, transparent 65%);
  pointer-events: none;
}
.resources-hero .container { position: relative; }
.resources-hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  margin: 0 0 16px;
}
.resources-hero p {
  color: rgba(255,255,255,.65);
  font-size: 1.15rem;
  max-width: 520px;
  margin: 0 auto;
}

/* ── Filter bar (tab-style) ───────────────────────── */
.filter-section {
  background: rgba(255,255,255,.98);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: var(--nav-h);
  z-index: 50;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(0,0,0,.04);
}
.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 2rem;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
}
.filter-bar::-webkit-scrollbar { display: none; }
.filter-pill {
  display: inline-flex;
  align-items: center;
  padding: 1rem 1.125rem;
  border: none;
  border-bottom: 2.5px solid transparent;
  background: transparent;
  color: var(--text-3);
  font-size: .8125rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  letter-spacing: .01em;
}
.filter-pill:hover { color: var(--text); }
.filter-pill.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ── Resource section ─────────────────────────────── */
.resource-section {
  background: #F0F3F7;
  padding: 3rem 2rem 6rem;
}
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1220px;
  margin: 0 auto;
}

/* ── Resource card ────────────────────────────────── */
.resource-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(14,27,40,.08);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  transition: transform .3s cubic-bezier(.22,.68,0,1.2), box-shadow .3s ease, border-color .3s ease;
}
.resource-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  border-color: rgba(34,168,85,.25);
}

/* Invisible full-card link */
.card-link {
  position: absolute;
  inset: 0;
  z-index: 10;
  border-radius: 16px;
}

.resource-card-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Card top: badge + icon */
.resource-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.375rem .875rem;
  border-bottom: 1px solid rgba(14,27,40,.06);
}
.rc-badge {
  display: inline-flex;
  align-items: center;
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(34,168,85,.1);
  border-radius: 50px;
  padding: .3rem .75rem;
  white-space: nowrap;
}
.rc-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--off);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .25s, color .25s;
}
.rc-icon svg {
  width: 15px;
  height: 15px;
  stroke: var(--text-3);
  transition: stroke .25s;
}
.resource-card:hover .rc-icon {
  background: rgba(34,168,85,.12);
}
.resource-card:hover .rc-icon svg {
  stroke: var(--accent);
}

/* Card body */
.resource-card-body {
  padding: 1.125rem 1.375rem .75rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}
.resource-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.42;
  margin: 0;
  letter-spacing: -.01em;
}
.resource-card p {
  font-size: .875rem;
  color: var(--text-3);
  line-height: 1.68;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card footer */
.resource-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .875rem 1.375rem 1.125rem;
  margin-top: auto;
  border-top: 1px solid rgba(14,27,40,.06);
}
.resource-card-footer .read-time {
  display: flex;
  align-items: center;
  gap: .3rem;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-3);
}
.resource-card-footer .read-time svg { opacity: .7; }
.rc-read-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .8125rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .01em;
  transition: gap .25s ease;
}
.rc-read-link svg { transition: transform .25s ease; }
.resource-card:hover .rc-read-link { gap: .5rem; }
.resource-card:hover .rc-read-link svg { transform: translateX(3px); }


.resource-section-head {
  max-width: 1220px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.resource-count {
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .01em;
}
.resource-count span {
  color: var(--accent);
  font-weight: 800;
}

/* ── Responsive ───────────────────────────────── */
@media (max-width: 1000px) {
  .article-wrap {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .article-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .toc-card { flex: 1; min-width: 260px; }
  .sidebar-cta { flex: 0 0 260px; }
  .resource-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .cursor-orb { display: none; }
  .atb-list { gap: 0; }
  .atb-list li { padding: 10px 16px 10px 0; font-size: .72rem; }
  .atb-list li + li { padding-left: 16px; }
  .resource-grid { grid-template-columns: 1fr; }
  .article-hero { padding: calc(var(--nav-h) + 1.5rem) 20px 3rem; }
  .article-wrap { padding: 40px 20px 60px; }
  .article-sidebar { flex-direction: column; }
  .toc-card { min-width: unset; width: 100%; }
  .sidebar-cta { flex: none; width: 100%; max-width: 340px; }
  .resources-hero { padding: 100px 20px 3rem; }
  .resources-hero h1 { font-size: clamp(1.75rem, 7vw, 2.5rem); }
  .filter-bar { padding: 0 1rem; gap: 0; }
  .filter-pill { padding: .875rem .75rem; font-size: .75rem; }
  .resource-section { padding: 2rem 1rem 4rem; }
  .resource-section-head { margin-bottom: 1.25rem; }
  .faq-q { font-size: .9rem; padding: 1.125rem 0; }
  .tldr-box { padding: 1.25rem; }
  .article-content h2 { font-size: 1.25rem; }
  .breadcrumb { font-size: .75rem; }
  .category-badge { font-size: .65rem; }
}
