/* Widgie's world. The Caret in Sky identity (docs/design/app-feel/c2-caret-sky.html) at the scale of a page:
   a sky that changes with the day as you scroll, the caret wherever a cursor would be, and one display face. */

@font-face {
    font-family: "Bricolage";
    src: url("/fonts/bricolage.woff2") format("woff2-variations");
    font-weight: 200 800;
    font-stretch: 75% 100%;
    font-display: swap;
}

:root {
    --sky: #c4d8f3;
    --ink: #121a2e;
    --ink-soft: #3e4c6b;
    --line: #6b7990;
    --muted: #9daec8;
    --blush: #ff7f8e;
    --mint: #a9e9cd;
    --butter: #ffe594;
    --rose: #ffc2ce;
    --lilac: #d2c6ff;
    --peach: #ffcea8;
    --night: #0f1830;
    --moon: #e9f2ff;
    --display: "Bricolage", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
    --page-x: clamp(20px, 5vw, 72px);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    color: var(--ink);
    background: var(--sky);
    font-family: var(--font);
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background-color: var(--sky);
    background-image: radial-gradient(circle at 1.5px 1.5px, rgba(18, 26, 46, 0.1) 1.3px, transparent 1.6px);
    background-size: 26px 26px;
    transition: background-color 0.9s ease;
    overflow-x: clip;
}

a {
    color: inherit;
}

::selection {
    background: var(--ink);
    color: var(--sky);
}

[hidden] {
    display: none !important;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* ---------- Header ---------- */

.top {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px var(--page-x);
    transition:
        background 0.3s,
        box-shadow 0.3s;
}

.top.scrolled {
    background: color-mix(in srgb, var(--sky) 82%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(18, 26, 46, 0.08);
}

body.at-night .top.scrolled {
    background: rgba(15, 24, 48, 0.82);
    box-shadow: 0 1px 0 rgba(233, 242, 255, 0.08);
    color: var(--moon);
}

body.at-night .top nav a {
    color: rgba(233, 242, 255, 0.7);
}

body.at-night .top nav a:hover,
body.at-night .top nav a[aria-current] {
    color: var(--moon);
}

body.at-night .top nav .join {
    background: var(--moon);
    color: var(--night);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    font: 800 28px/1 var(--display);
    letter-spacing: -1.2px;
    text-decoration: none;
}

.bar {
    display: inline-block;
    width: 0.15em;
    height: 0.92em;
    margin-left: 0.18em;
    border-radius: 0.08em;
    background: currentColor;
    animation: blink 1.06s steps(1) infinite;
}

.top nav {
    display: flex;
    align-items: center;
    gap: 26px;
    font-size: 15px;
    font-weight: 650;
}

.top nav a {
    text-decoration: none;
    color: var(--ink-soft);
}

.top nav a:hover,
.top nav a[aria-current] {
    color: var(--ink);
}

.top nav .join {
    padding: 11px 16px;
    border-radius: 12px;
    background: var(--ink);
    color: var(--sky);
}

.top nav .join:hover {
    color: var(--sky);
}

/* ---------- Story: text on the left, a pinned phone on the right ---------- */

.story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.82fr);
    column-gap: clamp(24px, 4vw, 72px);
    padding: 0 var(--page-x);
}

.story-stage {
    position: relative;
}

.story-stage .stage {
    position: sticky;
    top: max(84px, calc(50vh - 380px));
    margin: 104px auto 120px;
}

.hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
    padding: 120px 0 80px;
}

.title {
    font-family: var(--display);
    font-size: clamp(56px, 8.4vw, 150px);
    font-weight: 800;
    font-stretch: 86%;
    line-height: 0.9;
    letter-spacing: -0.045em;
    text-wrap: balance;
}

.title-caret {
    display: inline-block;
    width: 0.4em;
    height: 0.86em;
    margin-left: 0.06em;
    vertical-align: -0.04em;
    overflow: visible;
    transform-origin: 50% 95%;
}

.title-caret .shadow {
    display: none;
}

.title.typing .title-caret,
.title-caret.blink {
    animation: blink 1.06s steps(1) infinite;
}

.title.typing .title-caret {
    animation: none;
}

.title-caret.hop {
    animation: hop 0.6s cubic-bezier(0.3, 1.6, 0.5, 1);
}

@keyframes hop {
    40% {
        transform: translateY(-0.18em) rotate(-6deg);
    }
}

.lede {
    max-width: 30em;
    margin-top: 30px;
    font-size: clamp(18px, 1.5vw, 22px);
    line-height: 1.5;
    color: var(--ink-soft);
}

/* The type-a-widget line */

.ask {
    max-width: 640px;
    margin-top: 44px;
}

.ask-label {
    display: block;
    font: 700 15px var(--font);
    color: var(--ink-soft);
}

.ask-line {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding: 8px 8px 8px 22px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 1px 0 rgba(18, 26, 46, 0.06),
        0 18px 40px rgba(18, 26, 46, 0.12);
}

.ask-line input {
    flex: 1;
    min-width: 0;
    border: 0;
    outline: none;
    background: transparent;
    color: var(--ink);
    font: 600 clamp(18px, 1.7vw, 23px) / 1.3 var(--font);
    letter-spacing: -0.3px;
    caret-color: var(--blush);
}

.ask-line input::placeholder {
    color: var(--ink-soft);
    opacity: 0.45;
}

.ask-go {
    flex: none;
    height: 52px;
    padding: 0 20px;
    border: 0;
    border-radius: 14px;
    background: var(--ink);
    color: var(--sky);
    font: 700 16px var(--font);
    cursor: pointer;
    transition: transform 0.1s;
}

.ask-go:active {
    transform: scale(0.96);
}

.ask-note {
    min-height: 1.4em;
    margin-top: 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--ink-soft);
}

.tries {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    max-width: 640px;
    margin-top: 4px;
}

.tries > span {
    margin-right: 4px;
    font-size: 14px;
    font-weight: 650;
    color: var(--ink-soft);
}

.try {
    padding: 9px 13px;
    border: 0;
    border-radius: 11px;
    color: var(--ink);
    font: 650 14px var(--font);
    letter-spacing: -0.15px;
    cursor: pointer;
    transition:
        transform 0.12s,
        box-shadow 0.12s;
}

.try:nth-of-type(4n + 1) {
    background: var(--mint);
}

.try:nth-of-type(4n + 2) {
    background: var(--butter);
}

.try:nth-of-type(4n + 3) {
    background: var(--rose);
}

.try:nth-of-type(4n + 4) {
    background: var(--lilac);
}

.try:hover {
    transform: translateY(-2px) rotate(-1deg);
    box-shadow: 0 4px 0 rgba(18, 26, 46, 0.14);
}

/* Chapters */

.chapter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 92vh;
    max-width: 560px;
    padding: 60px 0;
}

.chapter-mark {
    width: 64px;
    height: 14px;
    margin-bottom: 26px;
    border-radius: 7px;
    background: var(--ink);
    transform-origin: left;
    transform: scaleX(0.25);
    opacity: 0.2;
    transition:
        transform 0.6s cubic-bezier(0.3, 1.4, 0.5, 1),
        opacity 0.4s;
}

.chapter.on .chapter-mark {
    transform: scaleX(1);
    opacity: 1;
}

.chapter h2 {
    font-family: var(--display);
    font-size: clamp(40px, 4.6vw, 76px);
    font-weight: 800;
    font-stretch: 88%;
    line-height: 0.96;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.chapter p {
    margin-top: 22px;
    max-width: 28em;
    font-size: clamp(17px, 1.35vw, 20px);
    line-height: 1.55;
    color: var(--ink-soft);
}

.chapter h2,
.chapter p {
    opacity: 0.25;
    transform: translateY(18px);
    transition:
        opacity 0.6s,
        transform 0.6s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.chapter.on h2,
.chapter.on p {
    opacity: 1;
    transform: none;
}

/* Marquee of things people would type */

.marquee {
    position: relative;
    z-index: 2;
    overflow: hidden;
    margin: 40px 0 0;
    padding: 26px 0;
    background: var(--ink);
    transform: rotate(-2deg) scale(1.04);
}

.marquee-track {
    display: flex;
    width: max-content;
    animation: slide 46s linear infinite;
}

.marquee span {
    display: inline-flex;
    align-items: center;
    padding: 0 28px;
    font: 800 clamp(34px, 4.6vw, 64px) / 1 var(--display);
    font-stretch: 84%;
    letter-spacing: -0.03em;
    color: var(--sky);
    white-space: nowrap;
}

.marquee span::after {
    content: "";
    width: 0.16em;
    height: 0.9em;
    margin-left: 56px;
    border-radius: 0.08em;
    background: var(--blush);
}

.marquee span:nth-child(3n + 2)::after {
    background: var(--butter);
}

.marquee span:nth-child(3n)::after {
    background: var(--mint);
}

@keyframes slide {
    to {
        transform: translateX(-50%);
    }
}

/* Two worlds (root page) */

.worlds {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
    padding: 140px var(--page-x) 120px;
}

.world {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 440px;
    padding: 40px;
    border-radius: 34px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
}

.world:hover {
    transform: translateY(-6px) rotate(-0.6deg);
}

.home-world {
    background: linear-gradient(160deg, #ffd8b5, #ffb28c);
}

.us-world {
    background: linear-gradient(160deg, #ffc2ce, #c9a8f0);
}

.world::before {
    content: "";
    position: absolute;
    right: -60px;
    bottom: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: transform 0.6s;
}

.world:hover::before {
    transform: scale(1.15);
}

.world-widget {
    position: absolute;
    top: 40px;
    right: 40px;
    width: min(200px, 34%);
    container-type: inline-size;
    transform: rotate(6deg);
    transition: transform 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.world-widget .w {
    height: auto;
    aspect-ratio: 1;
    --u: calc(100cqw / 158);
    box-shadow: 0 18px 36px rgba(18, 26, 46, 0.25);
}

.world:hover .world-widget {
    transform: rotate(-3deg) translateY(-8px) scale(1.04);
}

.world-kicker {
    font-size: 15px;
    font-weight: 700;
    color: var(--ink-soft);
}

.world strong {
    position: relative;
    max-width: min(9em, 62%);
    margin-top: 120px;
    font: 800 clamp(40px, 4.4vw, 68px) / 0.95 var(--display);
    font-stretch: 86%;
    letter-spacing: -0.04em;
}

.world-go {
    position: relative;
    align-self: flex-start;
    padding: 13px 18px;
    border-radius: 13px;
    background: var(--ink);
    color: var(--sky);
    font-weight: 700;
}

/* ---------- Night: the sign-up, under Sky turned dark ---------- */

.night {
    position: relative;
    overflow: hidden;
    margin-top: 120px;
    padding: 160px var(--page-x) 150px;
    background: radial-gradient(120% 90% at 50% 0%, #22386a 0%, #14203f 45%, var(--night) 100%);
    color: var(--moon);
}

.worlds + .night {
    margin-top: 0;
}

.stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 1.5px 1.5px, rgba(233, 242, 255, 0.55) 1.2px, transparent 1.7px),
        radial-gradient(circle at 1.5px 1.5px, rgba(233, 242, 255, 0.25) 1px, transparent 1.5px);
    background-size:
        130px 110px,
        26px 26px;
    background-position:
        13px 40px,
        0 0;
    animation: twinkle 5s ease-in-out infinite;
}

@keyframes twinkle {
    50% {
        opacity: 0.6;
    }
}

.night-inner {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.night h2 {
    font: 800 clamp(56px, 8vw, 128px) / 0.9 var(--display);
    font-stretch: 84%;
    letter-spacing: -0.045em;
    text-align: center;
}

.night-caret {
    display: inline-block;
    width: 0.4em;
    height: 0.86em;
    margin-left: 0.05em;
    vertical-align: -0.04em;
    animation: blink 1.06s steps(1) infinite;
}

.night-caret .shadow {
    display: none;
}

.night-lede {
    max-width: 30em;
    margin: 26px auto 44px;
    font-size: 19px;
    line-height: 1.5;
    text-align: center;
    color: rgba(233, 242, 255, 0.75);
}

.signup {
    display: grid;
    gap: 18px;
}

.pick {
    display: flex;
    gap: 10px;
    border: 0;
}

.pick legend {
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.75;
}

.pick label {
    flex: 1;
    cursor: pointer;
}

.pick input {
    position: absolute;
    opacity: 0;
}

.pick span {
    display: block;
    padding: 16px;
    border: 2px solid rgba(233, 242, 255, 0.25);
    border-radius: 16px;
    font-weight: 700;
    text-align: center;
    transition:
        border-color 0.15s,
        background 0.15s;
}

.pick input:checked + span {
    border-color: var(--moon);
    background: rgba(233, 242, 255, 0.12);
}

.pick input:focus-visible + span {
    outline: 3px solid var(--blush);
    outline-offset: 2px;
}

.field span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 700;
    opacity: 0.8;
}

.opt {
    font-style: normal;
    font-weight: 500;
    opacity: 0.65;
}

.field input,
.field textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid rgba(233, 242, 255, 0.22);
    border-radius: 16px;
    background: rgba(233, 242, 255, 0.07);
    color: var(--moon);
    font: 550 18px/1.4 var(--font);
    outline: none;
    resize: vertical;
    transition:
        border-color 0.15s,
        background 0.15s;
}

.field input::placeholder,
.field textarea::placeholder {
    color: rgba(233, 242, 255, 0.4);
}

.field input:focus,
.field textarea:focus {
    border-color: var(--moon);
    background: rgba(233, 242, 255, 0.12);
}

.cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 62px;
    padding: 0 28px;
    border: 0;
    border-radius: 16px;
    background: var(--ink);
    color: var(--sky);
    font: 750 18px var(--font);
    letter-spacing: -0.3px;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.cta::after {
    content: "";
    width: 3px;
    height: 22px;
    margin-left: 7px;
    border-radius: 1.5px;
    background: currentColor;
    animation: blink 1.06s steps(1) infinite;
}

.cta:active {
    transform: scale(0.98);
}

.cta[disabled] {
    opacity: 0.6;
    cursor: default;
}

.cta.quiet {
    background: transparent;
    color: var(--ink);
    box-shadow: inset 0 0 0 2px var(--line);
}

.cta.quiet::after {
    display: none;
}

.night .cta {
    background: var(--moon);
    color: var(--night);
}

.error {
    font-size: 15px;
    font-weight: 700;
    color: #ffb3bd;
}

.error:empty {
    display: none;
}

.fine {
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.6;
}

.turnstile:empty {
    display: none;
}

.done {
    text-align: center;
}

.done-caret {
    width: 70px;
    height: 140px;
    animation: hop 0.8s cubic-bezier(0.3, 1.6, 0.5, 1) 2;
}

.done-caret .shadow {
    fill: #000;
    opacity: 0.3;
}

.done h3 {
    margin-top: 10px;
    font: 800 44px/1 var(--display);
    letter-spacing: -0.04em;
}

.done p {
    margin: 14px auto 0;
    max-width: 26em;
    font-size: 18px;
    line-height: 1.5;
    opacity: 0.8;
}

/* Built in public */

.public {
    max-width: 900px;
    margin: 0 auto;
    padding: 140px var(--page-x) 40px;
    text-align: center;
}

.public h2 {
    font: 800 clamp(40px, 5vw, 72px) / 0.95 var(--display);
    font-stretch: 86%;
    letter-spacing: -0.04em;
}

.public p {
    margin: 22px auto 0;
    max-width: 34em;
    font-size: 19px;
    line-height: 1.55;
    color: var(--ink-soft);
}

/* Footer: the wordmark as big as the page */

.foot {
    padding: 80px var(--page-x) 0;
    overflow: hidden;
}

.foot-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink-soft);
}

.giant {
    display: flex;
    align-items: center;
    margin-top: 10px;
    margin-bottom: -0.17em;
    font: 800 clamp(96px, 23vw, 380px) / 1 var(--display);
    font-stretch: 80%;
    letter-spacing: -0.06em;
    text-decoration: none;
}

/* ---------- The caret as your cursor ---------- */

#cursor {
    display: none;
}

.caret-cursor,
.caret-cursor * {
    cursor: none !important;
}

.caret-cursor input,
.caret-cursor textarea {
    cursor: text !important;
}

.caret-cursor #cursor {
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    display: block;
    width: 22px;
    height: 44px;
    pointer-events: none;
    will-change: transform;
}

.cursor-caret {
    width: 100%;
    height: 100%;
    overflow: visible;
    transform-origin: 50% 90%;
    transition: transform 0.18s cubic-bezier(0.3, 1.5, 0.5, 1);
}

.cursor-caret .shadow {
    display: none;
}

#cursor.over .cursor-caret {
    transform: scale(1.35) rotate(-14deg);
}

#cursor.typing {
    opacity: 0;
}

#cursor.dark .cursor-caret path {
    stroke: var(--moon);
}

#cursor.dark .cursor-caret ellipse:not(.shadow):not([fill="#FF7F8E"]) {
    fill: var(--night);
}

/* ---------- Small pages ---------- */

.plain {
    min-height: 80vh;
    padding: 120px var(--page-x) 40px;
}

.center {
    max-width: 560px;
    margin: 0 auto;
    padding-top: 40px;
    text-align: center;
}

.big-caret {
    width: 96px;
    height: 192px;
    margin: 0 auto 18px;
}

.big-caret.party {
    animation: hop 0.8s cubic-bezier(0.3, 1.6, 0.5, 1) 3;
}

.center h1 {
    font: 800 clamp(48px, 7vw, 88px) / 0.95 var(--display);
    font-stretch: 86%;
    letter-spacing: -0.045em;
}

.center p {
    margin-top: 18px;
    font-size: 19px;
    line-height: 1.5;
    color: var(--ink-soft);
}

.center .cta {
    margin-top: 30px;
}

.count:empty {
    display: none;
}

.count {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 14px;
    border-radius: 11px;
    background: var(--mint);
    color: var(--ink);
    font-size: 16px;
    font-weight: 700;
}

.night-card {
    margin-top: 34px;
    padding: 30px;
    border-radius: 28px;
    background: radial-gradient(120% 90% at 50% 0%, #22386a 0%, var(--night) 100%);
    color: var(--moon);
    text-align: left;
}

.night-card .cta {
    background: var(--moon);
    color: var(--night);
}

.share-box {
    display: flex;
    gap: 10px;
    margin-top: 26px;
}

.share-box input {
    flex: 1;
    min-width: 0;
    height: 62px;
    padding: 0 16px;
    border: 2px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--ink);
    font: 600 16px var(--font);
}

.share-box .cta::after {
    display: none;
}

#native-share {
    margin-top: 12px;
}

.prose {
    max-width: 700px;
    margin: 0 auto;
}

.prose h1 {
    font: 800 clamp(48px, 7vw, 96px) / 0.95 var(--display);
    font-stretch: 86%;
    letter-spacing: -0.045em;
}

.prose h2 {
    margin-top: 44px;
    font: 800 30px var(--display);
    letter-spacing: -0.03em;
}

.prose p,
.prose li {
    margin-top: 12px;
    font-size: 18px;
    line-height: 1.6;
    color: var(--ink-soft);
}

.prose ul {
    padding-left: 22px;
}

/* Confetti */

.confetti {
    position: fixed;
    inset: 0;
    z-index: 90;
    overflow: hidden;
    pointer-events: none;
}

.confetti i {
    position: absolute;
    top: -20px;
    width: 7px;
    height: 20px;
    border-radius: 4px;
    animation: drop 1.7s cubic-bezier(0.2, 0.6, 0.4, 1) forwards;
}

@keyframes drop {
    to {
        transform: translateY(105vh) rotate(var(--r));
    }
}

/* ---------- Phone stage ---------- */

.stage {
    position: relative;
    width: 100%;
    max-width: 340px;
    padding-top: 92px;
}

.bubble {
    position: absolute;
    z-index: 3;
    top: 0;
    left: -64px;
    right: 40px;
    min-height: 72px;
    padding: 14px 16px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 30px rgba(18, 26, 46, 0.16);
    font-size: 16px;
    font-weight: 650;
    line-height: 1.35;
    letter-spacing: -0.2px;
}

.bubble::after {
    content: "";
    position: absolute;
    right: -9px;
    bottom: 18px;
    border: 10px solid transparent;
    border-left-color: #ffffff;
    border-right: 0;
}

.bubble .cursor {
    display: inline-block;
    width: 2.5px;
    height: 1.1em;
    margin-left: 2px;
    vertical-align: -0.18em;
    background: var(--ink);
    animation: blink 1.1s steps(1) infinite;
}

.bubble .hint-text {
    color: var(--ink-soft);
    opacity: 0.6;
}

.peeker {
    position: absolute;
    z-index: 2;
    top: 6px;
    right: -46px;
    width: 84px;
    height: 158px;
    transform-origin: 50% 95%;
    transition: transform 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}

.stage.building .peeker {
    transform: rotate(-24deg) translateX(-6px);
}

.peeker .eyes {
    transition: transform 0.12s;
}

.phone-frame {
    position: relative;
    padding: 2.6%;
    border-radius: 15%/7%;
    background: #0b0b0c;
    box-shadow:
        0 30px 60px rgba(18, 26, 46, 0.3),
        inset 0 0 0 1.5px #3a3a3e;
}

.screen {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 390 / 844;
    border-radius: 13%/6%;
    overflow: hidden;
    --u: calc(100cqw / 390);
}

.screen > * {
    --u: calc(100cqw / 390);
}

.wall-home {
    background:
        radial-gradient(circle at 1.5px 1.5px, rgba(18, 26, 46, 0.08) 1.3px, transparent 1.6px) 0 0 / 22px 22px,
        linear-gradient(165deg, #ffd8b5 0%, #f5c9c3 45%, #c4d8f3 100%);
}

.wall-us {
    background:
        radial-gradient(circle at 1.5px 1.5px, rgba(18, 26, 46, 0.08) 1.3px, transparent 1.6px) 0 0 / 22px 22px,
        linear-gradient(165deg, #ffc2ce 0%, #e3c3f0 50%, #c4d8f3 100%);
}

.wall-all {
    background:
        radial-gradient(circle at 1.5px 1.5px, rgba(18, 26, 46, 0.08) 1.3px, transparent 1.6px) 0 0 / 22px 22px,
        linear-gradient(165deg, #a9e9cd 0%, #c4d8f3 60%, #d2c6ff 100%);
}

.island {
    position: absolute;
    top: calc(11 * var(--u));
    left: 50%;
    width: calc(124 * var(--u));
    height: calc(36 * var(--u));
    margin-left: calc(-62 * var(--u));
    border-radius: calc(20 * var(--u));
    background: #000;
}

.status {
    position: absolute;
    top: calc(18 * var(--u));
    left: calc(50 * var(--u));
    right: calc(34 * var(--u));
    display: flex;
    justify-content: space-between;
    font-size: calc(16 * var(--u));
    font-weight: 650;
    color: var(--ink);
}

.status svg {
    width: calc(70 * var(--u));
    height: calc(13 * var(--u));
}

.grid {
    position: absolute;
    top: calc(70 * var(--u));
    left: calc(26 * var(--u));
    right: calc(26 * var(--u));
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(22 * var(--u));
}

.slot {
    position: relative;
    height: calc(158 * var(--u));
    border-radius: calc(22 * var(--u));
}

.slot.medium {
    grid-column: span 2;
}

.slot.empty,
.slot.building {
    border: calc(2.5 * var(--u)) dashed rgba(18, 26, 46, 0.22);
}

.slot.building {
    border-color: rgba(18, 26, 46, 0.55);
    background: rgba(255, 255, 255, 0.22);
}

.slot.building::before,
.slot.building::after {
    content: "";
    position: absolute;
    left: calc(16 * var(--u));
    border-radius: calc(4 * var(--u));
    background: var(--ink);
    animation: sketch 0.9s ease-out both;
}

.slot.building::before {
    top: calc(18 * var(--u));
    width: calc(54 * var(--u));
    height: calc(11 * var(--u));
}

.slot.building::after {
    top: calc(40 * var(--u));
    width: calc(96 * var(--u));
    height: calc(32 * var(--u));
    animation-delay: 0.25s;
}

@keyframes sketch {
    from {
        transform: scaleX(0);
        transform-origin: left;
    }
    to {
        transform: scaleX(1);
        transform-origin: left;
    }
}

.slot.built > .w {
    animation: land 0.5s cubic-bezier(0.3, 1.5, 0.5, 1);
}

@keyframes land {
    from {
        transform: scale(0.86);
        opacity: 0;
    }
}

.dock {
    position: absolute;
    left: calc(12 * var(--u));
    right: calc(12 * var(--u));
    bottom: calc(12 * var(--u));
    display: flex;
    justify-content: space-around;
    padding: calc(16 * var(--u)) calc(14 * var(--u));
    border-radius: calc(34 * var(--u));
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
}

.dock i {
    width: calc(60 * var(--u));
    height: calc(60 * var(--u));
    border-radius: calc(15 * var(--u));
    background: rgba(255, 255, 255, 0.7);
}

.dock i:nth-child(1) {
    background: #2fbf80;
}

.dock i:nth-child(2) {
    background: #4f8dff;
}

.dock i:nth-child(3) {
    background: #ffffff;
}

.dock i:nth-child(4) {
    background: #ffbe1a;
}

.home-bar {
    position: absolute;
    bottom: calc(5 * var(--u));
    left: 50%;
    width: calc(134 * var(--u));
    height: calc(5 * var(--u));
    margin-left: calc(-67 * var(--u));
    border-radius: 3px;
    background: var(--ink);
    opacity: 0.8;
}

/* ---------- Widgets (sizes in iPhone points) ---------- */

.w {
    position: relative;
    height: 100%;
    padding: calc(15 * var(--u));
    border-radius: calc(22 * var(--u));
    overflow: hidden;
    text-align: left;
    box-shadow: 0 calc(6 * var(--u)) calc(16 * var(--u)) rgba(18, 26, 46, 0.18);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.w button {
    border: 0;
    font: inherit;
    color: inherit;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.w button:active {
    transform: scale(0.9);
}

.w-label {
    display: flex;
    align-items: center;
    gap: calc(5 * var(--u));
    font-size: calc(13 * var(--u));
    font-weight: 750;
    white-space: nowrap;
}

.w-label svg {
    width: calc(14 * var(--u));
    height: calc(14 * var(--u));
    flex: none;
}

.w-big {
    margin-top: calc(8 * var(--u));
    font-size: calc(32 * var(--u));
    font-weight: 820;
    letter-spacing: calc(-1.2 * var(--u));
    line-height: 1;
}

.w-huge {
    font-size: calc(64 * var(--u));
    font-weight: 860;
    letter-spacing: calc(-3 * var(--u));
    line-height: 1;
}

.w-small {
    margin-top: calc(5 * var(--u));
    font-size: calc(12.5 * var(--u));
    font-weight: 600;
    line-height: 1.3;
    opacity: 0.78;
}

.w-tiny {
    margin-top: calc(4 * var(--u));
    font-size: calc(11 * var(--u));
    font-weight: 650;
    opacity: 0.7;
}

.w-tap {
    position: absolute;
    right: calc(13 * var(--u));
    bottom: calc(13 * var(--u));
    display: grid;
    place-items: center;
    width: calc(44 * var(--u));
    height: calc(44 * var(--u));
    border-radius: 50%;
    transition: transform 0.12s;
}

.w-tap svg {
    width: 52%;
    height: 52%;
}

/* Baby feeds: teal, coral once a feed is late */

.w.baby {
    display: flex;
    justify-content: space-between;
    background: #12343b;
    color: #e6fff8;
    transition: background 0.4s;
}

.w.baby .w-label {
    color: #7fe0c8;
}

.w.baby.late {
    background: #8c2f39;
}

.w.baby.late .w-label {
    color: #ffc2ce;
}

.w.baby .dots {
    display: flex;
    gap: calc(4 * var(--u));
    margin-top: calc(12 * var(--u));
}

.w.baby .dots i {
    width: calc(9 * var(--u));
    height: calc(9 * var(--u));
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.w.baby .dots i.on {
    background: #7fe0c8;
}

.w.baby.late .dots i.on {
    background: #ffc2ce;
}

.w.baby .sides {
    display: flex;
    flex-direction: column;
    gap: calc(7 * var(--u));
}

.w.baby .sides button {
    display: grid;
    place-items: center;
    width: calc(54 * var(--u));
    height: calc(38 * var(--u));
    border-radius: calc(12 * var(--u));
    background: rgba(255, 255, 255, 0.14);
    font-size: calc(15 * var(--u));
    font-weight: 800;
}

.w.baby .sides button svg {
    width: calc(18 * var(--u));
    height: calc(18 * var(--u));
}

/* Luna: warm brown with a yolk-yellow check */

.w.luna {
    background: #2b1f14;
    color: #ffe9cf;
}

.w.luna .w-label {
    color: #ffbe1a;
}

.w.luna .w-tap {
    background: #ffbe1a;
    color: #2b1f14;
}

/* Bins: lime card, ink type */

.w.bins {
    background: #d8f36b;
    color: var(--ink);
}

.w.bins .w-big {
    font-size: calc(36 * var(--u));
}

.w.bins .w-pass {
    position: absolute;
    left: calc(15 * var(--u));
    bottom: calc(14 * var(--u));
    padding: calc(7 * var(--u)) calc(10 * var(--u));
    border-radius: calc(10 * var(--u));
    background: var(--ink);
    color: #d8f36b;
    font-size: calc(12 * var(--u));
    font-weight: 750;
}

/* Groceries: white paper list */

.w.groceries {
    background: #ffffff;
    color: var(--ink);
}

.w.groceries .w-label span {
    margin-left: auto;
    font-weight: 600;
    opacity: 0.55;
}

.w.groceries ul {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: calc(7 * var(--u)) calc(12 * var(--u));
    margin-top: calc(12 * var(--u));
    list-style: none;
}

.w.groceries li button {
    display: flex;
    align-items: center;
    gap: calc(7 * var(--u));
    width: 100%;
    background: none;
    font-size: calc(13.5 * var(--u));
    font-weight: 600;
    text-align: left;
    white-space: nowrap;
}

.w.groceries li i {
    flex: none;
    width: calc(16 * var(--u));
    height: calc(16 * var(--u));
    border: calc(2 * var(--u)) solid var(--ink);
    border-radius: 50%;
}

.w.groceries li .crossed {
    text-decoration: line-through;
    opacity: 0.4;
}

.w.groceries li .crossed i {
    background: var(--ink);
}

/* Countdown: sunset with a paper sun */

.w.countdown {
    display: flex;
    background: linear-gradient(160deg, #ff9a6b, #ff5e7e);
    color: #fff6ef;
}

.w.countdown .sun {
    position: absolute;
    right: calc(-30 * var(--u));
    bottom: calc(-60 * var(--u));
    width: calc(190 * var(--u));
    height: calc(190 * var(--u));
    border-radius: 50%;
    background: #ffd36b;
    box-shadow:
        0 0 0 calc(18 * var(--u)) rgba(255, 211, 107, 0.35),
        0 0 0 calc(36 * var(--u)) rgba(255, 211, 107, 0.18);
}

.w.countdown .col {
    position: relative;
}

.w.countdown .w-huge {
    margin-top: calc(6 * var(--u));
}

.w.countdown .date {
    position: absolute;
    right: calc(16 * var(--u));
    top: calc(15 * var(--u));
    font-size: calc(12 * var(--u));
    font-weight: 800;
    letter-spacing: calc(1 * var(--u));
    color: #8c2f39;
}

.w.countdown .floaters {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.w.countdown .floaters span {
    position: absolute;
    left: calc((150 + var(--i) * 34) * var(--u));
    top: calc((56 + (var(--i) * 37) % 50) * var(--u));
    width: calc(20 * var(--u));
    height: calc(20 * var(--u));
    color: #ffffff;
    opacity: 0.9;
    animation: bob 3s ease-in-out infinite;
    animation-delay: calc(var(--i) * -0.6s);
}

.w.countdown .floaters.go span {
    animation: rise 0.9s ease-out both;
    animation-delay: calc(var(--i) * 0.06s);
}

@keyframes bob {
    50% {
        transform: translateY(calc(-6 * var(--u))) rotate(-8deg);
    }
}

@keyframes rise {
    to {
        transform: translateY(calc(-90 * var(--u))) scale(1.4);
        opacity: 0;
    }
}

/* Hearts: plum */

.w.hearts {
    background: #3a1830;
    color: #ffe3ec;
}

.w.hearts .w-label {
    color: #ff8fb0;
}

.w.hearts .w-small {
    max-width: 58%;
}

.w.hearts .w-tap {
    background: #ff6f8c;
    color: #3a1830;
}

.w .fly {
    position: absolute;
    right: calc(22 * var(--u));
    bottom: calc(50 * var(--u));
    width: calc(26 * var(--u));
    height: calc(26 * var(--u));
    color: #ff6f8c;
    pointer-events: none;
    animation: fly 0.9s ease-out forwards;
}

@keyframes fly {
    to {
        transform: translate(calc(-30 * var(--u)), calc(-80 * var(--u))) scale(1.5) rotate(-12deg);
        opacity: 0;
    }
}

/* Mood: butter, two faces */

.w.mood {
    background: #ffe594;
    color: var(--ink);
}

.w.mood .faces {
    display: flex;
    justify-content: space-between;
    margin-top: calc(12 * var(--u));
}

.w.mood .faces > * {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(5 * var(--u));
    background: none;
    font-size: calc(12 * var(--u));
    font-weight: 700;
}

.w.mood svg {
    width: calc(52 * var(--u));
    height: calc(52 * var(--u));
}

/* Daily question: deep indigo */

.w.question {
    background: #2a2350;
    color: #ece8ff;
}

.w.question .w-label {
    color: #d2c6ff;
}

.w.question p {
    margin-top: calc(9 * var(--u));
    font-size: calc(17 * var(--u));
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: calc(-0.3 * var(--u));
}

.w.question .answered {
    position: absolute;
    left: calc(15 * var(--u));
    right: calc(15 * var(--u));
    bottom: calc(13 * var(--u));
    display: flex;
    align-items: center;
    gap: calc(7 * var(--u));
}

.w.question .who {
    padding: calc(6 * var(--u)) calc(10 * var(--u));
    border-radius: calc(10 * var(--u));
    background: rgba(255, 255, 255, 0.12);
    font-size: calc(12 * var(--u));
    font-weight: 750;
}

.w.question .who.on {
    background: #d2c6ff;
    color: #2a2350;
}

.w.question .note {
    margin-left: auto;
    font-size: calc(11.5 * var(--u));
    font-weight: 600;
    opacity: 0.7;
}


/* The second phone in the "shared" chapter: the partner's phone, slid in behind. */

.stage .partner {
    position: absolute;
    z-index: 0;
    top: 132px;
    left: -46%;
    width: 78%;
    opacity: 0;
    transform: translateX(40px) rotate(-7deg);
    transition:
        opacity 0.6s,
        transform 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.1);
    pointer-events: none;
}

.stage[data-step="shared"] .partner {
    opacity: 1;
    transform: rotate(-7deg);
}

.stage .partner .who {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-soft);
}

.stage .phone-frame.mine {
    position: relative;
    z-index: 1;
}

/* A tap ripple, for the "works" chapter. */

.ripple {
    position: absolute;
    z-index: 5;
    width: 44px;
    height: 44px;
    margin: -22px 0 0 -22px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.75);
    pointer-events: none;
    animation: ripple 0.7s ease-out forwards;
}

@keyframes ripple {
    from {
        transform: scale(0.4);
    }
    to {
        transform: scale(1.8);
        opacity: 0;
    }
}

/* ---------- Phones and tablets ---------- */

@media (max-width: 900px) {
    .top nav a:not(.join) {
        display: none;
    }

    .story {
        grid-template-columns: minmax(0, 1fr);
    }

    .story-stage {
        grid-row: 1;
        position: sticky;
        z-index: 3;
        top: 0;
        height: 0;
    }

    .story-stage .stage {
        position: absolute;
        top: 0;
        left: 50%;
        /* The phone is about 2.2 times as tall as it is wide: keep it in the top half of the screen. */
        width: min(62vw, 22vh, 260px);
        margin: 0;
        transform: translate(-50%, calc(100vh - 34vh));
        opacity: 0;
        transition:
            opacity 0.4s,
            transform 0.5s cubic-bezier(0.2, 0.8, 0.3, 1);
    }

    body.in-story .story-stage .stage {
        opacity: 1;
        transform: translate(-50%, 70px);
    }

    .story-stage .bubble {
        display: none;
    }

    .story-stage .peeker {
        top: -10px;
        right: -26px;
        width: 44px;
        height: 84px;
    }

    .stage {
        padding-top: 30px;
    }

    .hero {
        min-height: auto;
        padding: 110px 0 40px;
    }

    .chapter {
        min-height: 100vh;
        justify-content: flex-end;
        padding: 0 0 7vh;
    }

    .chapter h2 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .chapter p {
        margin-top: 14px;
        font-size: 16px;
    }

    .chapter-mark {
        margin-bottom: 16px;
    }

    .chapter h2,
    .chapter p {
        position: relative;
        z-index: 4;
    }

    .chapter > * {
        padding-left: 4px;
    }

    .chapter:first-of-type {
        min-height: 100vh;
    }

    .worlds {
        grid-template-columns: 1fr;
        padding-top: 100px;
    }

    .world {
        min-height: 320px;
        padding: 30px;
    }

    .night {
        padding: 120px var(--page-x) 110px;
    }

    .pick {
        flex-direction: column;
    }

    .stage .partner {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
