@font-face { font-family: 'Mona Sans'; src: url('mona-sans.woff2') format('woff2'); font-weight: 200 900; font-stretch: 75% 125%; font-display: swap; }

:root { --ground: #081a40; --ice: #eaf1ff; --soft: #b5c8ee; --cobalt: #1f5eff; --gutter: max(20px, env(safe-area-inset-left), env(safe-area-inset-right)); --edge: 26px; --gap: 10px; --ease: cubic-bezier(0.2, 0.75, 0.2, 1); }
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--ground); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ice); font: 400 1.0625rem/1.5 'Mona Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid #7fb2ff; outline-offset: 3px; }

/* On tall screens, the header stays at the top, the footer at the bottom, and the rest sits between them. */
.page { display: grid; grid-template: auto minmax(0, 1fr) auto / minmax(0, 1fr); min-height: 100vh; min-height: 100svh; padding: calc(18px + env(safe-area-inset-top)) var(--gutter) calc(24px + env(safe-area-inset-bottom)); }
main { align-self: center; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.1875rem; font-weight: 680; letter-spacing: -0.015em; }
.brand svg { width: 34px; height: 34px; color: #7fb2ff; }
.soon { padding: 7px 14px; border-radius: 9px; background: var(--cobalt); color: #ffffff; font-weight: 650; line-height: 1.3; }

/* Phones first */
.intro { display: grid; gap: 14px; margin: 34px 0 26px; }
h1 { font-size: clamp(2.5rem, 12vw, 4.25rem); font-weight: 720; font-stretch: 114%; line-height: 0.98; letter-spacing: -0.038em; text-wrap: balance; }
.intro p { max-width: 34em; }
.intro .hint { margin-top: 10px; color: var(--soft); }
.follow {
  display: flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 18px; padding: 12px 20px; border-radius: 10px;
  background: var(--cobalt); box-shadow: 0 4px 0 #0f3aa8; color: #ffffff; font-weight: 650; line-height: 1.25; text-align: center; text-decoration: none;
}
.follow:hover { background: #3a71ff; }
.follow:active { transform: translateY(3px); box-shadow: 0 1px 0 #0f3aa8; }

/* A deck of cards. They start face down, then turn over one at a time to show real videos. */
.shapes-only { position: absolute; }
.wall { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gap); perspective: 1600px; }
.card { display: block; min-width: 0; padding: 0; border: 0; border-radius: 12px; background: none; text-align: left; transition: translate 0.35s var(--ease); }
.turn { position: relative; display: block; height: 100%; transform-style: preserve-3d; transition: transform 0.8s var(--ease); animation: turn 0.9s var(--ease) backwards; animation-delay: calc(0.5s + var(--order) * 0.28s); }
@keyframes turn { from { transform: rotateY(180deg); } }
.front, .back { overflow: hidden; border-radius: 12px; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0 0 1px rgb(234 241 255 / 0.18); }
/* The label and play symbol each have their own space, so they can never overlap. */
.front { display: grid; grid-template: minmax(0, 1fr) auto / var(--edge) minmax(0, 1fr); height: 100%; }
.back { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 4px; background: #123471; color: #7fb2ff; text-align: center; transform: rotateY(180deg); }
.back svg { width: clamp(48px, 12vw, 84px); height: auto; aspect-ratio: 1; }
.card video { display: block; grid-area: 1 / 2 / 3 / 3; width: 100%; height: auto; pointer-events: none; }
.edge { height: 0; min-height: 100%; padding: 12px 0; overflow: hidden; writing-mode: vertical-rl; rotate: 180deg; font-size: 0.8125rem; font-weight: 660; line-height: var(--edge); text-align: end; white-space: nowrap; }
.sound { --order: 0; order: 1; grid-column: 1 / -1; }
.venus { --order: 1; order: 2; }
.morse { --order: 2; order: 3; }
.shapes { --order: 3; order: 4; grid-column: 1 / -1; }
.sound .front { background: #bdd6ff; color: var(--ground); }
.venus .front { background: #7fb2ff; color: var(--ground); }
.morse .front { background: #0f47c9; color: #ffffff; }
.shapes .front { background: var(--cobalt); color: #ffffff; }
/* A play symbol at the bottom of the edge shows that each video opens, without covering it */
[data-film] .front::after {
  content: ''; grid-area: 2 / 1; width: var(--edge); height: var(--edge); margin-bottom: 6px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12.5-7.5z'/%3E%3C/svg%3E") center / 72% no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4.5v15l12.5-7.5z'/%3E%3C/svg%3E") center / 72% no-repeat;
}
/* The visitor's card lifts once, after the others have turned over. */
.yours { order: 5; grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.yours .turn { transform: rotateY(180deg); animation: lift 1.1s var(--ease) 2.5s; }
.yours[data-up] .turn { transform: none; }
@keyframes lift { 45% { transform: translateY(-16px) rotateY(180deg) rotateZ(2.5deg); } }
.yours .front, .yours .back { align-content: center; gap: 10px; padding: 20px; }
.yours .front { grid-template: auto auto / minmax(0, 1fr); background: #eaf1ff; color: var(--ground); }
.yours .back { background: var(--cobalt); color: #ffffff; }
.yours strong { font-size: 1.5rem; font-weight: 720; font-stretch: 112%; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
.yours .front strong { font-size: 1.875rem; }

footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; margin-top: 26px; font-size: 0.9375rem; color: var(--soft); }
footer p { flex: 1 1 18em; max-width: 46em; }
.pause { min-height: 44px; padding: 8px 16px; border: 0; border-radius: 10px; background: none; box-shadow: inset 0 0 0 1.5px rgb(234 241 255 / 0.42); color: var(--ice); font-weight: 620; white-space: nowrap; }
.pause:hover { background: #123471; }

dialog { width: max-content; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); padding: 14px; overflow: hidden; border: 0; border-radius: 16px; background: #123471; color: var(--ice); }
dialog::backdrop { background: rgb(3 10 28 / 0.86); }
.player-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.player-bar h2 { font-size: 1.0625rem; font-weight: 660; line-height: 1.3; }
dialog video { display: block; max-width: 100%; max-height: calc(100dvh - 116px); margin-inline: auto; border-radius: 8px; background: #000000; }

@media (min-width: 900px) and (min-height: 560px) {
  /* Everything shares the wall's width, so the text and videos line up. */
  :root { --edge: 30px; --gap: 14px; --h: min(calc((100vw - 250px) / 2.3275), calc(100vh - 316px), 820px); }
  .page { grid-template-columns: auto; width: max-content; min-width: min(920px, 100%); max-width: 100%; margin: 0 auto; padding-top: 22px; }
  .intro { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: end; gap: clamp(32px, 4vw, 72px); width: 0; min-width: 100%; margin: 26px 0 24px; }
  h1 { font-size: clamp(2.75rem, min(4.6vw, 8.4vh), 5.25rem); }
  .intro .hint { margin-top: 6px; }
  .follow { display: inline-flex; min-height: 46px; margin: 12px 0 4px; padding: 10px 18px; }
  .wall { grid-template-columns: repeat(4, auto); grid-template-rows: auto auto; justify-content: start; width: max-content; }
  .card { order: 0; grid-column: auto; }
  .venus, .morse, .yours { grid-row: 1 / 3; }
  .morse { grid-column: 3; }
  .yours { grid-column: 4; width: calc(var(--h) * 0.5625 + var(--edge)); height: var(--h); aspect-ratio: auto; }
  /* Turn over from left to right. */
  .venus { --order: 0; }
  .sound { --order: 1; }
  .shapes { --order: 2; }
  .morse { --order: 3; }
  .venus video, .morse video { width: calc(var(--h) * 0.5625); height: var(--h); object-fit: cover; }
  .sound { grid-column: 2; grid-row: 1; }
  .shapes { grid-column: 2; grid-row: 2; }
  .sound video, .shapes video { width: calc((var(--h) - var(--gap)) / 1.5625); }
  .card:hover { translate: 0 -4px; }
  footer { width: 0; min-width: 100%; margin-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { .card, .turn { animation: none; transition: none; } .yours .turn { animation: none; } }
