/* Kaleido's site uses the app's own six palettes; the theme picker recolours the whole page. */
:root, [data-theme="tungsten"] {
  --bg: #0d0c0b; --bg-2: #15130f; --fg: #f3efe8; --muted: rgba(243, 239, 232, 0.6);
  --accent: #f0c98a; --accent-fg: #1d1406; --btn: rgba(255, 255, 255, 0.08);
  --dd-line: #e9dcc3; --dd-accent: #f0c98a; --dd-red: #d9583b; --dd-cyan: #57b7c8; --dd-beam: #ffe2ad;
  --warm-1: #3a2717; --warm-2: #120c08;
}
[data-theme="daylight"] {
  --bg: #f3eee5; --bg-2: #e9e2d5; --fg: #1f1b16; --muted: rgba(31, 27, 22, 0.6);
  --accent: #d9583b; --accent-fg: #fff; --btn: rgba(31, 27, 22, 0.07);
  --dd-line: #2a251e; --dd-accent: #d9583b; --dd-red: #d9583b; --dd-cyan: #2d8fa3; --dd-beam: #ffc85e;
  --warm-1: #f7f0e3; --warm-2: #d6c9b2;
}
[data-theme="neon"] {
  --bg: #090a14; --bg-2: #10122a; --fg: #eef2ff; --muted: rgba(238, 242, 255, 0.6);
  --accent: #4fe3ff; --accent-fg: #04141a; --btn: rgba(143, 163, 255, 0.12);
  --dd-line: #93a6ff; --dd-accent: #ff4fd8; --dd-red: #ff4fd8; --dd-cyan: #4fe3ff; --dd-beam: #b6f3ff;
  --warm-1: #1d1650; --warm-2: #06060f;
}
[data-theme="forest"] {
  --bg: #0b120d; --bg-2: #121c15; --fg: #eef3e6; --muted: rgba(238, 243, 230, 0.6);
  --accent: #c8e39a; --accent-fg: #142008; --btn: rgba(200, 227, 154, 0.1);
  --dd-line: #cfe0bf; --dd-accent: #c8e39a; --dd-red: #e3a25b; --dd-cyan: #7cc3b0; --dd-beam: #f2f7c8;
  --warm-1: #26371f; --warm-2: #0a100b;
}
[data-theme="rose"] {
  --bg: #120a0e; --bg-2: #1c1016; --fg: #fbeef2; --muted: rgba(251, 238, 242, 0.6);
  --accent: #f3a6b8; --accent-fg: #2a0f17; --btn: rgba(243, 166, 184, 0.12);
  --dd-line: #f1cfd8; --dd-accent: #f3a6b8; --dd-red: #e86b7d; --dd-cyan: #9fc7e8; --dd-beam: #ffd9e2;
  --warm-1: #3d1a28; --warm-2: #12080c;
}
[data-theme="mono"] {
  --bg: #0a0a0a; --bg-2: #141414; --fg: #f2f2f2; --muted: rgba(242, 242, 242, 0.58);
  --accent: #ffffff; --accent-fg: #000; --btn: rgba(255, 255, 255, 0.09);
  --dd-line: #d6d6d6; --dd-accent: #ffffff; --dd-red: #bdbdbd; --dd-cyan: #8a8a8a; --dd-beam: #ffffff;
  --warm-1: #2c2c2c; --warm-2: #0a0a0a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 17px/1.6 "Instrument Sans", "Segoe UI", system-ui, sans-serif; -webkit-font-smoothing: antialiased; transition: background-color 0.6s, color 0.6s; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2 { font-family: "Instrument Serif", Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -0.01em; margin: 0; }
h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; }
h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.lede { color: var(--muted); margin: 10px 0 0; font-size: 18px; }
.fine { color: var(--muted); font-size: 14px; }
section { width: min(1180px, 100% - 40px); margin: 0 auto; }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; padding: 14px max(20px, calc(50% - 590px)); background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); transition: background-color 0.6s; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand img { width: 26px; }
.nav nav { display: flex; gap: 26px; align-items: center; font-size: 15px; }
.nav nav a { text-decoration: none; color: var(--muted); }
.nav nav a:hover { color: var(--fg); }
.nav .nav-cta { color: var(--accent-fg); background: var(--accent); padding: 7px 14px; border-radius: 8px; font-weight: 600; }
.nav .nav-cta:hover { color: var(--accent-fg); filter: brightness(1.06); }

/* buttons */
.ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.ctas.center { justify-content: center; }
.btn { display: inline-flex; flex-direction: column; align-items: flex-start; padding: 13px 20px; border-radius: 10px; background: var(--btn); text-decoration: none; font-weight: 600; transition: transform 0.15s, background-color 0.6s, color 0.6s; }
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: var(--accent); color: var(--accent-fg); }
.btn.big { padding: 18px 26px; font-size: 19px; min-width: 260px; }
.btn small { font-weight: 400; font-size: 13px; opacity: 0.75; margin-top: 2px; }

/* hero */
.hero { position: relative; min-height: min(720px, 88vh); width: 100%; }
.hero-art { position: absolute; inset: 0 2% 0 0; }
.hero-text { position: absolute; left: max(20px, calc(50% - 590px)); top: 31%; width: min(480px, 44%); z-index: 2; }
.wordrow { display: flex; align-items: center; gap: 18px; }
.mark { width: clamp(56px, 6vw, 92px); animation: iris 1.4s cubic-bezier(0.2, 0.9, 0.2, 1) both; transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.2, 1); }
.mark:hover { transform: rotate(60deg); }
@keyframes iris { from { opacity: 0; transform: rotate(-150deg) scale(0.5); } }
h1 { font-size: clamp(64px, 9vw, 128px); line-height: 0.95; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }
.underline { display: block; width: clamp(200px, 22vw, 340px); height: 24px; margin: 4px 0 0 calc(clamp(56px, 6vw, 92px) + 22px); overflow: visible; }
.underline path { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.2s cubic-bezier(0.5, 0, 0.2, 1) 0.6s forwards; transition: stroke 0.6s; }
.tag { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--muted); margin: 26px 0 24px; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s both; }
.hero .ctas { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both; }
.hero .fine { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) 0.55s both; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* framed screenshots */
.window { border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45), 0 0 0 1px color-mix(in srgb, var(--fg) 10%, transparent); }
.window-bar { display: flex; gap: 7px; padding: 11px 14px; background: #191714; }
.window-bar i { width: 11px; height: 11px; border-radius: 50%; background: #3a3631; }
.window-shot { margin-top: 20px; }
.caption { text-align: center; color: var(--muted); margin: 22px auto 0; max-width: 640px; }

/* the pause */
.pause { margin-top: 140px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; padding: 64px; border-radius: 28px; background: radial-gradient(ellipse at 70% 40%, var(--warm-1), var(--warm-2) 75%); color: #f3ead9; }
[data-theme="daylight"] .pause { color: #2a241c; }
.pause p { opacity: 0.75; font-size: 18px; }
.pause-shot img { border-radius: 10px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); transform: rotate(-1.2deg); }

/* only in kaleido */
.only { margin-top: 140px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 56px; margin-top: 44px; }
.feature { display: flex; gap: 22px; align-items: flex-start; }
.feature p { margin: 0; color: var(--muted); }
.fx { flex: none; width: 120px; height: 90px; overflow: visible; }
.fx .ln { fill: none; stroke: var(--dd-line); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.6s; }
.fx .dim { stroke-opacity: 0.45; }
.fx .accent { stroke: var(--dd-accent); }
.spin-back { transform-box: fill-box; transform-origin: center; animation: back 2.4s cubic-bezier(0.6, 0, 0.3, 1) infinite; }
@keyframes back { 0%, 30% { transform: rotate(0); } 70%, 100% { transform: rotate(-360deg); } }
.type { stroke-dasharray: 60; stroke-dashoffset: 60; animation: type 3.2s ease-in-out infinite; }
.t2 { animation-delay: 0.2s; } .t3 { animation-delay: 0.4s; } .t4 { animation-delay: 0.6s; }
@keyframes type { 0% { stroke-dashoffset: 60; } 30%, 80% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; opacity: 0; } }
.glass { animation: hunt 3.2s ease-in-out infinite; }
@keyframes hunt { 0%, 100% { transform: translate(0, -24px); } 50% { transform: translate(-10px, 0); } }
.tag-txt { font: 700 14px "Instrument Sans", sans-serif; text-anchor: middle; fill: var(--dd-accent); opacity: 0; animation: tag 3s ease-in-out infinite; }
.t-b { animation-delay: 0.35s; } .t-c { animation-delay: 0.7s; }
@keyframes tag { 0% { opacity: 0; transform: translateY(6px); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; } }
.dash { stroke-dasharray: 3 5; }
.hopper { fill: var(--dd-accent); animation: hop 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
@keyframes hop { 0% { transform: translate(-30px, 0); } 30% { transform: translate(0, 0); } 55% { transform: translate(20px, -26px); } 80%, 100% { transform: translate(40px, 0); } }
.scissors { animation: cut 2.6s ease-in-out infinite; }
.blade-a, .blade-b { transform-box: fill-box; transform-origin: 50% 0%; animation: snip 0.5s ease-in-out infinite alternate; }
.blade-b { animation-direction: alternate-reverse; }
@keyframes snip { from { transform: rotate(12deg); } to { transform: rotate(-12deg); } }
@keyframes cut { 0%, 100% { transform: translate(-16px, 0); } 50% { transform: translate(16px, 0); } }
.shackle { animation: lock 2.6s ease-in-out infinite; }
@keyframes lock { 0%, 40% { transform: translateY(-8px); } 55%, 100% { transform: translateY(0); } }

/* everyday */
.everyday { margin-top: 140px; }
.everything { list-style: none; padding: 0; margin: 34px 0 0; columns: 3 240px; column-gap: 40px; }
.everything li { break-inside: avoid; padding: 7px 0 7px 26px; position: relative; color: var(--muted); }
.everything li::before { content: ""; position: absolute; left: 0; top: 16px; width: 14px; height: 7px; border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent); transform: rotate(-45deg); border-radius: 1px; }

/* themes */
.themes { margin-top: 140px; text-align: center; }
.swatches { display: flex; justify-content: center; gap: 14px; margin: 28px 0 32px; flex-wrap: wrap; }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; }
.swatch i { width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 1px color-mix(in srgb, var(--fg) 25%, transparent); transition: transform 0.2s, box-shadow 0.2s; }
.swatch:hover i { transform: scale(1.1); }
.swatch[aria-checked="true"] { color: var(--fg); }
.swatch[aria-checked="true"] i { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent); }
.theme-shot { text-align: left; }
.theme-shot img { transition: opacity 0.35s; }

/* download */
.platforms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; text-align: left; }
.platform { display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: 18px; background: var(--bg); transition: background-color 0.6s, box-shadow 0.3s; }
.platform.yours { box-shadow: 0 0 0 2px var(--accent); }
.platform h3 { font: italic 400 32px "Instrument Serif", Georgia, serif; margin: 0; }
.platform .fine { margin: -6px 0 6px; }
.platform .btn { width: 100%; }
.platform .note { margin: 6px 0 0; font-size: 13px; color: var(--muted); }
.center-note { text-align: center; margin-top: 26px !important; }
@media (max-width: 860px) { .platforms { grid-template-columns: 1fr; } }
.download { margin: 140px auto 0; text-align: center; padding: 80px 20px; border-radius: 28px; background: var(--bg-2); transition: background-color 0.6s; }
.dl-mark { width: 84px; margin: 0 auto 18px; animation: turn 18s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
.download .ctas { margin-top: 30px; }
.download .fine { max-width: 620px; margin: 24px auto 0; }

footer { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; width: min(1180px, 100% - 40px); margin: 60px auto 0; padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
footer span:first-child { display: flex; align-items: center; gap: 8px; }
footer img { width: 18px; }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* the doodles (shared with the app's home page) */
.dd { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dd path, .dd circle, .dd rect, .dd polygon { fill: none; stroke: var(--dd-line); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.6s, fill 0.6s; }
.dd .dd-bg { stroke: var(--bg); }
.dd .dd-fillbg { fill: var(--bg); }
.dd .dd-faint { stroke-opacity: 0.45; }
.dd .dd-red { stroke: var(--dd-red); }
.dd-g { animation: dd-fade 0.5s ease both; animation-delay: var(--d); }
@keyframes dd-fade { from { opacity: 0; } }
.dd .dd-ln { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.6s cubic-bezier(0.5, 0, 0.2, 1) forwards; animation-delay: var(--d); }
.dd .dd-perf { animation: dd-roll-a 0.6s linear infinite; }
.dd .dd-frames { stroke: var(--dd-accent); stroke-opacity: 0.28; animation: dd-roll-b 2s linear infinite; }
@keyframes dd-roll-a { to { stroke-dashoffset: -14; } }
@keyframes dd-roll-b { to { stroke-dashoffset: -46; } }
.dd-reel { transform-box: fill-box; transform-origin: center; animation: dd-spin 3s linear infinite; }
.dd-reel2 { animation-duration: 2.1s; }
@keyframes dd-spin { to { transform: rotate(360deg); } }
.dd #ddBeam stop { stop-color: var(--dd-beam); }
.dd .dd-beam { stroke: none; animation: dd-flicker 2.4s steps(1) infinite; }
.dd-poster { opacity: 0.92; animation: dd-flicker 2.4s steps(1) infinite; }
@keyframes dd-flicker { 0% { opacity: 1; } 12% { opacity: 0.82; } 14% { opacity: 1; } 47% { opacity: 0.9; } 49% { opacity: 1; } 78% { opacity: 0.76; } 80% { opacity: 1; } }
.dd .dd-dust circle { stroke: none; fill: var(--dd-beam); animation: dd-dust 4.2s linear infinite; animation-delay: var(--t); }
@keyframes dd-dust { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: 0.9; } 100% { transform: translate(96px, -40px); opacity: 0; } }
.dd-arm { transform-box: fill-box; transform-origin: 0% 100%; animation: dd-clap 2.6s ease-in-out infinite; }
@keyframes dd-clap { 0%, 66% { transform: rotate(-26deg); } 74% { transform: rotate(0deg); } 80% { transform: rotate(-7deg); } 85% { transform: rotate(0deg); } 100% { transform: rotate(-26deg); } }
.dd-kernel { transform-box: fill-box; transform-origin: center; animation: dd-pop 2.6s cubic-bezier(0.2, 0.7, 0.4, 1) infinite; animation-delay: var(--t); opacity: 0; }
.dd .dd-kernel path { fill: var(--bg); }
@keyframes dd-pop { 0% { transform: translate(0, 10px) rotate(0); opacity: 0; } 12% { opacity: 1; } 45% { transform: translate(var(--kx), -46px) rotate(140deg); opacity: 1; } 100% { transform: translate(calc(var(--kx) * 1.8), 14px) rotate(280deg); opacity: 0; } }
.dd .dd-sweep { stroke: none; fill: var(--dd-accent); fill-opacity: 0.28; transform-box: view-box; transform-origin: 1100px 404px; animation: dd-spin 1s linear infinite; }
.dd .dd-num { font: 600 34px "Instrument Sans", sans-serif; text-anchor: middle; fill: var(--dd-line); stroke: none; opacity: 0; animation: dd-count 3s steps(1) infinite; }
.dd .dd-n2 { animation-delay: 1s; }
.dd .dd-n1 { animation-delay: 2s; }
@keyframes dd-count { 0% { opacity: 1; } 33.3% { opacity: 0; } 100% { opacity: 0; } }
.dd .dd-steam { stroke-opacity: 0.7; animation: dd-steam 2.4s ease-in-out infinite; animation-delay: var(--t); opacity: 0; }
@keyframes dd-steam { 0% { transform: translateY(6px); opacity: 0; } 40% { opacity: 0.85; } 100% { transform: translateY(-20px); opacity: 0; } }
.dd .dd-wave { animation: dd-wave 1.4s ease-in-out infinite; animation-delay: var(--t); }
@keyframes dd-wave { 0%, 100% { opacity: 0.15; } 50% { opacity: 1; } }
.dd-ticket { transform-box: fill-box; transform-origin: 50% 0%; animation: dd-sway 3.2s ease-in-out infinite alternate; }
@keyframes dd-sway { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.dd .dd-small { font: 700 8.5px "Instrument Sans", sans-serif; letter-spacing: 1.4px; fill: var(--dd-line); stroke: none; text-anchor: middle; }
.dd-glasses { transform-box: fill-box; transform-origin: center; animation: dd-wobble 2.8s ease-in-out infinite; }
@keyframes dd-wobble { 0%, 100% { transform: rotate(-6deg) translateY(0); } 50% { transform: rotate(5deg) translateY(-5px); } }
.dd .dd-lred { fill: var(--dd-red); fill-opacity: 0.35; }
.dd .dd-lcyan { fill: var(--dd-cyan); fill-opacity: 0.35; }

@media (max-width: 860px) {
  .nav nav a:not(.nav-cta) { display: none; }
  .hero { min-height: auto; display: flex; flex-direction: column-reverse; }
  .hero-art { position: relative; height: 260px; inset: auto; }
  .hero-text { position: relative; left: auto; top: auto; width: auto; padding: 40px 20px 0; }
  .pause { grid-template-columns: 1fr; padding: 32px 24px; }
  .feature-list { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01s !important; animation-iteration-count: 1 !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
