:root {
  --color-primary: #ece0c6;
  --color-secondary: #111111;
  --color-accent: #ece0c6;
  --color-text: #ece0c6;
  --color-background: #1a1a1a;
  --color-surface: #141414;
  --font-family: "Geist Sans", sans-serif;
}

/* ==========================================================================
   KMS Build Agent — Premium Styles (Dark-First, Warm Palette)
   Stack: Geist Sans (body) + Instrument Serif (display headlines only)
   Palette: Warm charcoal (#1a1a1a) + cream text (#ece0c6)
   Design: Minimalist, editorial, generous whitespace, cinematic scroll.
   ========================================================================== */

/* --- Base --- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Grain overlay (disabled — not visible on dark backgrounds) --- */

/* --- Prose (markdown-rendered dark-first content) --- */
.prose strong {
    color: rgba(236, 224, 198, 0.9);
    font-weight: 600;
}

.prose h2 {
    color: rgba(236, 224, 198, 0.92);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
}

.prose h3 {
    color: rgba(236, 224, 198, 0.8);
    font-weight: 500;
    font-size: 1.05rem;
    letter-spacing: -0.005em;
    margin-top: 2em;
}

.prose p {
    line-height: 1.8;
    color: rgba(236, 224, 198, 0.4);
    max-width: 65ch;
}

.prose ul {
    list-style: none;
    padding-left: 0;
}

.prose ul li {
    position: relative;
    padding-left: 1.25em;
    margin-bottom: 0.75em;
    line-height: 1.75;
    color: rgba(236, 224, 198, 0.4);
}

.prose ul li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: rgba(236, 224, 198, 0.12);
}

.prose ol {
    color: rgba(236, 224, 198, 0.4);
}

.prose ol li {
    line-height: 1.75;
    margin-bottom: 0.75em;
}

/* --- Accordion (cream closed / charcoal open) --- */
.accordion-item {
    margin-bottom: 6px;
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.15rem 1.5rem;
    background: rgba(236, 224, 198, 0.92);
    color: #1a1a1a;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: -0.005em;
    transition: background 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-trigger:hover {
    background: rgba(236, 224, 198, 1);
}

.accordion-icon {
    flex-shrink: 0;
    margin-left: 1rem;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.open .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    background: #1a1a1a;
    border-left: 1px solid rgba(236, 224, 198, 0.06);
    border-right: 1px solid rgba(236, 224, 198, 0.06);
    border-bottom: 1px solid rgba(236, 224, 198, 0.06);
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.accordion-item.open .accordion-content {
    max-height: 300px;
}

.accordion-content p {
    padding: 1.25rem 1.5rem;
    color: rgba(236, 224, 198, 0.5);
    font-size: 0.875rem;
    line-height: 1.75;
    margin: 0;
}

/* --- Benefits list (fallback when no JS) --- */
.benefits-list ul {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.benefits-list ul li {
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(236, 224, 198, 0.06);
    color: rgba(236, 224, 198, 0.45);
    padding-left: 0;
    transition: color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.benefits-list ul li:first-child {
    border-top: 1px solid rgba(236, 224, 198, 0.06);
}

.benefits-list ul li:hover {
    color: rgba(236, 224, 198, 0.85);
}

.benefits-list ul li::before {
    content: none;
}

/* --- Form elements (select, textarea) --- */
select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(236,224,198,0.3)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-position: right 1rem center;
    background-repeat: no-repeat;
    background-size: 12px;
    padding-right: 3rem;
}

select option {
    background: #1a1a1a;
    color: rgba(236, 224, 198, 0.85);
    padding: 0.5rem;
}

select:valid {
    color: rgba(236, 224, 198, 0.85);
}

textarea {
    line-height: 1.7;
}

textarea::placeholder,
input::placeholder {
    color: rgba(236, 224, 198, 0.2);
}

/* --- Blockquote --- */
.prose blockquote {
    font-style: italic;
    border-left: 1px solid rgba(236, 224, 198, 0.1);
    padding-left: 1.5em;
    margin-left: 0;
    color: rgba(236, 224, 198, 0.35);
}

/* --- Form focus (no glow, just border shift) --- */
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(236, 224, 198, 0.35) !important;
    box-shadow: none;
    outline: none;
}

/* --- Scroll entry animation --- */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children: list items, cards, etc. */
.stagger-item {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-item.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- FAQ accordion --- */
details {
    border-bottom: 1px solid rgba(236, 224, 198, 0.06);
    padding: 1.5em 0;
}

details summary {
    cursor: pointer;
    font-weight: 500;
    color: rgba(236, 224, 198, 0.6);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

details summary:hover {
    color: rgba(236, 224, 198, 0.9);
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] > *:not(summary) {
    animation: contentReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes contentReveal {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Links inside prose --- */
.prose a {
    color: rgba(236, 224, 198, 0.55);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(236, 224, 198, 0.12);
    transition: color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                text-decoration-color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.prose a:hover {
    color: rgba(236, 224, 198, 0.85);
    text-decoration-color: rgba(236, 224, 198, 0.35);
}

/* --- prose-invert compat --- */
.prose-invert strong {
    color: rgba(236, 224, 198, 0.9);
}

.prose-invert a {
    color: rgba(236, 224, 198, 0.55);
}

/* --- CTA button (cream bg on warm charcoal) --- */
.cta-btn {
    letter-spacing: 0.02em;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cta-btn:hover {
    opacity: 0.88;
}

.cta-btn:active {
    transform: scale(0.98);
}

/* --- Editorial radius: sharp corners system-wide --- */
.pillar-card,
.flow-diagram,
.flow-icon,
.feature-detail,
.feature-detail-icon,
.diag-mockup {
    border-radius: 0 !important;
}

/* --- Diagnostic document mockup --- */
.diag-mockup {
    background: #111;
    border: 1px solid rgba(236, 224, 198, 0.08);
    padding: 28px 24px;
    width: 100%;
    max-width: 320px;
}

/* --- Feature detail blocks --- */
.feature-detail {
    padding: 32px 28px;
    background: #141414;
    border: 1px solid rgba(236, 224, 198, 0.06);
    transition: border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-detail:hover {
    border-color: rgba(236, 224, 198, 0.12);
}

.feature-detail-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    background: rgba(236, 224, 198, 0.04);
    border: 1px solid rgba(236, 224, 198, 0.06);
}

/* --- Learn more links --- */
.learn-more-link {
    font-size: 0.8rem;
    color: rgba(236, 224, 198, 0.4);
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(236, 224, 198, 0.12);
    transition: color 0.3s ease, text-decoration-color 0.3s ease;
}

.learn-more-link:hover {
    color: rgba(236, 224, 198, 0.7);
    text-decoration-color: rgba(236, 224, 198, 0.3);
}

/* --- Diagnostic value items --- */
.diag-value-item {
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(236, 224, 198, 0.04);
}

.diag-value-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* --- Floating icon --- */
#floating-icon {
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: translateY(8px);
}

#floating-icon.show {
    opacity: 0.7 !important;
    pointer-events: auto !important;
    transform: translateY(0);
}

#floating-icon:hover {
    opacity: 1 !important;
}

/* --- Responsive --- */
@media (max-width: 640px) {
    .prose {
        font-size: 0.9rem;
    }

    .prose h2 {
        font-size: 1.15rem;
    }

    .prose h3 {
        font-size: 0.95rem;
    }

    .accordion-trigger {
        padding: 1rem 1.25rem;
        font-size: 0.85rem;
    }

    .accordion-content p {
        padding: 1rem 1.25rem;
        font-size: 0.825rem;
    }
}

/* --- Print --- */
@media print {
    header, footer, #floating-icon { display: none; }
    body { font-size: 12pt; color: black; background: white; }
}
