/* Home page only: black stage, one big app window that plays as you scroll. Loaded by pages/index.html. */
body.home {
  --night: #02070a;
  --bone: #f4f2ed;
  --graphite: #8d8b86;
  --rule: rgba(244, 242, 237, 0.14);
  --amber: 252, 115, 77;
  --cobalt: #0277b6;
  --gut: clamp(20px, 4vw, 56px);
  background: var(--night);
  color: var(--bone);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.home h1,
.home h2,
.rules b {
  font-weight: 600;
  letter-spacing: -0.05em;
  line-height: 0.94;
  margin: 0;
  text-wrap: balance;
}

/* Opening */
.opening {
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(132px, 18vh, 200px) var(--gut) 0;
}
.opening h1 {
  font-size: clamp(52px, 8.4vw, 132px);
  max-width: 13ch;
}
.opening-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: clamp(32px, 5vw, 56px);
}
.opening-row p {
  margin: 0;
  max-width: 34ch;
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.5;
  color: var(--graphite);
}
.opening-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  flex-shrink: 0;
}
.opening-cta small { color: var(--graphite); font-size: 14px; }
.opening-cta small a,
.tariffs .fine a { color: var(--bone); text-underline-offset: 3px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 30px;
  border-radius: 9999px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease;
}
/* The palette where it shows: Electric Blue for the one action, Midnight text on it (6.9:1). */
.pill-light { background: #0297de; color: #02070a; font-weight: 600; }
.pill-light:hover { background: #29a9e8; transform: translateY(-1px); }
.pill-light:active { transform: translateY(0) scale(0.98); }
.pill:focus-visible,
.home a:focus-visible { outline: 2px solid #0297de; outline-offset: 4px; }

/* Presentation video (placeholder until the file exists) */
.intro { margin-top: clamp(36px, 5vw, 64px); }
.intro-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 20px;
  background: #0f0f0f;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.intro-frame video { display: block; width: 100%; height: 100%; object-fit: cover; }
.intro-wait {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 24px;
  text-align: center;
}
.intro-play {
  display: grid;
  place-items: center;
  width: clamp(64px, 7vw, 88px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--bone);
  color: #000;
}
.intro-play svg { margin-left: 3px; }
.intro-wait p { margin: 0; max-width: 40ch; color: var(--graphite); font-size: clamp(15px, 1.3vw, 18px); line-height: 1.5; }
.intro-wait b { display: block; color: var(--bone); font-weight: 500; }

/* Film: a sticky stage, 4 scenes over 5 screens of scroll */
.film {
  position: relative;
  height: 500vh;
  margin-top: clamp(24px, 4vw, 56px);
}
.film-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  max-width: 1320px;
  margin: 0 auto;
  padding: 92px var(--gut) 0;
  box-sizing: border-box;
}
.captions {
  position: relative;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  height: 2.7em;
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1.3;
  letter-spacing: -0.015em;
}
.captions li {
  position: absolute;
  inset: 0 auto auto 0;
  max-width: min(46ch, calc(100% - 420px));
  color: var(--graphite);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 400ms ease, transform 400ms ease;
}
.captions li.on { opacity: 1; transform: none; }
.captions b { color: var(--bone); font-weight: 500; }
.screen { position: relative; width: 100%; }
.beats {
  position: absolute;
  top: 88px;
  right: var(--gut);
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 9999px;
  background: rgba(244, 242, 237, 0.08);
}
.beats button {
  padding: 8px 16px;
  border: 0;
  border-radius: 9999px;
  background: none;
  color: var(--graphite);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.beats button:hover { color: var(--bone); }
.beats button[aria-pressed="true"] { background: var(--bone); color: #000; }
/* Orange means one thing, as in the app: the colleague needs you. */
.beats button[data-beat="2"][aria-pressed="true"] { background: #fc734d; color: #02070a; }
.beats button:focus-visible { outline: 2px solid var(--bone); outline-offset: 2px; }

/* Where it works */
.where { max-width: 1320px; margin: clamp(80px, 11vw, 150px) auto 0; padding: 0 var(--gut); }
.where p { margin: 0; max-width: 30ch; font-size: clamp(28px, 3.6vw, 52px); font-weight: 500; line-height: 1.12; letter-spacing: -0.035em; color: var(--graphite); text-wrap: balance; }
.where b { color: var(--bone); font-weight: 500; }

/* The app window, drawn at 1240 × 760 and scaled by film.js */
.win {
  position: absolute;
  top: 0;
  left: 50%;
  width: 1240px;
  height: 760px;
  translate: -50% 0;
  transform-origin: top center;
  display: grid;
  grid-template-columns: 64px 1fr;
  background: #f2f2f0;
  border-radius: 16px;
  overflow: hidden;
  color: #141414;
  font-size: 13px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 50px 140px -20px rgba(0, 0, 0, 0.9);
}
.win * { box-sizing: border-box; }
.rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 44px 0 14px;
}
.rail i { font-style: normal; display: block; }
.rail .new { width: 40px; height: 28px; border-radius: 9px; background: #111; color: #fff; text-align: center; line-height: 27px; font-size: 18px; }
.rail .ic { width: 16px; height: 16px; border-radius: 5px; border: 2px solid #8a8a8a; }
.rail .p { border-radius: 50%; }
.rail .b { border-radius: 2px 6px 2px 6px; }
.rail .me { margin-top: auto; width: 28px; height: 28px; border-radius: 50%; background: #fff; text-align: center; line-height: 28px; font-weight: 600; font-size: 12px; }
.col { display: flex; flex-direction: column; min-width: 0; padding: 0 8px 8px 0; }
.tabs { height: 40px; display: flex; align-items: flex-end; gap: 2px; color: #666; font-size: 12.5px; }
.tab { display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 16px; border-radius: 10px 10px 0 0; }
.win:not([data-scene="3"]) .tab:nth-child(1),
.win[data-scene="3"] .tab:nth-child(2) { background: #fff; color: #141414; }
.tab-plus { padding: 0 12px 8px; }
.fav { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.fav-mail { background: #0277b6; }
.fav-sheet { background: #1f9d55; }
.card { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; border-radius: 0 12px 12px 12px; overflow: hidden; }
.bar { height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 14px; border-bottom: 1px solid #efefed; color: #999; }
.addr { flex: 1; padding: 6px 12px; border-radius: 8px; background: #f3f3f1; color: #555; font-size: 12px; }
.body { flex: 1; display: grid; grid-template-columns: 1fr 340px; min-height: 0; }
.page { position: relative; overflow: hidden; }
.pg { position: absolute; inset: 0; opacity: 0; transition: opacity 450ms ease; }
.win[data-scene="0"] .pg-inbox,
.win[data-scene="1"] .pg-mail,
.win[data-scene="2"] .pg-mail,
.win[data-scene="3"] .pg-sheet { opacity: 1; }

/* Inbox */
.pg-inbox { display: grid; grid-template-columns: 170px 1fr; }
.mail-side { display: flex; flex-direction: column; gap: 2px; padding: 22px 14px; }
.mail-side b { font-size: 17px; margin: 0 0 12px 10px; }
.mail-side span { padding: 7px 10px; border-radius: 8px; color: #444; }
.mail-side .sel { background: #e6f4fc; color: var(--cobalt); font-weight: 600; }
.mail-side em { float: right; font-style: normal; }
.mail-list { list-style: none; margin: 0; padding: 14px 18px 0 0; }
.mail-list li { display: grid; grid-template-columns: 150px 1fr 44px; gap: 14px; padding: 13px 12px; border-bottom: 1px solid #f1f1ef; }
.mail-list span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #777; }
.mail-list time { color: #999; text-align: right; font-size: 12px; }
.mail-list .unread b { font-weight: 700; }
.mail-list .unread span { color: #222; }
.mail-list li:first-child { background: #f5f8ff; border-radius: 8px; }

/* Open message + reply */
.pg-mail { padding: 30px 40px; }
.pg-mail h4 { margin: 0 0 8px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.from { margin: 0; color: #555; }
.from time { float: right; color: #999; }
.msg { margin: 22px 0 26px; max-width: 58ch; font-size: 14px; line-height: 1.65; color: #222; }
.reply { position: relative; min-height: 200px; padding: 16px 18px 60px; border: 1px solid #e3e3e0; border-radius: 12px; }
.to { margin: 0 0 10px; color: #888; font-size: 12px; }
.draft { margin: 0; min-height: 92px; max-width: 60ch; font-size: 14px; line-height: 1.65; }
.send { position: absolute; left: 18px; bottom: 16px; padding: 8px 20px; border-radius: 9999px; background: var(--cobalt); color: #fff; font-weight: 600; transition: background-color 300ms ease; }
.win[data-allowed] .send { background: #15803d; }
.caret { display: none; width: 1.5px; height: 1.15em; margin-left: 1px; vertical-align: text-bottom; background: #141414; animation: blink 1s steps(1) infinite; }
.win[data-scene="1"] .draft .caret,
.win[data-scene="0"]:not([data-sent]) .composer .caret { display: inline-block; }
@keyframes blink { 50% { opacity: 0; } }

/* Sheet artifact */
.pg-sheet { padding: 28px 32px; }
.pg-sheet h4 { margin: 0 0 18px; font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.pg-sheet h4 small { margin-left: 8px; color: #999; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.pg-sheet table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pg-sheet th { padding: 9px 10px; border: 1px solid #e6e6e3; background: #f6f6f4; text-align: left; font-weight: 600; }
.pg-sheet td { padding: 9px 10px; border: 1px solid #ececea; }
.pg-sheet th:first-child,
.pg-sheet td:first-child { width: 36px; text-align: center; color: #999; background: #f6f6f4; }
.pg-sheet td:nth-child(4) { text-align: right; }
.pg-sheet tbody tr { opacity: 0; transition: opacity 350ms ease; }
.pg-sheet tbody tr.on { opacity: 1; animation: flash 1.2s ease; }
.pg-sheet .sum td { font-weight: 700; background: #fafaf8; }
@keyframes flash { from { background: rgba(var(--amber), 0.35); } }
.files { margin: 20px 0 0; display: flex; gap: 8px; }
.files span { padding: 7px 14px; border: 1px solid #e3e3e0; border-radius: 9999px; color: #333; font-size: 12px; }

/* The colleague at work: glow, pointer, control bar */
.glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  box-shadow: inset 0 0 0 2px rgba(var(--amber), 0.75), inset 0 0 70px 18px rgba(var(--amber), 0.5);
  transition: opacity 500ms ease;
}
.win[data-scene="1"] .glow,
.win[data-scene="2"]:not([data-allowed]) .glow { opacity: 1; }
.win[data-scene="2"]:not([data-allowed]) .glow { animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { opacity: 0.55; } }
.pointer {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-start;
  opacity: 0;
  transform: translate(420px, 120px);
  transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 300ms ease;
  pointer-events: none;
}
.pointer img { width: 36px; height: 36px; }
.pointer span { margin: 24px 0 0 -10px; padding: 2px 9px; border-radius: 9999px; background: #5b8def; color: #fff; font-size: 11px; font-weight: 600; }
.win[data-scene="1"] .pointer,
.win[data-scene="2"] .pointer { opacity: 1; }
.control {
  position: absolute;
  left: 50%;
  bottom: 20px;
  translate: -50% 0;
  padding: 6px 6px 7px;
  border-radius: 14px;
  background: #8fb1f0;
  text-align: center;
  opacity: 0;
  transition: opacity 300ms ease;
}
.control small { display: block; padding: 0 0 6px; color: #fff; font-size: 11.5px; }
.control div { display: flex; align-items: center; gap: 10px; padding: 7px 7px 7px 14px; border-radius: 10px; background: #141414; color: #fff; white-space: nowrap; }
.control b { padding: 5px 12px; border-radius: 7px; background: #fff; color: #141414; font-weight: 500; }
.control .stop { background: #e5484d; color: #fff; }
.win[data-scene="1"] .control,
.win[data-scene="2"]:not([data-allowed]) .control { opacity: 1; }

/* Chat panel */
.chat { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid #efefed; }
.chat header { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.chat header b { display: block; font-size: 14px; }
.chat header small { color: #888; font-size: 12px; }
.thread { flex: 1; display: flex; flex-direction: column; gap: 14px; padding: 10px 16px; overflow: hidden; }
.thread > * { transition: opacity 350ms ease; }
.me-msg { align-self: flex-end; max-width: 88%; margin: 0; padding: 10px 14px; border-radius: 14px; background: #f1f1ef; line-height: 1.5; opacity: 0; }
.win[data-sent] .me-msg { opacity: 1; }
.trace { list-style: none; margin: 0; padding: 0; color: #666; font-size: 12.5px; line-height: 1.9; }
.trace li { opacity: 0; transition: opacity 300ms ease; }
.trace li.on { opacity: 1; }
.trace li::before { content: "✓"; margin-right: 8px; color: #15803d; }
.ask { padding: 12px 14px; border: 1px solid #e3e3e0; border-radius: 12px; opacity: 0; }
.win[data-scene="2"] .ask,
.win[data-scene="3"] .ask { opacity: 1; }
.win[data-allowed] .ask { opacity: 0.5; }
.ask small { color: #888; font-size: 11.5px; }
.ask b { display: block; margin: 4px 0 8px; }
.ask q { display: block; padding: 8px 10px; border-radius: 8px; background: #f6f6f4; color: #444; font-size: 12.5px; line-height: 1.5; quotes: none; }
.ask div { display: flex; gap: 10px; margin-top: 10px; font-size: 12px; }
.ask .yes { padding: 6px 12px; border-radius: 9999px; background: #141414; color: #fff; transition: background-color 300ms ease; }
.win[data-allowed] .ask .yes { background: #15803d; }
.ask .no { padding: 6px 4px; color: #dc2626; }
.done-msg { margin: 0; line-height: 1.55; opacity: 0; }
.win[data-scene="3"] .done-msg { opacity: 1; }
.composer { margin: 12px; padding: 13px 18px; min-height: 46px; border: 1px solid #e3e3e0; border-radius: 9999px; line-height: 1.45; }
.composer em { display: none; color: #aaa; font-style: normal; }
.composer span:empty ~ em { display: inline; }
.win[data-sent] .composer span { display: none; }
.win[data-sent] .composer em { display: inline; }

/* Rules */
.rules { max-width: 1320px; margin: clamp(80px, 12vw, 160px) auto 0; padding: 0 var(--gut); }
.rules ul { list-style: none; margin: 0; padding: 0; }
.rules li { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: baseline; padding: clamp(28px, 4vw, 48px) 0; border-top: 1px solid var(--rule); }
.rules b { font-size: clamp(32px, 4.6vw, 68px); }
.rules span { max-width: 36ch; color: var(--graphite); font-size: clamp(17px, 1.4vw, 19px); line-height: 1.55; }

.more { margin-top: clamp(100px, 14vw, 200px); }
.more-title { font-size: clamp(40px, 6vw, 92px); max-width: 14ch; margin-bottom: clamp(32px, 5vw, 64px); }

.thanks { max-width: 46ch; margin: 0; color: var(--graphite); font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; }

/* Price */
.tariffs { max-width: 1320px; margin: clamp(100px, 14vw, 200px) auto 0; padding: 0 var(--gut); }
.tariffs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(32px, 5vw, 64px); }
.tariffs h2 { font-size: clamp(48px, 7.5vw, 112px); }
.period { display: flex; gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: 9999px; background: rgba(244, 242, 237, 0.08); }
.period input { position: absolute; opacity: 0; pointer-events: none; }
.period label { padding: 9px 18px; border-radius: 9999px; color: var(--graphite); font-size: 15px; cursor: pointer; transition: background-color 200ms ease, color 200ms ease; }
.period label span { margin-left: 4px; color: #e3b25f; font-size: 13px; }
.period input:checked + label { background: var(--bone); color: #000; }
.period input:checked + label span { color: #8a5a10; }
.period input:focus-visible + label { outline: 2px solid var(--bone); outline-offset: 2px; }
.tariffs .y { display: none; }
.tariffs:has(#yearly:checked) .y { display: inline; }
.tariffs:has(#yearly:checked) .m { display: none; }
.tariffs dd b { color: var(--bone); font-weight: 500; }
.tariffs dl { margin: 0; }
.tariffs dl div { display: grid; grid-template-columns: 1fr 1.2fr 2fr; gap: 24px; align-items: baseline; padding: 26px 0; border-top: 1px solid var(--rule); }
.tariffs dt { font-size: 20px; font-weight: 600; color: #3aaee8; }
.tariffs dd { margin: 0; color: var(--graphite); font-size: 17px; line-height: 1.5; }
.tariffs .amt { color: var(--bone); font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tariffs .amt small { color: var(--graphite); font-size: 15px; font-weight: 400; letter-spacing: 0; }
.tariffs .fine { max-width: 72ch; margin: 28px 0 0; padding-top: 26px; border-top: 1px solid var(--rule); color: var(--graphite); font-size: 15px; line-height: 1.6; }

/* Last call */
.last { max-width: 1320px; margin: 0 auto; padding: clamp(140px, 20vw, 260px) var(--gut) clamp(100px, 14vw, 180px); }
.last h2 { font-size: clamp(56px, 11vw, 176px); letter-spacing: -0.06em; line-height: 0.9; max-width: 9ch; margin-bottom: 44px; }

@media (max-width: 760px) {
  .opening-row { flex-direction: column; align-items: flex-start; }
  .opening-cta { align-items: flex-start; }
  .film { height: 420vh; }
  .film-stage { padding-top: 84px; }
  .beats { position: static; margin-bottom: 16px; width: max-content; max-width: 100%; }
  .beats button { padding: 7px 11px; font-size: 13px; }
  .captions { height: 4em; }
  .captions li { max-width: none; }
  .rules li,
  .tariffs dl div { grid-template-columns: 1fr; gap: 10px; }
  .win { width: 720px; grid-template-columns: 1fr; }
  .rail,
  .chat,
  .tab-plus { display: none; }
  .col { padding: 0; }
  .body { grid-template-columns: 1fr; }
  .card { border-radius: 0 12px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .home *,
  .home *::before { transition: none !important; animation: none !important; }
}
