/* Shared styles for Backend Bestie service pages */
:root {
    --ink: #1f1d1c;
    --rose: #b76e79;
    --rose-light: #d9a3ab;
    --rose-deep: #9a5560;
    --cream: #f9f7f4;
    --sand: #efe9e2;
    --text: #2b2b2b;
    --muted: #6b6461;
    --line: #e4ddd5;
    --serif: 'Fraunces', Georgia, serif;
    --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --max: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--cream);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }

.eyebrow {
    font-family: var(--sans);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--rose);
}
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.15; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid var(--rose-light); outline-offset: 3px; }
.btn-primary { background: var(--rose); color: #fff; }
.btn-primary:hover { background: var(--rose-deep); }
.btn-ghost { border: 1px solid rgba(255,255,255,0.25); color: #fff; }
.btn-ghost:hover { border-color: var(--rose-light); color: var(--rose-light); }
.btn .arrow { transition: transform 0.25s ease; }
.btn:hover .arrow { transform: translateX(3px); }

/* Nav */
nav.site-nav {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(31, 29, 28, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
nav.site-nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { font-family: var(--serif); font-size: 1.35rem; color: var(--rose-light); text-decoration: none; letter-spacing: 0.02em; }
.brand sup { font-size: 0.55em; }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { color: #cfc8c3; text-decoration: none; font-size: 0.9rem; transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a[aria-current] { color: #fff; }
.nav-links .btn { padding: 10px 20px; color: #fff; }

/* Page hero */
.page-hero {
    background: var(--ink);
    color: #fff;
    position: relative;
    overflow: hidden;
    padding: 40px 0 96px;
}
.page-hero::before {
    content: "";
    position: absolute;
    width: 680px;
    height: 680px;
    right: -200px;
    top: -260px;
    background: radial-gradient(circle, rgba(183,110,121,0.26) 0%, rgba(183,110,121,0) 65%);
    pointer-events: none;
}
.page-hero .wrap { position: relative; }
.crumbs { font-size: 0.85rem; color: #9d9590; margin-bottom: 64px; }
.crumbs a { color: #cfc8c3; text-decoration: none; }
.crumbs a:hover { color: var(--rose-light); }
.crumbs span[aria-hidden] { margin: 0 8px; }
.page-hero h1 {
    font-size: clamp(2.5rem, 5.6vw, 4.2rem);
    font-weight: 300;
    margin: 18px 0 22px;
    max-width: 18ch;
    letter-spacing: -0.01em;
}
.page-hero h1 em { color: var(--rose-light); }
.page-hero .lede { color: #bdb5b0; font-size: 1.15rem; max-width: 620px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* Sections */
section { padding: 96px 0; }
section.tint { background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.sand { background: var(--sand); }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(1.9rem, 3.8vw, 2.7rem); margin-top: 14px; color: var(--ink); }
.section-head p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }

.prose p { color: var(--muted); font-size: 1.06rem; margin-bottom: 18px; }
.prose p strong { color: var(--ink); font-weight: 600; }
.prose h2 { font-size: clamp(1.9rem, 3.8vw, 2.6rem); color: var(--ink); margin: 14px 0 24px; }
.prose a { color: var(--rose-deep); }

.definition {
    border-left: 3px solid var(--rose);
    padding: 6px 0 6px 24px;
    margin: 8px 0 28px;
    font-family: var(--serif);
    font-size: 1.35rem;
    line-height: 1.45;
    color: var(--ink);
}

.check-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.check-list li { position: relative; padding-left: 32px; color: var(--text); font-size: 1rem; }
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--rose) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12l4 4 8-8'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
}
.card { background: #fff; padding: 32px 30px; }
.card h3 { font-size: 1.3rem; color: var(--ink); margin-bottom: 10px; }
.card p { color: var(--muted); font-size: 0.96rem; line-height: 1.65; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; counter-reset: step; }
.step { position: relative; padding-top: 30px; border-top: 2px solid var(--line); }
.step::before {
    counter-increment: step;
    content: "0" counter(step);
    position: absolute;
    top: -2px;
    left: 0;
    width: 40px;
    border-top: 2px solid var(--rose);
    padding-top: 26px;
    font-family: var(--serif);
    color: var(--rose);
    font-size: 0.95rem;
}
.step h3 { font-size: 1.25rem; margin: 28px 0 10px; color: var(--ink); }
.step p { color: var(--muted); font-size: 0.95rem; }

.uses { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.use { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 26px 26px; }
.use h3 { font-size: 1.15rem; color: var(--ink); margin-bottom: 8px; }
.use p { color: var(--muted); font-size: 0.95rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.creds {
    background: var(--ink);
    color: #fff;
    border-radius: 20px;
    padding: 36px;
}
.creds .eyebrow { color: var(--rose-light); }
.creds ul { list-style: none; margin-top: 18px; }
.creds li { padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.08); color: #cfc8c3; font-size: 0.96rem; }
.creds li:last-child { border-bottom: none; }
.creds li strong { display: block; color: #fff; font-weight: 500; }

/* Comparison table */
.compare { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.compare th, .compare td { text-align: left; padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: 0.95rem; vertical-align: top; }
.compare th { font-family: var(--sans); font-weight: 600; color: var(--ink); background: var(--sand); }
.compare td { color: var(--muted); }
.compare td:first-child { color: var(--ink); font-weight: 500; }
.compare tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* FAQ */
.faq-list { max-width: 820px; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    font-family: var(--serif);
    font-size: 1.2rem;
    color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font-family: var(--sans); font-size: 1.4rem; color: var(--rose); transition: transform 0.25s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list summary:focus-visible { outline: 2px solid var(--rose-light); outline-offset: 4px; }
.faq-list details p { color: var(--muted); padding: 0 40px 22px 0; }
.faq-list details p a { color: var(--rose-deep); }

/* Related */
.related { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related a {
    display: block;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 26px;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.related a:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(31,29,28,0.08); }
.related h3 { font-size: 1.2rem; color: var(--ink); margin-bottom: 8px; }
.related p { color: var(--muted); font-size: 0.93rem; }
.related .go { display: inline-block; margin-top: 14px; color: var(--rose-deep); font-size: 0.9rem; font-weight: 500; }

/* CTA */
.cta { background: var(--ink); color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta::before {
    content: "";
    position: absolute;
    width: 900px;
    height: 900px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(183,110,121,0.2) 0%, rgba(183,110,121,0) 60%);
    pointer-events: none;
}
.cta .wrap { position: relative; }
.cta .eyebrow { color: var(--rose-light); }
.cta h2 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); font-weight: 300; margin: 16px auto 18px; max-width: 20ch; }
.cta h2 em { color: var(--rose-light); }
.cta p { color: #bdb5b0; max-width: 560px; margin: 0 auto 36px; font-size: 1.06rem; }
.cta-email { display: block; margin-top: 22px; color: #9d9590; font-size: 0.9rem; text-decoration: none; }
.cta-email:hover { color: var(--rose-light); }

/* Footer */
footer.site-footer { background: #161413; color: #8a827d; padding: 56px 0 36px; font-size: 0.88rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer-grid h3 { font-family: var(--sans); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: #cfc8c3; margin-bottom: 14px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid .brand { display: inline-block; margin-bottom: 10px; }
footer.site-footer a { text-decoration: none; }
footer.site-footer a:hover { color: var(--rose-light); }
.footer-base { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .btn, .btn .arrow, .related a { transition: none; }
}

@media (max-width: 900px) {
    .cards, .related { grid-template-columns: 1fr 1fr; }
    .steps { grid-template-columns: 1fr 1fr; gap: 40px 28px; }
    .split { grid-template-columns: 1fr; gap: 44px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
    .nav-links a:not(.btn) { display: none; }
    .wrap { padding: 0 16px; }
    .crumbs { margin-bottom: 44px; }
    .page-hero { padding-bottom: 72px; }
    section { padding: 72px 0; }
    .cards, .related, .steps, .uses, .check-list { grid-template-columns: 1fr; }
    .creds { padding: 28px 22px; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-base { flex-direction: column; }
}
