@font-face {
  font-family: 'Source Sans';
  src: url('assets/source-sans-3-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #101619;
  --ink: #e7e9e3;
  --muted: #a7b0b1;
  --rule: #354044;
  --accent: #c1ceb0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; scrollbar-color: #536164 var(--night); }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font: 400 18px/1.6 'Source Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, p, figure, dl, dd { margin: 0; }
a { color: inherit; text-decoration: none; text-underline-offset: .25em; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 7px; }
a:hover { color: var(--accent); }
img { display: block; max-width: 100%; height: auto; }
::selection { color: var(--night); background: var(--accent); }
.wrap { width: min(1120px, calc(100% - 96px)); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; transform: translateY(-180%); background: var(--ink); color: var(--night); padding: 10px 20px; z-index: 10; }
.skip-link:focus { transform: none; }

.site-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding-block: 34px; }
.site-header .brand { grid-column: 2; justify-self: center; }
.brand { display: inline-flex; gap: 6px; align-items: center; font-size: 20px; font-weight: 600; letter-spacing: -.025em; }
.text-link { text-decoration: underline; text-decoration-color: #75827d; font-size: 16px; }

.project { border-top: 1px solid var(--rule); padding-block: 40px 64px; display: grid; grid-template-columns: .9fr 1.1fr; gap: 74px; align-items: center; }
.project:first-child { border-top: 0; }
.project-copy { padding-block: 16px; }
.project-heading { display: flex; gap: 17px; align-items: center; }
.project-heading h2 { font-size: 48px; font-weight: 550; line-height: 1.1; letter-spacing: -.03em; }
.app-icon { border-radius: 10px; flex-shrink: 0; }
.lapse-icon { background: #d7dfca; }
.project-tenk .app-icon { border-radius: 50%; }
.project-copy > p { color: var(--muted); margin-top: 24px; max-width: 40ch; }
.project-facts { margin-top: 28px; font-size: 15px; line-height: 1.5; }
.project-facts > div { display: grid; grid-template-columns: 85px 1fr; gap: 12px; padding-block: 5px; }
.project-facts dt { color: var(--muted); }
.project-links { display: flex; flex-wrap: wrap; align-items: center; gap: 19px; margin-top: 28px; }
.button { display: inline-block; border: 1px solid #72807a; padding: 10px 17px; border-radius: 4px; font-size: 16px; font-weight: 550; transition: background .18s ease-out, color .18s ease-out; }
.button:hover { background: var(--ink); color: var(--night); border-color: var(--ink); }
.release-note { color: var(--muted); font-size: 14px; }
.project-art { position: relative; height: 480px; border-radius: 4px; overflow: hidden; }
.lapse-art { background: #1d2b2c; }
.lapse-phones { display: flex; align-items: flex-start; justify-content: center; gap: 18px; padding: 43px 20px 0; }
.lapse-phones .lapse-light { margin-top: 30px; }
.curio-art { background: #30291f; }
.project-curio .project-art { grid-column: 1; grid-row: 1; }
.project-curio .project-copy { grid-column: 2; grid-row: 1; }
.project-curio { grid-template-columns: 1.1fr .9fr; }
.tenk-art { background: #17231d; display: grid; align-content: center; }
.watch-screens { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 0 27px 35px; }

.site-footer { display: flex; flex-wrap: wrap; gap: 12px 30px; border-top: 1px solid var(--rule); padding-block: 25px 35px; font-size: 14px; color: var(--muted); }
.footer-location { margin-left: auto; }
.moon-credit { flex-basis: 100%; font-size: 13px; text-decoration: underline; text-decoration-color: #75827d; }

@media (max-width: 1000px) {
  .wrap { width: calc(100% - 64px); }
  .project { gap: 36px; }
  .project-art { height: 440px; }
  .lapse-phones { gap: 10px; padding-inline: 12px; padding-top: 62px; }
  .project-heading h2 { font-size: 40px; }
  .watch-screens { gap: 12px; padding-inline: 20px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 40px); }
  .site-header { padding-block: 22px; }
  .brand { font-size: 18px; gap: 6px; }
  .brand img { width: 25px; height: 25px; }
  .project, .project-curio { grid-template-columns: 1fr; gap: 30px; padding-block: 32px 38px; }
  .project-copy { padding: 0; }
  .project-heading h2 { font-size: 41px; }
  .project-copy > p { max-width: none; }
  .project-facts { margin-top: 21px; }
  .project-links { margin-top: 22px; gap: 15px; }
  .project-art { height: 425px; }
  .project-curio .project-art, .project-curio .project-copy { grid-column: auto; grid-row: auto; }
  .lapse-phones { padding-top: 28px; gap: 12px; }
  .tenk-art { height: 350px; }
  .site-footer { flex-wrap: wrap; gap: 9px 23px; padding-block: 22px; }
  .footer-location { flex-basis: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* A photograph behind the page, quiet enough to keep the copy readable. */
.moon-background {
  position: fixed;
  inset: 0;
  z-index: -1;
  mix-blend-mode: screen;
  overflow: clip;
  pointer-events: none;
}
.moon-background img {
  position: absolute;
  top: 5vh;
  right: -120px;
  width: min(65vw, 780px);
  max-width: none;
  opacity: .085;
  filter: grayscale(1);
  mask-image: radial-gradient(ellipse closest-side, #000 78%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 78%, transparent 100%);
  transform: translate3d(0, var(--moon-offset, 0px), 0);
}
@media (max-width: 700px) {
  .moon-background img {
    top: 80px;
    right: -210px;
    width: 480px;
    opacity: .065;
  }
}
@media (prefers-reduced-motion: reduce) {
  .moon-background img { transform: none; }
}

.app-store-badge { display: inline-flex; flex-shrink: 0; }
.app-store-badge svg { display: block; height: 48px; width: auto; }

/* Raw screenshots are masked to the measured openings of Apple's PNG bezels.
   Keep the hardware unmasked: rounding the entire device cuts off its frame. */
.device { position: relative; flex-shrink: 0; filter: drop-shadow(4px 12px 12px #0005); }
.device-display { position: absolute; inset: 0; mask-size: 100% 100%; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; -webkit-mask-repeat: no-repeat; }
.device-bezel { position: relative; z-index: 1; width: 100%; height: 100%; pointer-events: none; }
.phone-device { aspect-ratio: 1470 / 3000; }
.phone-device .device-display { mask-image: url('assets/iphone-screen-mask.svg'); -webkit-mask-image: url('assets/iphone-screen-mask.svg'); }
.phone-device .device-display img { position: absolute; left: 5.1020408163%; top: 2.2%; width: 89.7959183673%; height: 95.6%; max-width: none; }
.lapse-phones .device { width: calc(50% - 9px); max-width: 172px; }
.curio-art { display: flex; justify-content: center; align-items: center; }
.curio-device { width: 204px; }
.watch-device { aspect-ratio: 560 / 880; width: calc(50% - 10px); max-width: 185px; }
.watch-device .device-display { mask-image: url('assets/watch-screen-mask.svg'); -webkit-mask-image: url('assets/watch-screen-mask.svg'); }
.watch-device .device-display img { position: absolute; left: 12.8571428571%; top: 21.8181818182%; width: 74.2857142857%; height: 56.3636363636%; max-width: none; }
.watch-device + .watch-device { margin-top: 70px; }
@media (max-width: 1000px) {
  .curio-device { width: 190px; }
}
@media (max-width: 700px) {
  .lapse-phones .device { max-width: 160px; }
  .curio-device { width: 190px; }
  .watch-device { max-width: 160px; }
  .watch-device + .watch-device { margin-top: 52px; }
}
