/* The Reelix website. Colours and type are the product's own two themes (themes/marquee, themes/paper),
 * so the site looks like what it describes. Everything is local: no CDN, no tracker. */

@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url(fonts/fraunces-latin-wght-italic.woff2) format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; src: url(fonts/inter-cyrillic-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Noto Serif"; src: url(fonts/noto-serif-cyrillic-wght-normal.woff2) format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; src: url(fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
	--bg: #0c0a08;
	--fg: #efe7dc;
	--muted: #a89c8c;
	--primary: #f2b84b;
	--primary-fg: #1a1208;
	--card: linear-gradient(135deg, rgb(255 240 220 / 0.055), rgb(255 240 220 / 0.015));
	--line: rgb(255 240 220 / 0.09);
	--well: rgb(0 0 0 / 0.38);
	--raised: #15120e;
	--bubble: #2a2219;
	--success: #8fd18b;
	--danger: #ff8a73;
	--info: #7cc4e0;
	--shadow: 0 30px 80px rgb(0 0 0 / 0.6);
	--glow: 0 0 60px rgb(242 184 75 / 0.18);
	--ambient:
		radial-gradient(ellipse 60% 45% at 25% -5%, rgb(70 140 170 / 0.3), transparent 70%),
		radial-gradient(ellipse 50% 40% at 92% 0%, rgb(242 184 75 / 0.16), transparent 70%);
	--poster: linear-gradient(160deg, #2b4a5c 0%, #1a2a38 45%, #6b3a1c 100%);
	--ui: "Inter", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", "Noto Sans SC", system-ui, sans-serif;
	--display: "Fraunces", "Noto Serif", "Songti SC", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", Georgia, serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
	--pill: 999px;
	color-scheme: dark;
}

[data-theme="paper"] {
	--bg: #f5f1ea;
	--fg: #1d1b18;
	--muted: #6b645a;
	--primary: #c8432b;
	--primary-fg: #fffdf9;
	--card: #fffdf9;
	--line: #ddd6c9;
	--well: #ebe5da;
	--raised: #fffdf9;
	--bubble: #ebe5da;
	--success: #2f7d4a;
	--danger: #a3271a;
	--info: #2c6a8c;
	--shadow: 0 24px 60px rgb(60 45 25 / 0.16);
	--glow: none;
	--ambient: radial-gradient(ellipse 60% 40% at 80% 0%, rgb(200 67 43 / 0.07), transparent 70%);
	--poster: linear-gradient(160deg, #c9d6d8 0%, #e3d5bf 50%, #d9a383 100%);
	--pill: 4px;
	color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.65 var(--ui); -webkit-font-smoothing: antialiased; overflow-x: hidden; transition: background 0.3s, color 0.3s; }
h1, h2, h3, p, ul, ol, figure, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
code, pre { font-family: var(--mono); font-size: 0.8125rem; font-variant-ligatures: none; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.solid { fill: currentColor; stroke: none; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

.ambient { position: absolute; inset: 0 0 auto; height: 70rem; background: var(--ambient); pointer-events: none; z-index: -1; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 2rem; padding: 0.85rem clamp(1rem, 4vw, 3rem); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); background: color-mix(in srgb, var(--bg) 78%, transparent); border-bottom: 1px solid var(--line); }
.brand { font: 700 1.5rem/1 var(--display); letter-spacing: -0.02em; }
.brand i { color: var(--primary); font-style: normal; }
.links { display: flex; gap: 1.75rem; font-size: 0.9rem; color: var(--muted); margin-right: auto; }
.links a:hover, .foot nav a:hover { color: var(--fg); }
.tools { display: flex; align-items: center; gap: 0.5rem; margin-left: auto; }
.icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--pill); color: var(--muted); }
.icon:hover { color: var(--fg); background: var(--well); }
.lang { position: relative; font-size: 0.875rem; }
.lang summary { list-style: none; cursor: pointer; padding: 0.4rem 0.8rem; border-radius: var(--pill); color: var(--muted); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: " ▾"; font-size: 0.7em; }
.lang summary:hover, .lang[open] summary { color: var(--fg); background: var(--well); }
.lang ul { position: absolute; right: 0; top: calc(100% + 0.4rem); min-width: 9rem; padding: 0.35rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--raised); box-shadow: var(--shadow); }
.lang li a { display: block; padding: 0.45rem 0.7rem; border-radius: 0.5rem; }
.lang li a:hover { background: var(--well); }
.lang li a[aria-current] { color: var(--primary); }

.btn { display: inline-flex; align-items: center; gap: 0.55rem; padding: 0.8rem 1.4rem; border-radius: var(--pill); background: var(--primary); color: var(--primary-fg); font-weight: 600; font-size: 0.95rem; box-shadow: var(--glow); transition: transform 0.15s, filter 0.15s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--well); }
.btn.small { padding: 0.45rem 1rem; font-size: 0.85rem; box-shadow: none; }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; max-width: 82rem; margin: 0 auto; padding: clamp(3rem, 8vw, 6.5rem) clamp(1rem, 4vw, 3rem) clamp(3rem, 6vw, 5rem); }
.eyebrow { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--primary); margin-bottom: 1.5rem; }
h1 { font: 700 clamp(2.5rem, 5.3vw, 4.4rem)/1.04 var(--display); letter-spacing: -0.03em; }
h1 span { display: block; }
h1 em { display: block; font-style: italic; font-weight: 500; color: var(--primary); }
:lang(zh-Hans) h1, :lang(ru) h1 { letter-spacing: 0; line-height: 1.15; }
:lang(zh-Hans) h1 em, :lang(ru) h1 em { font-style: normal; }
.lead { margin: 1.75rem 0 2rem; font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--muted); max-width: 34rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.fine { margin-top: 1.5rem; font-size: 0.85rem; color: var(--muted); }
.fine a { color: var(--primary); white-space: nowrap; }

/* The conversation illustration */
.demo { position: relative; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--raised); box-shadow: var(--shadow), var(--glow); overflow: hidden; }
.demo-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); }
.demo-bar i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--line); }
.demo-bar span { margin-left: 0.6rem; font: 700 0.95rem/1 var(--display); }
.demo-bar b { color: var(--primary); }
.demo-body { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.1rem; font-size: 0.85rem; }
.bubble { align-self: flex-end; max-width: 85%; padding: 0.6rem 1rem; border-radius: 1.1rem 1.1rem 0.3rem 1.1rem; background: var(--bubble); }
.steps { display: flex; flex-direction: column; gap: 0.3rem; color: var(--muted); border-left: 1px solid var(--line); margin-left: 0.4rem; padding-left: 0.8rem; }
.steps li { display: flex; align-items: flex-start; gap: 0.5rem; }
.steps svg { color: var(--success); margin-top: 0.25em; }
.title-card { display: flex; gap: 0.9rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--card); }
.poster { flex: none; width: 4.4rem; aspect-ratio: 2 / 3; border-radius: 0.5rem; background: var(--poster); display: grid; place-items: end start; padding: 0.4rem; font: 700 0.8rem/1 var(--display); color: #fff; text-shadow: 0 1px 6px rgb(0 0 0 / 0.5); }
.title-card h3 { font: 700 1.4rem/1.1 var(--display); }
.meta { display: flex; flex-wrap: wrap; gap: 0.3rem 0.7rem; margin: 0.35rem 0; color: var(--muted); font-size: 0.78rem; }
.star { color: var(--primary); }
.overview { color: var(--muted); font-size: 0.8rem; line-height: 1.5; }
.releases { display: flex; flex-direction: column; gap: 0.35rem; }
.releases li { padding: 0.5rem 0.7rem; border: 1px solid var(--line); border-radius: 0.7rem; background: var(--well); }
.releases code { display: block; font-size: 0.74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.releases p { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.55rem; margin-top: 0.25rem; font-size: 0.72rem; color: var(--muted); }
.tag { padding: 0 0.4rem; border-radius: 0.3rem; background: var(--line); color: var(--fg); font: 500 0.68rem/1.6 var(--mono); }
.releases b { font-weight: 600; }
.releases .picked { border-color: var(--primary); }
.releases .picked b { color: var(--primary); }
.releases .skipped { opacity: 0.6; }
.releases .skipped b { color: var(--danger); }
.answer { line-height: 1.55; }
.badge { display: inline-block; margin-left: 0.3rem; padding: 0 0.5rem; border-radius: 0.35rem; background: color-mix(in srgb, var(--success) 18%, transparent); color: var(--success); font-size: 0.72rem; white-space: nowrap; }
.demo-input { display: flex; align-items: center; justify-content: space-between; margin: 0 1.1rem 1.1rem; padding: 0.45rem 0.5rem 0.45rem 1.1rem; border: 1px solid var(--line); border-radius: var(--pill); color: var(--muted); font-size: 0.85rem; }
.demo-input button { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--pill); background: var(--primary); color: var(--primary-fg); }
.demo figcaption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.js .demo [data-step] { transition: opacity 0.45s, transform 0.45s; }
.js .demo [data-step].wait { opacity: 0; transform: translateY(0.6rem); }

/* The marquee band */
.ticker { overflow: hidden; border-block: 1px solid var(--line); padding: 1rem 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker div { display: flex; width: max-content; animation: slide 40s linear infinite; }
.ticker span { font: 500 italic 1.5rem/1 var(--display); color: var(--muted); padding: 0 1.5rem; white-space: nowrap; }
.ticker span::after { content: "✦"; font-style: normal; font-size: 0.7em; color: var(--primary); margin-left: 3rem; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Sections */
.block { max-width: 76rem; margin: 0 auto; padding: clamp(4rem, 9vw, 7.5rem) clamp(1rem, 4vw, 3rem) 0; }
.block.wide { max-width: 88rem; }
.head { max-width: 44rem; margin-bottom: 3rem; }
h2 { font: 700 clamp(2rem, 4vw, 3.1rem)/1.08 var(--display); letter-spacing: -0.02em; }
:lang(zh-Hans) h2, :lang(ru) h2 { letter-spacing: 0; line-height: 1.2; }
.head p { margin-top: 1rem; font-size: 1.1rem; color: var(--muted); }
h3 { font: 600 1.15rem/1.3 var(--display); }

/* The loop, as a strip of film */
.strip { display: grid; grid-template-columns: repeat(6, minmax(11.5rem, 1fr)); gap: 0; overflow-x: auto; border-radius: 0.75rem; background: var(--well); border: 1px solid var(--line); padding: 1.6rem 0; position: relative; scrollbar-width: thin;
	background-image: radial-gradient(circle, var(--bg) 0.28rem, transparent 0.3rem), radial-gradient(circle, var(--bg) 0.28rem, transparent 0.3rem); background-size: 1.6rem 1.6rem; background-repeat: repeat-x; background-position: 0.4rem -0.02rem, 0.4rem calc(100% + 0.02rem); background-attachment: local; }
.strip li { padding: 1.4rem 1.25rem; border-right: 1px solid var(--line); background: var(--raised); min-height: 13rem; }
.strip li:last-child { border-right: 0; }
.strip .n { font: 500 0.75rem/1 var(--mono); color: var(--primary); letter-spacing: 0.1em; }
.strip h3 { margin: 0.9rem 0 0.5rem; font-size: 1.5rem; font-weight: 700; }
.strip p { font-size: 0.88rem; color: var(--muted); line-height: 1.55; }

.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card, .grid article { padding: 1.6rem; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--card); }
.card p, .grid p { margin-top: 0.6rem; color: var(--muted); font-size: 0.95rem; }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.grid article { border-radius: 1rem; background: none; border-width: 1px 0 0; border-radius: 0; padding: 1.4rem 0 0; }
.grid h3::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--primary); margin-right: 0.6rem; vertical-align: 0.12em; }

/* Tabs */
.tabs { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.25rem; border-radius: calc(var(--pill) + 0.25rem); background: var(--well); border: 1px solid var(--line); }
.tabs.center { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 1.5rem; justify-content: center; }
.tabs button { padding: 0.45rem 1rem; border-radius: var(--pill); font-size: 0.875rem; color: var(--muted); transition: background 0.2s, color 0.2s; }
.tabs button:hover { color: var(--fg); }
.tabs button[aria-selected="true"] { background: var(--primary); color: var(--primary-fg); font-weight: 600; }

.c { color: var(--muted); }
.p { color: var(--muted); user-select: none; }

/* Screens */
.screen figure { position: relative; }
.screen img { width: 100%; border: 1px solid var(--line); border-radius: clamp(0.6rem, 1.4vw, 1.1rem); box-shadow: var(--shadow), var(--glow); background: var(--raised); }
.screen figcaption { margin-top: 1.25rem; text-align: center; color: var(--muted); }

/* Plugins */
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.chips li { padding: 0.3rem 0.8rem; border: 1px solid var(--line); border-radius: var(--pill); font-size: 0.82rem; background: var(--card); }
.term { border: 1px solid var(--line); border-radius: 1rem; background: var(--raised); overflow: hidden; }
.term { position: relative; margin-top: 1rem; text-align: left; }
.term pre { padding: 1.1rem 4.5rem 1.1rem 1.2rem; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.9; }
.copy { position: absolute; top: 0.6rem; right: 0.6rem; padding: 0.25rem 0.7rem; border: 1px solid var(--line); border-radius: var(--pill); background: var(--raised); font-size: 0.75rem; color: var(--muted); }
.copy:hover { color: var(--fg); }

/* Works with */
.works { margin-top: clamp(4rem, 9vw, 7.5rem); padding: 3rem clamp(1rem, 4vw, 3rem); border-block: 1px solid var(--line); text-align: center; }
.works h2 { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.works ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem 2.2rem; margin: 1.6rem auto 1.2rem; max-width: 60rem; }
.works li { font: 600 clamp(1.1rem, 2vw, 1.5rem)/1.3 var(--display); }
.works p { color: var(--muted); font-size: 0.9rem; }

/* Get started */
.start { max-width: 54rem; text-align: center; padding-bottom: clamp(4rem, 9vw, 7rem); }
.start .head { margin-inline: auto; }
.status { margin-top: 1.5rem; padding: 0.9rem 1.2rem; border-left: 2px solid var(--primary); background: var(--well); text-align: left; font-size: 0.88rem; color: var(--muted); border-radius: 0 0.5rem 0.5rem 0; }

.foot { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; max-width: 76rem; margin: 0 auto; padding: 3rem clamp(1rem, 4vw, 3rem); border-top: 1px solid var(--line); font-size: 0.9rem; color: var(--muted); }
.foot .brand { color: var(--fg); }
.foot p { margin-top: 0.7rem; max-width: 24rem; }
.foot nav { display: grid; gap: 0.45rem; align-content: start; }
.foot h2 { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--fg); margin-bottom: 0.4rem; }

.js .reveal { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.7s, transform 0.7s; }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 60rem) {
	.hero { grid-template-columns: minmax(0, 1fr); }
	.three, .grid { grid-template-columns: minmax(0, 1fr); }
	.links { display: none; }
	.foot { grid-template-columns: 1fr 1fr; }
	.foot > div { grid-column: 1 / -1; }
}
@media (max-width: 36rem) {
	.tools .btn, .tools a.icon { display: none; }
	.term pre .c { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.ticker div { animation: none; }
	.js .reveal, .js .demo [data-step] { transition: none; }
}
