/* LineageOne v1 – Clean capital-markets SaaS stylesheet */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a2e;
    background: #ffffff;
}

a { color: #0f3460; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ================================================================
   TOP NAVIGATION
   ================================================================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}
.nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    height: 56px;
    gap: 2rem;
}
.nav-logo {
    font-size: 1.05rem;
    font-weight: 700;
    color: #0f3460;
    text-decoration: none;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
    flex: 1;
}
.nav-links a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.15s;
    white-space: nowrap;
}
.nav-links a:hover { color: #0f3460; }

.nav-actions {
    display: flex;
    gap: 0.625rem;
    align-items: center;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1.4;
}
.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
}
.btn-primary { background: #0f3460; color: #fff; }
.btn-primary:hover { background: #163d6f; }
.btn-secondary { background: #27ae60; color: #fff; }
.btn-secondary:hover { background: #219150; }
.btn-outline { background: transparent; color: #0f3460; border: 1.5px solid #0f3460; }
.btn-outline:hover { background: #0f3460; color: #fff; }

/* ================================================================
   HERO
   ================================================================ */
.hero {
    padding: 5rem 0 4rem;
    text-align: center;
    background: #fafbfc;
    border-bottom: 1px solid #e5e7eb;
}
.hero-headline {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.025em;
    color: #0f1b2d;
    max-width: 720px;
    margin: 0 auto 1.25rem;
}
.hero-sub {
    font-size: 1.05rem;
    color: #4b5563;
    max-width: 640px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}
.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}
.hero-trust {
    font-size: 0.82rem;
    color: #9ca3af;
    font-weight: 500;
}

/* ================================================================
   SECTIONS
   ================================================================ */
.section {
    padding: 4rem 0;
}
.section-alt {
    background: #fafbfc;
}
.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
    letter-spacing: -0.015em;
    color: #0f1b2d;
}

/* --- Feature cards --- */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}
.feature-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.75rem 1.5rem;
}
.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #0f1b2d;
}
.feature-card p {
    font-size: 0.9rem;
    color: #4b5563;
    line-height: 1.55;
}

/* --- Steps --- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    counter-reset: step-counter;
}
.step {
    text-align: center;
    padding: 1.5rem 1rem;
}
.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0f3460;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
.step h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: #0f1b2d;
}
.step p {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
}

/* --- Security --- */
.security-list {
    list-style: none;
    max-width: 520px;
    margin: 0 auto;
}
.security-list li {
    padding: 0.65rem 0 0.65rem 1.5rem;
    position: relative;
    font-size: 0.925rem;
    color: #374151;
    border-bottom: 1px solid #f3f4f6;
}
.security-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #0f3460;
    font-weight: 700;
}

/* --- Pricing --- */
.pricing-note {
    text-align: center;
    font-size: 0.95rem;
    color: #4b5563;
    margin-bottom: 2rem;
}
.pricing-card {
    max-width: 380px;
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem 1.5rem;
    text-align: center;
}
.pricing-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #0f1b2d;
}
.pricing-card p {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

/* --- Custom Solutions CTA --- */
.cta-section {
    background: #0f1b2d;
    padding: 4rem 0;
}
.cta-inner {
    text-align: center;
}
.cta-section .section-title {
    color: #ffffff;
    margin-bottom: 1rem;
}
.cta-sub {
    color: #9ca3af;
    font-size: 1rem;
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}
.cta-section .btn-primary {
    background: #ffffff;
    color: #0f1b2d;
}
.cta-section .btn-primary:hover {
    background: #e5e7eb;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
    margin-top: 0;
    padding: 2rem 0;
    text-align: center;
    font-size: 0.82rem;
    color: #9ca3af;
    border-top: 1px solid #e5e7eb;
    background: #fafbfc;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.footer-brand strong {
    color: #0f1b2d;
    margin-right: 0.4rem;
}
.footer-brand span {
    color: #6b7280;
}
.footer-links {
    display: flex;
    gap: 1.5rem;
}
.footer-links a {
    font-size: 0.82rem;
    color: #6b7280;
    text-decoration: none;
}
.footer-links a:hover {
    color: #0f3460;
}
.footer-copy {
    font-size: 0.78rem;
    color: #9ca3af;
}

/* ================================================================
   FORM PAGES (Request Demo, Contact)
   ================================================================ */
.form-page {
    max-width: 540px;
    margin: 2rem auto;
}
.form-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.form-intro {
    color: #6b7280;
    font-size: 0.92rem;
    margin-bottom: 1.75rem;
}
.back-link {
    margin-bottom: 1.5rem;
}
.back-link a {
    font-size: 0.85rem;
    color: #6b7280;
    text-decoration: none;
}
.back-link a:hover {
    color: #0f3460;
}

.lead-form .form-group {
    margin-bottom: 1.25rem;
}
.lead-form label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: #374151;
}
.lead-form .req {
    color: #dc2626;
}
.lead-form input[type="text"],
.lead-form input[type="email"],
.lead-form textarea {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.15s;
}
.lead-form input:focus,
.lead-form textarea:focus {
    outline: none;
    border-color: #0f3460;
    box-shadow: 0 0 0 2px rgba(15, 52, 96, 0.08);
}
.lead-form textarea {
    resize: vertical;
}
.has-error input,
.has-error textarea {
    border-color: #dc2626;
}
.field-error {
    display: block;
    font-size: 0.8rem;
    color: #dc2626;
    margin-top: 0.25rem;
}

/* ================================================================
   THANKS PAGE
   ================================================================ */
.thanks-page {
    max-width: 540px;
    margin: 4rem auto;
    text-align: center;
}
.thanks-page h2 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}
.thanks-page p {
    color: #6b7280;
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ================================================================
   APP PAGES (Optimizer workflow)
   ================================================================ */

/* --- Forms --- */
fieldset {
    border: 1px solid #d1d5db;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    background: #fff;
}
legend {
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0 0.4rem;
}
.form-row {
    margin-bottom: 0.75rem;
}
.form-row label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
}
input[type="number"],
input[type="text"],
input[type="file"] {
    width: 100%;
    max-width: 360px;
    padding: 0.45rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.9rem;
    font-family: inherit;
}
input[type="file"] { padding: 0.35rem; }
label input[type="radio"] { margin-right: 0.35rem; }
fieldset label { display: block; margin-bottom: 0.4rem; cursor: pointer; }
.hint { font-size: 0.82rem; color: #666; margin-top: 0.25rem; }

/* --- Summary cards --- */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    text-align: center;
}
.card h4 { font-size: 0.78rem; text-transform: uppercase; color: #666; margin-bottom: 0.3rem; }
.card p { font-size: 1.1rem; font-weight: 700; color: #1a1a2e; }

/* --- Tables --- */
.table-wrapper {
    overflow-x: auto;
    margin-bottom: 1.5rem;
}
.data-table, .summary-table, .caps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    background: #fff;
}
.data-table th, .summary-table th {
    background: #0f3460;
    color: #fff;
    padding: 0.55rem 0.6rem;
    text-align: left;
    white-space: nowrap;
}
.data-table td, .summary-table td, .caps-table td {
    padding: 0.45rem 0.6rem;
    border-bottom: 1px solid #e2e8f0;
}
.data-table tbody tr:hover, .summary-table tbody tr:hover { background: #f0f4ff; }
.caps-table { max-width: 500px; }
.caps-table td { padding: 0.35rem 0.6rem; }
.caps-table .binding td { background: #eef7ee; font-weight: 600; }

/* --- Arrows --- */
.arrow { font-size: 1.1rem; text-align: center; }
.arrow-up { color: #27ae60; }
.arrow-down { color: #e74c3c; }
.arrow-neutral { color: #888; }

/* --- Error / Warning boxes --- */
.error-box {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.error-box ul { margin-left: 1.2rem; color: #b91c1c; }
.warnings {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}
.warnings ul { margin-left: 1.2rem; color: #92400e; }

.detail-box {
    background: #f0f4ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

/* --- Status badge --- */
.status-badge {
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    margin-bottom: 1rem;
}
.status-optimal { background: #d1fae5; color: #065f46; }
.status-infeasible, .status-infeasible-pre-check { background: #fef2f2; color: #b91c1c; }

/* --- Objective row highlight --- */
.objective-row td { background: #eef7ee; }

/* --- Actions --- */
.actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* --- Run form --- */
.run-form {
    margin-top: 1.5rem;
}

/* --- Flash --- */
.flash-messages { margin-bottom: 1rem; }
.flash { padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 0.5rem; }
.flash-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fca5a5; }
.flash-success { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; }

/* ================================================================
   APP MAIN spacing (when inside .container under nav)
   ================================================================ */
main.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
