/* MCP Gateway Landing Page — Coretura Brand Identity */

:root {
    /* Main colors */
    --coretura-red: #F64370;
    --coretura-blue: #008FC9;

    /* Logotype colors */
    --color-black: #000000;
    --color-white: #FFFFFF;

    /* Background colors */
    --color-beige: #F7F6F2;
    --color-beige-light: #FBFAF8;
    --color-beige-mid: #F1EFE8;
    --color-beige-dark: #EBE8DF;
    --color-dark-blue: #002540;

    /* Accent colors */
    --color-pink: #FBB4C6;
    --color-dark-red: #621B2D;
    --color-light-blue: #99D2E9;
    --color-medium-blue: #005679;

    /* UX scale */
    --red-100: #FDD9E2;
    --red-200: #FBB4C6;
    --red-300: #FA8EA9;
    --red-400: #F8698D;
    --red-500: #F64370;
    --red-600: #C5365A;
    --red-700: #942843;
    --red-800: #621B2D;

    --blue-100: #CCE9F4;
    --blue-200: #99D2E9;
    --blue-300: #66BCDF;
    --blue-400: #33A5D4;
    --blue-500: #008FC9;
    --blue-600: #0072A1;
    --blue-700: #005679;
    --blue-800: #003950;

    /* Semantic */
    --color-bg: var(--color-beige);
    --color-surface: var(--color-white);
    --color-text: var(--color-black);
    --color-text-secondary: var(--color-medium-blue);
    --color-text-muted: #6c757d;
    --color-border: var(--color-beige-dark);
    --color-healthy: #28a745;
    --color-unhealthy: var(--coretura-red);
    --color-unknown: #6c757d;

    --radius: 8px;
    --shadow: 0 1px 3px rgba(0, 37, 64, 0.06);
    --shadow-hover: 0 4px 16px rgba(0, 37, 64, 0.1);
}

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

body {
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header — Dark Blue with gradient accent line */

header {
    background: var(--color-dark-blue);
    color: var(--color-white);
    padding: 2.5rem 1.5rem 2rem;
    position: relative;
}

header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--coretura-red), var(--coretura-blue));
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.header-logo {
    height: 28px;
    width: auto;
    flex-shrink: 0;
}

.header-divider {
    width: 1px;
    height: 28px;
    background: rgba(255, 255, 255, 0.25);
    flex-shrink: 0;
}

.header-text h1 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.subtitle {
    opacity: 0.7;
    font-size: 0.8rem;
    font-weight: 300;
    margin-top: 0.15rem;
}

/* Main */

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    flex: 1;
    width: 100%;
}

/* Service grid */

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
    gap: 1.5rem;
}

/* Service card */

.service-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--coretura-red), var(--coretura-blue));
    opacity: 0;
    transition: opacity 0.2s;
}

.service-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--blue-200);
}

.service-card:hover::before {
    opacity: 1;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.service-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-dark-blue);
}

/* Health badge */

.health-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    white-space: nowrap;
}

.health-healthy {
    background: #d4edda;
    color: var(--color-healthy);
}

.health-unhealthy {
    background: var(--red-100);
    color: var(--coretura-red);
}

.health-unknown {
    background: var(--color-beige-mid);
    color: var(--color-unknown);
}

/* Description */

.service-description {
    font-size: 0.88rem;
    color: var(--color-text);
    font-weight: 300;
}

.service-description.muted {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Details table */

.service-details {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.82rem;
    background: var(--color-beige-light);
    padding: 0.75rem;
    border-radius: 6px;
}

.detail-row {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
}

.detail-label {
    color: var(--color-medium-blue);
    min-width: 80px;
    flex-shrink: 0;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.detail-value {
    word-break: break-all;
}

code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 0.82em;
    background: var(--color-beige-mid);
    padding: 0.1em 0.35em;
    border-radius: 3px;
}

.copyable {
    cursor: pointer;
    transition: background 0.15s;
}

.copyable:hover {
    background: var(--blue-100);
}

.copyable.copied {
    background: #d4edda;
}

/* Tools section */

details {
    font-size: 0.88rem;
}

summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--coretura-blue);
    padding: 0.25rem 0;
}

summary:hover {
    color: var(--color-medium-blue);
}

.tool-list {
    list-style: none;
    padding: 0.5rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tool-list li {
    font-size: 0.82rem;
}

.tool-desc {
    color: var(--color-text-muted);
    font-weight: 300;
}

/* Install section */

.install-tabs {
    padding-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.install-tab h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-medium-blue);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.install-tab pre {
    background: var(--color-beige-light);
    padding: 0.75rem;
    border-radius: 6px;
    overflow-x: auto;
    font-size: 0.78rem;
    line-height: 1.5;
    border: 1px solid var(--color-beige-dark);
}

.install-tab pre code {
    background: none;
    padding: 0;
}

/* Actions */

.service-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    padding-top: 0.5rem;
}

.btn {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    font-family: inherit;
}

.btn-primary {
    background: var(--coretura-blue);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-medium-blue);
    box-shadow: 0 2px 8px rgba(0, 143, 201, 0.25);
}

.btn-outline {
    border: 1px solid var(--color-border);
    color: var(--color-dark-blue);
    background: transparent;
}

.btn-outline:hover {
    background: var(--color-beige-light);
    border-color: var(--blue-200);
}

/* Capabilities */

.capabilities {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.capability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 14px;
    line-height: 1;
}

.is-hidden {
    display: none !important;
}

.clipboard-fallback {
    position: fixed;
    left: -9999px;
}

.capability-icon {
    display: block;
    width: 14px;
    height: 14px;
    min-width: 14px;
    max-width: 14px;
    min-height: 14px;
    max-height: 14px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.capability-active {
    background: var(--blue-100);
    color: var(--color-medium-blue);
}

.capability-zero {
    background: var(--color-beige-mid);
    color: var(--color-text-muted);
}

/* Configuration helper */

.config-helper {
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--color-border);
}

.config-helper h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-dark-blue);
    margin-bottom: 0.25rem;
}

.config-subtitle {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-weight: 300;
    margin-bottom: 1.5rem;
}

.config-controls {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.config-field label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-medium-blue);
}

.config-field select {
    font-family: inherit;
    font-size: 0.85rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-white);
    color: var(--color-text);
    cursor: pointer;
    min-width: 160px;
}

.config-field select:focus {
    outline: none;
    border-color: var(--coretura-blue);
    box-shadow: 0 0 0 2px var(--blue-100);
}

.config-tabs {
    display: flex;
    gap: 0;
}

.config-tab {
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.45rem 0.9rem;
    border: 1px solid var(--color-border);
    background: var(--color-white);
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.15s;
}

.config-tab:first-child {
    border-radius: var(--radius) 0 0 var(--radius);
}

.config-tab:last-child {
    border-radius: 0 var(--radius) var(--radius) 0;
}

.config-tab:only-child {
    border-radius: var(--radius);
}

.config-tab.active {
    background: var(--color-dark-blue);
    border-color: var(--color-dark-blue);
    color: var(--color-white);
}

.config-result {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.config-step {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.config-step-number {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--color-dark-blue);
    color: var(--color-white);
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.config-step-content {
    flex: 1;
    min-width: 0;
}

.config-instruction {
    font-size: 0.82rem;
    color: var(--color-text);
    font-weight: 400;
    margin-bottom: 0.6rem;
    line-height: 1.5;
}

.config-code-block {
    position: relative;
    background: var(--color-dark-blue);
    border-radius: 6px;
    padding: 1rem 3rem 1rem 1rem;
    overflow-x: auto;
}

.config-code-block pre {
    margin: 0;
}

.config-code-block code {
    font-family: "SF Mono", "Fira Code", "Fira Mono", Menlo, Consolas, monospace;
    font-size: 0.82rem;
    line-height: 1.5;
    color: var(--color-white);
    background: none;
    padding: 0;
    white-space: pre;
}

.config-copy-btn {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font: inherit;
    transition: all 0.15s;
}

.config-copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
}

.config-copy-btn.copied {
    color: var(--color-healthy);
    background: rgba(40, 167, 69, 0.2);
}

.btn-icon {
    display: block;
    width: 16px;
    height: 16px;
    min-width: 16px;
    max-width: 16px;
    min-height: 16px;
    max-height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Empty state */

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}

.empty-state h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--color-dark-blue);
    font-weight: 700;
}

.empty-state p {
    font-weight: 300;
}

/* Footer */

footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 300;
    border-top: 1px solid var(--color-border);
}

/* Responsive */

@media (max-width: 768px) {
    .service-grid {
        grid-template-columns: 1fr;
    }

    header {
        padding: 1.5rem 1rem;
    }

    main {
        padding: 1.5rem 1rem;
    }
}
