/* Heya! public site. Brand green, real photographs in full colour, and the Buddex shown
   the way the app draws it. The Heya itself lands as the wordmark, in the brand green. */

:root {
    --green: #5DB075;
    --green-deep: #25603A;
    --green-pale: #CFEBD7;
    --ink: #121713;
    --night: #1B1F1C;
    --night-raised: #272C28;
    --paper: #FAFBF7;
    --beat: 1.6s;
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --gutter: clamp(1.25rem, 4.5vw, 4.5rem);
    --display: "Bricolage Grotesque", "Hanken Grotesk", system-ui, sans-serif;
    --text: "Hanken Grotesk", system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-color: var(--green-deep) var(--paper);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: clamp(1.0625rem, .3vw + 1rem, 1.1875rem);
    line-height: 1.55;
    overflow-x: clip;
    -webkit-font-smoothing: antialiased;
}

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

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration-thickness: .08em;
    text-underline-offset: .22em;
}

p,
h1,
h2,
h3,
figure,
dl,
dd,
ol,
ul {
    margin: 0;
}

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

:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

h1,
h2,
.display {
    font-family: var(--display);
    font-weight: 800;
    font-stretch: 86%;
    letter-spacing: -.03em;
    line-height: .98;
    text-wrap: balance;
}

h1 {
    font-size: clamp(3.25rem, 7.5vw, 7.75rem);
    line-height: .93;
}

h2 {
    font-size: clamp(2.375rem, 5vw, 4.75rem);
}

.lede {
    max-width: 30ch;
    font-size: clamp(1.1875rem, .8vw + 1rem, 1.5rem);
    line-height: 1.35;
    text-wrap: pretty;
}

.copy {
    max-width: 44ch;
    text-wrap: pretty;
}

.note {
    font-size: .8125rem;
    font-weight: 600;
    letter-spacing: .04em;
}

.sheet {
    padding: clamp(4rem, 9vw, 8.5rem) var(--gutter);
    overflow-x: clip;
}

/* Tilted photographs, cards and stamps may bleed to the screen edge, never past it. */
@supports not (overflow-x: clip) {
    .sheet {
        overflow: hidden;
    }
}

/* ---------- Top edge ---------- */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.top__mark img {
    width: clamp(6rem, 8vw, 7.75rem);
}

.top__links {
    display: flex;
    align-items: center;
    gap: clamp(.75rem, 2vw, 1.75rem);
    font-weight: 600;
}

.top__links a {
    white-space: nowrap;
}

.pick {
    appearance: none;
    padding: .15rem .1rem;
    border: 0;
    border-bottom: .08em solid currentColor;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: 600 1em/1.3 var(--text);
    cursor: pointer;
}

.pick option {
    background: var(--paper);
    color: var(--ink);
}

/* ---------- Opening: the promise beside the people ---------- */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    min-height: calc(100svh - clamp(4.5rem, 9vw, 7.5rem));
    background: var(--green);
}

/* ---------- Where travel friends are made: one place lights up at a time ---------- */

.band {
    padding: clamp(1.75rem, 4vw, 3.25rem) var(--gutter);
    background: var(--ink);
    color: var(--paper);
    font: 800 clamp(1.625rem, 4.1vw, 3.75rem)/1.12 var(--display);
    font-stretch: 86%;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.band__place {
    color: rgba(93, 176, 117, .56);
    transition: color .5s var(--ease-out);
}

.band__place::after {
    content: " · ";
    color: rgba(250, 251, 247, .3);
}

.band__place:last-child::after {
    content: ".";
}

.band__place.is-lit,
.band__place:hover {
    color: var(--green);
}

.hero__words {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 2rem;
    padding: clamp(1.25rem, 2.6vh, 2rem) var(--gutter) clamp(2rem, 6vh, 4rem);
}

.hero__say {
    align-self: end;
    display: grid;
    gap: clamp(1.1rem, 2.4vh, 1.75rem);
}

.hero__photo {
    position: relative;
    min-height: 22rem;
}

.hero__photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--at, 50% 45%);
}

/* The wall of friends: two columns of photographs drifting past each other. */
.wall {
    position: relative;
    min-height: 22rem;
    overflow: hidden;
    background: var(--ink);
}

/* Columns are taken out of flow so the wall takes its height from the words beside it. */
.wall__col {
    position: absolute;
    top: 0;
    left: .5rem;
    width: calc(50% - .75rem);
    display: flex;
    flex-direction: column;
    animation: drift 70s linear infinite;
}

.wall__col + .wall__col {
    left: calc(50% + .25rem);
    animation-direction: reverse;
    animation-duration: 84s;
}

.wall img {
    width: 100%;
    aspect-ratio: 4 / 5;
    margin-bottom: .5rem;
    object-fit: cover;
    object-position: var(--at, 50% 40%);
}

.wall:hover .wall__col {
    animation-play-state: paused;
}

@keyframes drift {
    to { transform: translateY(-50%); }
}

.stores {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
}

.stores img {
    height: 3.125rem;
    width: auto;
}

.stores a {
    transition: transform .25s var(--ease-out);
}

.stores a:hover {
    transform: translateY(-2px);
}

/* ---------- Who, not where ---------- */

.who {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    background: var(--night);
    color: var(--paper);
}

.who h2 {
    font-size: clamp(3.25rem, 11.5vw, 12rem);
    line-height: .9;
    color: var(--green);
}

.who .lede {
    max-width: 36ch;
}

/* ---------- The last night ---------- */

.wide-photo img {
    width: 100%;
    max-height: 86vh;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position: 50% 62%;
}

.told {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    padding-top: 0;
}

.told__words {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

/* The silence: the goodbye photograph, and one small line at its foot. */
.silence {
    position: relative;
    display: grid;
    align-content: end;
    gap: .35rem;
    min-height: clamp(26rem, 88vh, 52rem);
    background: var(--ink);
    color: var(--paper);
    isolation: isolate;
}

.silence img {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 47%;
}

.silence::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    z-index: -1;
    background: linear-gradient(to bottom, transparent, rgba(18, 23, 19, .78));
}

.silence h2 {
    font-size: clamp(2.375rem, 5vw, 4.75rem);
}

.silence p {
    font-size: clamp(1.1875rem, .8vw + 1rem, 1.5rem);
}

/* ---------- The Buddex, drawn as the app draws it ---------- */

.buddex {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    gap: clamp(2rem, 5vw, 5.5rem);
    align-items: start;
    background: var(--night);
    color: var(--paper);
}

.buddex ::selection,
.close ::selection {
    background: var(--green);
}

.buddex__words {
    display: grid;
    gap: 1.5rem;
}

.buddex .copy,
.buddex .note {
    color: var(--green-pale);
}

.entry {
    position: relative;
    display: grid;
    gap: 1.4rem;
    padding: clamp(1.25rem, 2.4vw, 2rem);
    border: 1px solid rgba(250, 251, 247, .16);
    border-radius: 1.25rem;
    background: var(--night-raised);
    color: var(--paper);
    overflow: hidden;
}

.entry__head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
}

.entry__face {
    width: clamp(4.75rem, 7vw, 6.25rem);
    height: clamp(4.75rem, 7vw, 6.25rem);
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 36%;
    box-shadow: 0 0 0 3px var(--night-raised), 0 0 0 5px var(--green);
}

.entry h3 {
    font: 800 clamp(1.625rem, 2.4vw, 2.125rem)/1.05 var(--display);
    font-stretch: 90%;
    letter-spacing: -.02em;
}

.entry__since {
    font-size: .9375rem;
    color: var(--green-pale);
}

.near {
    display: inline-flex;
    align-items: center;
    gap: .45em;
    padding: .3rem .7rem;
    border-radius: 999px;
    background: rgba(93, 176, 117, .2);
    color: var(--green);
    font-size: .875rem;
    font-weight: 700;
}

.near::before {
    content: "";
    width: .55em;
    height: .55em;
    border-radius: 50%;
    background: currentColor;
}

.entry__sum {
    display: grid;
    gap: .25rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(250, 251, 247, .16);
}

.entry__sum strong {
    font-size: 1.0625rem;
}

.entry__sum span {
    color: var(--green-pale);
}

.entry__act {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem 1.25rem;
}

.press {
    appearance: none;
    min-height: 3.25rem;
    padding: .8rem 1.75rem;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font: 800 1.0625rem/1.1 var(--text);
    cursor: pointer;
    transition: background-color .18s linear, transform .2s var(--ease-out);
}

.press:hover {
    background: var(--paper);
}

.press:active {
    transform: scale(.97);
}

.press[disabled] {
    background: transparent;
    color: var(--paper);
    box-shadow: inset 0 0 0 2px var(--paper);
    cursor: default;
    transform: none;
}

.again {
    appearance: none;
    padding: 0;
    border: 0;
    background: none;
    color: var(--green-pale);
    font: inherit;
    font-size: .9375rem;
    text-decoration: underline;
    text-underline-offset: .22em;
    cursor: pointer;
}

.again[hidden] {
    display: none;
}

/* The Heya lands as the wordmark. */
.stamp {
    position: absolute;
    right: 3%;
    top: 1.1rem;
    width: min(44%, 14rem);
    aspect-ratio: 580 / 232;
    background: var(--green);
    -webkit-mask: url("assets/heya_logo_black.svg") center / contain no-repeat;
    mask: url("assets/heya_logo_black.svg") center / contain no-repeat;
    opacity: 0;
    transform: rotate(-9deg) scale(1.7);
    pointer-events: none;
}

.is-sent .stamp,
.snap.is-seen .stamp {
    opacity: 1;
    transform: rotate(-9deg) scale(1);
    transition: transform .45s var(--ease-out), opacity .1s linear;
}

/* ---------- Closing ---------- */

.close {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.25rem);
    justify-items: start;
}

.close h2,
.close .display {
    font-size: clamp(3rem, 8.4vw, 8.5rem);
    color: var(--green-deep);
}

/* The home page ends on the brand green, like the film. */
.close:not(.venue .close) {
    background: var(--green);
}

.close:not(.venue .close) .display {
    color: var(--ink);
}

.foot {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .9rem 2rem;
    padding: 1.4rem var(--gutter) 1.6rem;
    background: var(--ink);
    color: var(--green-pale);
    font-size: .9375rem;
}

.foot ul {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem 1.4rem;
}

.langs {
    display: flex;
    gap: .15rem;
}

.langs button {
    appearance: none;
    min-width: 2.75rem;
    min-height: 2.75rem;
    padding: 0 .4rem;
    border: 0;
    border-radius: 999px;
    background: none;
    color: inherit;
    font: 700 .875rem/1 var(--text);
    letter-spacing: .04em;
    cursor: pointer;
}

.langs button[aria-pressed="true"] {
    background: var(--green);
    color: var(--ink);
}

.langs button:hover {
    text-decoration: underline;
    text-underline-offset: .25em;
}

/* ---------- The story in five chapters ---------- */

@property --out {
    syntax: "<number>";
    inherits: true;
    initial-value: 1;
}

.chapter {
    scroll-margin-top: 2.75rem;
}

/* The chapter names follow the reader down the page; the current one is lit. */
.rail {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 3vw, 2.5rem);
    padding: .55rem var(--gutter);
    overflow: hidden;
    background: var(--ink);
    color: rgba(250, 251, 247, .62);
    font-size: .875rem;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}

.rail a {
    display: inline-flex;
    align-items: center;
    gap: .5em;
    text-decoration: none;
    transition: color .3s var(--ease-out);
}

.rail a::before {
    content: "";
    width: .45em;
    height: .45em;
    border-radius: 50%;
    background: currentColor;
    opacity: .5;
}

.rail a:hover {
    color: var(--paper);
}

.rail a[aria-current="true"] {
    color: var(--green);
}

.rail a[aria-current="true"]::before {
    opacity: 1;
}

/* The way to the stores stays in reach while the chapters scroll under it. */
.rail .rail__get {
    position: sticky;
    right: 0;
    margin-left: auto;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: var(--green);
    color: var(--ink);
    font-weight: 800;
    box-shadow: 0 0 0 .5rem var(--ink), -.9rem 0 .5rem .3rem var(--ink);
    transition: background-color .18s linear;
}

.rail a:nth-last-child(2) {
    margin-right: .9rem;
}

.rail .rail__get::before {
    content: none;
}

.rail .rail__get:hover {
    background: var(--paper);
    color: var(--ink);
}

.film-btn {
    appearance: none;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    min-height: 3rem;
    padding: .6rem 1.4rem .6rem 1.1rem;
    border: 0;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font: 700 1rem/1.1 var(--text);
    cursor: pointer;
    transition: background-color .18s linear, transform .2s var(--ease-out);
}

.film-btn svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: var(--green);
}

.film-btn:hover {
    background: var(--green-deep);
}

.film-btn:hover svg {
    fill: var(--paper);
}

.film-btn:active {
    transform: scale(.97);
}

.film {
    max-width: min(94vw, 68rem);
    max-height: 92svh;
    padding: 0;
    border: 0;
    border-radius: 1rem;
    background: var(--ink);
    overflow: visible;
}

.film::backdrop {
    background: rgba(18, 23, 19, .86);
}

.film video {
    display: block;
    max-width: 100%;
    max-height: 92svh;
    border-radius: 1rem;
}

.film__close {
    appearance: none;
    position: absolute;
    top: .75rem;
    right: .75rem;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 0;
    border-radius: 50%;
    background: var(--paper);
    color: var(--ink);
    cursor: pointer;
    box-shadow: 0 6px 18px -6px rgba(18, 23, 19, .6);
}

.film__close svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}

/* Meet: two routes that end in the same place. */
.meet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.meet__words {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.paths {
    position: relative;
    aspect-ratio: 4 / 3;
    font-size: .875rem;
    font-weight: 700;
}

.paths svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    fill: none;
    stroke-linecap: round;
}

.paths__ghost {
    stroke: rgba(18, 23, 19, .28);
    stroke-width: .45;
    stroke-dasharray: .1 1.7;
}

.paths__line {
    stroke: var(--ink);
    stroke-width: .6;
    stroke-dasharray: 1;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2s var(--ease-out);
}

.paths__line--buddy {
    stroke: var(--green);
}

.js .paths:not(.is-seen) .paths__line {
    stroke-dashoffset: 1;
}

.paths__from {
    position: absolute;
    left: 0;
    top: 0;
}

.paths__from--buddy {
    left: auto;
    right: 0;
    top: auto;
    bottom: -4%;
    color: var(--green-deep);
}

.paths__here {
    position: absolute;
    left: 50%;
    top: 61.3%;
    display: grid;
    justify-items: center;
    gap: .6rem;
    width: max-content;
    max-width: 60%;
    text-align: center;
    transform: translate(-50%, -.55rem);
    transition: opacity .5s linear 1.5s;
}

.paths__here span {
    padding: .1rem .5rem;
    border-radius: .4rem;
    background: var(--paper);
}

.paths__here::before {
    content: "";
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 .3rem var(--paper), 0 0 0 .42rem var(--ink);
    transition: transform .6s var(--ease-out) 1.5s;
}

.js .paths:not(.is-seen) .paths__here {
    opacity: 0;
}

.js .paths:not(.is-seen) .paths__here::before {
    transform: scale(.2);
}

/* Live it: the photographs land on the table one after the other. */
.live {
    background: var(--green);
}

.live__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

.live__words {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

.live h2 {
    font-size: clamp(3rem, 7.4vw, 7.5rem);
    line-height: .92;
}

.live .lede {
    max-width: 34ch;
}

.pile {
    position: relative;
    justify-self: center;
    width: min(100%, 30rem);
    aspect-ratio: 1;
}

.pile img {
    position: absolute;
    left: 24%;
    top: 12%;
    width: 52%;
    aspect-ratio: 4 / 5;
    border: solid #fff;
    border-width: .55rem .55rem 2.1rem;
    object-fit: cover;
    object-position: var(--at, 50% 40%);
    box-shadow: 0 2px 4px rgba(18, 23, 19, .16), 0 22px 36px -16px rgba(18, 23, 19, .55);
    transform: translate(var(--tx), var(--ty)) rotate(var(--r));
    transition: transform .9s var(--ease-out) var(--wait, 0s);
}

.pile img:nth-child(1) { --tx: -44%; --ty: -18%; --r: -9deg; }
.pile img:nth-child(2) { --tx: 44%; --ty: -14%; --r: 7deg; --wait: .12s; }
.pile img:nth-child(3) { --tx: -40%; --ty: 34%; --r: 5deg; --wait: .24s; }
.pile img:nth-child(4) { --tx: 42%; --ty: 36%; --r: -6deg; --wait: .36s; }
.pile img:nth-child(5) { --tx: 0%; --ty: 8%; --r: -2deg; --wait: .48s; }

.js .pile:not(.is-seen) img {
    transform: translate(0, 8%) rotate(calc(var(--r) * .25));
}

.live .band {
    font-size: clamp(1.375rem, 3vw, 2.75rem);
}

/* Leave: everyone scatters, and the lines to them hold. */
.thread {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    background: var(--ink);
    color: var(--paper);
}

.thread__words {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.thread h2 {
    color: var(--green);
}

.thread .lede {
    color: var(--green-pale);
}

.stars {
    position: relative;
    justify-self: center;
    width: min(100%, 40rem);
    aspect-ratio: 5 / 4;
    transition: --out 1.8s var(--ease-out);
}

.js .stars:not(.is-seen) {
    --out: .28;
}

.stars svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    transform: scale(var(--out));
}

.stars line {
    stroke: var(--green);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
    transition: stroke .5s linear 1.5s, stroke-dasharray 0s 1.5s;
}

.js .stars:not(.is-seen) line {
    stroke: rgba(250, 251, 247, .3);
    stroke-dasharray: 2 6;
}

.star {
    position: absolute;
    left: calc(50% + (var(--x) * 1% - 50%) * var(--out));
    top: calc(50% + (var(--y) * 1% - 50%) * var(--out));
    display: grid;
    justify-items: center;
    width: max-content;
    font-size: .8125rem;
    line-height: 1.25;
    text-align: center;
    color: var(--green-pale);
    font-variant-numeric: tabular-nums;
    transform: translate(-50%, -.4rem);
}

.star::before {
    content: "";
    width: .8rem;
    height: .8rem;
    margin-bottom: .35rem;
    border-radius: 50%;
    background: var(--paper);
    box-shadow: 0 0 0 .25rem var(--ink);
}

.star b {
    font-size: 1rem;
    color: var(--paper);
}

.star--buddy::before {
    background: var(--green);
}

.star--you {
    left: 50%;
    top: 50%;
    font-size: .9375rem;
    font-weight: 800;
    color: var(--paper);
    transform: translate(-50%, -.7rem);
}

.star--you::before {
    width: 1.4rem;
    height: 1.4rem;
    background: var(--green);
    box-shadow: 0 0 0 .3rem var(--ink), 0 0 0 .42rem var(--green);
}

/* Keep: Patrick's card on top of the others. */
.fan {
    position: relative;
    height: 21rem;
}

.buddex {
    align-items: center;
}

.card {
    position: absolute;
    left: 50%;
    top: .75rem;
    display: grid;
    align-content: start;
    gap: .45rem;
    width: 13rem;
    margin-left: -6.5rem;
    aspect-ratio: 13 / 19;
    padding: .6rem;
    border-radius: 1rem;
    background: var(--paper);
    color: var(--ink);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2), 0 26px 40px -18px rgba(0, 0, 0, .7);
    transform: rotate(-2deg);
    transition: transform .9s var(--ease-out);
}

.card img {
    width: 100%;
    aspect-ratio: 1;
    border-radius: .55rem;
    object-fit: cover;
    object-position: 50% 30%;
}

.card strong {
    padding-inline: .2rem;
    font: 800 1.375rem/1.1 var(--display);
    letter-spacing: -.02em;
}

.card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: .2rem .6rem;
    align-items: baseline;
    padding-inline: .2rem;
    font-size: .8125rem;
    font-weight: 600;
}

.card dt {
    font-size: .6875rem;
    font-weight: 700;
    color: rgba(18, 23, 19, .62);
}

.card__now {
    color: var(--green-deep);
}

.card--back {
    background: var(--green);
    transform: translateX(-6.25rem) rotate(-11deg);
}

.card--back + .card--back {
    transform: translateX(6.25rem) rotate(9deg);
}

.card--back::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--ink);
    -webkit-mask: url("assets/h_mark.svg") center / 38% no-repeat;
    mask: url("assets/h_mark.svg") center / 38% no-repeat;
}

.js .fan:not(.is-seen) .card {
    transform: rotate(0deg);
}

/* Heya!: the distance falls, then the phone buzzes. */
.near-you {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    background: var(--green);
}

.dist {
    display: grid;
    gap: .5rem;
}

.dist__label {
    font-weight: 700;
}

.dist__km {
    position: relative;
    justify-self: start;
    isolation: isolate;
    font: 800 clamp(6.5rem, 21vw, 16rem)/.86 var(--display);
    font-stretch: 86%;
    letter-spacing: -.04em;
    font-variant-numeric: tabular-nums;
}

.dist__km small {
    margin-left: .08em;
    font-size: .3em;
    letter-spacing: -.02em;
}

.dist__km::before,
.dist__km::after {
    content: "";
    position: absolute;
    left: .32em;
    top: 50%;
    z-index: -1;
    width: 1.5em;
    height: 1.5em;
    border: 2px solid rgba(18, 23, 19, .3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: transform 2.4s var(--ease-out), opacity 1.2s linear;
}

.dist__km::after {
    width: 2.2em;
    height: 2.2em;
    border-color: rgba(18, 23, 19, .16);
}

.js .near-you:not(.is-seen) .dist__km::before,
.js .near-you:not(.is-seen) .dist__km::after {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.6);
}

.dist__line {
    font: 800 clamp(1.75rem, 3.6vw, 3.25rem)/1.02 var(--display);
    font-stretch: 86%;
    letter-spacing: -.03em;
    text-wrap: balance;
    transition: opacity .5s linear 2.1s, transform .7s var(--ease-out) 2.1s;
}

.near-you__show {
    display: grid;
    gap: clamp(1.5rem, 3vw, 2.25rem);
}

.entry--near {
    justify-self: start;
    width: min(100%, 27rem);
    gap: 1.25rem;
    transition: opacity .4s linear 2.7s, transform .7s var(--ease-out) 2.7s;
}

.js .near-you:not(.is-seen) .dist__line,
.js .near-you:not(.is-seen) .entry--near {
    opacity: 0;
    transform: translateY(1.25rem);
}

.near-you .lede {
    max-width: 34ch;
}

/* Two Heyas a month: the count sits by the button and drops when one is sent. */
.left {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .9375rem;
    font-weight: 700;
    color: var(--green-pale);
}

.left__pips {
    display: flex;
    gap: .3rem;
}

.left__pips i {
    width: .7rem;
    height: .7rem;
    border-radius: 50%;
    background: var(--green);
    box-shadow: inset 0 0 0 2px var(--green);
    transition: background-color .3s linear .2s;
}

.is-sent .left__pips i:last-child {
    background: transparent;
}

.scarce {
    max-width: 24ch;
    font: 800 clamp(1.625rem, 2.8vw, 2.5rem)/1.02 var(--display);
    font-stretch: 86%;
    letter-spacing: -.03em;
    text-wrap: balance;
}

.again-together {
    background: var(--night);
    color: var(--paper);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6rem);
    align-items: center;
}

.again-together__words {
    display: grid;
    gap: clamp(1.25rem, 2.5vw, 2rem);
}

.again-together h2 {
    font-size: clamp(2.75rem, 6.8vw, 7rem);
    color: var(--green);
}

.again-together .lede {
    color: var(--green-pale);
}

.snap {
    color: var(--ink);
}

.again-together .snap {
    justify-self: start;
    width: min(100%, 19rem);
    margin-top: 1rem;
}

.snap {
    position: relative;
    justify-self: center;
    width: min(100%, 23rem);
    padding: .8rem .8rem 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(18, 23, 19, .12), 0 30px 48px -22px rgba(18, 23, 19, .5);
    rotate: -3deg;
}

.snap img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 44%;
}

.snap figcaption {
    padding: .85rem .2rem 1.05rem;
    font: 700 1.125rem/1.1 var(--display);
}

.snap--wide {
    width: min(100%, 34rem);
    padding-bottom: 2.4rem;
    rotate: 2deg;
}

.snap--wide img {
    aspect-ratio: 16 / 10;
    object-position: 20% 50%;
}

.again-together .snap img {
    aspect-ratio: 1;
    object-position: 50% 5%;
}

/* The story since, as the app keeps it: a year, a place, the photo of that Heya. */
.trail {
    border-top: 1px solid rgba(250, 251, 247, .16);
}

.trail li {
    display: grid;
    grid-template-columns: clamp(3.75rem, 7vw, 5.5rem) 1fr clamp(6rem, 10vw, 7.75rem);
    align-items: center;
    gap: 1rem;
    padding-block: .6rem;
    border-bottom: 1px solid rgba(250, 251, 247, .16);
    color: var(--green-pale);
    transition: opacity .5s linear var(--wait, 0s), transform .7s var(--ease-out) var(--wait, 0s);
}

.trail li:last-child {
    border-bottom: 0;
}

.trail__y {
    font: 800 clamp(1.5rem, 2.4vw, 2rem)/1 var(--display);
    font-stretch: 90%;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    color: var(--paper);
}

.trail li:last-child .trail__y {
    color: var(--green);
}

.trail img {
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: .6rem;
    object-fit: cover;
    object-position: var(--at, 50% 40%);
}

.trail li:nth-last-child(2) { --wait: .25s; }
.trail li:nth-last-child(3) { --wait: .5s; }
.trail li:nth-last-child(4) { --wait: .75s; }
.trail li:nth-last-child(5) { --wait: 1s; }
.trail li:nth-last-child(6) { --wait: 1.25s; }

.js .entry--story:not(.is-seen) .trail li {
    opacity: 0;
    transform: translateY(.75rem);
}

.snap .stamp {
    right: -9%;
    top: auto;
    bottom: 3.4rem;
    width: 66%;
}

/* ---------- Venues page ---------- */

.cta {
    display: inline-flex;
    align-items: center;
    min-height: 3.5rem;
    padding: .9rem 2rem;
    border-radius: 999px;
    background: var(--ink);
    color: var(--paper);
    font-weight: 800;
    font-size: 1.125rem;
    text-decoration: none;
    transition: background-color .18s linear, transform .2s var(--ease-out);
}

.cta:hover {
    background: var(--green-deep);
}

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

.venue .hero h1 {
    font-size: clamp(2.625rem, 5.2vw, 5.25rem);
}

.kinds {
    display: flex;
    flex-wrap: wrap;
    gap: .2rem 1.25rem;
    font-weight: 600;
}

.split {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5.5rem);
    align-items: center;
}

.split__photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 42%;
}

.split__words,
.card-sheet__words {
    display: grid;
    gap: 1.5rem;
}

.card-sheet {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
    background: var(--night);
    color: var(--paper);
}

.card-sheet .copy,
.card-sheet .note {
    color: var(--green-pale);
}

.spot-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1rem 1.25rem;
    width: min(100%, 30rem);
    aspect-ratio: 85 / 55;
    margin-inline: auto;
    padding: clamp(1rem, 2.4vw, 1.6rem);
    border-radius: .9rem;
    background: var(--green);
    color: var(--ink);
    rotate: -3deg;
}

.spot-card__mark {
    width: 6.5rem;
}

.spot-card__scan {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: end;
    width: clamp(4.75rem, 10vw, 6.75rem);
    border-radius: .4rem;
    background: var(--paper);
}

.spot-card__lines {
    align-self: end;
    display: grid;
    gap: .9rem;
    font-size: .875rem;
    font-weight: 700;
}

.spot-card__lines span {
    padding-bottom: 1.1rem;
    border-bottom: 2px solid var(--ink);
}

.spot-card__say {
    grid-column: 1 / -1;
    font: 800 clamp(1.125rem, 2vw, 1.5rem)/1.1 var(--display);
    letter-spacing: -.02em;
}

.ritual {
    display: grid;
    gap: clamp(2rem, 4vw, 3.5rem);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    counter-reset: step;
    border-top: 2px solid var(--ink);
}

.steps li {
    counter-increment: step;
    display: grid;
    align-content: start;
    gap: .6rem;
    padding: 1.4rem 1.75rem 0 0;
}

.steps li + li {
    padding-left: 1.75rem;
    border-left: 1px solid rgba(18, 23, 19, .25);
}

.steps li::before {
    content: counter(step);
    font: 800 clamp(2.5rem, 5vw, 4rem)/.9 var(--display);
    color: var(--green-deep);
}

.steps h3 {
    font: 700 1.25rem/1.25 var(--text);
}

.final {
    display: grid;
    gap: 1.75rem;
    justify-items: start;
    background: var(--green);
}

.final h2 {
    max-width: 16ch;
    font-size: clamp(2.75rem, 6.6vw, 6.5rem);
}

/* Venues page: same rhythm as the home page, in the slate of the Heya! Pro mark
   instead of the green, so the two audiences are told apart at a glance. */
.venue {
    --pro: #2D3748;
    --pro-deep: #1A2030;
    --pro-pale: #C3CEE6;
    scrollbar-color: var(--pro) var(--paper);
}

.venue ::selection {
    background: var(--pro-pale);
    color: var(--ink);
}

.venue .hero {
    background: var(--pro);
    color: var(--paper);
}

.venue .hero .cta,
.venue .final .cta {
    background: var(--paper);
    color: var(--ink);
}

.venue .hero .cta:hover,
.venue .final .cta:hover {
    background: var(--pro-pale);
}

.venue .hero .note {
    color: var(--pro-pale);
}

.venue .band {
    background: var(--pro-deep);
    color: var(--pro-pale);
}

.venue .band__place {
    color: rgba(195, 206, 230, .5);
}

.venue .band__place.is-lit,
.venue .band__place:hover {
    color: var(--paper);
}

.venue .who {
    background: var(--pro-deep);
}

.venue .who h2 {
    max-width: 16ch;
    font-size: clamp(3rem, 8.4vw, 8.5rem);
    line-height: .93;
    color: var(--pro-pale);
}

.card-sheet--paper {
    background: var(--paper);
    color: var(--ink);
}

.card-sheet--paper .copy,
.card-sheet--paper .note {
    color: inherit;
}

.venue .ritual {
    background: var(--pro);
    color: var(--paper);
}

.venue .steps {
    border-top-color: var(--paper);
}

.venue .steps li,
.venue .steps li + li {
    border-color: rgba(250, 251, 247, .3);
}

.venue .steps li::before {
    color: var(--pro-pale);
}

.venue .final {
    background: var(--pro-deep);
    color: var(--paper);
}

.venue .final .lede,
.venue .final .note {
    color: var(--pro-pale);
}

.venue .foot {
    background: #10141D;
    color: var(--pro-pale);
}

.venue .langs button[aria-pressed="true"] {
    background: var(--pro-pale);
    color: var(--ink);
}

/* ---------- Terms and privacy: pages made for reading ---------- */

.legal-head {
    display: grid;
    gap: 1.25rem;
    padding: clamp(1.25rem, 2.6vh, 2rem) var(--gutter) clamp(2.5rem, 6vw, 4.5rem);
    background: var(--green);
}

.legal-head .top {
    margin-bottom: clamp(2rem, 7vw, 5.5rem);
}

.legal-head h1 {
    max-width: 16ch;
    font-size: clamp(2.5rem, 6vw, 5.5rem);
}

.legal-head .lede {
    max-width: 46ch;
}

.legal-say {
    max-width: 60ch;
}

.legal-body {
    max-width: calc(70ch + 2 * var(--gutter));
    padding: clamp(2.5rem, 6vw, 5rem) var(--gutter) clamp(3.5rem, 8vw, 7rem);
}

.legal-body p,
.legal-body li {
    text-wrap: pretty;
}

.legal-intro {
    font-size: clamp(1.1875rem, .8vw + 1rem, 1.375rem);
    line-height: 1.45;
}

.legal-card {
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-top: clamp(1.5rem, 3vw, 2.25rem);
    border-top: 1px solid rgba(18, 23, 19, .18);
}

.legal-card h2 {
    margin-bottom: .9rem;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
    letter-spacing: -.02em;
    line-height: 1.1;
    color: var(--green-deep);
}

.legal-card p + p,
.legal-card p + ul,
.legal-card ul + p {
    margin-top: .8rem;
}

.legal-card ul {
    display: grid;
    gap: .55rem;
    padding-left: 1.25rem;
    list-style: disc;
}

.legal-card li::marker {
    color: var(--green-deep);
}

.legal-body a {
    font-weight: 600;
    color: var(--green-deep);
}

.legal .foot {
    justify-content: flex-start;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 54rem) {
    .hero,
    .told,
    .buddex,
    .meet,
    .live__top,
    .thread,
    .near-you,
    .again-together,
    .split,
    .card-sheet {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: 0;
    }

    .hero__words {
        gap: 1.25rem;
        padding-bottom: 2.5rem;
    }

    .hero__photo,
    .wall {
        order: -1;
        min-height: 0;
        height: min(44svh, 24rem);
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .steps li,
    .steps li + li {
        padding: 1.1rem 0;
        border-left: 0;
        border-bottom: 1px solid rgba(18, 23, 19, .25);
    }

    .stars {
        aspect-ratio: 1;
    }

    .paths {
        aspect-ratio: 1;
        margin-bottom: 1rem;
    }

    .paths__here {
        max-width: 78%;
    }

    .rail {
        gap: 1.1rem;
        font-size: .8125rem;
    }

    .rail a::before {
        content: none;
    }

    .again-together h2 {
        font-size: 13.5vw;
    }

    .foot {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* On a phone the rail cannot hold five names and the button: the chapter being read
   keeps its name, the others become dots, and nothing slides sideways. */
@media (max-width: 36rem) {
    .rail {
        gap: .15rem;
    }

    .rail a:not(.rail__get) {
        gap: .45rem;
        min-height: 2rem;
        padding-inline: .4rem;
        font-size: 0;
    }

    .rail a:not(.rail__get)::before {
        content: "";
        width: .5rem;
        height: .5rem;
    }

    .rail a[aria-current="true"] {
        font-size: .875rem;
    }
}

@media (max-width: 34rem) {
    .entry__head {
        grid-template-columns: auto 1fr;
    }

    .entry__head .near {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .stores img {
        height: 2.75rem;
    }

    .stamp {
        top: .9rem;
        width: 46%;
    }
}

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

    .wall__col {
        animation: none;
    }

    .band__place {
        color: var(--green);
        transition: none;
    }

    .paths__line,
    .paths__here,
    .paths__here::before,
    .pile img,
    .stars,
    .stars line,
    .card,
    .dist__km::before,
    .dist__km::after,
    .dist__line,
    .entry--near,
    .left__pips i,
    .trail li,
    .rail a,
    .film-btn,
    .snap.is-seen .stamp,
    .is-sent .stamp,
    .press,
    .cta,
    .stores a {
        transition: none;
    }
}
