/* Landing and demo pages. Dark only, matching the app's dark theme and the logo. */
:root {
  color-scheme: dark;
  --bg: #0F1115; --surface: #171A1F; --surface-2: #1C2027;
  --text: #ECEEF1; --text-2: #A8AFBA; --text-3: #8F97A3;
  --border: #262A31; --border-strong: #3A404A;
  --blue: #8DA3F1; --on-blue: #0F1115; --focus: #B9C7FA;
  --bad-fg: #FF9C92; --bad-bg: #2B1517; --bad-stripe: #F97066;
  --rev-fg: #F7C35F; --rev-bg: #2A2210; --rev-stripe: #F7C35F;
  --info-fg: #93BBFF; --info-bg: #14213A;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --bar-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1rem/1.5 var(--font); }
h1, h2 { margin: 0; text-wrap: balance; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -64px; z-index: 30; background: var(--surface); color: var(--text); padding: 8px 16px; border-radius: 8px; }
.skip:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- top bar ---------- */
.lp-bar {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--bar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(16px, 3vw, 32px);
  background: rgb(23 26 31 / .82); border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px) saturate(1.2); -webkit-backdrop-filter: blur(12px) saturate(1.2);
}
.lp-logo { display: inline-flex; align-items: center; gap: 12px; color: var(--blue); text-decoration: none; border-radius: 10px; min-height: 44px; }
.lp-mark { width: 38px; height: 38px; flex: none; }
.lp-word { display: flex; flex-direction: column; line-height: 1; }
.lp-name { font: 700 1.625rem/1 var(--serif); letter-spacing: -.01em; }
.lp-sub { margin-top: 4px; font: 600 .5625rem/1 var(--font); letter-spacing: .28em; text-transform: uppercase; }
.lp-login, .cta {
  display: inline-flex; align-items: center; justify-content: center; text-decoration: none; cursor: pointer;
  background: var(--blue); border: 0; white-space: nowrap;
  transition-property: transform, filter, box-shadow; transition-duration: 150ms; transition-timing-function: var(--ease);
}
.lp-login { min-height: 40px; padding: 0 20px; border-radius: 10px; color: var(--on-blue); font: 600 .9375rem/1 var(--font); }
.lp-login:hover, .cta:hover { filter: brightness(1.07); }
.lp-login:active, .cta:active { transform: scale(.97); }

/* ---------- zoom scene ---------- */
.zoom { position: relative; height: 640vh; }
.stage { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; background: #1B2747; }
.shots, .screen, .cta-wrap { position: absolute; inset: 0; }
.shots { overflow: hidden; background: #0B0E16; }
/* each photo is a 16:9 box that covers the viewport at scale 1; JS places all of them with one shared camera */
.shot {
  position: absolute; left: 0; top: 0; width: max(100vw, 177.78vh); width: max(100vw, 177.78dvh); aspect-ratio: 16 / 9;
  transform-origin: 0 0; will-change: transform; backface-visibility: hidden;
}
.shot.square { aspect-ratio: 1; }
.shot img { display: block; width: 100%; height: 100%; }
/* covers the AI-drawn dashboard on photo 3's monitor; the Tally screen sits on top of it */
.screen-bg { position: absolute; left: 0; top: 0; width: 100px; height: 100px; background: var(--bg); transform-origin: 0 0; will-change: transform; }

.hero {
  position: absolute; left: 0; right: 0; top: calc(var(--bar-h) + clamp(32px, 7vh, 72px)); z-index: 2;
  padding: 0 24px; text-align: center; pointer-events: none;
}
.hero h1 {
  max-width: 17ch; margin: 0 auto; color: #fff; font: 700 clamp(2rem, 1.2rem + 3.4vw, 3.75rem)/1.08 var(--serif); letter-spacing: -.015em;
  text-shadow: 0 2px 24px rgb(10 14 30 / .55);
}
.hero-hint { margin-top: 16px; color: rgb(255 255 255 / .85); font-weight: 500; font-size: .9375rem; text-shadow: 0 1px 8px rgb(10 14 30 / .6); }
.chev { display: inline-block; width: 8px; height: 8px; margin-left: 6px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); animation: nudge 1.8s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateY(1px) rotate(45deg); } }

/* the Tally screen is drawn at viewport size and shrunk onto image 4's monitor, so the final frame is crisp */
.screen { inset: auto; left: 0; top: 0; width: 100vw; height: 100vh; height: 100dvh; opacity: 0; transform-origin: 50% 50%; will-change: transform, opacity; }

/* ---------- mock app screen ---------- */
.mock { position: absolute; inset: 0; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); font-feature-settings: "tnum" 1; }
.mock-top { flex: none; height: 56px; display: flex; align-items: center; gap: 24px; padding: 0 24px; background: var(--surface); border-bottom: 1px solid var(--border); font-size: .9375rem; }
.mock-brand { font-weight: 600; }
.mock-co { color: var(--text-2); }
.mock-out { margin-left: auto; color: var(--blue); }
.mock-tabs { flex: none; display: flex; gap: 4px; padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); color: var(--text-2); font-weight: 500; overflow: hidden; }
.mock-tabs span { padding: 12px 16px; border-bottom: 3px solid transparent; white-space: nowrap; }
.mock-tabs .on { color: var(--text); font-weight: 600; border-bottom-color: var(--blue); }
.mock-body { position: relative; flex: 1; overflow: hidden; }
.mock-feed { padding: 32px clamp(16px, 6vw, 176px) 64px; }
.mock-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.mock-head h2 { font-size: 1.625rem; font-weight: 600; }
.mock-head p { margin-top: 8px; color: var(--text-2); font-size: .9375rem; }
.mock-refresh { display: flex; align-items: center; gap: 16px; color: var(--text-2); white-space: nowrap; }
.mock-btn { padding: 10px 18px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text); font-weight: 500; }
.mock-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 24px 0 28px; }
.mock-chips span { padding: 9px 18px; border: 1px solid var(--border-strong); border-radius: 999px; font-weight: 500; font-size: .9375rem; }
.mock-chips .on { background: var(--blue); border-color: var(--blue); color: var(--on-blue); }
.mock-chips i { width: 1px; height: 32px; background: var(--border-strong); margin: 0 4px; }
.mock-table { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; font-size: .9375rem; }
.mock-table th { text-align: left; padding: 12px 16px; color: var(--text-2); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mock-table td { padding: 13px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mock-table tr td:first-child { box-shadow: inset 3px 0 0 var(--bad-stripe); }
.mock-table tr.rv td:first-child { box-shadow: inset 3px 0 0 var(--rev-stripe); }
.mock-table .cell { color: var(--blue); font-family: var(--mono); font-weight: 500; }
.mock-table .up { color: var(--text-3); }
.mock-table .n { text-align: right; }
.mock-table b { display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: 6px; background: var(--bad-bg); color: var(--bad-fg); font-weight: 600; }
.mock-table tr.rv b { background: var(--rev-bg); color: var(--rev-fg); }
.mock-table em { padding: 2px 8px; border-radius: 6px; background: var(--info-bg); color: var(--info-fg); font-style: normal; font-weight: 600; }
.veil { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at 50% 50%, rgb(15 17 21 / .55), rgb(15 17 21 / .9)); pointer-events: none; }

/* ---------- call to action ---------- */
.cta-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: calc(var(--bar-h) + 16px) 24px 24px; text-align: center;
  opacity: 0; transform: translateY(16px); filter: blur(4px); pointer-events: none;
  transition-property: opacity, transform, filter; transition-duration: 220ms; transition-timing-function: cubic-bezier(0.3, 0, 1, 1);
}
.cta-wrap.on {
  opacity: 1; transform: none; filter: none; pointer-events: auto;
  transition-duration: 480ms; transition-timing-function: cubic-bezier(0.05, 0.7, 0.1, 1);
}
.cta-wrap h2 { color: #fff; font: 700 clamp(2rem, 1.3rem + 3vw, 3.5rem)/1.08 var(--serif); letter-spacing: -.015em; }
.cta-wrap > p:not(.cta-note) { max-width: 36rem; color: #D5DAE2; font-size: clamp(1rem, .95rem + .3vw, 1.125rem); }
.cta {
  margin-top: 8px; min-height: 56px; padding: 0 32px; border-radius: 14px;
  color: #fff; font: 600 1.1875rem/1 var(--font); text-shadow: 0 1px 1px rgb(15 17 21 / .35);
  box-shadow: 0 1px 0 rgb(255 255 255 / .25) inset, 0 8px 24px rgb(141 163 241 / .28);
}
.cta-note { color: var(--text-3); font-size: .8125rem; }

/* ---------- demo request page ---------- */
.demo { min-height: 100vh; padding: calc(var(--bar-h) + clamp(32px, 6vh, 64px)) 16px 64px; display: flex; justify-content: center;
  background: radial-gradient(80vmax 50vmax at 50% -10%, rgb(141 163 241 / .12), transparent 60%), var(--bg); }
.demo-col { width: 100%; max-width: 560px; }
.demo h1 { font: 700 clamp(2rem, 1.5rem + 2vw, 2.75rem)/1.1 var(--serif); letter-spacing: -.015em; }
.demo-lede { margin-top: 12px; color: var(--text-2); }
.demo-card { margin-top: 32px; padding: clamp(20px, 4vw, 32px); background: var(--surface); border: 1px solid var(--border); border-radius: 16px; }
.demo-form { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.demo-form .full { grid-column: 1 / -1; }
.f { display: flex; flex-direction: column; gap: 6px; }
.f label { font-weight: 500; font-size: .9375rem; }
.f .opt { color: var(--text-3); font-weight: 400; }
.f input, .f select, .f textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: var(--bg); color: var(--text); font: inherit;
  transition-property: border-color, box-shadow; transition-duration: 150ms; transition-timing-function: var(--ease);
}
.f textarea { min-height: 112px; resize: vertical; }
.f input:hover, .f select:hover, .f textarea:hover { border-color: #5A6170; }
.f input:focus-visible, .f select:focus-visible, .f textarea:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(141 163 241 / .3); }
.f [aria-invalid=true] { border-color: var(--bad-stripe); }
.f .err { min-height: 1.25em; color: var(--bad-fg); font-size: .8125rem; }
.demo-submit { justify-self: start; min-height: 48px; padding: 0 28px; border-radius: 12px; color: var(--on-blue); font: 600 1rem/1 var(--font); }
.demo-note { color: var(--text-3); font-size: .8125rem; }
.demo-done { display: grid; gap: 12px; }
.demo-done h2 { font: 700 1.5rem/1.2 var(--serif); }
.demo-done a { color: var(--blue); }

@media (max-width: 720px) {
  .lp-sub { display: none; }
  .lp-name { font-size: 1.375rem; }
  .lp-mark { width: 34px; height: 34px; }
  .mock-table .up, .mock-co, .mock-refresh .mock-time { display: none; }
  .mock-table th, .mock-table td { padding: 10px 10px; }
  .mock-table { font-size: .8125rem; }
  .demo-form { grid-template-columns: 1fr; }
}
@media (hover: none) { .lp-login:active, .cta:active { transform: none; } }

/* reduced motion: no zoom or scroll; JS shows two still scenes and these crossfade */
@media (prefers-reduced-motion: reduce) {
  .hero, .mock, .veil { transition: opacity 300ms linear; }
  .chev { animation: none; }
  .cta-wrap, .cta-wrap.on { transform: none; filter: none; transition: opacity 300ms linear; }
  .lp-login:active, .cta:active { transform: none; }
}

/* same-site page changes cross-fade; the logo glides to its spot on the next page */
@media (prefers-reduced-motion: no-preference) { @view-transition { navigation: auto; } }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 260ms; animation-timing-function: cubic-bezier(0.2, 0, 0, 1); }
.lp-mark { view-transition-name: tally-logo; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.demo-done { animation: rise 280ms cubic-bezier(0.2, 0, 0, 1) both; }
@media (prefers-reduced-motion: reduce) { .demo-done { animation: none; } }

/* display mode (/?display): the zoom plays by itself, so no scrolling or scroll hint; the button shows but does nothing */
.display, .display body { overflow: hidden; }
.display .hero-hint, .display .skip { display: none; }
.display .cta { pointer-events: none; }
