/* =========================================================================
   Cruxsmith — base stylesheet (functionality MVP)
   Placeholder "granite + ember" palette. All color/spacing lives in CSS
   variables so the design pass can reskin from one place.
   effects.css already provides: skip link, preloader, text-reveal, noise,
   focus ring, .nav-cta, .hamburger, smart-nav transform, mobile glass nav,
   back-to-top, reduced-motion. This file styles everything else.
   ========================================================================= */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #0f1115;
    --bg-secondary: #14171d;
    --bg-card: #1a1e26;
    --text: #e7e9ee;
    --text-secondary: #a2a8b4;
    --accent: #e0653a;          /* ember / forge — placeholder */
    --accent-hover: #c9542c;
    --border: #262b34;
    --maxw: 1080px;
    --radius: 14px;
}

body.light-mode {
    --bg: #fbfaf8;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --text: #1a1d23;
    --text-secondary: #5b626e;
    --border: #e7e3dc;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    transition: background-color 0.3s, color 0.3s;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: 'Space Grotesk', system-ui, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--text);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.5rem; }

/* effects.css ships a blue focus ring + blue nav-cta/back-to-top; retint to accent */
*:focus-visible { outline: 2px solid var(--accent) !important; outline-offset: 3px; }

/* ---- Buttons --------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 0.85rem 1.6rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.98rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); color: #fff; transform: translateY(-2px); box-shadow: 0 10px 28px rgba(224, 101, 58, 0.28); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.text-link { color: var(--accent); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* ---- Navigation (desktop appearance; position handled by effects.js) -- */
nav {
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}
.nav-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text);
}
.nav-links { display: flex; gap: 1.75rem; list-style: none; align-items: center; }
.nav-links a { color: var(--text); font-size: 0.95rem; font-weight: 500; }
.nav-links a:hover { color: var(--accent); }
.nav-controls { display: flex; gap: 0.9rem; align-items: center; }
.nav-cta { background: var(--accent) !important; color: #fff !important; }
.nav-cta:hover { background: var(--accent-hover) !important; box-shadow: 0 4px 14px rgba(224, 101, 58, 0.4); }
.theme-toggle { background: none; border: none; color: var(--text); cursor: pointer; font-size: 1.2rem; line-height: 1; }

/* ---- Hero ------------------------------------------------------------ */
.hero { max-width: 780px; margin: 0 auto; padding: 5rem 1.5rem 3.5rem; text-align: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; font-weight: 600; color: var(--accent); margin-bottom: 1.25rem; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4rem); margin-bottom: 1.25rem; }
.hero .subtitle { font-size: 1.2rem; color: var(--text-secondary); max-width: 640px; margin: 0 auto; }
.hero-actions { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; margin-top: 2.25rem; }
.hero-note { margin-top: 1.75rem; font-size: 0.95rem; color: var(--text-secondary); font-style: italic; }

/* ---- Sections -------------------------------------------------------- */
.section { padding: 4.5rem 0; }
.section-border { border-top: 1px solid var(--border); }
.section-heading { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin-bottom: 0.9rem; }
.section-subtext { font-size: 1.08rem; color: var(--text-secondary); max-width: 720px; }
.section-cta { margin-top: 2.25rem; }

/* ---- Card grids ------------------------------------------------------ */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; margin-top: 2.5rem; }
.feature-card, .work-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.9rem;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.feature-card:hover, .work-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 10px 30px rgba(0,0,0,0.18); }
.feature-card h3, .work-card h3 { font-size: 1.2rem; margin-bottom: 0.6rem; }
.feature-card p, .work-card p { color: var(--text-secondary); font-size: 0.97rem; }
.work-tag { display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.7rem; }

/* ---- Why panel ------------------------------------------------------- */
.why-panel {
    margin-top: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 2.25rem;
    max-width: 820px;
}
.why-panel p { color: var(--text-secondary); font-size: 1.05rem; }
.why-panel p + p { margin-top: 1rem; }

/* ---- CTA ------------------------------------------------------------- */
.cta-section { padding: 5rem 0; text-align: center; }
.cta-section h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 1rem; }
.cta-section p { font-size: 1.1rem; color: var(--text-secondary); max-width: 600px; margin: 0 auto 2rem; }

/* ---- Footer ---------------------------------------------------------- */
footer { border-top: 1px solid var(--border); padding: 2.5rem 0 2rem; background: var(--bg-secondary); }
.footer-inner { display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; align-items: flex-start; }
.footer-logo { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; }
.footer-brand p { color: var(--text-secondary); font-size: 0.92rem; margin-top: 0.4rem; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a { color: var(--text-secondary); font-size: 0.92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-legal { margin-top: 1.75rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.footer-legal p { color: var(--text-secondary); font-size: 0.85rem; }

/* ---- Scroll reveal --------------------------------------------------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Neutralize the lifted per-word heading text-reveal so headings are ALWAYS
   visible and never depend on JS to un-hide (the section .reveal handles entrance).
   This removed a real risk of a JS-hidden <h1>. */
.text-reveal-word { overflow: visible !important; }
.text-reveal-word .word-inner { transform: none !important; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 768px) {
    .section { padding: 3.25rem 0; }
    .card-grid { grid-template-columns: 1fr; }
    /* effects.css turns the bar transparent + pills the brand/controls on mobile;
       style the dropdown the hamburger opens */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border);
    }
    .nav-links.active { display: flex; }
    .footer-inner { flex-direction: column; gap: 1.25rem; }
}

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

/* ===== Research-informed sections (full-service reposition) ===== */

.trust-line { margin: 1.75rem auto 0; font-size: 0.95rem; color: var(--text-secondary); max-width: 640px; }

/* Numbered step badge (How it works) */
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 30px; height: 30px; border-radius: 8px;
    background: var(--accent); color: #fff;
    font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 0.95rem;
    margin-bottom: 0.85rem;
}

/* One partner vs five vendors */
.compare-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; margin-top: 2.5rem; }
.compare-col { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.9rem; }
.compare-col h3 { font-size: 1.15rem; margin-bottom: 1rem; }
.compare-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.7rem; }
.compare-col li { color: var(--text-secondary); font-size: 0.97rem; padding-left: 1.6rem; position: relative; }
.compare-bad li::before { content: '\2715'; position: absolute; left: 0; color: #9aa0ac; }
.compare-good { border-color: var(--accent); }
.compare-good li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Proof result callouts */
.proof-results { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 2.25rem; }
.result-item { background: var(--bg-card); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 10px; padding: 1.1rem 1.3rem; color: var(--text-secondary); font-size: 0.98rem; }
.result-item strong { color: var(--text); }

/* FAQ (native details/summary, no JS) */
.faq { margin-top: 2rem; max-width: 820px; }
.faq details { border: 1px solid var(--border); border-radius: 10px; padding: 0.5rem 1.2rem; margin-bottom: 0.8rem; background: var(--bg-card); }
.faq summary { cursor: pointer; font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1.02rem; padding: 0.7rem 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; float: right; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: '\2013'; }
.faq details p { color: var(--text-secondary); font-size: 0.97rem; padding: 0 0 0.9rem; }
.faq details p a { color: var(--accent); }

/* Pricing cue band */
.pricing-cue { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2.5rem; text-align: center; }
.pricing-cue h3 { font-size: 1.4rem; margin-bottom: 0.6rem; }
.pricing-cue p { color: var(--text-secondary); max-width: 600px; margin: 0 auto 1.5rem; }

/* Mobile sticky CTA */
.sticky-cta { display: none; }
@media (max-width: 768px) {
    .compare-grid { grid-template-columns: 1fr; }
    .sticky-cta {
        display: block; position: fixed; left: 1rem; right: 1rem;
        bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px)); z-index: 900;
        text-align: center; background: var(--accent); color: #fff; font-weight: 600;
        padding: 0.9rem 1rem; border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,0.35);
    }
}

/* ===== Services page ===== */
.svc { padding: 2.5rem 0; border-top: 1px solid var(--border); }
.svc:first-of-type { border-top: none; padding-top: 1rem; }
.svc h3 { font-size: 1.5rem; margin-bottom: 0.6rem; }
.svc .lead { color: var(--text-secondary); max-width: 760px; margin-bottom: 1.1rem; font-size: 1.02rem; }
.deliverables { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0.5rem 1.5rem; max-width: 800px; }
.deliverables li { color: var(--text-secondary); font-size: 0.94rem; padding-left: 1.45rem; position: relative; }
.deliverables li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* ===== Pricing page ===== */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; margin-top: 2.5rem; }
.price-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; display: flex; flex-direction: column; }
.price-card.featured { border-color: var(--accent); box-shadow: 0 8px 30px rgba(224,101,58,0.12); }
.price-badge { align-self: flex-start; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); margin-bottom: 0.6rem; }
.price-card h3 { font-size: 1.3rem; margin-bottom: 0.2rem; }
.price-amount { font-family: 'Space Grotesk', sans-serif; font-size: 1.85rem; font-weight: 700; margin: 0.5rem 0 0.6rem; }
.price-amount span { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); }
.price-card .price-desc { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 1.1rem; }
.price-card ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; margin-bottom: 1.5rem; }
.price-card ul li { color: var(--text-secondary); font-size: 0.93rem; padding-left: 1.45rem; position: relative; }
.price-card ul li::before { content: '\2713'; position: absolute; left: 0; color: var(--accent); }
.price-card .btn { margin-top: auto; text-align: center; }
.price-note { margin-top: 2.5rem; }

/* ===== Company-forward rebuild ===== */
/* Monospace eyebrows/labels/metrics = the load-bearing "developer-led" signal */
.eyebrow, .work-tag { font-family: 'JetBrains Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.12em; }
.metric { font-family: 'JetBrains Mono', ui-monospace, monospace; color: var(--accent); font-weight: 600; }
/* Footer "Who we serve / Where we work" clusters */
.footer-nav { display: flex; gap: 1.75rem 3rem; flex-wrap: wrap; margin: 0.25rem 0 1.5rem; }
.footer-col h4 { font-family: 'JetBrains Mono', ui-monospace, monospace; text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.72rem; color: var(--text-secondary); margin-bottom: 0.7rem; font-weight: 600; }
.footer-col a { display: block; color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 0.4rem; }
.footer-col a:hover { color: var(--accent); }
.expansion-note { color: var(--text-secondary); font-size: 0.95rem; margin-top: 1.25rem; font-style: italic; }
