/* Myrii landing page. Colour tokens follow Myrii.app's dark appearance. */
:root {
  --canvas: #161616;      /* C.canvas */
  --surface: #1e1e1e;     /* C.surface */
  --sunken: #272727;      /* C.sunken */
  --ink: #f2f2f2;         /* C.ink */
  --ink2: #a8a8a8;        /* C.ink2 */
  --ink3: #8c8c8c;        /* C.ink3 */
  --line: rgba(255, 255, 255, 0.09);        /* C.line */
  --line-strong: rgba(255, 255, 255, 0.16); /* C.lineStrong */
  --mono: #f5f5f5;        /* the primary button: off-white */
  --mono-hover: #e6e6e6;
  --on-mono: #171717;
  --accent: oklch(0.64 0.16 272);           /* blueberry: only for keyboard focus */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --x0: clamp(20px, 6.5vw, 84px);           /* one left edge, as in the app (84 pt at 1280) */
  --max: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 400 17px/1.55 var(--font); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 10; padding: 8px 12px; background: var(--mono); color: var(--on-mono); border-radius: 6px; font-weight: 500; }
.skip:focus { top: 12px; }

/* Header: the lockup where the app's title bar has it */
.top {
  position: absolute; inset: 0 0 auto 0; z-index: 10; height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--x0);
}
.brand img { width: 84px; height: auto; }

/* Buttons and links (app: 28 pt controls, 13 pt medium labels; the web gets a larger target) */
.button {
  display: inline-flex; align-items: center; height: 40px; padding: 0 16px;
  background: var(--mono); color: var(--on-mono); border-radius: 8px;
  font-size: 15px; font-weight: 500; letter-spacing: -0.01em;
  transition: background-color 0.12s ease-out;
}
.button:hover { background: var(--mono-hover); }
.link { font-size: 14px; font-weight: 500; color: var(--ink); padding: 8px 2px; transition: color 0.12s ease-out; }
.link:hover { color: var(--ink2); }
.link.quiet { color: var(--ink2); }
.link.quiet:hover { color: var(--ink); }

/* Hero: the cloud of thumbnails is the picture; the text sits in its middle */
.hero { position: relative; min-height: 100vh; min-height: 100svh; overflow: hidden; display: grid; place-items: center; text-align: center; }
.hero-text { position: relative; z-index: 5; padding: 0 20px; display: flex; flex-direction: column; align-items: center; }
/* A soft shadow of the page colour behind the text: whatever the thumbnails (bright frames, faces), the headline reads */
.hero-text::before { content: ""; position: absolute; inset: -18% -12%; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(22, 22, 22, 0.72), rgba(22, 22, 22, 0.45) 55%, rgba(22, 22, 22, 0) 100%); }
h1 {
  margin: 0; font-weight: 700; font-size: clamp(54px, 9.6vw, 148px); line-height: 0.92;
  letter-spacing: -0.05em; white-space: nowrap;
}
.lede { margin: 26px 0 0; text-wrap: balance; color: var(--ink2); font-size: clamp(17px, 1.5vw, 21px); line-height: 1.4; letter-spacing: -0.01em; }
.hero .button { margin-top: 34px; }

/* The thumbnails (places from field.js; motion is CSS only). Every frame at its own shape, sharp and at full strength */
.field { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.card {
  position: absolute; left: 0; top: 0; width: var(--w); height: var(--h);
  transform: translate3d(var(--x), var(--y), 0);
  opacity: 0;
}
.card img {
  width: 100%; height: 100%; object-fit: cover;   /* the box already has the image's own shape: nothing is cut */
  border-radius: var(--r); background: var(--surface);
  outline: 1px solid rgba(255, 255, 255, 0.06); outline-offset: -1px;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  will-change: transform;
  animation: orbit 90s linear var(--delay) infinite;
  animation-play-state: var(--play, running);
}
.card[data-size="l"] img { box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.field.on .card { opacity: 1; transition: opacity 1s ease-out var(--in); }
.field.paused { --play: paused; }
/* Each card turns on a tiny circle without rotating; the phases follow the angle around the headline, so the set moves as one */
@keyframes orbit {
  from { transform: rotate(0deg) translateX(var(--a)) rotate(0deg); }
  to   { transform: rotate(360deg) translateX(var(--a)) rotate(-360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .card img { animation: none; }
  .field.on .card { transition: none; }
  html { scroll-behavior: auto; }
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* How it works, as type: four large words, each with one short line */
.flow { max-width: calc(1320px + 2 * var(--x0)); margin: 0 auto; padding: clamp(96px, 14vw, 200px) var(--x0) 0; }
.flow ol { list-style: none; margin: 0; padding: 0; }
.flow li { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); align-items: baseline; gap: 0 4vw; }
.flow li + li { margin-top: clamp(4px, 1vw, 14px); }
.word { font-size: clamp(56px, 10.5vw, 160px); font-weight: 700; line-height: 1; letter-spacing: -0.055em; }
.what { color: var(--ink2); font-size: clamp(16px, 1.45vw, 21px); letter-spacing: -0.01em; }

/* The app, as one composed spread rather than a row of framed screenshots */
.spread { max-width: calc(1320px + 2 * var(--x0)); margin: 0 auto; padding: clamp(120px, 16vw, 240px) var(--x0) 0; }
.spread h2 { max-width: 11ch; font-size: clamp(40px, 5.6vw, 84px); font-weight: 700; line-height: 0.98; letter-spacing: -0.045em; }
.plates { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); margin-top: clamp(48px, 7vw, 104px); }
.plate { width: 100%; border-radius: 10px; background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 40px 100px rgba(0, 0, 0, 0.5); }
.plate.queue { grid-column: 1 / 10; grid-row: 1; }
.plate.review { grid-column: 8 / 13; grid-row: 1; align-self: end; transform: translateY(42%); z-index: 2; }
.plate.week { grid-column: 4 / 12; grid-row: 2; margin-top: clamp(140px, 17vw, 260px); }

/* Footer: one closing line and the way in */
.foot {
  max-width: calc(1320px + 2 * var(--x0)); margin: 0 auto; padding: clamp(140px, 18vw, 260px) var(--x0) 40px;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 28px 24px;
}
.last { margin: 0; font-size: clamp(40px, 5.6vw, 84px); font-weight: 700; line-height: 0.98; letter-spacing: -0.045em; }
.foot .small { grid-column: 1 / -1; margin: clamp(56px, 8vw, 120px) 0 0; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; color: var(--ink3); font-size: 13px; }
.foot .small img { width: 53px; height: auto; }

/* Phones */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .hero { place-items: end center; }
  .hero-text { padding-bottom: 14svh; }
  h1 { white-space: normal; text-wrap: balance; }
  .flow li { grid-template-columns: 1fr; }
  .what { margin: 4px 0 18px; }
  .plates { grid-template-columns: 1fr; margin-inline: calc(-1 * var(--x0)); }
  .plate { border-radius: 0; box-shadow: 0 0 0 1px var(--line); }
  .plate.queue, .plate.review, .plate.week { grid-column: 1; grid-row: auto; transform: none; margin-top: 0; }
  .plate.review { width: 82%; justify-self: end; margin: -18% 6% 0 0; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-strong), 0 30px 70px rgba(0, 0, 0, 0.6); }
  .plate.week { margin-top: 64px; }
  .foot { grid-template-columns: 1fr; }
  .foot .button { justify-self: start; }
}
