/*!
 * Kyma Info Pages — shared design components
 * namespace: ki-  (Kyma Info)
 *
 * All values defer to tokens defined in ../style.css.
 * Pages extending base_info.html get these classes automatically.
 * Per-page overrides (hero gradient, --ki-accent) live in each page's
 * {% block extra_head %} style block — only those lines need to change.
 */

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.ki-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(250,250,248,0.72);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle, rgba(28,25,23,0.06));
}
.ki-nav-inner {
    max-width: 860px; margin: 0 auto;
    padding: 0 32px;
    display: flex; align-items: center; justify-content: space-between;
    height: 60px; gap: 16px;
}
.ki-nav-brand {
    display: inline-flex; align-items: center;
    text-decoration: none;
    transition: opacity 160ms;
}
.ki-nav-brand:hover { opacity: 0.65; text-decoration: none; }
.ki-nav-brand img { height: 18px; width: auto; display: block; }
.ki-back {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500;
    color: var(--text-muted, #716960);
    text-decoration: none;
    transition: color 160ms;
}
.ki-back:hover { color: var(--teal-500, #147D8E); text-decoration: none; }
.ki-back svg { width: 14px; height: 14px; stroke-width: 2; }

/* ── Hero base (gradient & --ki-accent set per-page) ─────────────────────── */
.ki-hero {
    position: relative; overflow: hidden;
    --ki-accent: #A7F3D0;
}
.ki-hero::before {
    content: "";
    position: absolute; inset: 0; pointer-events: none;
}
.ki-hero-inner {
    max-width: 860px; margin: 0 auto;
    padding: 64px 32px 72px;
    position: relative; z-index: 1;
}
.ki-hero-eyebrow {
    font-family: var(--font-brand, 'Clash Display', sans-serif);
    font-size: 11px; font-weight: 500;
    letter-spacing: 0.24em; text-transform: uppercase;
    color: var(--ki-accent);
    margin-bottom: 16px;
    display: inline-flex; align-items: center; gap: 8px;
}
.ki-hero-eyebrow::before {
    content: ""; width: 6px; height: 6px; border-radius: 50%;
    background: var(--ki-accent);
    flex-shrink: 0;
}
.ki-hero-title {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: clamp(34px, 5vw, 52px);
    font-weight: 300; letter-spacing: -0.025em; line-height: 1.1;
    color: #fff; margin-bottom: 20px;
}
.ki-hero-title em { font-style: italic; color: var(--ki-accent); font-weight: 300; }
.ki-hero-lead {
    font-size: 17px; line-height: 1.65; color: rgba(255,255,255,0.78);
    max-width: 600px;
}

/* ── Content body ────────────────────────────────────────────────────────── */
.ki-body { max-width: 860px; margin: 0 auto; padding: 64px 32px 96px; }
.ki-section { margin-bottom: 56px; }
.ki-section-title {
    font-family: var(--font-display, 'Fraunces', serif);
    font-size: 24px; font-weight: 300;
    letter-spacing: -0.015em; color: var(--stone-900, #1B1917);
    margin-bottom: 20px; padding-bottom: 14px;
    border-bottom: 1px solid var(--border-subtle, rgba(28,25,23,0.06));
}
.ki-p {
    font-size: 15px; line-height: 1.75;
    color: var(--text-secondary, #4E4843);
    margin-bottom: 14px;
}
.ki-p:last-child { margin-bottom: 0; }
.ki-p strong { color: var(--text-primary, #1B1917); font-weight: 600; }

/* ── Callout box ─────────────────────────────────────────────────────────── */
.ki-callout {
    background: linear-gradient(135deg, rgba(11,86,101,0.06) 0%, rgba(88,181,197,0.06) 100%);
    border: 1px solid rgba(20,125,142,0.15);
    border-radius: 16px;
    padding: 24px 28px; margin: 24px 0;
}
.ki-callout-title {
    font-weight: 600; font-size: 14px;
    color: var(--teal-700, #0C5663); margin-bottom: 8px;
}
.ki-callout p { font-size: 14px; line-height: 1.65; color: var(--text-secondary, #4E4843); margin: 0; }

/* ── Sources list ────────────────────────────────────────────────────────── */
.ki-sources {
    counter-reset: ki-ref; list-style: none; padding: 0; margin: 0;
    display: flex; flex-direction: column; gap: 10px;
}
.ki-sources li {
    counter-increment: ki-ref;
    display: grid; grid-template-columns: 24px 1fr;
    gap: 12px; align-items: baseline;
    font-size: 13px; line-height: 1.6;
    color: var(--text-muted, #716960);
}
.ki-sources li::before {
    content: counter(ki-ref);
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-size: 11px; color: var(--teal-500, #147D8E);
    font-weight: 500; text-align: right;
}
.ki-sources a { color: var(--teal-600, #106A79); }
.ki-sources a:hover { color: var(--teal-500, #147D8E); }

/* ── Disclaimer ──────────────────────────────────────────────────────────── */
.ki-disclaimer {
    background: var(--bg-subtle, #F5F4F0);
    border-radius: 12px;
    padding: 20px 24px;
    font-size: 13px; line-height: 1.65;
    color: var(--text-muted, #716960);
}

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .ki-nav-inner { padding: 0 20px; }
    .ki-hero-inner { padding: 48px 20px 56px; }
    .ki-body { padding: 48px 20px 72px; }
}

/* ── Consent pages (Kyma terms consent, Claude connection consent) ───────────
   Wrap the page in .kc-page; the hero uses the .ki-hero-consent teal variant. */
.ki-hero.ki-hero-consent {
    background: linear-gradient(135deg, var(--teal-800) 0%, var(--navy-900) 100%);
    --ki-accent: var(--teal-200);
}
.ki-hero.ki-hero-consent::before {
    background:
        radial-gradient(55% 80% at 5% 0%, rgba(140,205,216,0.18) 0%, rgba(140,205,216,0) 60%),
        radial-gradient(55% 100% at 95% 100%, rgba(20,125,142,0.25) 0%, rgba(20,125,142,0) 60%);
}
.kc-consent-text p { font-size: 15px; line-height: 1.75; color: var(--text-secondary); margin-bottom: 14px; }
.kc-consent-text p:last-child { margin-bottom: 0; }
.kc-consent-text strong { color: var(--text-primary); font-weight: var(--w-semibold); }
.kc-consent-text h1, .kc-consent-text h2, .kc-consent-text h3, .kc-consent-text h4 {
    font-family: var(--font-body); font-size: 16px; font-weight: var(--w-semibold);
    color: var(--text-primary); line-height: var(--lh-snug); margin: var(--sp-6) 0 var(--sp-2);
}
.kc-consent-text h1:first-child, .kc-consent-text h2:first-child,
.kc-consent-text h3:first-child, .kc-consent-text h4:first-child { margin-top: 0; }
.kc-consent-text ul, .kc-consent-text ol {
    padding-left: var(--sp-6); margin: 0 0 14px; font-size: 15px; line-height: 1.75; color: var(--text-secondary);
}
.kc-consent-text ul { list-style: disc; }
.kc-consent-text ol { list-style: decimal; }
.kc-consent-text li { margin-bottom: var(--sp-1); }
.kc-consent-text li > p { margin-bottom: var(--sp-1); }
.kc-nav-actions { display: flex; align-items: center; gap: var(--sp-4); }
.kc-consent-link { margin-top: var(--sp-4); }
.kc-actions {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-4); flex-wrap: wrap;
    padding-top: var(--sp-6); border-top: 1px solid var(--border-default);
}
.kc-actions-note { font-size: var(--text-body-s); color: var(--text-muted); max-width: 520px; margin: 0; }
.kc-actions-buttons { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.kc-page .ki-body > .ki-callout:first-child { margin-top: 0; }
.kc-callout-action { margin: var(--sp-2) 0 0; font-size: 14px; color: var(--text-muted); }
.kc-link-button {
    background: none; border: 0; padding: 0;
    color: var(--teal-600, #106A79); font: inherit; font-weight: var(--w-semibold);
    text-decoration: underline; cursor: pointer;
}
.kc-link-button:hover { color: var(--teal-500, #147D8E); }

/* Code blocks — MCP URL, CLI commands, inline paths on the Connect Claude page. */
.kc-code {
    display: block;
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-size: 13px;
    background: var(--bg-subtle, #F5F4F0);
    border: 1px solid var(--border-default);
    border-radius: var(--r-md, 10px);
    padding: 12px 14px;
    margin: 8px 0 14px;
    overflow-x: auto;
    white-space: pre;
    color: var(--text-primary);
}
.kc-code-inline {
    background: var(--bg-subtle, #F5F4F0);
    padding: 1px 6px;
    border-radius: 6px;
    font-family: var(--font-mono, 'DM Mono', monospace);
    font-size: 0.92em;
}

/* Sub-step headings inside a .ki-section (e.g. "Add the Kyma skill"). */
.kc-subsection-title {
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: var(--w-semibold);
    color: var(--text-primary);
    margin: var(--sp-6) 0 var(--sp-2);
    border: 0;
}

/* "Which should I use?" choice cards. */
.kc-choice-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-4);
}
.kc-choice-card {
    display: flex; align-items: flex-start; gap: var(--sp-3);
    border: 1px solid var(--border-default);
    border-radius: 14px;
    padding: 18px 20px;
    background: var(--bg-surface, #fff);
    text-decoration: none;
    transition: border-color 160ms;
}
.kc-choice-card:hover { border-color: var(--teal-500, #147D8E); text-decoration: none; }
.kc-choice-card img { flex-shrink: 0; margin-top: 2px; }
.kc-choice-card-title { display: block; font-weight: var(--w-semibold); color: var(--text-primary); margin-bottom: 4px; }
.kc-choice-card-desc { display: block; font-size: 13px; line-height: 1.55; color: var(--text-secondary); margin-top: 4px; }

/* Lists directly followed by a heading need their own bottom spacing. */
.kc-page .ki-body ol,
.kc-page .ki-body ul {
    margin: 0 0 var(--sp-4);
    padding-left: var(--sp-6);
}
.kc-page .ki-body ol { list-style: decimal; }
.kc-page .ki-body ul { list-style: disc; }

@media (max-width: 640px) {
    .kc-choice-grid { grid-template-columns: 1fr; }
}

/* Phones: tighter rhythm, and the actions become a sticky bottom bar
   so the way forward is always visible on a long consent scroll. */
@media (max-width: 640px) {
    .kc-page .kc-nav-actions { gap: var(--sp-3); }
    .kc-page .ki-hero-inner { padding: 36px 20px 40px; }
    .kc-page .ki-hero-lead { font-size: 15px; line-height: 1.55; }
    .kc-page .ki-body { padding: 28px 20px 0; }
    .kc-page .ki-callout { padding: 16px 18px; margin: 0 0 28px; border-radius: var(--r-lg); }
    .kc-page .ki-section { margin-bottom: 36px; }
    .kc-page .ki-section-title { font-size: 21px; margin-bottom: 14px; padding-bottom: 10px; }
    .kc-consent-text p, .kc-consent-text ul, .kc-consent-text ol { font-size: 14px; line-height: 1.65; }
    .kc-consent-link .k-btn { width: 100%; justify-content: center; }
    .kc-actions {
        position: sticky; bottom: 0; z-index: var(--z-sticky);
        flex-direction: column; align-items: stretch; gap: var(--sp-3);
        margin: 0 -20px; padding: var(--sp-3) 20px calc(var(--sp-4) + env(safe-area-inset-bottom));
        background: var(--bg-page); box-shadow: 0 -8px 24px rgba(27,25,23,0.06);
    }
    .kc-actions-note { max-width: none; font-size: 12px; line-height: 1.5; }
    .kc-actions-buttons { flex-wrap: nowrap; }
    .kc-actions-buttons .k-btn { flex: 1 1 0; justify-content: center; }
    .kc-actions > .k-btn { width: 100%; justify-content: center; }
}
