/* The pages outside the app: the landing page, privacy, and the error pages.
   Navigation, footer and the handwriting that annotates them. */

/* ---------- navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background-color .3s, box-shadow .3s, transform .4s var(--ease-out);
}
.nav.is-stuck { background: rgb(242 240 232 / .86); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 1px 0 var(--line); }
.nav__in { display: flex; align-items: center; gap: 28px; height: 72px; }
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  position: relative; padding: .5em .8em; border-radius: 999px; text-decoration: none;
  font-weight: 600; font-size: .95rem; color: var(--ink-2); transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: .8em; right: .8em; bottom: .28em; height: .5em; z-index: -1;
  background: var(--hl); border-radius: .2em .5em .25em .4em; transform: scaleX(0); transform-origin: left;
  transition: transform .35s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after, .nav__links a[aria-current]::after { transform: scaleX(1); }
.nav__links a[aria-current] { color: var(--ink); }
.nav__in { isolation: isolate; }
@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav__in { height: 62px; }
  .nav__cta { margin-left: auto; }
}

/* ---------- handwriting ---------- */
.scrawl { font: 600 1.5rem/1.05 var(--hand); color: var(--red); letter-spacing: 0; }
.scrawl--blue { color: var(--blue); }
.scrawl--ink { color: var(--ink-2); }
.draw path, .draw circle, .draw line { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.js .draw [pathLength] { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset .9s var(--ease-out); transition-delay: var(--dd, .2s); }
.js .is-in .draw [pathLength], .js .draw.is-in [pathLength] { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) { .js .draw [pathLength] { stroke-dashoffset: 0; transition: none; } }

/* A heading word under the highlighter or the red pen. */
.hl { position: relative; white-space: nowrap; isolation: isolate; }
.hl::before {
  content: ""; position: absolute; z-index: -1; inset: .16em -.08em .04em;
  background: var(--hl); border-radius: .16em .4em .2em .34em / .4em .18em .36em .2em;
  transform: rotate(-.8deg) scaleX(var(--s, 1)); transform-origin: left;
  transition: transform .9s var(--ease-out) .15s;
}
.js [data-rise]:not(.is-in) .hl::before, .js .hl[data-rise]:not(.is-in)::before { --s: 0; }
.pen {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8' viewBox='0 0 24 8'%3E%3Cpath d='M0 4Q6 -1.5 12 4T24 4' fill='none' stroke='%23d92d20' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x 0 100% / .52em .17em;
  padding-bottom: .1em;
}

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: clamp(48px, 7vw, 88px) 0 28px; background: var(--desk); }
.foot__top { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, .6fr)); gap: 40px; align-items: start; }
.foot__brand .logo { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.foot__tag { margin-top: 14px; max-width: 28ch; color: var(--ink-2); font-size: 1.05rem; }
.foot h2 { font: 700 .74rem/1 var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); font-stretch: 100%; margin-bottom: 14px; }
.foot ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.foot ul a { text-decoration: none; font-weight: 600; color: var(--ink); }
.foot ul a:hover { text-decoration: underline; text-decoration-color: var(--hl); text-decoration-thickness: .35em; text-underline-offset: -.12em; text-decoration-skip-ink: none; }
.foot__base { display: flex; flex-wrap: wrap; gap: 8px 28px; justify-content: space-between; margin-top: clamp(40px, 6vw, 72px); padding-top: 20px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); font-weight: 500; }
@media (max-width: 720px) {
  .foot__top { grid-template-columns: 1fr 1fr; }
  .foot__brand { grid-column: 1 / -1; }
}

/* ---------- a plain page: privacy ---------- */
.page { padding: clamp(120px, 16vw, 176px) 0 clamp(64px, 9vw, 120px); }
.page__in { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }
.page h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); margin: 18px 0 14px; }
.page__lead { font-size: 1.2rem; color: var(--ink-2); max-width: 46ch; }
.page__sheet {
  position: relative; margin-top: clamp(32px, 5vw, 56px); background: var(--paper); border-radius: 4px; box-shadow: var(--shadow-2);
  padding: clamp(24px, 5vw, 56px) clamp(20px, 5vw, 60px) clamp(24px, 5vw, 48px) 104px;
}
.page__sheet::before { content: ""; position: absolute; top: 0; bottom: 0; left: 64px; width: 1.5px; background: rgb(217 45 32 / .32); }
.clause { display: grid; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); position: relative; }
.clause:first-child { border-top: 0; padding-top: 0; }
.clause h2 { font: 700 1.14rem/1.3 var(--ui); letter-spacing: -.01em; font-stretch: 100%; }
.clause p { color: var(--ink-2); font-size: 1.04rem; line-height: 1.65; max-width: 60ch; }
.clause__n { position: absolute; left: -92px; top: 20px; font: 600 1.5rem/1 var(--hand); color: var(--red); width: 1.6em; text-align: right; }
.clause:first-child .clause__n { top: -2px; }
.page__foot { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); font-size: .86rem; color: var(--ink-3); }
@media (max-width: 700px) { .clause__n { display: none; } .page__sheet::before { display: none; } .page__sheet { padding-left: clamp(20px, 5vw, 60px); } }

/* ---------- error pages: a note left on the desk ---------- */
.oops { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.oops__top { padding: 20px var(--gutter); }
.oops__mid { display: grid; place-items: center; padding: 24px var(--gutter) 56px; }
.oops__card {
  position: relative; width: min(100%, 640px); background: var(--paper); border-radius: 4px; box-shadow: var(--shadow-3);
  padding: clamp(28px, 6vw, 56px) clamp(22px, 6vw, 56px) clamp(26px, 5vw, 44px); transform: rotate(-.8deg); isolation: isolate;
}
.oops__card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--paper-2); border-radius: 4px; box-shadow: var(--shadow-1); transform: rotate(1.6deg) translate(6px, 4px); }
.oops__tape { position: absolute; top: -14px; left: 50%; width: 118px; height: 30px; margin-left: -59px; background: rgb(255 225 74 / .82); transform: rotate(-2.4deg); box-shadow: 0 1px 2px rgb(20 22 26 / .12); clip-path: polygon(0 12%, 4% 0, 9% 14%, 14% 2%, 19% 13%, 100% 0, 100% 88%, 96% 100%, 91% 86%, 86% 98%, 81% 87%, 0 100%); }
.oops__code { font: 800 clamp(5.4rem, 22vw, 10.5rem)/.82 var(--disp); font-stretch: 78%; letter-spacing: -.06em; color: var(--ink); display: inline-block; position: relative; }
.oops__code s { text-decoration: none; position: relative; color: var(--ink-4); }
.oops__code s::after { content: ""; position: absolute; left: -6%; right: -6%; top: 52%; height: .075em; background: var(--red); border-radius: 99px; transform: rotate(-7deg) scaleX(var(--sx, 1)); transform-origin: left; animation: strike .7s var(--ease-out) .35s backwards; }
@keyframes strike { from { transform: rotate(-7deg) scaleX(0); } }
.oops__hand { position: absolute; font: 600 clamp(1.5rem, 4.4vw, 2.1rem)/1 var(--hand); color: var(--red); white-space: nowrap; transform: rotate(-6deg); right: clamp(4px, 3vw, 28px); top: clamp(30px, 9vw, 70px); animation: jot .5s var(--ease-out) .9s backwards; }
@keyframes jot { from { opacity: 0; transform: rotate(-6deg) translateY(8px); } }
.oops h1 { font-size: clamp(1.9rem, 5.4vw, 2.9rem); margin: 22px 0 10px; }
.oops p.oops__body { color: var(--ink-2); font-size: 1.1rem; max-width: 38ch; }
.oops__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.oops__fine { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); }
.oops__wire { color: var(--ink); width: min(100%, 320px); height: auto; margin-bottom: 4px; }
.oops__wire path { stroke-width: 5; }
.oops__wire .oops__cut { stroke: var(--red); stroke-width: 4; }
.oops__hand--flow { position: static; display: inline-block; margin: 0 0 4px 46%; transform: rotate(-4deg); }
.oops__card.is-back .oops__cut, .oops__card.is-back .oops__hand--flow { opacity: .28; transition: opacity .4s; }
.oops__bottom { padding: 18px var(--gutter) 24px; text-align: center; }
.oops__status { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.oops__status i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); }
.oops__status.is-on i { background: #1f9d55; }
@media (max-width: 520px) { .oops__hand { position: static; display: block; transform: rotate(-3deg); margin-top: 10px; animation: none; } .oops__card { transform: none; } }
