/* ================================================================================== 
   IndieML Substance API - Master CSS
===================================================================================== */

@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700');

:root {
    /* Brand Accent */
    --brand-primary: #8a2217;
    --brand-hover: #731c13;

    /* Light Mode Surfaces */
    --bg-color: #ffffff;
    --bg-alt: #f3f5f8;
    --border-color: #dadce0;
    
    /* Light Mode Typography */
    --main-text: #0f1419; /* 15 20 25 */
    --minor-text: #333333; /* 51 51 51 */
    
    /* Structural */
    --max-width: 1100px;
    --medium-width: 800px;
    --radius: 8px;
}

@media (prefers-color-scheme: dark) {
    :root {
        /* Dark Mode Surfaces */
        --bg-color: #000000;
        --bg-alt: #16181c;
        --border-color: #2f3336;
        
        /* Dark Mode Typography */
        --main-text: #e7e9ea;
        --minor-text: #71767b;
    }
}

/* ================================================================================== 
   Global Typography Rules
===================================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-color);
    color: var(--main-text);
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 40px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--main-text);
    margin-bottom: 5px;
}

/* Section Titles */
h2 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--main-text);
    margin-bottom: 24px;
}

.h2-margin-small {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--main-text);
    margin-bottom: 5px;
    
}

/* Subsection / Card Titles (Standardized to 18px / 600 weight) */
h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--main-text);
    margin-bottom: 5px;
}

/* Standard Body & Card Text */
p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--minor-text);
    margin-bottom: 5px; /* was 16px */
}

p:last-child {
    margin-bottom: 0;
}

/* Utility for Centered Section Headers */
.section-header-center {
    text-align: center;
    /*max-width: 800px;*/
    /*margin: auto;*/
}

.section-header-description {
    text-align: center;
    max-width: 800px; 
    margin: 0 auto 40px auto;    
}



/* ================================================================================== 
   Layout Grids & Placeholders
===================================================================================== */
.section-block {
    padding: 60px 0;
    border-bottom: 1px solid var(--border-color);
}

/* Removes the border from the last section above footer */
.section-block:last-of-type {
    border-bottom: none; 
}

.placeholder-box {
    background-color: var(--bg-alt);
    border: 1px dashed var(--minor-text);
    border-radius: var(--radius);
    padding: 60px 20px;
    text-align: center;
    color: var(--minor-text);
    font-weight: 600;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}


.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.instruction-container {
    max-width: var(--medium-width);
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}



/* ================================================================================== 
   Components: Buttons, Tags, & Misc
===================================================================================== */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
    background-color: #333333;
    color: #ffffff;
    border: 2px solid #333333;
}

.btn-primary:hover {
    background-color: #555555;
    border-color: #555555;
}

.btn-primary:active {
    background-color: #222222;
    border-color: #222222;
}

.btn-outline {
    background-color: transparent;
    color: var(--main-text);
    border: 2px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--bg-alt);
}


.bottom-padding-sm {
    padding-bottom: 10px;
}

.bottom-padding-md {
    padding-bottom: 20px;
}

.button-align {
    display: flex;
    justify-content: space-between; /* Pushes button left, status right */
    align-items: flex-start; /* Vertically centers them */
    width: 100%;
    margin-top: 10px; /* Adjust spacing below the textarea if needed */
}

#demoStatus.form-message {
    margin: 0; 
    text-align: right;
}

#demoBtn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

#formStatus {
    min-height: 24px; /* Adjust this to match your font's line-height */
    display: block;
    margin-top: 8px; /* Keeps the spacing consistent */
}


/* Standard input error state */
.input-error {
    border-color: #ff4d4d !important;
    background-color: #fff0f0 !important; /* Optional: light red background */
    transition: all 0.2s ease;
}

/* Remove the error state when the user starts typing again */
input:focus {
    border-color: inherit;
    background-color: inherit;
}


/* Copy code button */
.icon-copy {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: currentColor;
    /* Webkit prefix for Safari/Chrome */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
    /* Standard syntax */
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='13' height='13' rx='2' ry='2'%3E%3C/rect%3E%3Cpath d='M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1'%3E%3C/path%3E%3C/svg%3E") no-repeat center / contain;
}




/* ================================================================================== 
   Block 1: Header & Hero Section
===================================================================================== */
.header-main {
    background-color: var(--brand-primary);
    width: 100%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0; 
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Source Sans Pro', sans-serif;
    font-size: 35px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.logo-image {
    height: 35px;
    width: 35px;
    border-radius: 100px;
}

.hero-block {
    padding: 40px 0 0 0;
    text-align: center;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--minor-text);
    max-width: 750px;
    margin: 0 auto 0px auto;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}


/* ================================================================================== 
   Block 2: Interactive Demo
===================================================================================== */
.demo-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
}

.demo-input-area {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-controls {
    display: flex;
    gap: 12px;
}

.btn-sample {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--minor-text);
    padding: 6px 12px;
    font-size: 14px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* subtle lift */
}

.btn-sample:hover {
    color: var(--main-text);
    border-color: var(--minor-text);
}

.btn-bluesky {
    text-decoration: none;
    padding: 8px 16px;
    display: inline-block;
}



.demo-textarea {
    width: 100%;
    height: 200px;
    padding: 16px;
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    background-color: var(--bg-color);
    color: var(--main-text);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    resize: vertical;
}

.demo-textarea:focus {
    outline: none;
    border-color: #333333;
}

.demo-output-area {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
}

.demo-score-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--minor-text);
    margin-bottom: 8px;
}

.demo-score-value {
    font-size: 72px;
    font-weight: 700;
    color: var(--main-text);
    line-height: 1;
    margin-bottom: 12px;
}

.demo-score-meta {
    font-size: 14px;
    color: var(--minor-text);
    font-family: Consolas, "Fira Code", monospace;
}

.demo-quick-label {
    font-size: 14px;
    color: var(--minor-text);
    font-weight: 600;
    padding-top: 6px;
}

.btn-align-start {
    align-self: flex-start;
}



/* ================================================================================== 
   Block 3: Bluesky Proof
===================================================================================== */
.proof-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.proof-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.proof-tag {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--minor-text);
}

.proof-score-badge {
    background-color: var(--main-text);
    color: var(--bg-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
}

.proof-text {
    font-size: 15px;
    color: var(--main-text);
    font-style: italic;
}


/* ================================================================================== 
   Block 4: Use Cases
===================================================================================== */
.usecase-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}


/* ================================================================================== 
   Block 6: Pricing
===================================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.pricing-card {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.pricing-card h3 {
    text-align: center;
}

.price-container {
    text-align: center;
    margin-bottom: 8px;
}

.price {
    font-size: 32px;
    font-weight: 700;
    color: var(--main-text);
}

.price-sub {
    font-size: 14px;
    color: var(--minor-text);
    font-weight: 400;
}

.beta-badge {
    display: inline-block;
    background-color: #f1f5f9;
    color: #475569;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 16px;
    margin: 0 auto 24px auto;
    text-align: center;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
    flex-grow: 1;
}

.pricing-features li {
    font-size: 14px;
    color: var(--minor-text);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.btn-pricing {
    display: block;
    text-align: center;
    background-color: var(--main-text);
    color: var(--bg-color);
    text-decoration: none;
    padding: 10px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    margin-top: auto;
}

.btn-pricing.secondary {
    background-color: transparent;
    color: var(--main-text);
    border: 1px solid var(--main-text);
}


/* ================================================================================== 
   Block 7: Integration & Code Windows
===================================================================================== */
code {
    /* Modern, tightly-kerned system code fonts */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 85%; /* Shrinks it slightly so it doesn't disrupt line height */
    letter-spacing: normal;
    word-spacing: normal;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    color: var(--main-text);
    overflow-wrap: break-word;
    word-wrap: break-word;
}


.code-layout {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.code-layout-instructions {
    max-width: 800px;
    margin: 0 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}



.code-window {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    overflow: hidden;
}

.code-header {
    background-color: var(--bg-alt);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.code-header-instructions {
    /*background-color: var(--bg-alt);*/
    border-bottom: 1px solid var(--border-color);
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}



.code-tabs {
    display: flex;
    gap: 12px;
}

.code-title {
    font-family: Consolas, 'Fira Code', monospace;
    font-size: 14px;
    color: var(--minor-text);
    font-weight: 600;
}




.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
}

.btn-sample.active {
    color: var(--main-text);
    border-color: var(--main-text);
}

.code-body {
    padding: 24px;
    overflow-x: auto;
}

.code-text {
    margin: 0;
    font-family: Consolas, 'Fira Code', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--main-text);
    text-align: left;
}

.d-none {
    display: none;
}

/* Syntax Highlighting */
.syn-kw { font-weight: 700; }
.syn-str { color: var(--brand-primary); }
.syn-num { color: var(--minor-text); }


.code-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.code-dropdown {
    background-color: white;
    color: inherit;
    border: 1px solid currentColor; /* Or use a subtle rgba value like rgba(255,255,255,0.2) */
    border-radius: 4px;
    padding: 6px 32px 6px 12px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.code-dropdown:focus {
    outline: none;
    opacity: 0.8;
}

/* Color-matched dropdown chevron using the mask technique */
.code-dropdown-wrapper::after {
    content: "";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    background-color: currentColor;
    pointer-events: none; /* Ensures clicking the arrow still triggers the select box */
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat center / contain;
}


/* ================================================================================== 
   Block 8: API Key Form
===================================================================================== */
.api-form-container {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    color: var(--main-text);
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 16px;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--main-text);
}

.form-message {
    margin-top: 16px;
    font-size: 14px;
    font-weight: 600;
    display: none;
}

.demo-message {
    font-size: 14px;
    font-weight: 600;
    display: none;
}


.form-message.success {
    color: #10b981; /* A standard, high-contrast success green */
    display: block;
}

.form-message.error {
    color: var(--brand-primary);
    display: block;
}


/* ================================================================================== 
   Block 9: Footer
===================================================================================== */
.footer-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding-bottom: 48px; /* Gives the page some breathing room at the bottom */
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
}

.footer-link {
    color: var(--minor-text);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--main-text);
}

.footer-copy {
    color: var(--minor-text);
    font-size: 14px;
    margin: 0;
}


/* ================================================================================== 
   Salesforce Integration
===================================================================================== */
.instruction-block {
    background-color: var(--bg-alt);
}

.instruction-steps {
    padding-left: 24px;
    /*margin-bottom: 16px;*/
}

.instruction-substeps {
    padding-left: 24px;
    margin-top: 4px;
}

.step-item {
    margin-bottom: 8px;
}

.substep-item {
    margin-bottom: 4px;
}

.semi-bold-text {
    font-weight: 600;
}

.note-text {
    color: var(--minor-text);
}

/* Spacing Utilities */
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mb-24 { margin-bottom: 24px; }

/* Override inherited center alignment for code windows */
.code-window {
    text-align: left;
}

/* Layout Utilities */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.mb-12 { margin-bottom: 12px; }

/* Text Action Link (for inside cards) */
.card-footer-link {
    margin-top: auto; /* Pushes the link to the very bottom of the card */
    padding-top: 16px;
}

.action-link {
    color: var(--brand-primary);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.action-link:hover {
    opacity: 0.8;
}



/* ================================================================================== 
   Toast Notification
===================================================================================== */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--main-text);
    color: var(--bg-color);
    padding: 8px 24px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.toast-notification.show {
    opacity: 1;
    visibility: visible;
    bottom: 40px; /* Slight upward slide */
}







/* Mobile Responsiveness (Cascades across all blocks) */
@media (max-width: 768px) {

    .grid-3, .grid-2 {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-block, .grid-2 {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .demo-controls {
        display: flex;
        justify-content: center;
    }
    
    .button-align {
        flex-direction: column;
        align-items: center;
    }
    
    #demoBtn {
        align-self: center;
        margin: 0 auto;
    }
    
    
    
    #demoStatus.form-message {
        text-align: left;
        margin-top: 8px;
    }
    

    .demo-container {
        grid-template-columns: 1fr;
    }
    
    
    
    

}




    
    
}