/* ═══════════════════════════════════════════════════════
   REMODELSD — California Architectural Blog Stylesheet
   Instrument Serif + Figtree | Linen / Copper / Sage
   v1.0 — Matches index.html premium design
   ═══════════════════════════════════════════════════════ */

:root {
    --linen: #f2ece4;
    --cream: #faf7f2;
    --parchment: #fffdf9;
    --ink: #1a1714;
    --graphite: #2e2b27;
    --warm-gray: #5c5651;
    --dust: #948d86;
    --mist: #c4bdb5;
    --copper: #b07545;
    --copper-hover: #c4864f;
    --copper-glow: rgba(176,117,69,.08);
    --copper-strong: rgba(176,117,69,.15);
    --sage: #6b7c5e;
    --sage-light: rgba(107,124,94,.1);
    --r: 12px;
    --r-lg: 18px;
    --r-xl: 24px;
    --r-pill: 100px;
    --sh-sm: 0 1px 2px rgba(26,23,20,.04);
    --sh: 0 2px 8px rgba(26,23,20,.05), 0 8px 24px rgba(26,23,20,.04);
    --sh-lg: 0 4px 16px rgba(26,23,20,.06), 0 16px 48px rgba(26,23,20,.05);
}

/* ── RESET (scoped to .ca-blog) ── */
.ca-blog *, .ca-blog *::before, .ca-blog *::after { box-sizing: border-box; }

/* ── BODY ── */
.ca-blog-body {
    font-family: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ink);
    background: var(--linen);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* Grain overlay */
.ca-blog-body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9998;
    opacity: .02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px;
}

/* ── BLOG HERO ── */
.ca-blog-hero {
    position: relative;
    padding: clamp(48px, 7vw, 80px) clamp(16px, 4vw, 40px) clamp(32px, 5vw, 56px);
    text-align: center;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(176,117,69,.04) 0%, transparent 60%);
}
.ca-blog-hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(176,117,69,.05) 0%, rgba(176,117,69,.02) 30%, transparent 60%);
    pointer-events: none;
}

/* Breadcrumbs */
.ca-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 500;
    color: var(--dust);
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.ca-breadcrumbs a {
    color: var(--copper);
    text-decoration: none;
    transition: color .2s;
}
.ca-breadcrumbs a:hover { color: var(--copper-hover); }
.ca-breadcrumbs .sep { color: var(--mist); margin: 0 2px; }

/* Hero title */
.ca-blog-hero h1 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.9rem, 5vw, 3rem);
    color: var(--ink);
    max-width: 720px;
    margin: 0 auto 16px;
    letter-spacing: -.015em;
    line-height: 1.15;
}

/* Meta row */
.ca-blog-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-size: .82rem;
    color: var(--dust);
    flex-wrap: wrap;
}
.ca-blog-meta svg {
    width: 14px; height: 14px;
    stroke: var(--copper);
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vertical-align: -2px;
    margin-right: 3px;
}
.ca-blog-meta .tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--r-pill);
    background: var(--cream);
    border: 1px solid rgba(26,23,20,.05);
    font-weight: 600;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--warm-gray);
}

/* ── CONTENT CARD ── */
.ca-blog-content {
    max-width: 780px;
    margin: -20px auto 0;
    padding: clamp(28px, 5vw, 56px) clamp(20px, 4vw, 48px);
    background: var(--parchment);
    border: 1px solid rgba(26,23,20,.04);
    border-radius: var(--r-xl);
    box-shadow: var(--sh-lg);
    position: relative;
    z-index: 1;
}
.ca-blog-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--copper), var(--sage), var(--copper));
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    opacity: .5;
}

/* Typography */
.ca-blog-content h2 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    color: var(--ink);
    margin: 2.5rem 0 1rem;
    line-height: 1.2;
    letter-spacing: -.01em;
    border-bottom: none;
    padding-bottom: 0;
}
.ca-blog-content h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    color: var(--graphite);
    margin: 2rem 0 .75rem;
    line-height: 1.25;
}
.ca-blog-content h4 {
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--graphite);
    margin: 1.5rem 0 .5rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .85rem;
}
.ca-blog-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.3rem;
    color: var(--graphite);
}
.ca-blog-content strong { color: var(--ink); }
.ca-blog-content a {
    color: var(--copper);
    text-decoration: underline;
    text-decoration-color: rgba(176,117,69,.3);
    text-underline-offset: 3px;
    transition: text-decoration-color .2s;
}
.ca-blog-content a:hover { text-decoration-color: var(--copper); }

.ca-blog-content ul, .ca-blog-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    line-height: 1.8;
}
.ca-blog-content li {
    margin-bottom: .6rem;
    font-size: 1.02rem;
    color: var(--graphite);
}
.ca-blog-content li::marker { color: var(--copper); }
.ca-blog-content blockquote {
    border-left: 3px solid var(--copper);
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: var(--copper-glow);
    border-radius: 0 var(--r) var(--r) 0;
    font-style: italic;
    color: var(--warm-gray);
}
.ca-blog-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--r-lg);
    box-shadow: 0 4px 20px rgba(26,23,20,.08);
    margin: 1.5rem 0;
}
.ca-blog-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: .95rem;
}
.ca-blog-content th {
    background: var(--cream);
    text-align: left;
    padding: 10px 14px;
    font-weight: 600;
    border-bottom: 2px solid var(--mist);
    font-size: .85rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--warm-gray);
}
.ca-blog-content td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(26,23,20,.06);
    color: var(--graphite);
}
.ca-blog-content tr:hover td { background: rgba(176,117,69,.02); }

/* ── CALCULATOR LINK BOX ── */
.ca-calc-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    margin: 2rem 0;
    background: linear-gradient(135deg, var(--copper-glow), var(--sage-light));
    border: 1px solid rgba(176,117,69,.12);
    border-radius: var(--r-lg);
    transition: transform .2s, box-shadow .2s;
}
.ca-calc-box:hover { transform: translateY(-2px); box-shadow: var(--sh); }
.ca-calc-box-icon {
    flex-shrink: 0;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    background: var(--copper);
    border-radius: var(--r);
    color: #fff;
    font-size: 1.2rem;
}
.ca-calc-box-text { flex: 1; }
.ca-calc-box-text strong {
    display: block;
    font-size: .95rem;
    color: var(--ink);
    margin-bottom: 2px;
}
.ca-calc-box-text span {
    font-size: .82rem;
    color: var(--dust);
}
.ca-calc-box-arrow {
    flex-shrink: 0;
    color: var(--copper);
    font-weight: 700;
    font-size: 1.2rem;
    transition: transform .2s;
}
.ca-calc-box:hover .ca-calc-box-arrow { transform: translateX(4px); }

/* ── FAQ ACCORDION ── */
.ca-faq { margin: 2.5rem 0; }
.ca-faq h2 { margin-bottom: .5rem; }
.ca-faq-item {
    border-bottom: 1px solid rgba(26,23,20,.06);
}
.ca-faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    font-weight: 600;
    font-size: 1rem;
    color: var(--ink);
    cursor: pointer;
    list-style: none;
}
.ca-faq-item summary::-webkit-details-marker { display: none; }
.ca-faq-item summary::after {
    content: '+';
    font-size: 1.3rem;
    color: var(--copper);
    transition: transform .3s;
    flex-shrink: 0;
    margin-left: 12px;
}
.ca-faq-item[open] summary::after {
    content: '\2212';
    transform: rotate(180deg);
}
.ca-faq-item .ca-faq-answer {
    padding: 0 0 16px;
    font-size: .98rem;
    color: var(--warm-gray);
    line-height: 1.7;
}

/* ── CTA BAND ── */
.ca-cta-band {
    margin: 3rem -clamp(20px, 4vw, 48px);
    padding: clamp(36px, 5vw, 56px) clamp(20px, 4vw, 40px);
    background: linear-gradient(135deg, var(--ink) 0%, var(--graphite) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ca-cta-band::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(176,117,69,.08) 0%, transparent 50%);
    pointer-events: none;
}
.ca-cta-band h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1.4rem, 3vw, 2rem);
    color: #fff;
    margin-bottom: 8px;
    position: relative;
}
.ca-cta-band p {
    color: rgba(255,255,255,.6) !important;
    margin-bottom: 24px !important;
    font-size: .95rem !important;
    position: relative;
}
.ca-cta-band .ca-btn-copper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: var(--copper);
    color: #fff;
    border-radius: var(--r-pill);
    font-family: 'Figtree', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    transition: all .3s cubic-bezier(.16,1,.3,1);
    box-shadow: 0 4px 24px rgba(176,117,69,.3);
    position: relative;
}
.ca-cta-band .ca-btn-copper:hover {
    background: var(--copper-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(176,117,69,.35);
}
.ca-cta-band .ca-cta-sub {
    display: block;
    margin-top: 14px;
    font-size: .78rem;
    color: rgba(255,255,255,.4) !important;
}

/* ── RELATED ARTICLES ── */
.ca-related {
    margin: 2.5rem 0 0;
    padding: 24px;
    background: var(--cream);
    border: 1px solid rgba(26,23,20,.05);
    border-radius: var(--r-lg);
}
.ca-related h3 {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 1.2rem;
    margin: 0 0 12px;
}
.ca-related ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ca-related li {
    margin-bottom: 8px;
    padding-left: 0;
}
.ca-related a {
    color: var(--copper);
    font-weight: 500;
    text-decoration: none;
    font-size: .95rem;
    transition: color .2s;
}
.ca-related a:hover { color: var(--copper-hover); text-decoration: underline; }
.ca-related a::before { content: '\2192\00a0'; color: var(--mist); }

/* ── FOOTER ── */
.ca-footer {
    padding: 36px clamp(16px, 4vw, 40px);
    text-align: center;
    color: var(--dust);
    font-size: .82rem;
    border-top: 1px solid rgba(26,23,20,.05);
    background: var(--linen);
    font-family: 'Figtree', sans-serif;
}
.ca-footer a {
    color: var(--copper);
    font-weight: 500;
    text-decoration: none;
}
.ca-footer a:hover { text-decoration: underline; }
.ca-foot-links {
    display: flex;
    justify-content: center;
    gap: 28px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.ca-footer p { margin-bottom: 4px; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .ca-blog-hero { padding: 36px 16px 24px; }
    .ca-blog-hero h1 { font-size: 1.6rem; }
    .ca-blog-content { margin: -10px 8px 0; padding: 24px 18px; border-radius: var(--r-lg); }
    .ca-blog-content h2 { font-size: 1.3rem; }
    .ca-blog-content h3 { font-size: 1.1rem; }
    .ca-blog-content p { font-size: 1rem; }
    .ca-calc-box { flex-direction: column; text-align: center; }
    .ca-cta-band { margin: 2rem -18px; padding: 32px 18px; }
    .ca-breadcrumbs { font-size: .72rem; }
    .ca-blog-meta { gap: 10px; }
    .ca-foot-links { gap: 16px; }
}

@media (max-width: 480px) {
    .ca-blog-hero h1 { font-size: 1.35rem; }
    .ca-blog-content { padding: 20px 14px; }
}

/* ── PRINT ── */
@media print {
    .ca-blog-body { background: #fff; }
    .ca-blog-body::after { display: none; }
    .ca-blog-hero { background: none; padding: 20px 0; }
    .ca-blog-content { box-shadow: none; border: none; max-width: 100%; padding: 0; }
    .ca-cta-band, .ca-calc-box, .ca-related, #azani-nav { display: none; }
    .ca-footer { border-top: 1px solid #ccc; }
    .ca-blog-content a { color: #000; text-decoration: underline; }
    .ca-blog-content a::after { content: " (" attr(href) ")"; font-size: .8em; }
}

/* ── NAV OVERRIDE — keep azani-nav inline styles but harmonize ── */
/* This does NOT override #azani-nav inline styles; just adds smooth transition */
#azani-nav { transition: background .3s; }
