/* SPDX-License-Identifier: Apache-2.0 */
/* docs.waldiez.io's landing page. Light by default, dark when the system asks or the toggle says so (theme.js);
   all motion off under prefers-reduced-motion. */
:root {
    color-scheme: light dark;
    --bg: #ffffff;
    --surface: #f4f6fb;
    --line: #d5dae6;
    --text: #0f172a;
    --muted: #475569;
    --link: #5b21b6;
    --accent-a: #0891b2;
    --accent-b: #7c3aed;
    --accent-c: #db2777;
    --focus: #7c3aed;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    line-height: 1.55;
}
/* Dark: when the system asks and no theme was chosen, or when dark was chosen (the toggle, theme.js). */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #050818;
        --surface: #0d1329;
        --line: #243055;
        --text: #e6e9f2;
        --muted: #a3acc4;
        --link: #c4b5fd;
        --accent-a: #22d3ee;
        --accent-b: #8b5cf6;
        --accent-c: #ec4899;
        --focus: #c4b5fd;
    }
}
:root[data-theme="dark"] {
    --bg: #050818;
    --surface: #0d1329;
    --line: #243055;
    --text: #e6e9f2;
    --muted: #a3acc4;
    --link: #c4b5fd;
    --accent-a: #22d3ee;
    --accent-b: #8b5cf6;
    --accent-c: #ec4899;
    --focus: #c4b5fd;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
/* A theme change: theme.js grows the new one as a circle from the toggle; the browser's cross-fade is off. */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--surface); padding: 0.5rem 0.75rem; z-index: 1; }
.muted { color: var(--muted); }
footer { color: var(--muted); font-size: 0.9rem; }

body { min-height: 100vh; display: flex; flex-direction: column; }

/* The bar: the docs site's own, as every page of a docs portal has one. */
.bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.5rem;
       background: color-mix(in srgb, var(--bg) 80%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar img { height: 26px; width: auto; }
.bar .name { font-weight: 700; text-decoration: none; color: var(--text); display: inline-flex; align-items: center; gap: 0.55rem; min-height: 24px; }
.bar .name span { color: var(--muted); font-weight: 500; }
.bar nav { margin-left: auto; display: flex; gap: 1.1rem; }
.bar nav a { text-decoration: none; color: var(--muted); font-weight: 500; min-height: 24px; display: inline-flex; align-items: center; }
.bar nav a:hover { color: var(--text); }

/* The head, over a slow aurora. The aurora is decoration: the text sits on --bg wherever it is read. */
.head { position: relative; isolation: isolate; overflow: hidden; padding: 4.5rem 1.5rem 3.5rem; text-align: center; }
.aurora { position: absolute; inset: -30% -10% auto; height: 520px; z-index: -1; pointer-events: none; filter: blur(60px); opacity: 0.55; }
.aurora i { position: absolute; width: 42%; height: 70%; border-radius: 50%; }
.aurora i:nth-child(1) { left: 8%; top: 10%; background: var(--accent-a); animation: drift-a 18s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { left: 32%; top: 0; background: var(--accent-b); animation: drift-b 22s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { left: 55%; top: 15%; background: var(--accent-c); animation: drift-c 26s ease-in-out infinite alternate; }
@keyframes drift-a { to { transform: translate(12%, 18%) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-10%, 22%) scale(0.9); } }
@keyframes drift-c { to { transform: translate(-16%, -6%) scale(1.1); } }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .aurora { opacity: 0.28; } }
:root[data-theme="light"] .aurora { opacity: 0.28; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
           padding: 0.3rem 0.75rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); }
.head h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; margin: 1rem auto 0.8rem; max-width: 16ch; letter-spacing: -0.03em; }
.head h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent-a), var(--accent-b), var(--accent-c));
              -webkit-background-clip: text; background-clip: text; color: transparent; }
.head p { max-width: 640px; margin: 0 auto; font-size: 1.1rem; }

/* The cards: one per site. They rise in one after the other, and lift and light their edge on hover or focus. */
main { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 1.5rem 3rem; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 1.5rem; }
.card { position: relative; border-radius: 20px; padding: 1px; background: var(--line);
        transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1), background 0.35s, box-shadow 0.35s;
        animation: rise 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.card:nth-child(2) { animation-delay: 0.12s; }
.card:nth-child(3) { animation-delay: 0.24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } }
.card:hover, .card:focus-within {
    transform: translateY(-4px);
    background: linear-gradient(135deg, var(--accent-a), var(--accent-b), var(--accent-c));
    box-shadow: 0 18px 40px -18px color-mix(in srgb, var(--accent-b) 55%, transparent);
}
.inner { height: 100%; border-radius: 19px; background: var(--surface); padding: 1.6rem; display: flex; flex-direction: column; gap: 1rem; }
.top { display: flex; gap: 0.9rem; align-items: center; }
.top img { width: 44px; height: 44px; }
.top h2 { margin: 0; font-size: 1.45rem; }
.top h2 a { color: var(--text); text-decoration: none; }
/* The whole card answers a click on its title: the link's area covers it. */
.top h2 a::after { content: ""; position: absolute; inset: 0; border-radius: 20px; }
.top h2 a:focus-visible { outline: none; }
.card:has(.top a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 4px; }
.summary { margin: 0; }
.go { display: inline-flex; align-items: center; gap: 0.35rem; font-weight: 600; color: var(--link); }
.go span { display: inline-block; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .go span, .card:focus-within .go span { transform: translateX(5px); }
.card h3 { margin: 0.4rem 0 0.3rem; font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.45rem; position: relative; z-index: 1; }
.links a { display: inline-flex; align-items: center; min-height: 32px; padding: 0.25rem 0.7rem; border-radius: 999px; border: 1px solid var(--line);
           background: var(--bg); color: var(--text); text-decoration: none; font-size: 0.92rem; transition: border-color 0.2s, color 0.2s; }
.links a:hover { border-color: var(--accent-b); color: var(--link); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88rem; }
.links code { color: inherit; }

/* The theme toggle: one button, light or dark; the icon of the theme shown turns in. */
.theme-btn { width: 36px; height: 36px; margin-left: 0.5rem; padding: 0; border-radius: 999px; border: 1px solid var(--line);
             background: var(--surface); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer;
             transition: color 0.2s, border-color 0.2s, transform 0.2s; }
.theme-btn[hidden] { display: none; }
.theme-btn:hover { color: var(--text); border-color: var(--accent-b); }
.theme-btn:active { transform: scale(0.92); }
.theme-btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.theme-btn svg { grid-area: 1 / 1; width: 18px; height: 18px; opacity: 0; transform: rotate(-90deg) scale(0.4);
                 transition: opacity 0.25s, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
.theme-btn[aria-pressed="false"] .i-sun, .theme-btn[aria-pressed="true"] .i-moon {
    opacity: 1; transform: none; }

footer { text-align: center; padding: 2rem 1rem 2.5rem; border-top: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
    .aurora i, .card { animation: none; }
    .card, .go span, .links a, .theme-btn, .theme-btn svg { transition: none; }
    .card:hover, .card:focus-within { transform: none; }
}
@media (max-width: 520px) {
    .bar nav a.wide { display: none; }
    .head { padding: 3rem 1.25rem 2.5rem; }
    main { padding: 0 1rem 2.5rem; }
    .cards { grid-template-columns: 1fr; }
}
