:root {
  color-scheme: light;
  --ink: #1c192b;
  --muted: #514e65;
  --paper: #f8f7fb;
  --rule: #e2deec;
  --night: #181528;
  --on-night: #fff;
  --subtle-on-night: #dad4e8;
  --lilac: #cdbdff;
  --lime: #e6f991;
  --violet: #563b9d;
  --type: Inter, "Segoe UI", Arial, sans-serif;
  --gutter: clamp(1.25rem, 4.25vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.65 var(--type); }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
a { color: inherit; }
main:focus { outline: none; }
a:focus-visible { outline: 3px solid #126ead; outline-offset: 5px; }
.hero a:focus-visible, .site-footer a:focus-visible { outline-color: var(--lime); }

.wrap {
  width: min(87.5rem, 100% - var(--gutter) * 2);
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  z-index: 2;
  inset: .7rem auto auto .7rem;
  padding: .65rem 1rem;
  border-radius: .45rem;
  background: var(--night);
  color: #fff;
  transform: translateY(-185%);
}

.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--rule); background: #fff; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  padding-block: .2rem;
}

.brand { flex: 0 0 auto; width: min(100%, clamp(15.5rem, 25vw, 18.75rem)); }
.brand img { width: 100%; height: auto; }

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: clamp(1.15rem, 3.1vw, 2.6rem);
  font: 700 1rem/1.3 var(--type);
}

nav a {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: none;
}

nav a:hover { color: var(--violet); text-decoration: underline 2px; text-underline-offset: .28em; }

.hero {
  background: radial-gradient(ellipse at 88% 35%, #27223e, transparent 64%), var(--night);
  color: var(--on-night);
  padding-block: clamp(2.75rem, 5.9vw, 5.5rem);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(1.7rem, 5.2vw, 5rem);
}

h1, h2, h3 {
  font-family: var(--type);
  font-weight: 700;
  letter-spacing: -.047em;
}

h1 {
  max-width: 10.5em;
  font-size: clamp(3.25rem, 6.1vw, 5.75rem);
  line-height: 1.02;
}

h1 span { display: block; color: var(--lilac); }

.hero-description {
  max-width: 35rem;
  margin-block: 1.2rem 1.45rem;
  color: var(--subtle-on-night);
  font-size: clamp(1.12rem, 1.55vw, 1.3rem);
  line-height: 1.55;
}

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

.hero-family {
  position: relative;
  isolation: isolate;
  justify-self: end;
  width: min(100%, 29rem);
  aspect-ratio: 460 / 410;
}

.family-orbit {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.family-tile {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: clamp(.8rem, 2.25vw, 2rem);
  box-shadow: .2rem .55rem .65rem rgb(10 8 22 / .22);
}

.family-tile img { width: 86%; height: auto; }

.family-loopwink {
  top: 6.8%;
  left: 17.4%;
  width: 57%;
  aspect-ratio: 1.64;
  transform: rotate(-12deg);
}

.family-loopwink img { width: 74%; mix-blend-mode: multiply; }

.family-clickwink {
  top: 34.9%;
  left: 61.6%;
  width: 35%;
  aspect-ratio: 1.44;
  transform: rotate(12.5deg);
}

.family-movewink {
  top: 53.7%;
  left: 4.35%;
  width: 39%;
  aspect-ratio: 1.49;
  transform: rotate(-9deg);
}

.family-stickywinks {
  top: 69.8%;
  left: 45%;
  width: 34.5%;
  aspect-ratio: 1.44;
  transform: rotate(8deg);
}

.family-stickywinks img { width: 68%; }

.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: .6rem .95rem;
  border: 1px solid transparent;
  border-radius: .5rem;
  font: 700 .975rem/1.35 var(--type);
  text-align: center;
  text-decoration: none;
  transition: background-color .16s ease, border-color .16s ease;
}

.button-primary { background: var(--lilac); color: var(--night); }
.button-primary:hover { background: #e1d6ff; }
.button-outline { border-color: #807599; color: #fff; }
.button-outline:hover { background: #342c47; border-color: var(--lilac); }
.button-dark { background: var(--night); color: #fff; }
.button-dark:hover { background: #3b2d5a; }
.button-product { background: var(--violet); color: #fff; }
.button-product:hover { background: #43307b; }
.button-tracker { background: #183f32; color: #fff; }
.button-tracker:hover { background: #245441; }

.apps { padding-block: clamp(2.8rem, 5.4vw, 4.8rem); }

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .75rem 1.5rem;
  margin-bottom: 1.45rem;
}

h2 { font-size: clamp(2.15rem, 4.05vw, 3.45rem); line-height: 1.04; }
.section-heading p { color: var(--muted); font-size: 1.05rem; line-height: 1.5; }

.app-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(.9rem, 2vw, 1.5rem);
}

.app-card {
  display: flex;
  overflow: hidden;
  flex-direction: column;
  border: 1px solid var(--rule);
  border-radius: 1.1rem;
  background: #fff;
}

.app-preview {
  display: grid;
  grid-template: minmax(0, 1fr) auto / minmax(0, 1fr);
  place-items: center;
  gap: .6rem;
  height: clamp(15.75rem, 19.2vw, 18rem);
  padding: clamp(.65rem, 1.2vw, 1.1rem) clamp(.55rem, 1.1vw, .95rem) .65rem;
  border-bottom: 1px solid var(--rule);
  cursor: zoom-in;
  text-decoration: none;
}

.app-preview-loopwink, .family-loopwink { background: #e9e2fe; }
.app-preview-clickwink, .family-clickwink, .app-heading-clickwink { background: #dff1fb; }
.app-preview-movewink, .family-movewink, .app-heading-movewink { background: #edf3d9; }
.app-preview-stickywinks, .family-stickywinks, .app-heading-stickywinks { background: #fbefd2; }

.app-preview img {
  width: auto;
  height: auto;
  max-height: 100%;
  min-height: 0;
  border: 1px solid rgb(27 21 49 / .18);
  border-radius: .4rem;
  box-shadow: 0 .5rem 1rem rgb(27 21 49 / .16);
}

.app-preview-loopwink img { max-width: 92%; }

.preview-expand {
  display: grid;
  place-items: center;
  justify-self: end;
  width: 1.5rem;
  height: 1.5rem;
  border: 1px solid rgb(51 45 76 / .15);
  border-radius: .35rem;
  background: rgb(255 255 255 / .45);
}

.preview-expand::before {
  content: "";
  width: .9rem;
  height: .9rem;
  background: url("assets/expand.svg") center / contain no-repeat;
}

.app-preview:hover .preview-expand, .app-preview:focus-visible .preview-expand { background-color: #fff; }
.app-preview:focus-visible { outline-offset: -4px; }
.app-preview-stickywinks img { border: 0; border-radius: 0; box-shadow: none; }

html:has(.screenshot-dialog[open]) { overflow: hidden; }

.screenshot-dialog {
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100dvh - 1.5rem);
  padding: .75rem;
  border: 1px solid var(--rule);
  border-radius: .9rem;
  background: #f8f6fb;
  box-shadow: 0 1.25rem 4rem rgb(18 14 31 / .35);
}

.screenshot-dialog::backdrop { background: rgb(22 18 35 / .76); }

.screenshot-dialog form {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 .5rem;
}

.screenshot-close {
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid var(--rule);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font: 400 1.65rem/1 var(--type);
  cursor: pointer;
}

.screenshot-close:hover { background: #eee8fa; }
.screenshot-close:focus-visible { outline: 3px solid #126ead; outline-offset: 3px; }

.screenshot-dialog img {
  max-width: min(74rem, calc(100vw - 3.25rem));
  max-height: calc(100dvh - 6.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: .4rem;
}

.app-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: start;
  gap: .55rem;
}

.app-copy, .linux-downloads .app-heading {
  padding: clamp(1rem, 2vw, 1.45rem) clamp(1rem, 1.65vw, 1.35rem);
}

.app-heading { display: flex; align-items: center; gap: .55rem; }
.app-heading img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
/* The Loopwink image has more padding around Loopy than the companion images. */
.app-icon-loopwink { transform: scale(1.25); }
.app-heading h3, .studio-contact h3, .linux-downloads .app-heading h2, .linux-install h2 {
  font-size: clamp(1.5rem, 2.3vw, 1.9rem);
  line-height: 1.15;
}
.app-copy > p, .app-summary { flex: 1; color: var(--muted); }

.app-actions {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: .4rem;
  min-height: 2.75rem;
  margin-top: .35rem;
}

.app-actions .button { min-height: 2.75rem; padding-inline: .68rem; font-size: .9rem; }
.app-download-label { color: var(--muted); font: 700 .875rem/1.35 var(--type); }
.app-explore {
  display: inline-flex;
  flex-basis: 100%;
  min-height: 2.75rem;
  align-items: center;
  color: var(--violet);
  font: 700 .875rem/1.35 var(--type);
  text-underline-offset: .18em;
}
.app-summary .app-explore { min-height: 1.75rem; }
.app-status { padding: .35rem .55rem; border-radius: .4rem; background: #f0edf7; color: #4b425f; font: 700 .875rem/1.35 var(--type); }
.app-summary .app-status { display: inline-block; margin-top: .4rem; }

.linux-downloads .section-heading { display: grid; }
.linux-downloads .section-heading h1 { max-width: none; font-size: clamp(2rem, 3.5vw, 2.75rem); line-height: 1.08; }
.linux-downloads .section-heading p { max-width: 52rem; }
.linux-downloads .app-heading { border-bottom: 1px solid var(--rule); }
.linux-install { display: grid; gap: .75rem; margin-top: 2rem; max-width: 42rem; }

.projects {
  padding-block: clamp(2.65rem, 4vw, 3.85rem);
  border-top: 1px solid var(--rule);
  background: #fff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
  gap: clamp(.9rem, 2vw, 1.5rem);
}

.project-card {
  display: grid;
  align-content: start;
  gap: clamp(1.1rem, 3.2vw, 3rem);
  padding: clamp(.85rem, 2vw, 1.45rem);
  border: 1px solid var(--rule);
  border-radius: 1.1rem;
  background: var(--paper);
}

.project-card:only-child { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }

.project-art {
  padding: clamp(.95rem, 2.4vw, 1.4rem);
  border: 1px solid #315142;
  border-radius: .8rem;
  background-color: #14362c;
  background-image:
    radial-gradient(ellipse at 15% 0%, #365a46, transparent 70%),
    linear-gradient(90deg, rgb(236 198 126 / .14) 1px, transparent 1px),
    linear-gradient(rgb(236 198 126 / .14) 1px, transparent 1px);
  background-size: auto, 1.2rem 1.2rem, 1.2rem 1.2rem;
}

.project-art-tracker {
  padding: 0;
  overflow: hidden;
}

.project-screenshot {
  width: 100%;
  height: auto;
}

.project-copy { padding: .35rem clamp(.25rem, 1.3vw, 1.1rem) .35rem 0; }
.project-copy h3 { font-size: clamp(1.6rem, 3vw, 2.5rem); line-height: 1.15; text-wrap: balance; }
.project-copy p { max-width: 34rem; margin-top: .75rem; color: var(--muted); }
.project-copy .button { margin-top: 1.05rem; }

.studio { background: #f0eafa; border-block: 1px solid var(--rule); }

.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(14rem, .55fr);
  gap: 1.7rem clamp(2rem, 8vw, 7rem);
  padding-block: clamp(2.7rem, 4.5vw, 4.5rem);
}

.studio-layout p { margin-top: .8rem; max-width: 38rem; color: var(--muted); }
.studio-contact { padding-left: clamp(1.3rem, 3.4vw, 3rem); border-left: 1px solid #d5c8e9; }
.studio-contact .button { margin-top: .85rem; }

.site-footer { background: var(--night); color: var(--subtle-on-night); }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .65rem;
  padding-block: 1.4rem;
  font-size: .925rem;
}

.footer-inner a { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 650; text-underline-offset: .22em; }

@media (max-width: 1219px) {
  .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  h1 { font-size: clamp(2.6rem, 9.3vw, 4.6rem); }

  .section-heading { flex-direction: column; align-items: start; }
  .project-card:only-child { grid-template-columns: 1fr; }
  .project-copy { padding: 0 .25rem .25rem; }

  .studio-layout { grid-template-columns: 1fr; }
  .studio-contact { padding: 1.25rem 0 0; border-left: 0; border-top: 1px solid #d5c8e9; }
}

@media (max-width: 639px) {
  .hero-layout, .app-grid { grid-template-columns: 1fr; }
  .hero-family { justify-self: center; width: min(100%, 20rem); }
  .app-preview { height: clamp(14rem, 65vw, 17.5rem); }
  .app-copy, .linux-downloads .app-heading { padding: 1.2rem; }
}

@media (max-width: 520px) {
  .header-inner { flex-direction: column; gap: 0; padding-block: .15rem .35rem; }
  .brand { width: min(100%, 15.5rem); }
  .hero-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
