/* =========================================================
   BacklinkAnalytics.com - Design System
   ========================================================= */

:root {
    /* Forest + gold palette */
    --forest: #14241c;
    --forest-600: #1d3328;
    --forest-700: #0f1c15;
    --gold: #c8962f;
    --gold-600: #b3821f;
    --gold-700: #9a6f18;
    --gold-deep: #8a6414;   /* legible gold for text on ivory */

    /* Legacy aliases kept so component rules resolve to the new theme.
       --indigo* now maps to forest (primary), accents use --gold*. */
    --indigo: #20382b;
    --indigo-600: #1a2e23;
    --indigo-700: #122019;
    --violet: #213d2e;
    --cyan: #14241c;

    --ink: #16201b;
    --ink-soft: #3c463f;
    --muted: #5a655c;
    --line: #e4ddcd;
    --bg: #f7f5ef;
    --bg-soft: #efe9dc;
    --bg-tint: #f3ead6;     /* warm gold tint */
    --white: #fffefb;
    --success: #2f7d5b;
    --warning: #c8962f;     /* gold stars */
    --danger: #c0492f;

    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 3px rgba(20, 36, 28, .08);
    --shadow: 0 14px 34px -14px rgba(20, 36, 28, .22);
    --shadow-lg: 0 30px 60px -20px rgba(20, 36, 28, .30);
    --grad: linear-gradient(135deg, var(--forest-600) 0%, var(--forest) 100%);
    --grad-gold: linear-gradient(135deg, #d8a83f 0%, #c8962f 100%);
    --grad-soft: linear-gradient(135deg, #f3ead6 0%, #eaeee3 100%);

    --font-head: 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;
    --maxw: 1160px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-body);
    color: var(--ink-soft);
    background: var(--bg);
    line-height: 1.65;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--indigo); text-decoration: none; transition: color .2s; }
a:hover { color: var(--indigo-700); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--ink); line-height: 1.18; font-weight: 700; }
ul { list-style: none; padding: 0; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 22px; }

.skip-link {
    position: absolute; left: -999px; top: 0; background: var(--ink); color: #fff;
    padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 200;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    font-family: var(--font-head); font-weight: 600; font-size: 1rem; line-height: 1.1;
    padding: .82rem 1.5rem; border-radius: 999px; border: 1px solid transparent;
    cursor: pointer; transition: transform .15s, box-shadow .25s, background .2s;
    white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--grad-gold); color: var(--forest-700); box-shadow: 0 10px 24px -12px rgba(154, 111, 24, .75); }
.btn-primary:hover { color: var(--forest-700); box-shadow: 0 16px 30px -12px rgba(154, 111, 24, .85); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { color: var(--ink); border-color: #c7d2fe; }
.btn-light { background: rgba(255,255,255,.16); color:#fff; border-color: rgba(255,255,255,.4); }
.btn-light:hover { color:#fff; background: rgba(255,255,255,.26); }
.btn-lg { padding: 1rem 1.9rem; font-size: 1.05rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: var(--shadow-sm); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; }

.brand { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--font-head); }
.brand-text { font-size: 1.28rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.brand-text strong { color: var(--gold-600); font-weight: 800; }
.brand-mark { display: grid; place-items: center; }

.primary-nav { display: flex; align-items: center; gap: 2rem; }
.primary-nav > ul { display: flex; align-items: center; gap: 1.7rem; }
.primary-nav a {
    font-family: var(--font-head); font-weight: 600; color: var(--ink-soft);
    font-size: .98rem; position: relative; padding: .2rem 0;
}
.primary-nav a:hover, .primary-nav a.is-active { color: var(--indigo); }
.primary-nav a.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
    background: var(--grad); border-radius: 2px;
}
.nav-cta { font-size: .95rem; padding: .7rem 1.7rem; flex: 0 0 auto; border-radius: 12px; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px; background: none; border: 0;
    cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-head { max-width: 660px; margin: 0 auto 54px; text-align: center; }
.section-head.left { margin-inline: 0; text-align: left; }
.eyebrow {
    display: inline-block; font-family: var(--font-head); font-weight: 700; font-size: .8rem;
    letter-spacing: .12em; text-transform: uppercase; color: var(--gold-deep);
    background: var(--bg-tint); padding: .35rem .85rem; border-radius: 999px; margin-bottom: 1rem;
}
.section-head h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -.02em; }
.section-head p { margin-top: 1rem; font-size: 1.1rem; color: var(--muted); }

/* ---------- Hero ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 600px at 80% -10%, #f0e4c4 0%, transparent 55%),
                radial-gradient(900px 500px at 0% 0%, #e3ebdd 0%, transparent 50%),
                var(--bg);
    padding: 70px 0 90px;
}
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero-badge {
    display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-head);
    font-weight: 600; font-size: .85rem; color: var(--indigo-700);
    background: var(--white); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.4rem;
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 4px rgba(16,185,129,.18); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.7rem); letter-spacing: -.03em; font-weight: 800; }
.hero h1 .grad { color: var(--gold-deep); }
.hero-lead { margin-top: 1.3rem; font-size: 1.2rem; color: var(--ink-soft); max-width: 540px; }
.hero-actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-trust { margin-top: 2.2rem; display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap; color: var(--muted); font-size: .92rem; }
.hero-trust strong { color: var(--ink); }
.stars { color: var(--warning); letter-spacing: 2px; }

/* Hero analyzer card */
.analyzer {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); padding: 22px; position: relative;
}
.analyzer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.analyzer-title { font-family: var(--font-head); font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.analyzer-pill { font-size: .72rem; font-weight: 700; color: var(--success); background: #ecfdf5; padding: .25rem .6rem; border-radius: 999px; }
.analyzer-search { display: flex; gap: 8px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 6px; }
.analyzer-search input { flex: 1; border: 0; background: transparent; padding: .55rem .7rem; font-size: .95rem; color: var(--ink); outline: none; }
.analyzer-search .btn { padding: .55rem 1rem; font-size: .9rem; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.metric { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.metric .label { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.metric .value { font-family: var(--font-head); font-weight: 800; font-size: 1.5rem; color: var(--ink); margin-top: 2px; }
.metric .trend { font-size: .76rem; font-weight: 600; }
.metric .trend.up { color: var(--success); }
.bars { display: flex; align-items: flex-end; gap: 7px; height: 90px; margin-top: 20px; padding: 0 2px; }
.bars span { flex: 1; background: var(--grad-gold); border-radius: 6px 6px 0 0; opacity: .9; animation: grow 1s ease both; }
@keyframes grow { from { height: 0 !important; } }
.analyzer-foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; font-size: .8rem; color: var(--muted); }

/* ---------- Logos strip ---------- */
.logos { padding: 40px 0; border-block: 1px solid var(--line); background: var(--bg-soft); }
.logos p { text-align: center; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; margin-bottom: 20px; }
.logos-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 40px; }
.logos-row span { font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: #aab3a6; letter-spacing: -.02em; }

/* ---------- Feature cards ---------- */
.features { background: var(--bg); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 30px; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: #c7d2fe; }
.feature-icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--grad-soft); color: var(--indigo); margin-bottom: 18px;
}
.feature-icon svg { width: 26px; height: 26px; }
.feature-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.feature-card p { color: var(--muted); font-size: .98rem; }

/* ---------- How it works ---------- */
.how { background: var(--bg-soft); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step-num {
    width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
    background: var(--grad); color: #fff; font-family: var(--font-head); font-weight: 800;
    font-size: 1.15rem; margin-bottom: 16px; box-shadow: var(--shadow);
}
.step h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .98rem; }

/* ---------- Stats band ---------- */
.stats { background: var(--ink); color: #fff; }
.stats .container { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-family: var(--font-head); font-weight: 800; font-size: clamp(2rem, 4vw, 2.9rem); background: var(--grad-gold); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat .desc { color: #cbd5e1; margin-top: .2rem; font-size: .95rem; }

/* ---------- Pricing ---------- */
.pricing { background: var(--bg); }
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.price-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
    padding: 32px; display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s;
}
.price-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.price-card.featured { border-color: transparent; background: linear-gradient(var(--white), var(--white)) padding-box, var(--grad-gold) border-box; border: 2px solid transparent; box-shadow: var(--shadow-lg); position: relative; }
.price-card.featured::before { content: "Most popular"; position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--grad-gold); color: var(--forest-700); font-family: var(--font-head); font-weight: 700; font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; padding: .35rem .9rem; border-radius: 999px; }
.price-card h3 { font-size: 1.15rem; }
.price-amount { font-family: var(--font-head); font-weight: 800; font-size: 2.6rem; color: var(--ink); margin: .4rem 0; }
.price-amount span { font-size: 1rem; font-weight: 600; color: var(--muted); }
.price-card ul { margin: 18px 0 26px; display: grid; gap: .65rem; }
.price-card li { display: flex; gap: .6rem; color: var(--ink-soft); font-size: .96rem; }
.price-card li svg { flex: none; color: var(--success); width: 20px; height: 20px; margin-top: 2px; }
.price-card .btn { margin-top: auto; width: 100%; }

/* ---------- Comparison table ---------- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white); box-shadow: var(--shadow-sm); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 16px 20px; text-align: center; border-bottom: 1px solid var(--line); }
.compare thead th { font-family: var(--font-head); font-size: 1.05rem; color: var(--ink); padding-top: 22px; padding-bottom: 22px; }
.compare tbody th[scope="row"] { text-align: left; font-weight: 600; color: var(--ink-soft); font-family: var(--font-body); font-size: .96rem; }
.compare tbody tr:last-child td, .compare tbody tr:last-child th { border-bottom: 0; }
.compare .hi { background: var(--bg-tint); }
.compare thead .hi { border-radius: 12px 12px 0 0; color: var(--gold-deep); }
.compare .yes { color: var(--success); font-weight: 800; font-size: 1.15rem; }
.compare .no { color: #c4bda9; font-weight: 700; }
.compare .txt { color: var(--ink-soft); font-size: .92rem; }
.compare .btn { padding: .6rem 1rem; font-size: .9rem; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--bg-soft); }
.quote-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.quote { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow-sm); }
.quote .stars { margin-bottom: 12px; }
.quote p { color: var(--ink-soft); font-size: 1rem; }
.quote-author { margin-top: 18px; display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-family: var(--font-head); font-weight: 700; }
.quote-author strong { display: block; color: var(--ink); font-family: var(--font-head); font-size: .95rem; }
.quote-author small { color: var(--muted); }

/* ---------- CTA band ---------- */
.cta {
    background: radial-gradient(800px 400px at 50% 120%, rgba(200,150,47,.40), transparent 60%), var(--grad);
    color: #fff; text-align: center;
}
.cta h2 { color: #fff; font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
.cta p { color: rgba(255,255,255,.9); max-width: 560px; margin: 1rem auto 2rem; font-size: 1.12rem; }
.cta .hero-actions { justify-content: center; }

/* ---------- Page hero (interior) ---------- */
.page-hero {
    background: radial-gradient(900px 420px at 80% -20%, #f0e4c4 0%, transparent 55%), var(--bg-soft);
    padding: 70px 0 56px; text-align: center; border-bottom: 1px solid var(--line);
}
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); letter-spacing: -.02em; }
.page-hero p { color: var(--muted); font-size: 1.12rem; max-width: 620px; margin: 1rem auto 0; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--indigo); }

/* ---------- Prose / legal ---------- */
.prose { max-width: 800px; margin: 0 auto; }
.prose h2 { font-size: 1.55rem; margin: 2.2rem 0 .8rem; }
.prose h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .4rem; margin: .6rem 0; }
.prose a { text-decoration: underline; }
.legal-meta { color: var(--muted); font-size: .92rem; margin-bottom: 1.5rem; }
.toc { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 2.4rem; }
.toc h2 { margin: 0 0 .6rem; font-size: 1.05rem; }
.toc ul { display: grid; gap: .35rem; }
.toc a { text-decoration: none; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-grid img, .about-card { border-radius: var(--radius-lg); }
.about-card { background: var(--grad-soft); border: 1px solid var(--line); padding: 36px; }
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.value .feature-icon { margin-bottom: 14px; }
.value h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.value p { color: var(--muted); font-size: .95rem; }
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member { text-align: center; }
.member .avatar { width: 92px; height: 92px; font-size: 1.7rem; margin: 0 auto 14px; }
.member strong { display: block; color: var(--ink); font-family: var(--font-head); }
.member small { color: var(--muted); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: start; }
.contact-info .ci-item { display: flex; gap: 14px; margin-bottom: 26px; }
.contact-info .feature-icon { margin: 0; flex: none; }
.contact-info h3 { font-size: 1.05rem; margin-bottom: .15rem; }
.contact-info p { color: var(--muted); font-size: .96rem; }
.contact-info a { font-weight: 600; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow); }
.field { margin-bottom: 18px; }
.field label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: .4rem; }
.field input, .field select, .field textarea {
    width: 100%; padding: .8rem .95rem; border: 1px solid var(--line); border-radius: 11px;
    font-family: var(--font-body); font-size: .98rem; color: var(--ink); background: var(--bg-soft);
    transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none; border-color: var(--indigo); background: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.12);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.alert { padding: 14px 18px; border-radius: 12px; margin-bottom: 22px; font-size: .96rem; }
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; background: var(--white); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { box-shadow: var(--shadow); border-color: #c7d2fe; }
.faq-item summary {
    list-style: none; cursor: pointer; padding: 20px 24px; font-family: var(--font-head);
    font-weight: 600; color: var(--ink); font-size: 1.06rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; color: var(--indigo); transition: transform .25s; line-height: 1; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 24px 22px; color: var(--ink-soft); }
.faq-cats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }
.faq-cats span { font-family: var(--font-head); font-weight: 600; font-size: .85rem; padding: .4rem 1rem; border-radius: 999px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--ink-soft); }

/* ---------- Footer ---------- */
.site-footer { background: #0f1c15; color: #c4cdc4; padding: 64px 0 30px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.brand--footer .brand-text { color: #fff; }
.brand--footer .brand-text strong { color: #d9b75e; }
.footer-blurb { margin: 16px 0 14px; font-size: .94rem; color: #aab3a6; max-width: 340px; }
.footer-blurb strong { color: #e2e8f0; }
.footer-contact a { color: #d9b75e; font-weight: 600; }
.footer-heading { color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 16px; }
.footer-col ul { display: grid; gap: .6rem; }
.footer-col a { color: #aab3a6; font-size: .95rem; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-bottom p { color: #aab3a6; font-size: .9rem; }
.footer-social { display: flex; gap: 18px; }
.footer-social a { color: #aab3a6; font-size: .9rem; }
.footer-social a:hover { color: #fff; }

/* ---------- Back to top ---------- */
.to-top {
    position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%;
    border: 0; background: var(--grad); color: #fff; font-size: 1.2rem; cursor: pointer;
    box-shadow: var(--shadow); z-index: 90; transition: opacity .3s, transform .2s;
}
.to-top:hover { transform: translateY(-3px); }
.to-top[hidden] { display: none; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .hero-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .feature-grid, .steps, .price-grid, .quote-grid, .value-grid { grid-template-columns: 1fr 1fr; }
    .team-grid { grid-template-columns: 1fr 1fr; }
    .stats .container { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
    body { font-size: 16px; }
    section { padding: 60px 0; }
    .nav-toggle { display: flex; }
    .primary-nav {
        position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch;
        gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 14px 22px 22px;
        transform: translateY(-130%); transition: transform .3s ease; box-shadow: var(--shadow);
    }
    .primary-nav.open { transform: translateY(0); }
    .primary-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
    .primary-nav > ul li { border-bottom: 1px solid var(--line); }
    .primary-nav > ul a { display: block; padding: 14px 4px; }
    .primary-nav a.is-active::after { display: none; }
    .nav-cta { margin-top: 14px; text-align: center; }
    .feature-grid, .steps, .price-grid, .quote-grid, .value-grid, .team-grid, .footer-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .hero-actions .btn, .cta .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
