/* linbit-tunl landing page.
 *
 * LINBIT brand cues (placeholder values -- update from
 * https://linbit.com/brand/ once the spec is in hand):
 *   primary:    #f7941d  (LINBIT orange)
 *   ink:        #1a1a1a
 *   muted:      #666
 *   surface:    #fff
 *   line:       #e4e4e4
 *   bg-tint:    #f7f6f3  (warm off-white)
 * Typography: system sans, no webfont dependency.
 */

:root {
    --primary:   #f7941d;
    --primary-d: #d57a09;
    --ink:       #1a1a1a;
    --muted:     #666;
    --surface:   #ffffff;
    --line:      #e4e4e4;
    --tint:      #f7f6f3;
    --code-bg:   #1a1a1a;
    --code-fg:   #f0f0f0;
    /* Outer content column.  45rem (~720px) gives short prose ~70ch at
     * body font, fits the curl one-liner without mid-URL wrap, and
     * stacks the download cards comfortably. */
    --max-wrap:  45rem;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--surface);
    color: var(--ink);
    font: 16px/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

.wrap {
    max-width: var(--max-wrap);
    margin: 0 auto;
    padding: 0 1.5rem;
}

header {
    background: var(--tint);
    border-bottom: 1px solid var(--line);
    padding: 3rem 0 2.25rem;
}
header h1 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}
header h1::before {
    content: "";
    display: inline-block;
    width: 0.55em;
    height: 0.55em;
    background: var(--primary);
    border-radius: 2px;
    margin-right: 0.55em;
    transform: translateY(-0.05em);
}
.lede {
    margin: 0;
    max-width: 66ch;
    color: var(--muted);
    font-size: 1.05rem;
}

main {
    padding: 2rem 0 3rem;
}
section {
    padding: 1.25rem 0;
    border-top: 1px solid var(--line);
}
section:first-child { border-top: none; }
section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
    font-weight: 600;
}

a {
    color: var(--primary-d);
    text-decoration: none;
    border-bottom: 1px solid transparent;
}
a:hover { border-bottom-color: var(--primary-d); }

code {
    font: 0.9em/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--tint);
    border: 1px solid var(--line);
    border-radius: 3px;
    padding: 0.05em 0.35em;
    word-break: break-word;
}
pre {
    font: 0.85em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    background: var(--code-bg);
    color: var(--code-fg);
    border-radius: 6px;
    padding: 0.9rem 1rem;
    overflow-x: auto;
    margin: 0.5rem 0 1rem;
}
.key {
    word-break: break-all;
    /* white-space: pre-wrap; */
}
.key .label {
    display: block;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
}

/* Download cards.  Stacked rather than side-by-side so the curl
 * one-liner fits without mid-URL wrap inside .wrap (see --max-wrap
 * in :root).
 *
 * The card itself is a plain container (not a link), so the curl
 * line inside is freely selectable.  A dedicated "Download" anchor
 * and a "Copy" button next to the code block carry the two actions
 * a visitor actually wants. */
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 1rem 0;
}
.card {
    padding: 1rem 1.1rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
}
.card.primary {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.10);
}
.card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    color: var(--primary-d);
}
.card p {
    margin: 0 0 0.6rem;
    color: var(--muted);
    font-size: 0.95rem;
}
.card p.actions {
    margin: 0.6rem 0 0;
}
.card p.card-ref {
    margin: 0.45rem 0 0;
    font-size: 0.85rem;
}

/* The curl one-liner + the Copy button sit side-by-side on wide
 * viewports and stack on narrow ones. */
.code-row {
    display: flex;
    align-items: stretch;
    gap: 0.4rem;
    margin: 0.4rem 0 0;
}
.code-row code {
    flex: 1;
    display: block;
    background: var(--code-bg);
    color: var(--code-fg);
    border: none;
    padding: 0.55rem 0.7rem;
    font-size: 0.78rem;
    white-space: pre-wrap;
    word-break: break-all;
    border-radius: 4px;
    /* Visitor selects from here -- make it obvious that's possible. */
    user-select: all;
    -webkit-user-select: all;
}
.copy-btn {
    flex: 0 0 auto;
    font: inherit;
    font-size: 0.82rem;
    padding: 0 0.85rem;
    color: var(--primary-d);
    background: var(--tint);
    border: 1px solid var(--line);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 120ms, color 120ms, background 120ms;
}
.copy-btn:hover {
    border-color: var(--primary);
}
.copy-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}
.copy-btn.copied {
    color: var(--surface);
    background: var(--primary);
    border-color: var(--primary);
}

/* Explicit download link, styled as a subdued button so it's
 * recognisable at a glance but doesn't compete with the curl line. */
.dl-btn {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--primary);
    border-radius: 4px;
    color: var(--primary-d);
    font-size: 0.9rem;
    /* override the global underlined-on-hover link style */
    border-bottom: 1px solid var(--primary);
}
.dl-btn:hover {
    background: var(--primary);
    color: var(--surface);
    border-bottom-color: var(--primary);
}
.dl-btn .filename {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.85em;
}

ul, ol {
    margin: 0.5rem 0 1rem;
    padding-left: 1.25rem;
}
li { margin: 0.25rem 0; }

.muted { color: var(--muted); font-size: 0.92rem; }

footer {
    border-top: 1px solid var(--line);
    background: var(--tint);
    color: var(--muted);
    font-size: 0.88rem;
    padding: 1rem 0 1.25rem;
}
footer .wrap {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}
footer .right { margin-left: auto; }
