/* Shared styles for the CryoStud animations (palette matches the site tokens). */
:root {
  --bg: #f2f8f6; --bg-2: #e6f0ed; --surface: #ffffff; --ink: #0a1f19; --muted: #4b645c; --line: #d2e3de;
  --accent: #16a34a; --accent-strong: #15803d; --accent-ink: #ffffff; --accent-soft: #dcfce7;
  --cold: #0e7490; --cold-soft: #d5f1f6; --ochre: #b45a1f; --ochre-soft: #fbeadb;
  --sky-top: #cfe9e2; --sky-bottom: #f6f3d8; --hill-far: #bfe0cf; --hill-near: #9fd1b4;
  --grass: #8fcf9c; --grass-dark: #6fb97f; --road: #b9c4c0; --road-line: #f4f7f6;
  --wall: #ffffff; --wall-shade: #e3ece9; --interior: #e6f0ed; --cloud: #ffffff; --barn2: #2f6f8f;
  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #07120f; --bg-2: #0a1a15; --surface: #0d1f1a; --ink: #e8f4f0; --muted: #9bb5ac; --line: #1b3a31;
    --accent: #22c55e; --accent-strong: #4ade80; --accent-ink: #04170d; --accent-soft: #113322;
    --cold: #67d4e4; --cold-soft: #0d2c33; --ochre: #e59255; --ochre-soft: #261710;
    --sky-top: #0b1d2a; --sky-bottom: #3b3a3a; --hill-far: #123329; --hill-near: #0f3a2a;
    --grass: #1f5a38; --grass-dark: #17492d; --road: #3a4642; --road-line: #8da097;
    --wall: #d7e4df; --wall-shade: #b6c8c1; --interior: #1b3a31; --cloud: #29404a; --barn2: #3d8fb8;
  }
}
:root[data-theme="dark"] {
  --bg: #07120f; --bg-2: #0a1a15; --surface: #0d1f1a; --ink: #e8f4f0; --muted: #9bb5ac; --line: #1b3a31;
  --accent: #22c55e; --accent-strong: #4ade80; --accent-ink: #04170d; --accent-soft: #113322;
  --cold: #67d4e4; --cold-soft: #0d2c33; --ochre: #e59255; --ochre-soft: #261710;
  --sky-top: #0b1d2a; --sky-bottom: #3b3a3a; --hill-far: #123329; --hill-near: #0f3a2a;
  --grass: #1f5a38; --grass-dark: #17492d; --road: #3a4642; --road-line: #8da097;
  --wall: #d7e4df; --wall-shade: #b6c8c1; --interior: #1b3a31; --cloud: #29404a; --barn2: #3d8fb8;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-sans); -webkit-font-smoothing: antialiased; }
.anim { max-width: 1160px; margin: 0 auto; padding: 24px 16px 32px; }
.stage { position: relative; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--bg-2);
  box-shadow: 0 24px 60px -28px rgba(10, 31, 25, .35); aspect-ratio: 16 / 9; }
.stage svg { display: block; width: 100%; height: 100%; }
.stage svg text { font-family: var(--font-sans); }
.sky-top { stop-color: var(--sky-top); } .sky-bottom { stop-color: var(--sky-bottom); }
.bar { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.bar button.ctl { font: inherit; font-weight: 700; font-size: .9rem; border-radius: 999px; padding: 9px 16px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink); cursor: pointer; }
.bar button.ctl:hover { border-color: var(--accent); }
.bar button.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; min-width: 88px; }
.bar button[hidden] { display: none; }
.scrub { flex: 1 1 220px; accent-color: var(--accent); }
.dots { display: flex; gap: 8px; }
.dots button { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent); background: transparent; padding: 0; cursor: pointer; }
.dots button[aria-current="true"] { background: var(--accent); }
.caption { margin-top: 14px; min-height: 3.2em; font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.caption small { display: block; font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace; font-weight: 500; font-size: .72rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--accent-strong); margin-bottom: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
@media (max-width: 640px) { .caption { font-size: 1rem; } }

/* caption bubbles: a short explanation the animation holds on while the viewer reads */
.bub { font: 600 17px/1.42 var(--font-sans); color: var(--ink); padding: 14px 20px; }
.bub b { display: block; font-size: 19px; font-weight: 800; color: var(--accent-strong); margin-bottom: 4px; letter-spacing: -.01em; }

body.embed { background: transparent; }
body.embed .anim { padding: 0 0 4px; max-width: none; }
/* ?video: used to render an MP4 and poster: the stage fills the window and the caption sits over it */
body.video { background: var(--bg-2); overflow: hidden; }
body.video .anim { position: fixed; inset: 0; max-width: none; padding: 0; margin: 0; }
body.video .stage { width: 100vw; height: 100vh; aspect-ratio: auto; border: 0; border-radius: 0; box-shadow: none; }
body.video .bar { display: none; }
body.video .caption { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; min-height: 0; padding: 9px 22px;
  background: rgba(10, 31, 25, .84); color: #fff; border-radius: 999px; font-size: 20px; white-space: nowrap; }
body.video .caption small { display: none; }
.brand-mark { display: none; }
body.video .brand-mark { display: inline; }

/* return link at the top of each animation page; hidden when the page is embedded in another page or rendered to video */
.home { display: flex; width: fit-content; align-items: center; gap: 6px; margin: 0 0 14px; font-size: .95rem; font-weight: 700; color: var(--accent-strong); text-decoration: none; }
.home:hover { text-decoration: underline; }
body.embed .home, body.video .home { display: none; }
