@font-face {
  font-family: TasqHand;
  src: url("./assets/story/TasqHand.ttf") format("truetype");
  font-display: swap;
}
@font-face {
  font-family: TasqHand;
  src: url("./assets/TasqHand-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --ink: #292e29;
  --paper: #faf8f0;
  --sage: #dfead3;
  --peach: #ffdfca;
  --hand: TasqHand, "Comic Sans MS", cursive;
  --gutter: clamp(1.4rem, 6vw, 5rem);
  --content: 72rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  isolation: isolate;
  color: var(--ink);
  background: var(--paper);
  font: 1.2rem/1.4 var(--hand);
}
a { color: inherit; }
a:focus-visible { outline: 2px solid currentColor; outline-offset: 6px; }

.site-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .27;
  background: url("./assets/tasq-website-loop-poster.jpg") 68% center / cover no-repeat;
}
.site-background-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 68% center;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem max(var(--gutter), calc((100% - var(--content)) / 2));
  border-bottom: 1px solid #292e2940;
}
.banner a {
  display: inline-block;
  font-size: clamp(2.9rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.06em;
  line-height: 1;
  text-decoration: none;
}

.intro, .walkthrough-stage {
  background-image: radial-gradient(#292e2921 1.3px, transparent 1.3px);
  background-position: center;
  background-size: 25px 25px;
}
.intro {
  padding: clamp(4.5rem, 11svh, 8rem) var(--gutter);
}
.intro-inner { max-width: var(--content); margin: auto; }
.intro h1 {
  margin: 0;
  font-size: clamp(3.8rem, 11vw, 8.4rem);
  font-weight: 400;
  letter-spacing: -.05em;
  line-height: .95;
}
.intro p {
  margin: 1.7rem 0 1.6rem;
  max-width: 28rem;
  font-size: clamp(1.18rem, 2.5vw, 1.55rem);
}
.ink-button {
  display: inline-flex;
  align-items: center;
  min-height: 3rem;
  padding: .75rem 1.35rem;
  color: var(--paper);
  background: var(--ink);
  border-radius: 16px 14px 17px 13px;
  text-decoration: none;
}
.ink-button:hover { background-color: #424a41; }
.ink-button:focus-visible { outline-color: var(--ink); }

.marquee {
  overflow: hidden;
  background: rgb(250 248 240 / .48);
  border-block: 1px solid #292e2940;
}
.marquee-track {
  display: flex;
  width: max-content;
  padding-block: .24em .36em;
  font-size: clamp(3.5rem, 10vw, 9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.045em;
  white-space: nowrap;
  animation: marquee 23s linear infinite;
}
.marquee-track span { padding-inline: .35em .65em; }
@keyframes marquee {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.walkthrough-stage { background-color: rgb(223 234 211 / .40); }
.walkthrough-inner {
  --device-width: min(20rem, 35vw, 38svh);
  position: relative;
  max-width: 78rem;
  margin: auto;
}
.scene {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
  padding: 3rem var(--gutter);
}
.scene[data-side="left"] .scene-screen { order: -1; }
.scene:not(:last-child) { border-bottom: 1px solid #292e2928; }
.scene-copy h2, .finish h2 {
  margin: 0;
  font-size: clamp(2.5rem, 6.6vw, 5.6rem);
  font-weight: 400;
  line-height: .98;
  letter-spacing: -.05em;
  text-wrap: balance;
}
.scene-copy p {
  max-width: 28rem;
  margin: 1.1rem 0 0;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
}
.scene-copy .scene-cue {
  margin-top: .85rem;
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: #425043;
}
.friend-sprite { display: block; width: 3.5rem; height: auto; margin-top: 1rem; }
.scene-screen, .device {
  width: var(--device-width);
  aspect-ratio: 600 / 1298;
  border-radius: 13% / 6%;
}
.scene-screen {
  display: block;
  height: auto;
  object-fit: cover;
  background: var(--paper);
  justify-self: center;
  outline: 6px solid var(--ink);
}
.device, .scene-detail, .scene-motion { display: none; }

.charty-demo {
  container-type: inline-size;
  position: relative;
  overflow: hidden;
  text-align: left;
  background: radial-gradient(#292e291f 1px, transparent 1px) center / 5% 2.31%, var(--paper);
}
.charty-demo::after {
  content: "";
  position: absolute;
  inset: 2% 35% auto;
  height: 3.1%;
  border-radius: 999px;
  background: #1b1b19;
}
.charty-demo-status {
  position: absolute;
  inset: 2.4% 8% auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font: 700 3.6cqw/1 system-ui, sans-serif;
}
.charty-demo-battery {
  width: 6cqw;
  height: 3cqw;
  border: .38cqw solid currentColor;
  border-radius: .8cqw;
  background: linear-gradient(to right, var(--ink) 78%, transparent 78%) content-box;
  padding: .3cqw;
}
.charty-demo-chat, .charty-demo-agenda {
  position: absolute;
  inset: 7% 0 0;
  padding-inline: 5cqw;
  font-size: 4.4cqw;
  line-height: 1.3;
}
.charty-demo-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2cqw;
  border-bottom: .3cqw solid #292e2930;
  padding: 2cqw 0 3cqw;
  white-space: nowrap;
}
.charty-demo-bar strong { font-size: 5.4cqw; }
.charty-demo-bar span { font-size: 3.4cqw; }
.charty-demo-bar span:last-child { text-align: right; }
.charty-demo-flow { padding: 5cqw 0 17cqw; }
.charty-demo-message {
  max-width: 91%;
  padding: 3cqw 3.5cqw;
  border: .45cqw solid var(--ink);
  border-radius: 3.5cqw 3.1cqw 3.8cqw 3.3cqw;
  background: #fffef9;
}
.charty-demo-message small { font-size: 3.4cqw; color: #525a50; }
.charty-demo-message p { margin: 1.4cqw 0 0; }
.charty-demo-request { margin-left: auto; background: #f5ead9; }
.charty-demo-photo {
  display: grid;
  margin-top: 2cqw;
  padding: 2cqw;
  border: .3cqw solid #292e2940;
  border-radius: 1.6cqw;
  background: #fffef9;
  font: 3.4cqw/1.55 system-ui, sans-serif;
}
.charty-demo-photo span { display: flex; justify-content: space-between; gap: 2cqw; }
.charty-demo-photo strong { border-bottom: .35cqw solid #292e2930; padding-bottom: .65cqw; }
.charty-demo-times {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5cqw 2cqw;
  margin: 3cqw 0;
  font-size: 3.65cqw;
}
.charty-demo-times dd { margin: 0; text-align: right; white-space: nowrap; }
.charty-demo-actions { display: flex; justify-content: flex-end; gap: 2cqw; }
.charty-demo-actions span {
  padding: 1.3cqw 3cqw;
  border: .4cqw solid var(--ink);
  border-radius: 2cqw;
  font-size: 3.9cqw;
}
.charty-demo-actions span:first-child { color: var(--paper); background: var(--ink); }
.charty-demo-composer {
  position: absolute;
  inset: auto 5cqw 5cqw;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: .3cqw solid #292e2930;
  padding: 3cqw 2cqw 1cqw;
  background: var(--paper);
  font-size: 3.6cqw;
  color: #626960;
}
.charty-demo-date { margin: 4cqw 0; }
.charty-demo-event {
  display: grid;
  gap: .7cqw;
  padding: 2.6cqw 3.6cqw;
  margin-bottom: 2.3cqw;
  background: var(--sage);
  border: .3cqw solid #292e2960;
  border-radius: 2.1cqw 2.5cqw 2cqw 2.3cqw;
}
.charty-demo-event span { font-size: 3.6cqw; }
.charty-demo-reply, .charty-demo-confirm, .charty-demo-agenda { display: none; }
.charty-demo[data-demo-step="1"] .charty-demo-request,
.charty-demo[data-demo-step="3"] .charty-demo-chat { display: none; }
.charty-demo[data-demo-step="1"] .charty-demo-reply,
.charty-demo[data-demo-step="2"] .charty-demo-confirm,
.charty-demo[data-demo-step="3"] .charty-demo-agenda { display: block; }
.charty-demo-confirm { margin-top: 3cqw; }
.is-scrubbable .charty-demo-chat, .is-scrubbable .charty-demo-agenda {
  padding-inline-start: 13cqw;
}
.is-scrubbable .charty-demo-message { max-width: 100%; }

.is-scrubbable .walkthrough-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.is-scrubbable .walkthrough-inner {
  --device-margin: clamp(.75rem, 1.5svh, 1.25rem);
  --device-width: min(48vw, calc((100svh - 2 * var(--device-margin)) * 600 / 1298));
  height: 100%;
  max-width: none;
}
.is-scrubbable .scene {
  display: contents;
}
.is-scrubbable .device, .is-scrubbable .scene-screen, .is-scrubbable .scene-motion {
  display: block;
  position: absolute;
  inset: 50% auto auto 0;
  transform: translate3d(var(--phone-x, 0px), -50%, 0);
}
.is-scrubbable .device {
  background: var(--paper);
  box-shadow: 0 0 0 7px var(--ink), 0 24px 48px #292e293b;
}
.is-scrubbable .scene-screen, .is-scrubbable .scene-motion {
  outline: 0;
  opacity: 0;
}
.is-scrubbable .scene-motion {
  width: var(--device-width);
  height: auto;
  aspect-ratio: 600 / 1298;
  border-radius: 13% / 6%;
}
.is-scrubbable .scene-copy {
  position: absolute;
  inset: 50% auto auto 0;
  width: min(39%, 34rem);
  transform: translate3d(var(--copy-x, 0px), calc(-50% + var(--copy-y, 0px)), 0);
  opacity: 0;
  z-index: 1;
}
.finish {
  margin: clamp(2rem, 8vw, 6rem) auto;
  width: min(calc(100% - var(--gutter) * 2), var(--content));
  padding: clamp(2rem, 7vw, 5rem);
  background: rgb(255 223 202 / .76);
  border: 1.5px solid var(--ink);
  border-radius: 20px 24px 22px 18px;
}
.finish .ink-button { margin-top: 1.6rem; }

.site-footer {
  padding: clamp(2rem, 5vw, 3.75rem) var(--gutter) 1.25rem;
  border-top: 1px solid #292e2940;
  background: rgb(250 248 240 / .8);
  font-size: 1rem;
}
.site-footer-inner { max-width: var(--content); margin: 0 auto; }
.site-footer-main {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.75rem;
}
.site-footer-brand {
  margin: 0;
  font-size: clamp(2.75rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.06em;
}
.site-footer-group {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: .5rem;
}
.site-footer-group h2 { margin: 0; font-size: 1.2rem; }
.site-footer-group a { text-underline-offset: .22em; overflow-wrap: anywhere; }
.site-footer-copyright {
  margin: 2rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #292e2930;
  color: #425043;
}

@media (max-width: 560px) {
  .site-footer-main { grid-template-columns: 1fr 1.45fr; gap: 1.25rem; }
  .site-footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .walkthrough-inner { --device-width: min(17rem, 57vw, 28svh); }
  .scene {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 1.8rem;
  }
  .scene[data-side="left"] .scene-screen { order: 0; }
  .scene-copy p { margin: .65rem auto 0; }
  .friend-sprite { display: none; }
  .is-scrubbable .walkthrough-inner {
    --device-width: min(78vw, calc((100svh - 2 * var(--device-margin)) * 600 / 1298));
  }
  .is-scrubbable .charty-demo-chat, .is-scrubbable .charty-demo-agenda {
    padding-inline-start: max(12cqw, calc(104cqw - 48vw));
  }
  .is-scrubbable .charty-demo-times { font-size: 3.25cqw; }
  .is-scrubbable .charty-demo-bar { grid-template-columns: 1fr auto; }
  .is-scrubbable .charty-demo-bar span:first-child { display: none; }
  .is-scrubbable .scene-copy {
    width: 42%;
    text-align: left;
  }
  .is-scrubbable .scene-copy h2 { font-size: clamp(1.8rem, 6vw, 3rem); }
  .is-scrubbable .scene-copy p {
    margin-inline: 0;
    font-size: clamp(1rem, 3.5vw, 1.25rem);
    line-height: 1.3;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .site-background-video { visibility: hidden; }
  .marquee-track {
    display: block;
    width: auto;
    animation: none;
    text-align: center;
    white-space: normal;
  }
  .marquee-track span { display: block; }
  .marquee-track [aria-hidden] { display: none; }
}
