/* Minimal, data-driven styling for the learn-more page.
   Everything that maps onto a design-system token lives in Swift; this file
   only carries what cannot be expressed as a token: preformatted code blocks
   and the two chart primitives (gradient meter bars and a polyline plot). */

:root {
    --lm-accent-from: #EF934C;
    --lm-accent-to: #EA3E32;
    --lm-track: color-mix(in srgb, var(--l) 12%, transparent);
    --lm-muted: color-mix(in srgb, var(--l) 32%, transparent);
}

/* Hero & call-to-action ------------------------------------------------ */

#learn-more-hero {
    background: linear-gradient(160deg, var(--lm-accent-from) 0%, var(--lm-accent-to) 100%);
}

#learn-more-cta {
    background: linear-gradient(320deg, var(--lm-accent-from) 0%, var(--lm-accent-to) 100%);
}

.lm-ecosystem-tile {
    background: linear-gradient(135deg, var(--lm-accent-from) 0%, var(--lm-accent-to) 100%);
}

/* Section eyebrow ------------------------------------------------------- */

/* The numbered eyebrow paints the shared brand gradient onto its glyphs so
   every section ties back to the hero. The solid colour is a fallback for
   engines without `background-clip: text`. */
.lm-eyebrow {
    color: var(--lm-accent-to);
    background: linear-gradient(90deg, var(--lm-accent-from), var(--lm-accent-to));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 0.14em;
}

/* Split feature rows --------------------------------------------------- */

/* Code blocks ---------------------------------------------------------- */

/* The code sample keeps a fixed dark canvas regardless of the page theme so
   the syntax colours stay legible. Token hues reuse design-system variables
   that have no dark-mode override (so they read the same on this dark canvas):
   the brand gradient endpoints for keywords/types, and --o / --bl / --ac300 /
   --ls for numbers, members, attributes and comments. */
.lm-code-block {
    --lm-code-fg: #e6e6e6;
    background: #17181c;
    /* Keep a fixed, subtle edge instead of the theme-adaptive separator, which
       would read as a bright line on this dark canvas in light mode. */
    border-color: rgba(255, 255, 255, 0.08);
}

.lm-code {
    margin: 0;
    overflow-x: auto;
    white-space: pre;
    tab-size: 4;
    line-height: 1.6;
    color: var(--lm-code-fg);
}

.lm-code code {
    font: inherit;
}

.lm-tok-keyword {
    color: var(--lm-accent-to);
    font-weight: 600;
}

.lm-tok-type {
    color: var(--lm-accent-from);
}

.lm-tok-string {
    color: color-mix(in srgb, var(--g) 55%, white);
}

.lm-tok-number {
    color: var(--o);
}

.lm-tok-member {
    color: var(--bl);
}

.lm-tok-attribute {
    color: var(--ac300);
}

.lm-tok-comment {
    color: var(--ls);
    font-style: italic;
}

/* Meter bars ----------------------------------------------------------- */

.lm-bar-track {
    position: relative;
    width: 100%;
    height: 0.85rem;
    border-radius: 999px;
    background: var(--lm-track);
    overflow: hidden;
}

.lm-bar-fill {
    height: 100%;
    width: var(--lm-value, 0%);
    border-radius: 999px;
    background: var(--lm-muted);
}

.lm-bar-fill--accent {
    background: linear-gradient(90deg, var(--lm-accent-from), var(--lm-accent-to));
}

/* Polyline plot -------------------------------------------------------- */

.lm-plot {
    position: relative;
    width: 100%;
    height: 18rem;
}

.lm-gridline {
    position: absolute;
    left: 0;
    right: 0;
    top: var(--lm-top, 0%);
    height: 1px;
    background: color-mix(in srgb, var(--l) 14%, transparent);
}

.lm-ytick {
    position: absolute;
    left: 0;
    top: var(--lm-top, 0%);
    transform: translateY(-50%);
    padding-right: 0.4rem;
}

.lm-line {
    position: absolute;
    inset: 0;
    clip-path: var(--lm-shape);
}

.lm-line--accent {
    background: linear-gradient(90deg, var(--lm-accent-from), var(--lm-accent-to));
}

.lm-line--strong {
    background: color-mix(in srgb, var(--l) 70%, transparent);
}

.lm-line--soft {
    background: color-mix(in srgb, var(--l) 36%, transparent);
}

.lm-dot {
    position: absolute;
    left: var(--lm-x);
    top: var(--lm-y);
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    transform: translate(-50%, -50%);
}

.lm-dot--accent {
    background: var(--lm-accent-to);
}

.lm-dot--strong {
    background: color-mix(in srgb, var(--l) 70%, transparent);
}

.lm-dot--soft {
    background: color-mix(in srgb, var(--l) 36%, transparent);
}
