/* The landing page. Builds on site.css. */

/* ---------- opening ----------
   Sized so the first screen ends with the scroll still rolled shut. */
.hero { color: var(--on-indigo); overflow: hidden; }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 7.4fr) minmax(0, 4.6fr); column-gap: 32px; align-items: center;
  min-height: calc(100svh - var(--bar) - var(--roll) * 2 - 22px);
  padding-top: 40px; padding-bottom: 56px;
}
.hero h1 { font-size: clamp(2.9rem, 5.9vw, 4.9rem); line-height: 1; letter-spacing: .005em; text-shadow: 0 .05em 0 var(--indigo-deep); }
.hero h1 .keep { white-space: nowrap; }
.hero .lede { margin-top: 26px; max-width: 30em; font-size: 1.28rem; line-height: 1.5; color: var(--on-indigo-soft); }
.hero .actions { margin-top: 34px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero .actions a:not(.btn) { font-weight: 700; }
.hero .terms { margin-top: 24px; font-size: 1rem; color: var(--on-indigo-soft); }
.hero .terms b { color: var(--on-indigo); font-weight: 700; }
.hero .art { justify-self: end; width: min(100%, 440px); margin-right: -10px; }

/* on load: the headline comes up word by word, then the rest follows */
.hero h1 .w { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .12em; margin-bottom: -.12em; }
.hero h1 .w > span { display: inline-block; transform: translateY(108%); animation: rise .75s var(--ease) forwards; animation-delay: calc(var(--i) * 60ms + 60ms); }
.hero .lede, .hero .actions, .hero .terms { animation: follow .6s ease-out both; }
.hero .lede { animation-delay: .5s; }
.hero .actions { animation-delay: .6s; }
.hero .terms { animation-delay: .7s; }
.hero .art { animation: settle .95s cubic-bezier(.2, .9, .3, 1.18) .2s both; transform-origin: 30% 90%; }
@keyframes rise { to { transform: none; } }
@keyframes follow { from { opacity: 0; transform: translateY(10px); } }
@keyframes settle { from { opacity: 0; transform: translateY(26px) rotate(-7deg); } }

/* ---------- the showcase: six features, one tile each, all the same size ---------- */
.showcase { padding: 72px 0 92px; }
.showcase-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 40px; margin-bottom: 44px; }
.showcase-head h2 { font-size: clamp(2rem, 3.3vw, 2.75rem); line-height: 1.05; letter-spacing: .005em; }
.showcase-head p { color: var(--olive-ink); font-size: .98rem; }
.if-touch { display: none; }
@media (hover: none) { .if-hover { display: none; } .if-touch { display: inline; } }

.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 64px 56px; }
.tile h3 { margin-top: 6px; font-size: 1.65rem; line-height: 1.1; letter-spacing: .005em; }
.tile .cmdname { margin-top: 22px; }
.tile > p:last-child { margin-top: 10px; color: var(--ink-soft); }
.tile code { color: var(--ink); }

/* A window onto each Discord message. Every window is the same shape; the
   message slides up inside it when you point at it, so the whole thing can
   be read without one feature taking more of the page than another. */
.win {
  position: relative; aspect-ratio: 596 / 380; overflow: hidden; container-type: size;
  border-radius: 10px; background: #1A1A1E; box-shadow: 0 0 0 3px var(--indigo);
}
.win img { width: 100%; height: auto; transition: transform .6s var(--ease); }
.win::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 64px; pointer-events: none;
  background: linear-gradient(rgba(26, 26, 30, 0), #1A1A1E);
  transition: opacity .25s;
}
.win.fits::after { display: none; }
.win:hover img, .win:focus img { transform: translateY(calc(100cqh - 100%)); transition: transform var(--pan, 1.5s) cubic-bezier(.45, .05, .55, .95); }
.win:hover::after, .win:focus::after { opacity: 0; }
.win:focus-visible { outline: 3px solid var(--outline); outline-offset: 5px; }

/* ---------- sections that follow, text on the left ---------- */
.plate-row .split { padding: 92px 0; }
.showcase + .plate-row .split, .plate-row + .plate-row .split { border-top: 2px solid var(--rule); }
.note { position: sticky; top: calc(var(--bar) + 36px); align-self: start; }
.note h2 { font-size: clamp(2rem, 3.3vw, 2.75rem); line-height: 1.05; letter-spacing: .005em; }
.note > p { margin-top: 16px; color: var(--ink-soft); font-size: 1.08rem; max-width: 30em; }
.note code { color: var(--ink); }

/* ---------- the rest of what it does ---------- */
.also dl { margin: 0; }
.also .item { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr); column-gap: 28px; padding: 18px 0; border-top: 2px solid var(--rule); }
.also .item:last-child { border-bottom: 2px solid var(--rule); }
.also dt { font-weight: 800; }
.also dd { margin: 0; color: var(--ink-soft); }

/* ---------- pricing ---------- */
.plan { padding: 28px 30px 30px; border-radius: 14px; }
.plan + .plan { margin-top: 20px; }
.plan-free { border: 3px solid var(--outline); background: var(--paper-hi); }
.plan-premium { background: var(--indigo); color: var(--on-indigo); box-shadow: 0 5px 0 var(--indigo-deep); }
.plan header { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.plan h3 { font-size: 1.7rem; letter-spacing: .01em; }
.plan .price { font: 400 2.7rem/1 var(--display); }
.plan .per { margin-top: 4px; text-align: right; font-size: .98rem; color: var(--on-indigo-soft); }
.plan ul { margin: 20px 0 0; padding: 0; list-style: none; }
.plan li { padding: 10px 0; border-top: 2px solid var(--rule); }
.plan-premium li { border-top-color: var(--rule-on-indigo); }
.plan .after { padding-top: 16px; border-top: 2px solid var(--rule-on-indigo); color: var(--on-indigo-soft); }
.plan-premium code { color: var(--on-indigo); }

/* ---------- closing ---------- */
.closing { color: var(--on-indigo); overflow-x: clip; }
.closing .wrap { padding-top: 84px; padding-bottom: 60px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 28px 48px; }
.closing h2 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.02; text-shadow: 0 .05em 0 var(--indigo-deep); }
.closing p { margin-top: 14px; color: var(--on-indigo-soft); font-size: 1.1rem; }
.closing code { color: var(--on-indigo); }
.closing .btn { margin-top: 30px; }

/* The logo's inkwell and quill, as two pictures so the quill can leave the ink.
   The quill goes in behind the front of the inkwell's mouth. --u is one pixel
   of the drawing. */
.inkwell { --u: calc(var(--pot, 62px) / 298); position: relative; z-index: 3; width: calc(var(--u) * 817); height: calc(var(--u) * 1109); pointer-events: none; }
.inkwell img { position: absolute; max-width: none; }
.inkwell .pot { left: 0; bottom: 0; width: calc(var(--u) * 298); height: calc(var(--u) * 288); }
.inkwell .lip { z-index: 2; clip-path: inset(7.99% 0 0 0); }
.inkwell .quill { left: calc(var(--u) * 137); top: 0; width: calc(var(--u) * 680); height: calc(var(--u) * 877); transform-origin: calc(var(--u) * 1.75) calc(var(--u) * 873.87); z-index: 1; will-change: transform; }
/* the heading's words stay out of sight until the quill has written them */
.closing h2 .ink { display: inline-block; }
.closing h2.unwritten .ink { clip-path: inset(-.2em 100% -.2em -.1em); }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-top: 36px; padding-bottom: 40px; }
  .hero .art { justify-self: center; width: min(58%, 270px); margin: 36px 0 0; }
  .showcase { padding: 48px 0 60px; }
  .showcase-head { margin-bottom: 32px; }
  .tiles { gap: 48px 36px; }
  .plate-row .split { padding: 60px 0; }
  .note { position: static; }
  .also dl, .plans { margin-top: 32px; }
}
@media (max-width: 700px) {
  .tiles { grid-template-columns: minmax(0, 1fr); }
  /* the inkwell sits above the line it writes, so both are in view together */
  .closing .wrap { grid-template-columns: minmax(0, 1fr); }
  .inkwell { order: -1; justify-self: end; margin-bottom: -14px; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: clamp(2rem, 10vw, 2.6rem); }
  .hero .lede { font-size: 1.14rem; }
  .hero .actions .btn { width: 100%; }
  /* windows run to the paper's edges so the text in them stays readable */
  .win { margin: 0 calc(6px - var(--pad)); border-radius: 6px; box-shadow: 0 0 0 2px var(--indigo); }
  .also .item { grid-template-columns: minmax(0, 1fr); row-gap: 4px; }
  .plan { padding: 22px 20px 24px; }
  .plan .price { font-size: 2.2rem; }
  .closing .wrap { padding-top: 60px; }
  .closing .btn { width: 100%; }
  .inkwell { --pot: 48px; }
}
