@font-face {
    font-family: "Bricolage Grotesque";
    src: url("fonts/bricolage-grotesque.woff2") format("woff2");
    font-weight: 400 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/atkinson-hyperlegible-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/atkinson-hyperlegible-400-italic.woff2") format("woff2");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "Atkinson Hyperlegible";
    src: url("fonts/atkinson-hyperlegible-700.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --sky: #eaf2ff;
    --paper: #ffffff;
    --ink: #14213d;
    --ink-soft: #4a5673;
    --blue: #2f66db;
    --blue-text: #1f4fb8;
    --bubble: #dde1e7;
    --red: #c22236;
    --display: "Bricolage Grotesque", system-ui, sans-serif;
    --body: "Atkinson Hyperlegible", system-ui, sans-serif;
    --measure: 38rem;
    --gutter: clamp(1rem, 4vw, 3rem);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--sky);
    color: var(--ink);
    font-family: var(--body);
    font-size: 1.125rem;
    line-height: 1.55;
}

h1,
h2,
h3 {
    font-family: var(--display);
    line-height: 1.1;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: var(--blue-text);
    text-underline-offset: 0.15em;
}

a:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
    border-radius: 2px;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

/* Masthead */

.masthead {
    padding: 1.25rem var(--gutter);
}

.wordmark {
    font-family: var(--display);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
}

/* Hero: the unanswered conversation */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 22rem) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
    max-width: 72rem;
    margin: 0 auto;
    padding: clamp(1.5rem, 5vw, 4rem) var(--gutter) clamp(4rem, 9vw, 7rem);
}

.phone {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1rem 0.9rem;
    background: var(--paper);
    border: 2px solid var(--ink);
    border-radius: 2.25rem;
    box-shadow: 0.75rem 0.75rem 0 var(--blue);
}

.phone-contact {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.25rem 0.5rem 0.75rem;
    border-bottom: 1px solid var(--bubble);
    font-weight: 700;
}

.avatar {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--bubble);
    font-family: var(--display);
    font-weight: 800;
    font-size: 0.95rem;
}

.thread {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
}

.thread li {
    max-width: 85%;
    padding: 0.5rem 0.85rem;
    background: var(--bubble);
    border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
    font-size: 1rem;
    line-height: 1.35;
}

.read-receipt {
    align-self: flex-end;
    font-size: 0.8rem;
    color: var(--ink-soft);
}

.typing {
    display: flex;
    gap: 0.3rem;
    width: max-content;
    padding: 0.7rem 0.9rem;
    background: var(--bubble);
    border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
}

.typing span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: var(--ink-soft);
}

.composer {
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    border: 1px solid var(--bubble);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 0.95rem;
}

.hero-text h1 {
    font-size: clamp(3.25rem, 9vw, 7rem);
    font-weight: 800;
    font-variation-settings: "opsz" 96;
    letter-spacing: -0.04em;
    line-height: 0.92;
    margin-bottom: 1.5rem;
}

.lead {
    max-width: 32rem;
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.button {
    display: inline-block;
    padding: 0.8rem 1.4rem;
    border: 2px solid var(--blue);
    border-radius: 999px;
    background: var(--blue);
    color: var(--paper);
    font-weight: 700;
    text-decoration: none;
}

.button:hover {
    background: var(--blue-text);
    border-color: var(--blue-text);
}

.button-quiet {
    background: transparent;
    color: var(--blue-text);
}

.button-quiet:hover {
    background: var(--paper);
    color: var(--blue-text);
}

/* The conversation plays once: bubbles arrive, get read, and Meta keeps typing */

@media (prefers-reduced-motion: no-preference) {
    .thread li,
    .read-receipt,
    .typing {
        opacity: 0;
        animation: arrive 0.3s ease-out forwards;
    }

    .thread li:nth-child(1) { animation-delay: 0.3s; }
    .thread li:nth-child(2) { animation-delay: 0.9s; }
    .thread li:nth-child(3) { animation-delay: 1.6s; }
    .thread li:nth-child(4) { animation-delay: 2.4s; }
    .thread li:nth-child(5) { animation-delay: 3.3s; }
    .thread li:nth-child(6) { animation-delay: 4.4s; }
    .thread li:nth-child(7) { animation-delay: 5.4s; }
    .read-receipt { animation-delay: 6.2s; }
    .typing { animation-delay: 7.2s; }

    .typing span {
        animation: bob 1.2s ease-in-out infinite;
    }

    .typing span:nth-child(2) { animation-delay: 0.15s; }
    .typing span:nth-child(3) { animation-delay: 0.3s; }
}

@keyframes arrive {
    from {
        opacity: 0;
        transform: translateY(0.4rem);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes bob {
    0%, 60%, 100% { transform: none; }
    30% { transform: translateY(-0.25rem); }
}

/* Shared section rhythm */

.why,
.receipts,
.move {
    padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}

.why > *,
.receipts > *,
.move > * {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

section h2 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 2.5rem;
}

.source {
    font-size: 0.9rem;
    color: var(--ink-soft);
}

/* Why Signal */

.reply-options {
    display: grid;
    gap: 0.6rem;
}

.reply-options .reply {
    justify-self: start;
    margin: 0.4rem 0 0.6rem;
}

@media (min-width: 48rem) {
    .reply-options {
        grid-template-columns: repeat(4, 1fr);
        column-gap: 0.8rem;
    }

    .reply-options button {
        grid-row: 1;
    }

    .reply-options .reply {
        grid-column: 1 / -1;
        margin: 1rem 0 0;
    }
}

.reply-options button {
    display: flex;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    border: 2px solid var(--bubble);
    border-radius: 1.1rem 1.1rem 1.1rem 0.3rem;
    background: var(--paper);
    color: var(--ink);
    font: 700 clamp(1rem, 1.8vw, 1.15rem) / 1.3 var(--display);
    text-align: left;
    cursor: pointer;
}

.reply-options button::before {
    content: "+";
    color: var(--blue);
}

.reply-options button[aria-expanded="true"] {
    background: var(--bubble);
}

.reply-options button[aria-expanded="true"]::before {
    content: "\2212";
}

.reply-options button:hover {
    border-color: var(--blue);
}

.reply-options button:focus-visible {
    outline: 3px solid var(--blue);
    outline-offset: 3px;
}

.reply {
    position: relative;
    max-width: 42rem;
    translate: var(--shift, 0);
    padding: 1.1rem 1.4rem 1.2rem;
    background: var(--bubble);
    border-radius: 1.4rem;
}

/* Without the script, the texts stack under the heading. */
.why > .reply {
    margin-left: max(0px, calc((100% - 72rem) / 2));
}

.why > .reply + .reply {
    margin-top: 1rem;
}

.reply[hidden] {
    display: none;
}

.reply::before {
    content: "";
    position: absolute;
    top: -0.55rem;
    left: var(--tail, 2rem);
    width: 1.1rem;
    height: 1.1rem;
    background: var(--bubble);
    transform: translateX(-50%) rotate(45deg);
}

.reply h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
}

.reply .source {
    margin-top: 0.6rem;
}

/* The receipts */

.same-company {
    display: grid;
    grid-template-columns: 1fr min(72rem, 100%) 1fr;
    padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
    background: var(--red);
    color: var(--paper);
}

.same-company > * {
    grid-column: 2;
}

.same-company h2 {
    font-size: clamp(3rem, 11vw, 8rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 2rem;
}

.same-company .bubble {
    justify-self: start;
    max-width: 30rem;
    padding: 0.8rem 1.2rem;
    background: var(--bubble);
    color: var(--ink);
    border-radius: 1.4rem 1.4rem 1.4rem 0.35rem;
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    line-height: 1.4;
}

.bubble-receipt {
    margin-top: 0.5rem;
    font-size: 0.85rem;
}

.receipts {
    background: var(--paper);
}

.warning {
    font-weight: 700;
    color: var(--red);
    margin-bottom: 0.5rem;
}

.receipts-intro {
    margin-bottom: 3rem;
    color: var(--ink-soft);
}

.receipt-list li {
    display: grid;
    grid-template-columns: 7rem minmax(0, var(--measure));
    column-gap: 2rem;
    row-gap: 0.6rem;
    padding: 2rem 0;
    border-top: 1px solid var(--bubble);
}

.receipt-list li > * {
    grid-column: 2;
}

.receipt-list .status {
    grid-column: 1;
    grid-row: 1 / span 3;
    font-family: var(--display);
    font-weight: 700;
    color: var(--red);
    padding-top: 0.2rem;
}

.receipt-list h3 {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* How to move: a real sequence, so it is numbered */

.steps {
    counter-reset: step;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 2.5rem 3rem;
}

.steps li {
    counter-increment: step;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.steps li::before {
    content: counter(step);
    font-family: var(--display);
    font-weight: 800;
    font-size: 3.5rem;
    line-height: 1;
    color: var(--blue);
}

.steps h3 {
    font-size: 1.4rem;
    font-weight: 700;
}

/* Footer */

.footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem 3rem;
    padding: 3rem max(var(--gutter), calc((100% - 72rem) / 2));
    background: var(--paper);
    color: var(--ink-soft);
}

.maker {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--ink);
    font-family: var(--display);
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
}

.maker:hover span {
    text-decoration: underline;
}

.footer p {
    max-width: var(--measure);
    font-size: 0.95rem;
}

/* Phone widths */

@media (max-width: 52rem) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .hero-text {
        order: -1;
    }

    .phone {
        max-width: 22rem;
        box-shadow: 0.5rem 0.5rem 0 var(--blue);
    }

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

    .receipt-list li > *,
    .receipt-list .status {
        grid-column: 1;
        grid-row: auto;
    }
}
